 |
|  |
 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:15
|
|
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
|
|
Gone Fishin, Canada
Jan 2000 time: 05:15
|
|
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.
Attachment: 2001 terrorist defense.zip
This has been downloaded 10 time(s).
|
|
|  |
 |
|  |
 |
|
dw0914
|
|
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!!!
Last edited by dw0914 on 22-09-2001 at 19:24
|
|
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:15
|
|
(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.
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:15
|
|
Good to see you back, Locutus! Thought we'd lost you to the CIV3 forums.
|
|
|  |
 |
|
dw0914
|
|
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! 
Last edited by dw0914 on 25-09-2001 at 01:35
|
|
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:15
|
|
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
Last edited by Locutus on 28-09-2001 at 16:21
|
|
|  |
All times are GMT. The time now is 05:15. Apolyton Time is 00:15. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|