Thread Tools
Old September 20, 2001, 14:42   #1
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
A few Scenario Making Q's, please look! u can help
hey there, i need some help with my scenarios. i have made 3 or 4 that are close to finishing but ALL need messages added. can someone give me a step by step description on what files to edit and what to say to add messages to a scenario? for example, off the bat i want 3 messages to pop up, all three linked together with next-> and <-back buttons. the last one, i would like a scenario rules button that links to my great library CONCEPT_SCENARIO. i also would then like to add messages when the following things happen (please say how to do each one..)

when you are near an enemy city

when one of your cities is taken over

when you take over the enemy's capital city

when you conquer an enemy nation

when you step onto an enemy's territory (for the first time)

when your civ dies

thanks a bunch all it is appreciated...also...

how do you set the game to end at a certain point? for example, i have a scenario that needs to end when you conquer a certain enemy...or, you lose when a certain number of turns has passed. let's just say for example, i want the war victory movie and ending and score to show up when you conquer the Americans. also i want you to lose after (example) 20 turns. what would i have to say and where would i put it?

...and is there a way to factor in less turns u take = better score? how / where do i do this?

UNITS...big problems. i edit Units.txt in default gamedata but i think this is where the prob is. i also great library and gl_str. but when i load the scenario i get a large string of errors. how can i prevent this from always happening!? haha...

well thanks for reading i know i need help but please reply if u have answers to ANY of these. quote the part of my question you are responding to right before u answer it, if u would. thanks a bunch
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-
dw0914 is offline  
Old September 20, 2001, 18:01   #2
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 13:38
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Here's a few:

Quote:
for example, off the bat i want 3 messages to pop up, all three linked together with next-> and <-back buttons. the last one, i would like a scenario rules button that links to my great library CONCEPT_SCENARIO.
Sounds like you want your own version of the messages that pop up at the beginning of the WW2 scenario:

Code:
  //---------------------------------
 // Stuff to do when the game starts 
//-----------------------------------

int_t  NUM_PLAYERS;

HandleEvent(BeginTurn) 'dw0914_Start' pre {

	if(IsHumanPlayer(player[0])) {
            Message (1, 'dw0914StartMessage');
      }
      NUM_PLAYERS=preference("NumPlayers");
}

  //---------------------//
 // Start game messages //
//---------------------//

messagebox 'dw0914_Start' {
	Show();
	Title(ID__dw0914_START_TITLE);
	Text(ID_dw0914_START_A);
	Button(ID_BUTTON_NEXT) {
		Kill();
		Message(1, 'dw0914_Start_1');
	}
}

messagebox 'dw0914_Start_1' {
	Show();
	Text(ID_dw0914_Start_B);
	Button(ID_BUTTON_RULES) {
		Kill();
		LibraryConcept(72);
	}
	Button(ID_BUTTON_BACK) {
		Kill();
		Message(1, 'dw0914_Start');
	}
}

Quote:
when you are near an enemy city
"enemy" means "at war with"? I'm not sure this is a good idea, you might get a lot of messages.

Code:
HandleEvent(MoveUnits) 'dw0914_ApproachEnemyCity' pre {
int_t                 i;
int_t                 j;
army_t		tmpArmy;
location_t	tmpLoc;
city_t                tmpCity;
	tmpArmy = army[0];
	player[0] = tmpArmy.owner;
	if (player[0] == 1) {
		tmpLoc = location[1];
            for(i=0;i
Quote:
when one of your cities is taken over
Code:
HandleEvent(CaptureCity) 'dw0914_CapturedMyCity' pre {

     if(city[0].owner==1){
          message(1,'dw0914_CapturedMyCityMessage');
     }
}

messagebox 'dw0914_CapturedMyCityMessage' {
    show();
    Text (ID_M_dw0914_CapturedMyCityMessage') ;
}
You'll need to put the necessary strings in your scen_str.txt. It's really rather late here; I'll knock off a few more tomorrow (if Wombat doesn't beat me to it).

But you don't get off that easy. Tell us about these scenarios!

Edit: Something's not working here. I'll try again tomorrow.
Peter Triggs is offline  
Old September 20, 2001, 18:18   #3
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
re:
thanks a bunch

i am going to try some of those. WW2 scenario...well yeah like that but all scenarios start off w/ a few messages linked together. and approching city, i forget where i found that...but like when you are within viewing distance of a certain city, i want a message to pop up, saying stuff like " you see ____ (city name) in the distance. it looks strong...etc etc"...i will try it! thx

EDITED>>>>>>>> what file do you put those commands in?? i know how you correspond them to scen_str but the stuff u put in, where do you put that? ALSO PLEASE change the any part that says dw0914 to TD because the first scenario I need to get out is the 2001 Terrorist Defense. it's all set up...you know what take a look at it if you want. i am having trouble getting city names to show up...for some odd reason. NOTE THAT I AM NOT ASSUMING its osama bin laden. i just needed someones name to stick in there for now. ALSO NOTE the US gov't is Communism and not Democracy. this may turn a few heads but the US has too many units and Democracy has bad support. so i recommend reasearching global communications, then research technocracy. it has good support for military and is good all around. note lastly that the "terrorist nation" occupies way more than the middle east.

LAST THING how do i get it so japanese is not an option for my scenario when you are about to start it?? thanks all, download my scenario and pls help me! its down below.
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-

Last edited by dw0914; September 20, 2001 at 18:39.
dw0914 is offline  
Old September 20, 2001, 18:42   #4
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
MY SCENARIO NOT YET DONE
please read the above message on stuff about this scenario and pls help me out with the stuff i asked above. thanks! remember this goes in your scenarios folder. as i said DONT FORGET TO PLEASE POST RESPONSES to my first msg. thanks again.
Attached Files:
File Type: zip 2001terroristdefense.zip (117.6 KB, 12 views)
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-
dw0914 is offline  
Old September 21, 2001, 16:08   #5
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 13:38
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
1) I've added the files you need. You've just got to fix up the messages in scen_str.txt.

2) About the Japanese: I think you've got to have at least three players in a scenario. So you're going to have to add a proper third player.

3) The link to the Great Library is via the line "LibraryConcept(72);". You'll have to check out some of the other scenarios to see how this works. I don't know offhand.

4) It's untested but pretty straightforward so I think should work.
Attached Files:
File Type: zip 2001 terrorist defense.zip (118.0 KB, 11 views)
Peter Triggs is offline  
Old September 22, 2001, 02:26   #6
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 14:38
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Peter Triggs
2) About the Japanese: I think you've got to have at least three players in a scenario. So you're going to have to add a proper third player.
The Masada scenario has only 2 players, and seems to work fine.

Quote:
(if Wombat doesn't beat me to it).
Spent last night in a self-made bivouac freezing MAO. (wierd mental image now...). So I couldn't get to any computer

Anyway... dw, I'd give US corporate republic if democracy hasn't got the support, its not far off. (or change the support Coefficient in govern.txt)
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old September 22, 2001, 10:19   #7
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
OK i see u added my messages, they work at the beginning. now i have a new wave of questions...here is my updated list. peter or wombat, if u reply pls try to answer what u can thanks!

1) MESSAGES - in sight of city - peter, you added the message for this, but you were right. it sends the message every turn you are near a city!!! here is what i mean...this is straight out of scen_str in Alexander the Great scenario. how do i do stuff like this?

Code:
# Persian strings
AG_SCOUT_REPORT_A	"The peninsula of Asia Minor (Turkey) contains Persia's
 most important cities.
 These are the ethnically Greek cities on the west 
coast, where Persia gets most of its Hoplite soldiers.
 However, most of these cities are
 rebellious, and would eagerly await your liberating armies."
AG_SCOUT_REPORT_B	"The other major source of Persian power is in Phoenicia
 (Tyre, Sidon and Aradus). The Phoenicians 
man the large Persian navy. 
Scouts spotted a large Persian army near Dascylium,
led by General Memnon. 
Luckily, most of the Persian navy is supressing revolt in Egypt."
AG_SCOUT_REPORT_C	"Your first major task should be to control the 
southern and western coast of Asia 
Minor before the Persian navy returns to attack you."
AG_TYRE_APPROACH	"Control of Tyre is the key to controlling this entire region. 
But the people of Tyre aren't worried;
 their city is built on a hill and has 
very tough defenses. No one 
has ever successfully stormed this city.
 If you can, it would be a big boost to your reputation."
AG_TYRE_BESIDE		"Scouts report that Tyre is heavily defended! 
A direct assault now will likely result in 
many deaths on your side. 
A prolonged bombardment with many 
Catapults is highly advised to soften up the defenses."
AG_TYRE_CONQUER		"You have done the impossible and conquered Tyre!
 None thought that such a strongly 
defended city could be conquered by anyone.
 Your reputation is greatly boosted 
amongst nearby nations. The cities of the 
Corinithian League are especially less likely 
to cross you. They see that if you can conquer 
Tyre, you can conquer them."
what do i do for mine? i mean if i were to put that in my scen_str, except with AG replaced by TD and city names changed to the ones in mine, the messages wouldn't show up, would they?? this is what i meant by beside a city.

2) does anyone know how to make the scenario rules button link to CONCEPT_SCENARIO in the Great Library?
Quote:
The link to the Great Library is via the line "LibraryConcept(72);".
peter said that...does anyone know how to get this to work?

3) the WW2 scenario has it so you can only be 1 of 2 nations. mine is between the Americans and Terrorists but i don't know how you get it so you can't select Japanese, which was the third nation in there when i first made the scenario.

4) what would i edit in govern.txt to make it so you can support more units with democracy?

5) how do you make messages appear when either your civ dies or the enemies die?

6) how do you make the game end after a certain number of turns (you lose) i have been told this before but i forget what you say / where you put it.

7) how do you make it so your score is increased with the less turns you take? (you know, if you win in 5 turns you get more than winning in 6...well dumb example but you get the picture )

well i think thats it! try to answer those babies
i'm pretty sure you can tho before i get too smiley happy, i am gonna post my most recent 2001 Terrorist Defense file. please answer what you can, and edit my file if you need to. thanks!!!
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-

Last edited by dw0914; September 22, 2001 at 10:24.
dw0914 is offline  
Old September 22, 2001, 10:27   #8
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
here's the latest of my TD scenario. edit it only if you know what you're doing. read the above message to see what i need to do with this
Attached Files:
File Type: zip 2001terroristdefense.zip (119.1 KB, 10 views)
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-
dw0914 is offline  
Old September 23, 2001, 15:13   #9
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:38
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
(Note to all but Dan: I've been helping Dan out with his modmaking attempts through email on and off pretty much since CtP2 came out so if some things that I say don't make sense it's quite possibly because I'm referring to our earlier email discussions).

Dan,
Okay, forums, email, all the same to me. I didn't have time to look at your terrorist scenario yet (will do that sometime this week) but I'll finish up everything regarding the Foreign Lands scenario. If I'm forgetting stuff or if you have more questions, let me know. Below I attached a new version of the scenario with all fixes described below included. I named it the folder scen0001 so you can use it next to the existing one and compare the differences if needed or make changes to the original yourself if I did things you don't like or whatever. Don't forget to update the number in packlist.txt when you unpack the scenario or my scenario won't show up in the in-game scenario selection screen.

Units: for your convenience and to be able to test some stuff, I took the liberty or replacing the old units with the new ones for you and I reset the Fog of War for the human player to reflect this.

Great Library: In the version of the scenario I sent you yesterday the new units don't show up properly in the GL yet: they're their but they have the wrong texts. This is because you didn't add them to default\gamedata\uniticon.txt yet. All items from the GL should be in this file as well or they will simply not show up. All you need to do is copy the WAR_WALKER and MACHINE_GUNNER references and copy those, then renaming the relevant parts YOU and SPIDEY. Units.txt will then need to be adapted again, the Icon lines should refer to the ICON_UNIT_YOU and ICON_UNIT_SPIDEY that are in uniticon.txt.
Getting CONCEPT_SCENARIO to show up involves slightly more work. You also need to add a reference to it in uniticon.txt, as with the units, but you also need to add it to gl_str.txt and default\gamedata\concept.txt (and update the number at the top of the file). To make the button in the start message refer to the new rules, you need to know the index of CONCEPT_SCENARIO in the concept.txt file. This index is simply the line on which it is located in that file, in this case 44. This needs to be changed in the SLIC code. See my attachment on how I exactly implemented it all, I used the Alexander scenario as basis for these changes so icons and names and stuff are identical to those in that scenario.

Invisible Ship: I wrote the SLIC code to make the ship useless until you are right next to it, like the 7 Samurai scenario. It's now a unmovable Native American (I think) ship but it will change to a movable American ship when you walk right next to it (at what point a message will appear as well informing the player of what happened; if you want to change the text, it's in scen_str.txt). For me the code is extremely simple but I can imagine you might have a harder time understanding it (so no need to try unless you feel the inclanation to learn (basic) SLIC; I did comment it fairly well to help you understand it if you want to).

You really want to make Capitalization or Infrastucture or something else available for building because it's really annoying to play the scenario like this (just try and you'll see). Except for that, the scenario now plays fairly well, though I'm getting the idea that the human units are a bit too powerful, each one of them can easily knock out a large stack (unless it's very well balanced and inside a city) and together their virtually invincible (if you let them heal in a city every now and then). You'll want to at least fix that as well sometime and maybe add some cool features and something of a storyline, it's still a bit straight-forward like this (but you probably already knew that).

Damn, zip too large to attach. Oh well, get it from my website then, here.
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old September 23, 2001, 17:11   #10
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 13:38
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Good to see you back, Locutus! Thought we'd lost you to the CIV3 forums.
Peter Triggs is offline  
Old September 24, 2001, 16:14   #11
dw0914
Settler
 
Local Time: 08:38
Local Date: October 31, 2010
Join Date: Sep 2001
Posts: 7
uhm....hmmm
works good. i am going to try to edit it some more over the next few days, including making changes to the units. please look over my other Qs all...and locutus if u know any answers to those Qs please let me know too!
__________________
...feelings, sensations that you thought were dead, no squealing...remember that its -all in your head-

Last edited by dw0914; September 24, 2001 at 16:35.
dw0914 is offline  
Old September 28, 2001, 07:15   #12
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:38
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Peter,
Nah, you'll never loose me to Civ3, it's probably gonna be way to conservative for my taste. I participated in a number of history-related discussions lately because I've come to history but I certainly won't give up CtP2 for it... My schoolwork however is a much more real threat to my CtP time though, that's taking up 90% of my time these days (the little that I had left and that wasn't spent on school and civ3 was spent on medmod work)

Dan,
I had some time to look at your Terrorist scenario, here are some answers you've been looking for:

Quote:
Originally posted by dw0914
1) MESSAGES - in sight of city - peter, you added the message for this, but you were right. it sends the message every turn you are near a city!!! here is what i mean...this is straight out of scen_str in Alexander the Great scenario. how do i do stuff like this?
There was a number of things wrong with the code you were using for showing messages upon approaching cities. I changed the code so it now works like the Alexander scenario (see attachment). You'll need to keep track of all cities and other important locations in variables now, this requires you to declare a variable at the top of the file ('location_t Loc;') and fill this variable with coordinates in a special init-function ('MakeLocation (Loc, x, y);'). Then you need a function and a messagebox per city/location that actually displays the message. I attached a SLIC file with 2 examples, one for an American city (that gets triggered if Terrorists approach it) and one for a Terrorist city (that gets triggered if Americans approach it), you can use these as templates for other cities/locations. Simply replace the citynames with the name of the city you need, if needed replace the distance ('if (Distance(tmpLoc, kabulLoc) < 3) {') and if needed replace the player (1 = American, 2 = Terrorist; 'player[0] == 1' and 'Message(2, 'NearWashington');'). Let me know if you have any problems with this, all this should be fairly easy to understand when you actually see the files.

Quote:
2) does anyone know how to make the scenario rules button link to CONCEPT_SCENARIO in the Great Library?
My answers for the Foreign Lands scenario should be sufficient to help you out with this.

Quote:
3) the WW2 scenario has it so you can only be 1 of 2 nations. mine is between the Americans and Terrorists but i don't know how you get it so you can't select Japanese, which was the third nation in there when i first made the scenario.
No idea about this. I'd say just ignore it and warn people not to choose Japanese in a readme or whatever...

Quote:
4) what would i edit in govern.txt to make it so you can support more units with democracy?
Well, there are a lot of settings that can help: production settings (WorkdayExpectation, PositiveWorkdayCoef, NegativeWorkdayCoef, ProductionCoef), support settings (SupportCoef, TurnsToNewReadiness, ReadyPeaceCoef, DefenseCoef, etc), happiness settings (WarDiscontentMaxUnits, WarDiscontentPerUnit, ConquestDistress, HomeDefeatCoef, MaxMartialLawUnits, etc). Just play around with these things a bit until you're happy...

Quote:
5) how do you make messages appear when either your civ dies or the enemies die?
Well, the game already has a bunch of default messages for this, I guess you could simply adapt the messages for that (I think the texts for this are all in info_str.txt). If this isn't good enough let me know and I'll see if I can write some simple SLIC triggers for this.

Quote:
6) how do you make the game end after a certain number of turns (you lose) i have been told this before but i forget what you say / where you put it.
Well, some simple SLIC code should do the trick, something like this perhaps:
Code:
HandleEvent(BeginTurn) 'TD_EndGame' post {
	if (g.year == 20) {	// 20 is # of turns the game should last, change this to whatever is needed
		if (IsHumanPlayer(1)) {	// if player is American
			GameOver(1, 2);	// I think 1 is American, 2 means you lose, not sure though
			Message(1, 'TD_AmericansOutOfTime');
		else {
			GameOver(2, 1);	// I think 2 is Terrorist, 1 means you win
			Message(2, 'TD_TerroristStillAlive');
		}
	}
}

Messagebox 'TD_AmericansOutOfTime' {
	Show();
	Text(ID_TD_AMERICANS_OUT_OF_TIME);
}

Messagebox 'TD_TerroristStillAlive' {
	Show();
	Text(ID_TD_TERRORIST_STILL_ALIVE);
}

// TD_AMERICANS_OUT_OF_TIME "Large hordes protest in front of the White House, they're angry you still haven't
 avenged the horrible acts of terror properly, you have disgraced the reputation of the US and terrorists can 
continue to harass the free world unpunished. The Democrats and a significant number of Republicans 
are furious, an Impeachment trial is started and both House and Senate decide to depose you."
// TD_TERRORIST_STILL_ALIVE "The Americans aren't retaliating! Your terrorist network is thriving in every 
countryin the world, angry mobs are holding anti-US demonstrations and burning American flags in the 
streets of Kabul every day! Victory cannot be far away!"
Warning: I didn't actually test this code yet so I can't guarantee that it'll work (can't be far off though). I'll see if I can do that afterall tonight or tomorrow.

Quote:
7) how do you make it so your score is increased with the less turns you take? (you know, if you win in 5 turns you get more than winning in 6...well dumb example but you get the picture )
Well, you can't edit the actual score itself but you can introduce a new scoring system of your own, ala the Alexander scenario. This requires a bunch of SLIC code (can't make this code until you describe in more detail how this score should be calculated).

Hope that helps and let me know what other questions you have...

Wouter
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

Last edited by Locutus; September 28, 2001 at 07:21.
Locutus is offline  
Old September 28, 2001, 07:23   #13
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:38
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Oops, forgot to attach the SLIC file...
Attached Files:
File Type: slc scenario.slc (4.8 KB, 7 views)
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old September 28, 2001, 07:25   #14
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 15:38
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Just realized that the scen_str.txt file might come in handy as well...
Attached Files:
File Type: txt scen_str.txt (1.7 KB, 5 views)
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:38.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team