Just Crazy Jim wrote:Not that I'm in a rush to edit my way through 7,800,000+ hex values to trim out useless bytes, but if a man were bored enough (and careful enough) is there a guide or note that documents what is safe to strip out? In this case, I would strip Go West!.gmp down to its base and start over.
I think you are boldly going where no lunatic has gone before.
On the bright side, there does appear to be a pretty high limit before events cause problems. I've never hit it, and have done quite a bit of playing around with events when testing.
There is a guide to where the events section of the .gmp begins and ends (have you got the folder named
Milo's Stuff*?) so it should be possible to strip the entire events section in one fell swoop. That wouldn't be too arduous. I expect that manually picking out individual events would be trickier. Having said that, I also expect there would be some consistent syntax for starting and finishing the bytes for any event, and once that was known it should be usable.
If you want to look into this, I'd start with the most bog basic blank map available in the editor and save that sucker, then add one or two events to it and do a comparison on the hex.
*Here's what Milo's Stuff says about events:
Code: Select all
------------------------------------------------------------------------
Events:
Event block header
Events
Conditions
Effects
Event dependencies: cargos, trains, etc
000468a0:00066940? EVENT BLOCK HEADER: several 4-byte counts or flags
000468a0:000468a3 number of events
000468c8:000468cb number of events?
EVENTS: 2199 bytes each
0004695a:0004695d 00 00 00 00 for no cond
40 0d f8 05 for ALWAYS TRUE
10 87 78 03 for ALWAYS TRUE
d8 99 70 03 for ALWAYS FALSE and constructed
0004696e:00046971 event index, starting with 1
00046972:00046990 event name, null-terminated
00046a3a:00046d55 dialog 1, null-terminated
00046d5b:00046e23 dialog 2, null-terminated
00047148:00047148 0 = dialog, 1 = choice, 2 = newspaper, 3 = game msg
00047149:00047149 event frequency:
0 yearly (beginning of year)
1 yearly (end of year)
2 monthly (beginning of month)
3 monthly (end of month)
4 weekly (beginning of week)
5 weekly (end of week)
6 when track or station is placed
7 when a company is started
8 at start of scenario
9 status (in annual report/ledger)
a after an event choice
0004714a:0004714a test against territory: 0=all, #=territory, 63=don't test
0004714e:0004714e 0 = single-player, 1 = multiplayer, 2 = both
0004714f:0004714f 0 = repeating event, 1 = one-time event
00047153:00047153 test against:
0 don't test against companies
1 all companies
2 on-screen player's company only
3 AI companies only
00047154:00047154 test against:
0 don't test against players
1 all players
2 on-screen player only
3 AI players only
00047155:00047155 apply effects:
0 to the company\player\terr for which cond is true
1 to the whole game
2 to all companies
3 to human companies only
4 to AI companies only
5 to territories
6 to all players
7 to human players only
8 to AI players only
00047159:00047159 0 = apply effects repeatedly; 1 = apply once per event
00047169:0004716c index of territory to apply effect to (0 = all terrs)
00047209 next event name
So that doesn't look too bad. As long as you have a record of all past and present event names, it should be possible to remove any of them.
Edit: So I took a look in one of my .gmp's and Milo's offsets don't correspond to my file. Just for added fun.
![Razz :-P](./images/smilies/icon_razz.gif)
I suspect they correspond to whatever test map he was using at the time, rather than being intended as a general purpose roadmap.
However
![Very Happy :-D](./images/smilies/icon_biggrin.gif)
I have managed to track down where the same bits are in my file. I'll look into mapping it a bit more later, but it doesn't seem like it's going to be too much drama.
For example, his reference 0004695a:0004695d corresponds to 0024c88a:0024c88d in my file.