Thread Tools
Old May 27, 2002, 16:00   #1
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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.
Jacobite1688 is offline  
Old May 27, 2002, 16:16   #2
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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).
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old May 27, 2002, 16:28   #3
St Leo
Scenario League / Civ2-CreationApolytoners Hall of Fame
 
St Leo's Avatar
 
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.
__________________
Blog | Civ2 Scenario League | leo.petr at gmail.com
St Leo is offline  
Old May 27, 2002, 16:33   #4
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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?
Jacobite1688 is offline  
Old May 27, 2002, 16:34   #5
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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.
Jacobite1688 is offline  
Old May 27, 2002, 18:17   #6
Stefan Härtel
Civilization II Democracy Game: ExodusScenario League / Civ2-Creation
King
 
Stefan Härtel's Avatar
 
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!
Stefan Härtel is offline  
Old May 27, 2002, 19:07   #7
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old May 27, 2002, 19:12   #8
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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.
Jacobite1688 is offline  
Old May 27, 2002, 19:19   #9
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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!
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old May 27, 2002, 19:27   #10
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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.
Jacobite1688 is offline  
Old May 27, 2002, 20:03   #11
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
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.
techumseh is offline  
Old May 27, 2002, 20:44   #12
Exile
Scenario League / Civ2-Creation
King
 
Exile's Avatar
 
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.
Exile is offline  
Old May 27, 2002, 21:45   #13
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
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. )
techumseh is offline  
Old May 28, 2002, 01:18   #14
ravagon
Scenario League / Civ2-Creation
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...
ravagon is offline  
Old May 28, 2002, 02:23   #15
Jacobite1688
Spanish Civers
Prince
 
Jacobite1688's Avatar
 
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.
Jacobite1688 is offline  
Old May 28, 2002, 09:22   #16
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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)
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old May 28, 2002, 09:35   #17
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
Wow.
techumseh is offline  
Old May 29, 2002, 10:17   #18
Henrik
Civilization II PBEMScenario League / Civ2-CreationNationStatesMacCivilization II Democracy Game: Red FrontSpanish CiversCivilization IV Creators
Emperor
 
Henrik's Avatar
 
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!
Henrik is offline  
Old May 29, 2002, 18:11   #19
Exile
Scenario League / Civ2-Creation
King
 
Exile's Avatar
 
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.
Exile is offline  
Old May 29, 2002, 18:45   #20
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
Re: Take that!
Quote:
Originally posted by Exile
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.
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.
techumseh is offline  
Old May 29, 2002, 18:58   #21
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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!
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old May 29, 2002, 22:16   #22
ravagon
Scenario League / Civ2-Creation
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.
ravagon is offline  
Old May 30, 2002, 12:01   #23
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old June 1, 2002, 11:53   #24
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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?
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old June 1, 2002, 16:18   #25
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 19:24
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
ToT.
techumseh is offline  
Old June 1, 2002, 16:23   #26
DarthVeda
Emperor
 
DarthVeda's Avatar
 
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.
DarthVeda is offline  
Old June 2, 2002, 10:03   #27
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old June 2, 2002, 12:11   #28
DarthVeda
Emperor
 
DarthVeda's Avatar
 
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.
DarthVeda is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 21:24.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team