 |
|  |
 |
|
Stefan Härtel
|
 |
Eddie's best friend
Jul 1999 time: 06:31
|
|
It seems as though many scenarios today can't do without multiple events, rules, graphics etc. files. I'm personally a bit ambivalent about this. On the one hand, this stretches the limits of the game; while it doesn't remove them entirely, it grants you incredibly much space. On the other hand, however, changing your files every other turn can become a nuisance.
I'm wondering how other people think about this, as I'm currently working on a scenario idea. Yaroslav has pointed out that changing files every 12 turns could become tiresome. I think I agree with this, especially because the turns would be rather short, not as long as in "Red Front" or "Herbstnebel", but rather only about 10 units to move, so a turn wouldn't be longer than 1-2 minutes.
Imagine I'd double the amount of turns to 24 turns-that would propably still not do.
The problem is that it's not events, but rules and graphic files that would be changed. There is no way around it, if I want to do it the way I want to.
So, the question is, whether a files change every 12 or 24 turns would be acceptable or not.
Personally, I still favour the idea, if only because it isn't possible to do the things I want to otherwise.
|
|
|  |
 |
|  |
 |
|
Stefan Härtel
|
 |
Eddie's best friend
Jul 1999 time: 06:31
|
|
Well, some examples would be "Red Front" and "Second Front" by Nemo, "Herbstnebel" by Darthveda and "Imperium Romanum" by BeBro (all excellent scenarios).
File switching would be easy, by simply activating a batch file.
Maybe there are alternatives. Until now, I didn't want to say what I want to simulate, but it figures that this won't give too much of the scenario away; I want to simulate days on an hourly basis, with 12 daylight hours and 12 nightime hours, people sleeping, nightcamps and so on. This is about all I want to say right now.
Sleeping people and all that can be simulated by turninterval and givetechnology events, and Leonardo's Workshop, but I wanted day and night graphics. Thing is that events would propably be so large that file switching would be invetibale in any case.
The whole scenario would then last for several "days", maybe ten or so. That'd total to 120 turns on hourly base, 240 turns on half-hour base. I could make it longer, either by adding more "days" or shortening turn length to 15 minutes. The latter option would make files switching more bearable because it would happen only every 48 turns.
Of course, the turns could be a minute each, but in order to make that realistic, the map would have to be larger than possible, and the scenario would then be unbearably long.
Any ideas?
|
|
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
I'm probably gonna regret saying this, but...
If you force people to turn on autosaving, it might be possible to write a program that tracks what turn you're in. You'd also need to run that program, before you start, obviously.
(I'm not sure exactly when the game autosaves, but surely one would save at the start/end of each turn.)
This program could then automatically swap the files while you're playing.
If Civ2 autosaves at the start of a turn, the program could even copy the autosave and remove the events.
A text event in the game would then simply tell you to load this newly created savegame.
That would pretty much automate the whole process. You only have to start a program before you start the scenario, and load a new savegame when asked.
If civ2 memory becomes involved, things could be made even more advanced. So you wouldn't even need to do any file swapping or reloading, just start a program.
But this is all purely hypothetical. I'm just rambling about! Please don't make me do this! No... NOOOO! 
Well, seriously, there might be some possibilities there... But equally seriously, I don't have the time.
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
Right...
As usual, I wasted my evening trying to work something out.
I attached a little example scenario (the CiC Alexander scenario, so I guess it should work on CiC/FW/MGE).
Before you start the scenario (it doesn't really matter when, as long as it is before the first swap on turn 4) start the CivSwap application.
The rest you should be able to find out as you go along.
I don't have any fail-safe routines built in, so if you would do anything I didn't expect in the batch file or so, CivSwap is likely to crash.
It obviously also slows down your computer a bit, since it constantly tracks whether the autosave has changed.
I don't know exactly how much, but I didn't notice too much on my rather old PII 350MHz PC (except when the files are being swapped).
If you want to know how it works, you'd have to look at the CivSwap.ini, swap.bat, events.txt and events2.txt files.
There are a few more things you would need to know before you start using it as a scenario creator, but you'd better try it out before I go into any further detail.
CivSwap attachment is now here.
Last edited by Mercator on 15-10-2003 at 20:32
|
|
|  |
 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
quote: Originally posted by Boco
CivSwap.exe generates a %2 to pass on to Swap.bat, right? |
Yep, CivSwap appends the name of the autosave as an extra argument.
quote: Does it have an input dialog that allows you to edit the name of %2 to use for other "XX"'s? Or does it simply look for any new file whose name contains "_auto.sav"? |
When CivSwap is started, it starts looking for a file called "??_auto.sav", where ? can be any character, that is more recent than the CivSwap program startup time.
There should only be one... unless you're playing the same scenario on different instances of civ2 simultaneously .
That file (with the "??" resolved) will be the one that is monitored for changes, and that file will be passed as the argument.
You can see the name of the file in the CivSwap titlebar.
quote: How is the 4 and 8 in the ini file used to determine the correct file to use? Works for any time scale? |
4 and 8 are the civ2 turn numbers. They correspond to the turn numbers used in the events file.
As you can see in the CivSwap.ini, the swap.bat is called with an argument ("weird" or "normal" in this case). That argument is used in the swap.bat batch file (as %1) to determine which operations to perform.
Since CivSwap calls the batch file with arguments, it would still be possible to do the swapping manually too.
That is, after the IF statements, instead of GOTO end I could have added the usual choice menu. That way people can do the swapping both manually and automatically.
quote: Am I missing some basic stuff or jumping way ahead on the project timeline? |
You're missing some basic stuff. 
And you didn't actually play the scenario, did you? You just looked at the text files... 
CivSwap is still a bit buggy, but fortunately, that doesn't have any consequences in this case. The bug kind of resolves itself... But there are still a few things to fix.
Oh yes... As usual, CivSwap would require the VB6 Run-Time Files. But everybody already has those of course, since everyone has MapEdit. 
If you don't, you can download them from my utility website:
http://www.civgaming.net/mercator/mapedit/
quote:  |
Bastards! 
|
|
|  |
 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
No problem, but trying it out will give you a better idea of how it works. I's really only 12 short turns anyway.
Well, "my scenario", It's the CiC Alexander scenario. On turn 4 it swaps to the CiC Apocalypse graphics (and new "events"), on turn 8 it switches back.
And that's what it does indeed... But you wouldn't learn it by starting the scenario. CivSwap only gives 3 clues about how it functions:
- When it is searching for the file the title bar says "Searching..."
- When it has found the file ithe title bar gives the name of the autosave.
- When it is executing the batch file, the title bar says "Executing..."
After it has found the file, CivSwap goes into an infinite loop. It keeps checking whether the filedate has changed. When it has (i.e. it is your next turn), it will read the turn byte (It will work on all Civ2 versions, by the way, incuding ToT).
If the turn matches one of the turns mentioned in the INI, it will launch the "command line" you specified for it.
That command line doesn't actually have to be a batch file, by the way. You could launch any program...
Now I think of it, you could perhaps automatically launch MapCopy (to do some major terrain changing) or some custom program that hex-edits the savegame.
Of course, since you still have to reload, you'll lose most of the surprise, but it has some potential there... Kind of a poor-man's CSPL.
I think I'll post a new thread for CivSwap soon, I fixed a few things, so I think it's "done"... Not to mention this is technically a threadjack, although it is related to and a possible solution to Stefan's dilemma.
|
|
|  |
 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
quote: Originally posted by fairline
Damn, this boy's good! |
Thank you.
quote: How does this work with XP, as I see you don't have Choice.com and there's a batch file? |
The choice is only necessary if you have a menu. But using CivSwap you don't need a menu anymore, since it is all automated... However, it is possible, and might be advisable to also add a menu for people who can't or won't use CivSwap.
quote: Oh, and being a numpty, I didn't get it to work - I had a 'Monitor error 53 - 4' when the scenario started and the units file was never changed; the 'surprise.sav' was not created. |
I must've attached the wrong version. That was a "debug" version I made to track that bug down. I fixed that now.
Here's the latest version. There's only one noticeable difference: the autosave filename is not attached automatically anymore. Instead, you should use the $AUTOSAVE "variable". It will be replaced with the autosave filename (not the full path by the way, just the filename).
I think I'll post the new thread as soon as other people have confirmed it works, and when I've written a readme/user's guide for it.
EDIT: fixed another bug.
Attachment: autoswap.zip
This has been downloaded 6 time(s).
Last edited by Mercator on 15-10-2003 at 21:22
|
|
|  |
 |
|  |
 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:31
|
|
quote: Originally posted by Stefan Härtel
It works the first time. The second time, it won't change the events file. It's a bit complicated I think. I was in turn 9 (after having loaded surprise.sav in the concerning turn) and nothing happened; but when I loaded original.sav, the gif files were correct, whereas they weren't before. |
So it had made the changes, but didn't add the events correctly?
Or did this happen the second time you "played" the scenario, and did you only do the first swap the first time you played?
Anyway, this scenario already swaps back the old files. But in most cases that obviously won't be the case.
Maybe I should add a "reset" button. That reset option would then launch the part of the batch file that resets all files back to ther original locations.
By the way, do any of you see the MS-DOS windows still open (minimised), or are they all automatically closed?
They stay open for me. Not intentionally, but because of that they kind of work as a debugger. You can see if anything failed.
quote: Also, is there some way of making this compatible with the German version? I mean, is it enough to add a further line to the batchfile saying that it should create the German files as well? |
Yes, I think it is.
CivSwap launches batch files at set turns, everything else needs to be specified (as usual) in the batch file.
The easiest is probably to always copy the German files along as well.
Another possibility would be to create separate batch files for English and German (e.g. swap.eng and swap.ger), and a separate "install" batch file that then renames one of those to swap.bat.
|
|
|  |
All times are GMT. The time now is 05:31. Apolyton Time is 00:31. |
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
|
|
|
|
|
|