Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Scenario Events and stuff
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 09-12-2002 19:47 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Scenario Events and stuff Avatar Enlargement: We've got the solution

Can someone answer a few questions, mostly slic related...

1. How do i stop all players from using ANY diplomacy at all with each other via slic? Including stopping the human from initiating diplomacy.

2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...

3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?

I think i could probably dig some of these answers from the Alexander scenario etc eventually but it never works when i try to hack pieces from it.

Okay ive got plenty more questions, but these will do for now.

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:24
  Old Post 09-12-2002 20:22 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Re: Scenario Events and stuff Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by Maquiladora
Can someone answer a few questions, mostly slic related...
1. How do i stop all players from using ANY diplomacy at all with each other via slic? Including stopping the human from initiating diplomacy.

You don't need SLIC, just go into diplomacyproposal.txt and add
Disabled
to all of the proposals you want to turn off



quote:
Originally posted by Maquiladora
2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...

I'm guessing that you will have to create a new unit and then create a SLIC trigger for the actual event (Ben says that it is easy to do, and I'm hoping to see it pulled off in War of the Ring), but if all you need is a message at the beginning of the game, I hijacked Dale's Diplomod messagebox (diplomod_str.txt) and used it for my own beginning game message. You need to be using Diplomod though.



quote:
Originally posted by Maquiladora
3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?

Another thing that I would like to see in War of the Ring, so I'm hoping the SLICers can pull some magic out of their hats...

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:24
  Old Post 09-12-2002 23:23 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Re: Scenario Events and stuff Support Apolyton or Terrorists Win

quote:
Originally posted by Maquiladora
2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...

If you can guarantee it's location at the beginning of the game, then you don't need to define a new unit. If you cannot, then by far the easiest way is to have a UNIT_HMS_REPULSE.

Then you need something like this:

code:
HandleEvent(BattleAftermath) 'is_hms_repulse_still_around' pre { int_t i; unit_t tmpUnit; int_t here; // assuming REPULSE owner is 1 for(i=0; i < PlayerUnitCount(1); i = i + 1){ GetUnitByIndex(1, i, tmpUnit); if(tmpUnit.type == UnitDB(UNIT_HMS_REPULSE)){ here = 1; } } if(!here){ message(1, 'hmsrepulse_dead'); } } messagebox 'hmsrepulse_dead' { Show(); Title(ID_HMS_REPULSE_DEAD_TITLE); Text(ID_HMS_REPULSE_DEAD); }


quote:

3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?


Without going in to too much detail, you'll need to know the locations they'll be spawned in, do CreateUnit functions for each one (as used in the AtG scen), then store each one, probably best to use a unit array. Then on the next beginturn for their owner, check they're still alive, and use a MoveOrder or Battle order perhaps to force the attack. I don't know if this works properly.
Try looking at Peter Triggs reSLICed WW2 scenario. This might have examples of this kind of thing.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:24
  Old Post 10-12-2002 03:13
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

1.

code:
HandleEvent(NewProposal) 'StopAllProposals' pre { return STOP; }


Even if the human sends a proposal the diplo screen will close and nothing happens.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 03:17 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Thanks to all Thats got a few out of the way.

Im gonna work a little on my own slic writing while i work on the cosmetics of my scenario so i wont be asking anymore just yet.

By the way, what does cityid.txt do exactly? Been staring at it for the past 2 hours and i still dunno. It wasnt modifed for citymod2 though, so im guessing its defunct or i just wont need to change it.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:24
  Old Post 10-12-2002 03:17
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

3. Can be done with a variation of the frenzy AI. :

And use three events in a beginTurn handler:
CreateUnit
MovePathOrder (to be close to the city, doenst work properly to move one tile)
MoveOrder (to move inside the city)

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:24
  Old Post 10-12-2002 03:20
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:

what does cityid.txt do exactly?

Nothing. CTP1 Left over.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 03:32 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Full PM-box? Change here!

Ah okay, good.

One more question, if i create an event for say: if the human player attacks the Neutral Civ they get all gold taken away for 10 turns. But make it so the human can still pay upkeep+wages, but limit them to no rush buying money, perhaps change the gold amount to 100 after the turn has been played ready for next turn. Also i want to prevent the AI from attacking the Neutral Civ, civ number 7.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:24
  Old Post 10-12-2002 04:12
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

The new Question: UNTESTED and May Contain Syntax errors

code:
int_t PlayerRemovedGold[]; HandleEvent(BattleAftermath) 'BlaBlaBlabyPedrunn' pre { int_t tmpGold; if(IsHumanPlayer(player[0])) { if (GetEffectiveRegard(player[0], Player[1]) > 300) { PlayerRemovedGold[player[0]] = PlayerGold(player[0]); AddGold(player[0], -PlayerRemovedGold[player[0]]); } } } HandleEvent(EndTurn) 'BlaBlaBla2byPedrunn' pre { if(PlayerRemovedGold[player[0]] != 0) { AddGold(player[0], PlayerRemovedGold[player[0]]); PlayerRemovedGold[player[0]]= 0; } }


I gotta adimit i dont like this idea at all .

Last edited by Pedrunn on 10-12-2002 at 04:19

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 05:10 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Dont worry im saving all these

Yeah im not sure about that either, but i dont want to completely stop the player from not being able to attack the neutrals, but i also want to give the human a penalty if they choose to attack at some point, ill see.

Im planning plenty of events, mostly attack/message popup related, but this would provide the human with a good strategic choice too.

Pedrunn is offline Pedrunn
King
of Natal, Brazil
Jul 2001
time: 02:24
  Old Post 10-12-2002 07:02
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Remove this text

quote:
if i create an event for say: if the human player attacks the Neutral Civ they get all gold taken away for 10 turns.

The code removes all the gold from the human player if they attack a nutral civ only for one turn. And thats all it does

Last edited by Pedrunn on 10-12-2002 at 07:08

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 13:22 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Full PM-box? Change here!

Yeah i read that part right then. I guess thats not as bad, but as the human will know the consequences for attacking a neutral nation, they could spend all their money before they attack so it doesnt get taken away.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:24
  Old Post 10-12-2002 17:11 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

er... is the only other use for gold rush-buying? It would be much easier to prevent that, rather than messing with the amount of gold they actually have.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 17:29 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Browse Apolyton AD-FREE

cross posted abit there

quote:
Originally posted by Immortal Wombat
er... is the only other use for gold rush-buying? It would be much easier to prevent that, rather than messing with the amount of gold they actually have.


Yeah, i just dont want the human to have the ability to rush buy units if they want to gain an advantage by attacking a neutral. But i think taking away their money for several turns and giving a popup telling them, has more atmosphere, no?

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 10-12-2002 17:35 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton or Terrorists Win

Or,

If say, Britain attacks a Neutral city, Germany and Japan receive 5000 gold each, sort of like the Neutrals paying for help but no need to deduct the Neutrals money because theyll be unplayable and no one will notice.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 16-12-2002 19:21 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Inflate your Upload Space

Okay i need good ideas for turnlength.

Currently the scenario lasts 46 months in real life, and i ideally want the scenario to last around 150-500 turns. Just some ideas,

1-8 Jan
9-16 Jan
17-24 Jan
25-31 Jan
1-8 Feb (or 7-14 Feb)
etc
... or

Week 1 Jan
Week 2 Jan
Week 3 Jan
Week 4 Jan
Week 1 Feb (or Week 5 Feb)

Which do you prefer? Keep in mind i want it to last over 150 turns and not anymore than 500, and also each turn to be an equal increment. I cant decide which one i like. Obviously length of the scenario is most important because all the ideas and events will fit around it, not to mention growth and science costs. Any other ideas welcome...

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:24
  Old Post 16-12-2002 20:46 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Help yourself to an AD-FREE life

the latter

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:24
  Old Post 17-12-2002 22:51
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

I like the 2nd choice as well... Just looks "cleaner" I guess.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 17-12-2002 23:20 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Help yourself to an AD-FREE life

Okay that one it is. Although itll have to be,

Wk 2 Dec 1941
Wk 3 Dec 1941
Wk 4 Dec 1941
Wk 1 Jan 1942

so the year fits in the little turn box.

A new question: How do i stop all players from changing government? Aside from giving them all seperate advances for each of their governments. Ideally through nice clean slic code.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 18-12-2002 00:12 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Inflate your Upload Space

Okay nevermind i figured out a way to do it. Ill give each nation a new strategy in strategies.txt and define only one government for each. Like it was done in the Activison ww2 one. I was gonna give each government a new strategy anyway so...

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 19-12-2002 02:04 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Remove this text

How do i immediately start a new line in a messagebox? Is it possible?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:24
  Old Post 19-12-2002 05:26 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Insert \n for a line break. Locutus mentions it in the SLIC oddities thread

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 19-12-2002 05:55 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Support Apolyton or Terrorists Win

I should read more. ta

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 19-12-2002 10:06 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Does \t actually work for TAB? Only when i used it it seemed to move the line left instead, sometimes even left off the edge of the messagebox window.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:24
  Old Post 19-12-2002 22:52 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

I've never tried it personally. A string of spaces usually serves.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 19-12-2002 23:05 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Support Apolyton buy from Amazon

Yeap, using that now.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:24
  Old Post 20-12-2002 03:00 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Support Apolyton buy from Amazon

Well, I never tested the \t properly, only once or twice and it seemed okay. I wouldn't be surprised at all if it was buggy - trying to combine C and SLIC never sounded like a particularly good idea to me in the first place - that's like asking begging for trouble

BTW, do you mind if I move the citystyle related posts to a seperate thread? It contains some *very* useful info but for future reference it would be much easier to find if it was in a seperate thread rather than as part of a big and general discussion like this one...

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 20-12-2002 03:30 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by Locutus
BTW, do you mind if I move the citystyle related posts to a seperate thread? It contains some *very* useful info but for future reference it would be much easier to find if it was in a seperate thread rather than as part of a big and general discussion like this one...


Yeah go ahead, my threads always seem to meander off into other subjects but then i suppose most threads do that in this forum.

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:24
  Old Post 27-12-2002 19:07 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton, buy Civilization 2

Okay after placing more cities and tile imps than i care to count i can start building some events for this thing, so things which i would like to use;

1. Spawn unit/s at given location on a given turn for a certain Civ and group all units at location into an army.

2a. Move an army on a given turn to attack another enemy army.
2b. Move an army on a given turn and bombard a city or enemy army.

3. well im sure there will be...

Ive looked through all existing scenarios but couldnt find anything clear with these. Can anyone give me some simple pointers on doing these?

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:24
Post  Old Post 27-12-2002 21:00 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Tired of ads?

I have here a piece of code that was able to make an army to attack a city that is on a neighbor tile of that city. I tried something like this recently. But I failed as far as I figured it out I wasn't able to group the just created units into one army.


code:
void_f MG_SendTroopsTo(location_t theLoc, location_t theGoal) { location_t MGLoc; location_t MGGoal; army_t MGArmy; unit_t MGUnit; MGLoc = theLoc; MGGoal = theGoal; if (GetUnitsAtLocation (MGLoc)>0) { Event:ActivateAllUnits(MGLoc); GetUnitFromCell(MGLoc, 0, MGUnit); GetArmyFromUnit(MGUnit, MGArmy); Event:Battle(MGArmy, MGGoal); message(1,'MG_TestMessage'); message(MGArmy.owner,'MG_TestMessage'); } }


If you want to group all units at agiven location into one army you could use this event:

GroupOrder(army_t);

But note that you can't do anything with this army on the same turn, because all the events are executed afterwards the current event handle and all called events before were executed.

For the rest I suggest to consult also slci code that is not part of scenarios, the BetteraAI code contains some stuff about grouping single units into an army and has also some stuff about moving armies if you want to make the army to attack someone you needs the battle event.

-Martin

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:24.
Apolyton Time is 00:24.
    top of page
Rate This Thread:
archivepost
Forum Jump:
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
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0830 seconds (93.08% PHP - 6.92% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net