 |
|
Jacobite1688
|
 |
Chicago, IL U.S.A.
Jul 2001 time: 23:19
|
|
Oooh, an answer already, thanks. It started to work somewhere around 12.5 K.
Last edited by Jacobite1688 on 28-05-2002 at 02:06
|
|
|  |
 |
|
Jacobite1688
|
 |
Chicago, IL U.S.A.
Jul 2001 time: 23:19
|
|
Just as a little test, a .sav file was 168 K. I ran delevents on it and it is now 156 K. the events that were coded into the file are 6.36 K. Another example is: Al-andalus.sav = 189 K / events = 12.3 / delevent .sav = 160K - Hmmm....
Last edited by Jacobite1688 on 28-05-2002 at 04:39
|
|
|  |
 |
|
ravagon
|
|
Australia
Sep 1999 time: 13:19
|
|
Well, you learn something new every day I guess. Everything I've tried (for FW) seems to have topped out at a little under 25K.
Is there any guide for establishing rough normalized quanta for particular event types or is it more complicated than that? ie: Event combinations not equal to the some of their parts or somesuch...
|
|
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:19
|
|
I just had a little look at the savegame, and it's a bit more complicated than I thought it was.
The events part seems to be split in two parts, a large portion of "rubbish" (events compiled into at first sight incomprehensible code) and at the very end a string table (all the text from the events squashed together)...
And the very start of the events section there's a number that says: 32768 (I have FW), which is presumably an indicator of the max size of events.
I immediately tried changing it to the maximum possible value (around 2 billion)... Of course, that doesn't seem to make any difference, since the events are already there. But Civ2 has a habit of resetting values... Not this one. After playing a little more and after a few events had taken place, that value was still 2 billion.
If that value really is "THE indicator" that might be some good news. Once we figure out that events code, we might be able to compile the events ourselves, add it to a savegame and set whatever maximum we damn well please ourselves!
Another possibility is to find where in the executable this value of 32768 is set, and change that, which should also allow bigger events.
In other words, there's plenty of reason for us to start up our hex editors! 
( Interesting how such a seemingly simple question seems to have revealed a possible major Civ2 breakthrough)
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
ravagon
|
|
Australia
Sep 1999 time: 13:19
|
|
Merc, I kind of hate to say this but why would an apparent events file size tag in the savegame have any effect?
If its a part of the savegame after events have been embedded but not before then it came from the exe right? Or am I missing something?
The key question as to whether or not that number makes a difference should be able to be solved by trying to embed events files with drastically different sizes. Taking into account your previous note about different events files having different (not necessarily comparable) sizes you should still see some difference between a 1kb event and a 25kb event. If both of the savegames came up with the same number then its a red herring I'd think.
[Edit: Actually, scratch that. Now that I think about it that logic doesn't necessarily follow although any effect would still have to rely on the exe getting it from the savegame which sounds a little unlikely to me]
Finding the part of the exe OTOH sounds like a plan indeed ... 
Last edited by ravagon on 30-05-2002 at 07:28
|
|
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:19
|
|
OK... So my try with CiC didn't work out quite the way I hoped. I changed all occurrences of 16K to 24K and there was no difference. That probably means the event size limit is not a long integer (range up to over 2 billion), but a short integer (up to 32K). So the maximum CiC event size would be smaller than the current FW maximum. Moreover, there are more occurrences of short integers with a value of 16K in the CiC executable than there are occurrences of long integers with the value 32K in the FW executable. In other words, the advantage I hoped I would have in first examining the CiC executable isn't there.
Now, let's only hope the FW event heap size is a long integer, not a short integer. If the latter is the case, 32K will be as big as we can ever get.
Apart from that, it doesn't seem to be a very smart thing to do to open CiC scenarios with the FW scenario editors. It showed more actions than there really were to a trigger. If I'd click on one of those non-existant actions, Civ2 would freeze.
That brought me to another "discovery", while in FW the events data is stored in the savegame, in CiC it's not! I verified it using this event:
@IF
CITYTAKEN
city=Rome
attacker=ANYBODY
defender=ANYBODY
@THEN
JUSTONCE
TEXT
Boo!
ENDTEXT
@ENDIF
AFAIK, JustOnce is the only event structure that should require some memory, to remember it if you save and reload a scenario. If no record is kept whether this "once" has already occurred, the action can occur once each time you load a savegame from the scenario.
And indeed, if you save and reload, the "Boo!" message will appear again when it shouldn't.
I don't know if this is a very interesting, or perhaps already well-known fact... But anyway, now you know.
I've now also tested the FW executable. I changed all long integer occurrences of 32768 to 65536, and the debugger refused the events (just over 32K). This doesn't look very good. 
Ahem... And that 32768 I found in the events section of a savegame was just chance I guess. I haven't found it in any other savegame yet, so it probably isn't the size indicator. By the looks of it, I was a little early screaming about infinite events. 
On the other hand, I might be able to decipher the events code, but that'll take time, and I really can't do that on my own... And even then, assuming that this code in the savegame is loaded into the events heap in memory, we'll probably still have to deal with a preset maximum, which is probably at it's maximum of 32K already.
*sigh* It was fun while it lasted. 
Any suggestions?
|
|
|  |
All times are GMT. The time now is 05:19. Apolyton Time is 00:19. |
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
|
|
|
|
|
|