 |
|  |
 |
|
Cyrion
|
 |
Caught somewhere in time
Jan 2002 time: 06:17
|
|
quote: Originally posted by Patine
This question is directed mostly a Mercator (whatever variation of that name he's using now) or anyone familiar with his work, but any other answer would be helpful. I want to set up a situation whereby a trigger occurs, and then, on that turn, and every n turns thereafter, something happens. I've heard Merc has a new utility that can manage that (unless I'm mistaken) but can someone tell me how to do that in a workable way, please? |
No, I'm not Mercator DL!
Should your event be a unit creation, here is what you could do (if the desired spot isn't a city!):
1) write an event creating a unit in that spot every n turns
2) place a "impassable" (defense of 90, move 0, NONE) on that spot from the start
3) when the trigger occurs, use a "change terrain" event on the desired square to wipe the impassable" unit: from then on, the event described under 1 will work just fine (as long as the spot isn't occupied by a unit belonging to another civ, of course!)
If your event is NOT a unit creation, please specify, and maybe we'll find a solution around the problem! 
|
|
|  |
 |
|
AGRICOLA
|
|
Canadian bush & Florida
Feb 2003 time: 00:17
|
|
quote: Originally posted by Patine
I want to set up a situation whereby a trigger occurs, and then, on that turn, and every n turns thereafter, something happens. |
Do you mean "on that turn and for n turns thereafter" or "on that turn and every n'th turn thereafter"?
|
|
|  |
 |
|
AGRICOLA
|
|
Canadian bush & Florida
Feb 2003 time: 00:17
|
|
From what I understand, you don't know beforehand the number of the turn during which the trigger will occur.
If you did know the number (e.g. 15), you could write an EVENTS file where the desired event would take place on turns 15+n, 15+2n etc , and use the standard procedure of having the player go through the procedure to replace the original at the end of turn 15
However, with no dynamic programming available in EVENTS, all that I can think of right now is to make a series of EVENTS files, where each file would assume that the trigger event occurs on a different turn. There would have to be enough of these files to cover all eventualities.
When the trigger event occurs, the original EVENTS would display a message to finish the turn, save the game under a particular name, exit and open a file to select the present month & year. The process would be the same as is currently used to switch EVENTS (and other files), except that you would probably have a much longer list of options to choose from. There is no question that this is a terrible, brute force approach.
I’m really talking off the top of my head here because 95% of my programming experience is with FORTRAN, but I can’t help wondering if the programming language available in Windows (I don’t even know what it’s called) can’t be used to accept turn# as input, use it to modify an existing EVENTS file, and then carry out the exchange of files. How difficult would it be to modify CivSwap?
Last edited by AGRICOLA on 22-04-2004 at 22:14
|
|
|  |
 |
|
Elok
|
 |
Land of Ramen Dragons
Mar 2003 time: 00:17
|
|
ToT can lick my nuts. Hmph.
Anyway, you might reconcile Cyrion's method with your needs this way:
Events.txt is set to create a unit for Tribe B every, say, three turns at a certain spot. That spot is occupied by an invicible unit of Tribe A's supported from the city to be taken, which is right next to it. This unit, named Lord of Town X or whatever, is an immobile diplomat/fanatic with absurd defense, so there's no reason to disband it and it can't be moved or rehomed in any way. He's sort of the town's watchman, and his ZOC blocks enemy approach from a certain point without bothering the citizens of Tribe A. When the city is taken, of course, he vanishes, and henceforth every three turns a thingamabobber is created at that spot. If you wanted to guarantee it, you could create a superunit there for Tribe B when the city is taken.
Alternately, just eventgive a tech to the attacker when it takes the city, and make the desired events occur with the possession of that tech, WITHOUT the justonce trigger. It'll have to be *every* turn, of course, but such is life.
|
|
|  |
 |
|
Elok
|
 |
Land of Ramen Dragons
Mar 2003 time: 00:17
|
|
EDIT: DP, whoops!
Last edited by Elok on 23-04-2004 at 01:42
|
|
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:17
|
|
I should really reload a thread before I post. That was a bit of a late "crosspost" there (edit: damnit! again)... Modifying CivSwap would be quite possible, I'm not sure how long it would take, but it's not gonna happen anytime soon.
But, now you mention it, something like what you said can be done with batch files + CivSwap... That is, if there's a relatively small range of turns (or actually, that doesn't matter, except the civswap ini file will get rather big)...
Let me see... Suppose the city will be captured in turn 2, 3 or 4.
- In your original events.txt you will have the CityTaken event. This will trigger a text event saying that the user should load a new savegame (as created by CivSwap).
- You let CivSwap swap events files on the very first possible turn (2 in this case).
- You also let CivSwap "delevent" a copy of the autosave on each of the possible turns (2, 3 and 4).
Edit: it shouldn't edit the autosave itself! But rather a copy of the autosave! (Otherwise people could accidentally get the new events, if they're used to loading autosaves)
- Because the player only reloads the game after the turn the city is actually captured, the change in events will only take effect in that turn.
I think that's enough, actually. The new events file will add a TurnInterval event creating the units, and you're set.
This will of course mean CivSwap will get lots of unnecessary action... And cheating players could reload that new savegame even when that city wasn't captured... or not load any new savegame at all, if the new event creates enemy units, of course.
Last edited by Mercator on 22-04-2004 at 23:02
|
|
|  |
All times are GMT. The time now is 05:17. Apolyton Time is 00:17. |
top of page
|
|
|
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
|
|
|
|
|
|