May 27, 2002, 16:00
|
#1
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
Maximum # of Events in FW?
What is it? Something is crashing out my new scenario, and this HAS got to be the problem. Any help on this matter would be great.
|
|
|
|
May 27, 2002, 16:16
|
#2
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
AFAIK, There's not a fixed number. The amount depends on what sort of events you have and how complex they are (or something).
If you suspect it's the problem, try deleting most of your events and see if it works. If it does, add events until it goes wrong again.
Or open it in the FW editor and see what the indicator there says (although I'm not sure if doing that might screw up the events).
|
|
|
|
May 27, 2002, 16:28
|
#3
|
Local Time: 21:24
Local Date: October 31, 2010
Join Date: Jul 2005
Location: In search of pants
Posts: 5,085
|
The limit 16368 bytes, but the space is shared to the effect that it is actually a little less.
|
|
|
|
May 27, 2002, 16:33
|
#4
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
The problem is indeed the size of the event file. Now, what is the limit?
|
|
|
|
May 27, 2002, 16:34
|
#5
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
Oooh, an answer already, thanks. It started to work somewhere around 12.5 K.
Last edited by Jacobite1688; May 27, 2002 at 17:06.
|
|
|
|
May 27, 2002, 18:17
|
#6
|
King
Local Time: 02:24
Local Date: November 1, 2010
Join Date: Jul 1999
Location: Some cold place
Posts: 2,336
|
For some strange reason, the maximum size for events files varies from version to version. Jesús Balsinde, for example, repeatedly told me the size of his events file was at the maximum limit, which was at around 14 KB. The size of the events files of Capt. Nemos multiple events scenarios are between 16 and 19 KB.
In my scenario Artaxerxes, I made the events file with the FW editor, and when it was "full", the size was 17 KB. Somewhere else, one of my manually made events files was up to 21 KB.
__________________
Follow the masses!
30,000 lemmings can't be wrong!
|
|
|
|
May 27, 2002, 19:07
|
#7
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
It's not the size of the file that's the problem, it's the size the events will occupy in the stack space in Civ2. Those things are probably in the same vicinity, but not exactly the same. It depends on what kind of events you have etc.
|
|
|
|
May 27, 2002, 19:12
|
#8
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
This seems to make sense, as I have already gotten it to work with different version of the event.txt file that were larger in size but had different content.
|
|
|
|
May 27, 2002, 19:19
|
#9
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
In savegames of scenarios, the events are in some way attached at the end of the savegame (which is the part that is thrown out when running delevent). I imagine that part of the savegame is limited to 16K.
And that part doesn't look like the events.txt is pasted onto the savegame.
Now this events limit wouldn't be just a little number somewhere in the Civ2 executable (like the money limit) now would it??? That would be mighty fine... Unlimited events!
|
|
|
|
May 27, 2002, 19:27
|
#10
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
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; May 27, 2002 at 19:39.
|
|
|
|
May 27, 2002, 20:03
|
#11
|
Emperor
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
Quote:
|
Originally posted by Mercator
It's not the size of the file that's the problem, it's the size the events will occupy in the stack space in Civ2. Those things are probably in the same vicinity, but not exactly the same. It depends on what kind of events you have etc.
|
Mercator is right. It's not the external size of your text file, but the available space, or 'heap' available in the Civ program itself. For Civ2 Scenarios it was 16KB, in FW/MGE it was 32 KB, and in ToT it's 100KB.
|
|
|
|
May 27, 2002, 20:44
|
#12
|
King
Local Time: 20:24
Local Date: October 31, 2010
Join Date: Sep 2000
Location: of the Benighted Realms
Posts: 1,791
|
So then . . .
Is there any way to enlarge the size of the heap?
__________________
Lost in America.
"a freaking mastermind." --Stefu
"or a very good liar." --Stefu
"Jesus" avatars created by Mercator and Laszlo.
|
|
|
|
May 27, 2002, 21:45
|
#13
|
Emperor
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
Re: So then . . .
Quote:
|
Originally posted by Exile
Is there any way to enlarge the size of the heap?
|
Get Test of Time! (You had to have seen that one coming. )
|
|
|
|
May 28, 2002, 01:18
|
#14
|
King
Local Time: 09:24
Local Date: November 1, 2010
Join Date: Sep 1999
Location: Australia
Posts: 1,515
|
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...
|
|
|
|
May 28, 2002, 02:23
|
#15
|
Prince
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Jul 2001
Location: Chicago, IL U.S.A.
Posts: 300
|
I think we are in uncharted territory here, Ravagon. There are sooo many possible combos that I doubt it will ever be documented.
|
|
|
|
May 28, 2002, 09:22
|
#16
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
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)
|
|
|
|
May 28, 2002, 09:35
|
#17
|
Emperor
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
Wow.
|
|
|
|
May 29, 2002, 10:17
|
#18
|
Emperor
Local Time: 02:24
Local Date: November 1, 2010
Join Date: Dec 2000
Location: The European Union, Sweden, Lund
Posts: 3,682
|
Very, very interesting...
__________________
No Fighting here, this is the war room!
|
|
|
|
May 29, 2002, 18:11
|
#19
|
King
Local Time: 20:24
Local Date: October 31, 2010
Join Date: Sep 2000
Location: of the Benighted Realms
Posts: 1,791
|
Take that!
Techumseh!
ToT my eye!
2 billion!!!!!!
Damn! This is just what I'd like to see. I need an events file that's about 10-20 times as large as the one I'm using in Imperialism 1870. That would really enhance the "uprisings/revolts" part of the thing.
Mercator, please keep me posted.
__________________
Lost in America.
"a freaking mastermind." --Stefu
"or a very good liar." --Stefu
"Jesus" avatars created by Mercator and Laszlo.
|
|
|
|
May 29, 2002, 18:45
|
#20
|
Emperor
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
Re: Take that!
Well Exile, 100kb in the hand is worth 2 billion kb in the bush, as they say. And ToT events language has many other advantages, (more triggers, more actions, multiple events, etc., not to mention multi-layerd maps. etc. etc. etc.)
Still this is very interesting. If a scn. file could be edited to increase the events capacity, the question then is: Will the extra events which are loaded into the scn file then be retained in the sav. file when you save the game?
I would also like to be kept posted.
|
|
|
|
May 29, 2002, 18:58
|
#21
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
OK, that means I have to go and do something then.
Julius Brenzaida, Allard Höfelt, Gothmog etc... Help!
|
|
|
|
May 29, 2002, 22:16
|
#22
|
King
Local Time: 09:24
Local Date: November 1, 2010
Join Date: Sep 1999
Location: Australia
Posts: 1,515
|
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; May 29, 2002 at 22:28.
|
|
|
|
May 30, 2002, 12:01
|
#23
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
Well, that number in the savegame is only there when there are events, and is always 32768 (I think)... I think that this would be a maximum size indicator of some sorts, so when changed would allow for more events. But of course, since that number is only in when the events are already in the savegame, changing that number is really pointless unless we would be able to compile events ourselves.
So I will be looking into the executable... probably first the CiC executable because there are far less occurrences of 16K in the CiC executable, than there are occurrences of 32K in the FW executable... That would make it easier to test, and might give a clue to which one to pick in the FW executable.
|
|
|
|
June 1, 2002, 11:53
|
#24
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
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?
|
|
|
|
June 1, 2002, 16:18
|
#25
|
Emperor
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
ToT.
|
|
|
|
June 1, 2002, 16:23
|
#26
|
Emperor
Local Time: 21:24
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Baltimore, MD
Posts: 4,325
|
ah so hard to live with the 100k and multiple events of ToT.
|
|
|
|
June 2, 2002, 10:03
|
#27
|
Emperor
Local Time: 03:24
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
Quote:
|
Originally posted by techumseh
ToT.
|
Naturally! But the FW'ers deserve a little more too.
|
|
|
|
June 2, 2002, 12:11
|
#28
|
Emperor
Local Time: 21:24
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Baltimore, MD
Posts: 4,325
|
It may be possible to rig CSPL to run with FW. You'd need access to the library file that Angelo's locked away though.
|
|
|
|
Posting 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
|
|
|
All times are GMT -4. The time now is 21:24.
|
|