Log in

View Full Version : Replay Viewer



Chris_
07-23-2008, 21:31
I'm making on a replay viewing program for EB, to replay the progression of factions on the campaign map, which I mentioned over the AAR forum.

The current version grabs the screen, and cuts out the map, saving it to a .png file. It then works out the turn and season, and writes it on the image. However, this relies on the player taking a print screen every turn and toggling fow. If you dont take a printscreen one turn, it will go out of sync. Obviously this is a problem. This problem wouldnt exist if I could have access to the turn number and map data.

V.T. Marvin suggested integrating it with the script, so I looked into it. I was wondering if there was any way at all to get output from the script - such as a log file. I looked around on google and read about the command line switch fplog, which may be able to specify a log file, and I was wondering if it works ( I tried, but I may be doing something wrong ). I also found some info on console commands called dump_fac_score/dump_fertility, which aparrently get routed through to the log/output window. However, no such log is created as far as I can see. Even though these seem completely irrelevant, I would be able to represent turn numbers and map data with them ( albeit a long-winded way ).

If it's not possible to get information out using any built in functions, I do have a workaround, but it's a bit of a fudge, and I would prefer to avoid having to do it.

Che Roriniho
07-23-2008, 21:36
Iff you pull this off you will be my favouritest person ever. If you need someone for general bitch-work (ie, editing lots of stuff, etc.), PM me.

Have a Cookie *offers Jar*

Chris_
07-23-2008, 21:56
*Takes Cookie* Thanks :beam:

Just been nosing around a .sav file, and I might be able to get the information from there (hurray for hex editors!).

Update : Slowly, very slowly figuring out the file format for savegames. Although its quite interesting/fun, it might take a while.

LorDBulA
07-24-2008, 08:18
I cant think of anyway to make script communicate with external software.

Few ideas I had how this can be done:

1. Hooking windows so you can monitor mouse and key events in RTW ( to detect end turn ).
Only problem with this are battles that can cause false positives.

2.Using autosave. Checking out when autosave file is changed would be enough for simple implementation. You can also read a date from this file but not season unfortunately.

Second problem is lifting fow. I guess some good timed EB script could help here but I guess this will be tricky.

Edited:
Best way would be to use only save file to generate custom map. Not using RTW at all to capture screenshots.
Unfortunately this would require fairly well understanding of save file format so you can extract all necessary data from it.

Chris_
07-24-2008, 09:28
Yeah, those are the same kind of possibilities that I came up with if it couldn't be done with script. At the minute, it detects keystates, and grabs the screen based on that. And yes, it does generate false positives ( because it watches Print Screen - but I can change that ).

The save file does seem to be the way to go. Which is why I stayed up till 3am reading one and comparing it with another. I managed to get some understanding of it - I noticed a couple of the faction indexes - 06 for Romani, 0A for Aeudi, and so on. I also changed Roma to Smeg, but thats not really useful. However, I think i'm getting close to being able to figure out ownership of a province, which would in turn allow me to figure out who owns what.

LorDBulA
07-24-2008, 09:50
Check out descr_sm_factions.txt file. I think you can get faction table from this file.
At lease examples given by you match this file.
Also faction colors can be obtained from this file.

Chris_
07-24-2008, 10:13
Thanks for the info. Been looking at some saves from the 1.1 savegame thread, and i've found where the player's faction is specified. Not at a computer with RTW at the minute, so I can't see if swapping it works. At least the weekend is coming up, so I can slowly figure out the format.

Also, do you know how provinces are indexed? Is it in the order listed in DESCR_FACTIONS.txt? It just really helps to have some numbers to look out for.

LorDBulA
07-24-2008, 10:18
Also, do you know how provinces are indexed?
I would bet on descr_regions.txt file (in Data/world/maps/base directory )

In this file you can also get RGB values of province that you can use to draw a map (with help of map_regions.tga).
Check out Recruitment Viewer for nice EB map you can draw on.

Chris_
07-24-2008, 20:21
I'm getting slightly more understanding of the format, and have just changed my faction from Rome to Aedui. Cant end turn though, apparently its still Rome's turn :laugh4:. Slow going though. I think I saw the map data - it looked list-like, although its hard to tell sometimes.

Chris_
07-25-2008, 00:16
Here's an update on progress. I'm nearly there (I think). Here's what I did to Roma while trying to figure out which byte defines ownership, so I can read it out later:

https://i338.photobucket.com/albums/n419/chriseden0/roma.jpg
https://i338.photobucket.com/albums/n419/chriseden0/roma2.jpg

Tellos Athenaios
07-25-2008, 09:07
Roma just got a new city plan! :2thumbsup:

Gaias
07-25-2008, 23:18
Awesome idea here Chris_. :2thumbsup:

I wouldn't go around asking for people to give suggestions as they are likely to end up asking for a full blown savegame editor... Unless your are up to such a challenge?!? :yes:

:laugh4:

Che Roriniho
07-25-2008, 23:53
Gaias, I know for one, that I would certainly want that!

Chris_
07-26-2008, 04:42
I wouldn't go around asking for people to give suggestions as they are likely to end up asking for a full blown savegame editor... Unless your are up to such a challenge?!?

I'm going to do the replay viewer first - I just found what the data I need in the save game ( it was 6E 00 00 00 06 that gave it away if anyone wants to know). After that, maybe a save editor (time permitting). I have accidentally changed most things by now anyway :laugh4:. But anyway, replay viewer first.

Tellos Athenaios
07-26-2008, 10:59
Well, 6e = 'n' or simply 110; and the other is a four byte integer corresponding to what is IIRC called I_TurnNumber in the script?

LorDBulA
07-26-2008, 12:17
It would be nice if you could document your discoveries when you are done with reverse-engineering RTW save file.

Chris_
07-26-2008, 12:36
Well, 6e = 'n' or simply 110; and the other is a four byte integer corresponding to what is IIRC called I_TurnNumber in the script?

110 = Latium2, and 06 = Romani.


It would be nice if you could document your discoveries when you are done with reverse-engineering RTW save file.

I've been keeping notes as I go along. Half of them in a word document, half scrawled all over a notepad, along with with lots of ?'s and random doodles.

overweightninja
07-26-2008, 20:41
110 = Latium2, and 06 = Romani.



I've been keeping notes as I go along. Half of them in a word document, half scrawled all over a notepad, along with with lots of ?'s and random doodles.
*un-lurks*
Ramdom .doc and notepad files are cool, I'm sure LordBula isn't the only one following this thead with interest :2thumbsup:
Cheers mate
*back to lurking*

Tellos Athenaios
07-26-2008, 22:00
110 = Latium2, and 06 = Romani.

Ah, I misread your post. But (obviously) you'd need region numbers/identifiers & faction numbers/identifiers as well to construct your map... <_<

Chris_
07-27-2008, 16:16
Good news, I figured out what identifies the owner of a town. Also, I moved a city, rebound what cities own what provinces, and some other stuff. Replay editor should be easy to do now.

LorDBulA
07-27-2008, 17:23
Wow so city positions are controlled by save game? Thats surprising.

Chris_
07-27-2008, 17:37
Yeah, it seems to load most stuff from the files when the campaign is started, and after that just loads it from the save game. It still uses the files (it stores the path), probably for some cross referencing of buildings/traits and the like, but things like positions, and unit counts seem to be taken straight from the save.

Tellos Athenaios
07-27-2008, 17:43
:idea2: I suppose it's also possible to extract the # of cash any given factions has from the save game? Because that would be a real valuable piece of info to "replay" throughout the game; as it allows for more accurate testing of money scripts...!

Chris_
07-27-2008, 17:49
I suppose it's also possible to extract the # of cash any given factions has from the save game?

Yep, done that.

As i've been going through this, i've been wondering how many of the supposed 'hardcoded' things are actually hardcoded. Yknow, the 240 unit count cap (which I broke), stuff like that.

Update : Just swapped Baktria and Rome around completely, by changing two numbers :beam:

LorDBulA
07-27-2008, 18:21
I actually would love to write a peace of software that will allow player to boost up AI army composition to give more enjoyable gameplay.
Basically less levies more professionals and with some right proportions of unit types.

Getting AI standings with other factions would be very helpful to make head and tails of AI diplomacy decisions.
Although this would be very tricky.

And of course if we could raise faction from the dead by editing save game would be insane.

Possibility to raze city like Carthage from the face of earth would also be great (although with all the scripts this would be more tricky ).

I really hope you will share your findings Chris when you are done with reverse engineering save file.

Great job man.

Chris_
07-27-2008, 18:46
I just sent Carthage off the map, and it seemed to just cease to exist. The game seems to get rid of everything that goes into the offmap.

Gaias
07-28-2008, 00:38
( it was 6E 00 00 00 06 that gave it away if anyone wants to know).

Bah! All you programmer types are freaking crazy anyways. All I see there in that alpha numeric sequence is blonde, brunette, and red head. :clown:

Chris_
07-28-2008, 05:50
Bah! All you programmer types are freaking crazy anyways

Yep, all the more fun :laugh4:

More findings :

https://i338.photobucket.com/albums/n419/chriseden0/oooooo.jpg

Looks like it was meant to be 4 turns per year after all.

Edit : Before anyone gets excited, I could get this to show up on loading, couldnt stop it from going Summer -> Winter -> Summer -> Winter. Yet

Che Roriniho
07-28-2008, 10:35
Yep, all the more fun :laugh4:

More findings :

https://i338.photobucket.com/albums/n419/chriseden0/oooooo.jpg

Looks like it was meant to be 4 turns per year after all.

Edit : Before anyone gets excited, I could get this to show up on loading, couldnt stop it from going Summer -> Winter -> Summer -> Winter. Yet

I don't get it. What are we looking at?

Chris_
07-28-2008, 10:39
IIRC it doesn't go to Spring by default in vanilla, since it runs 2 turns per year. As it says Spring, which indicates that RTW was originally going to be 4 turns. Although, its been a while since I played vanilla.

(Funny when you realise how little you remember about pre-EB)

Che Roriniho
07-28-2008, 11:57
IIRC it doesn't go to Spring by default in vanilla, since it runs 2 turns per year. As it says Spring, which indicates that RTW was originally going to be 4 turns. Although, its been a while since I played vanilla.

(Funny when you realise how little you remember about pre-EB)

Oh, I see! That's really cool. I know what you mean about pre-EB though. Did Vanilla even have regional recruitment? IIRC you could only do that with mercenaries (oh, the GREEN! I always went with Brutii, so the mercenaries actually went with the rest of my troops...)

Gaias
07-28-2008, 19:30
IIRC it doesn't go to Spring by default in vanilla, since it runs 2 turns per year. As it says Spring, which indicates that RTW was originally going to be 4 turns. Although, its been a while since I played vanilla.

(Funny when you realise how little you remember about pre-EB)

See, this is where I get confused alot when you guys start talking about a game that was before EB. The game, from what I understand of people talking about it, was vaguely similar to EB but without all the good stuff. I think I remember the name of it was 'Rome:Total War', but don't quote me on that as I am only recalling it...

Chris_
07-29-2008, 09:51
Later on today i'm going to do a summary of progress made on deciphering the save game. I'm at work at the minute, but at lunch time i'll have more time.

Update : I lied, I figured something else out and was doing that instead of writing what i'd already done :beam:

Chris_
07-30-2008, 00:32
Just an update. Cities are basically done, all I need to find is tax level, but that shouldnt be too hard. Ports are also pretty much done, and I had an idea. I was wondering if the team had considered representing smaller towns with the port villages you get. I could move these villages independently of the docks themselves, so you could stick a shedload of ports somewhere inaccesible, and move the villages around the map.

Example ( I had to move Arretium and Roma's port villages at the minute )


https://i338.photobucket.com/albums/n419/chriseden0/gimboid.jpg

V.T. Marvin
07-30-2008, 08:06
That is nice - the map looks more lively with those villages around!:2thumbsup:

Just a question - why the fleet in Arretium docks has grey flag? Is it still actually Roman?

Chris_
07-30-2008, 08:14
I toggle banners for the screenshot - that fleet's banner must have been fading out as I took it. So it's nothing special.

Chris_
07-31-2008, 17:29
I should have something people can test soon (maybe sometime during the weekend). At the minute it's more of a savegame viewer, as I cant really start writing back to the file until I figure out everything in the savegame. :beam:

Che Roriniho
08-05-2008, 18:49
Just an update. Cities are basically done, all I need to find is tax level, but that shouldnt be too hard. Ports are also pretty much done, and I had an idea. I was wondering if the team had considered representing smaller towns with the port villages you get. I could move these villages independently of the docks themselves, so you could stick a shedload of ports somewhere inaccesible, and move the villages around the map.

Example ( I had to move Arretium and Roma's port villages at the minute )


https://i338.photobucket.com/albums/n419/chriseden0/gimboid.jpg


I want your babies. This could (to an extent) stop the constant moaning about certain towns being left out, as they're their, you just can't capture them!

Tellos Athenaios
08-12-2008, 12:37
Does you replay viewer parse the descr_factions_sm.txt file? Because if people have recoloured their factions (which apparently appears quite frequently with the Ptolies for better contrast -- a bit more orange-ish for instance; or with factions which end up separated from their original core provinces...) you Replay Viewer would 'miss' such changes.

Also, a short question: how is the tool invoked, currently? IIRC you had a tool which made a snapshot triggered on a user-action such as PrintScrn - the easiest thing would then be to do the following in your 'monitoring script' (Unix style; from what I vaguely recall so bear with me):



pid=fork();
switch(pid) {
case PARENT : wait_pid(..); break;
case CHILD : exec("replay_snapshot [args]"); break;
}


I suppose? (Executing your snapshot tool as a child process of the monitoring tool with applicable commandline arguments.) Then just name the generated map as snapshot_XXX.png or sth. (XXX being some kind of unique identifier, the most obvious being a date/time stamp.)

Chris_
08-12-2008, 12:58
Well the replay viewer kind of got merged into the savegame editor. At the minute it doesnt do recording of games, as I took it out to make the merge easier. The current build of the savegame editor is a windows forms app, which I was prototyping with. At the minute I'm converting it to a normal Win32 app.

Since it gets the information from the .sav file, at the minute you have to point it to one, which it then gets data from. At the minute it gets city/province and faction data, and generates a map you can save. I'm going to add a feature where you can tell it to to record a savegame - you specify the name. When the save file changes, it should pick that up and parse the save. Or, if that doesn't work very well, I can always go back to using a keyboard shortcut.

I plan to make an ebreplay format, which will contain playback data for the progression of the map. This should be much smaller than save files ( since they aren't compressed at all ). When opened in the editor, you would also be able to save map images.

I might split the replay viewer and the savegame editor, since the replay editor features are basically done, where the savegame editor is some way off.

At the minute it doesnt parse descr_sm_factions, but I can do that.

Senshi
08-12-2008, 16:03
As I statet in your Migration-Thread, the content your tool has now is totally sufficient for a first release and surely would be appreciated by many.:2thumbsup:

LorDBulA
08-14-2008, 20:10
Just to show off :laugh4:

211BC

My Roman Army and allied cities/tribes:


roman cavalry eqvites consvlares Count:1513
greek skirmisher akontistai Count:5449
roman infantry hastati Count:2142
italic general campanian cavalry Count:124
samnite infantry spearmen Count:701
italic infantry bruttian Count:1101
roman cavalry camillan eqvites Count:3
dacian missile peltastaithrakioi merc Count:486
roman infantry hastati early Count:66
roman infantry principes early Count:44
hellenistic infantry illyrian pirate Count:1095
hellenistic cavalry illyrioihippeis Count:101
roman infantry polybian triarii Count:1059
roman skirmisher velites Count:1194
hellenistic general lonchophoroi Count:1056
hellenistic missile cretan archers merc Count:811
hellenistic infantry thureophoroi mercenary Count:189
greek infantry misthophoroi hoplitai Count:252
greek skirmisher peltastai Count:604
generic ship penteconterai Count:130
generic ship liburnes Count:52
roman cavalry polybian eqvites Count:140
hellenistic cavalry thrakioi hippeis merc Count:95
roman missile accensi Count:171
roman infantry principes Count:2174
samnite infantry spearmen merc Count:126
hellenistic infantry hoplitai merc Count:370
greek skirmisher peltastai mercenary Count:1041
celtic skirmisher cavalry curepos Count:14
roman skirmisher leves Count:211
celtic infantry gaemile liguriae Count:749
roman infantry camillan rorarii Count:80
generic ship trireme Count:104
celtic general neitos Count:982
hellenistic infantry illyrian thureophoroi Count:381
germanic infantry bastarnoz swaiut Count:322
celtic infantry lugoae Count:720
celtic missile iaosatae regional Count:120
greek missile toxotai Count:120
greek infantry taxeis hoplitai Count:160
celtic missile sotaroas merc Count:434
iberian infantry light caetratii Count:3080
iberian infantry light milites Count:1200
iberian missile northern skirmisher Count:871
iberian cavalry equites cantabrii Count:300
generic militia Count:800
celtic infantry gaeroas Count:1809
celtic infantry enoci curoas merc Count:1133
celtic infantry mistophoroi keltohellenikoi Count:249
greek infantry lucanian spearmen merc Count:566
hellenistic infantry massiloi hoplitai merc Count:160
samnite infantry swordsmen merc Count:196
iberian infantry loricatii caetratii Count:32
galatian infantry kluddolon Count:162
celtic infantry curoas Count:145
iberian infantry scortamavera merc Count:56
iberian infantry scutarii merc Count:142
iberian infantry dunaminaca mercenary Count:141
iberian infantry roscaithrera regional Count:153
italic cavalry campanian Count:39
hellenistic cavalry prodromoithrakioi merc Count:24
generic ship covered liburnes Count:52
iberian skirmisher celtiberian Count:240
iberian missile balearic slinger mercenary Count:117
Total men: 38353



Ptolemy empire:


hellenistic infantry kleruchoi agemata Count:3170
greek skirmisher akontistai Count:1047
hellenistic infantry thureophoroi Count:1673
greek infantry kleruchoi hoplitai Count:9793
greek infantry thorakitai Count:1481
eastern infantry nizag gund Count:790
eastern cavalry light generic skirmisher Count:100
hellenistic infantry iudaioi taxeis Count:1791
hellenistic cavalry generals bodyguard 3 Count:1483
african infantry nubian spearmen Count:2330
hellenistic infantry machimoi phalangitai Count:6045
hellenistic infantry pantodapoi Count:1831
arabian skirmisher tribal levies Count:1422
arabian infantry redsea axemen Count:1465
african infantry ethiopian swordsmen Count:337
arabian infantry ethiopian spearmen Count:570
hellenistic infantry hoplitai Count:594
eastern infantry katpatuka zanteush Count:200
eastern missile syrian archers Count:480
african infantry machimoi Count:757
hellenistic infantry heavy pezhetairoi Count:1212
galatian infantry galatikoi kleruchoi Count:746
hellenistic missile cretan archers Count:13
greek skirmisher peltastai Count:1069
hellenistic cavalry machimoi hippeis Count:143
arabian missile arab slingers Count:44
arabian missile cavalry tribal levies Count:100
hellenistic cavalry lonchophoroi Count:100
hellenistic infantry red sea hoplites Count:375
steppe missile hallatamtithanvare Count:160
generic ship penteconterai Count:52
generic ship tetrere Count:49
hellenistic cavalry successor hetairoi Count:100
greek missile sphendenotai Count:120
eastern missile eransahr arshtbara Count:23
eastern cavalry medium generic Count:100
Total men: 41765

Chris_
08-14-2008, 21:14
Looks like we're both making progress. I made a game just now where the AI plays every faction. :laugh4:

Che Roriniho
08-14-2008, 23:28
Looks like we're both making progress. I made a game just now where the AI plays every faction. :laugh4:

Sweet... That would be good for the faction progression thread if you managed to do the replay viewer.

paullus
08-15-2008, 01:20
wow, that AI Ptolemaic army is actually structured really well. Nothing screwy, I'm so happy!

Rodrico Stak
08-17-2008, 03:09
Woah! That's amazing that you've been able to figure this all out! I would have been reduced to banging my head on the keyboard long ago.:laugh4:

Che Roriniho
08-20-2008, 08:45
Any news Chris?

Senshi
09-30-2008, 21:54
Hey, Chris, don't give candy to the hungry lions if there is no meat to follow!:whip:

Especially, if the supply of candy suddenly stops for more than a month:sweatdrop:

Hope the project is not dead:embarassed:

Chris_
09-30-2008, 21:58
I'm not dead, just been really busy at work. Project is also not dead, although I haven't done too much on it recently. I'll try and do some on it when I can, as things should get a little less busy soon.

Tellos Athenaios
09-30-2008, 22:31
Project been uploaded to the _>>insert secret EB material source here<<_ already? :beam:

Senshi
12-10-2008, 21:38
:bump:

What happened to this one? I'd hate to see this one die :( , I'm absolute eager to get this! As said, even a simple beta release with only the handful of features it has now would be awesome

Chris_
12-10-2008, 21:52
I uploaded what I had so far (the program that loaded and saved map images) here (http://www.secretundergroundbase.com/Downloads/EBSGViewer.zip). It doesn't make replays, although it's something I'd like to get round to doing. Work has kind of pushed most other things aside recently though, which is why I've been absent.

The viewer uses a really early version of save game loading, and sometimes doesn't read files. Most of the time it's ok, and if a file can't be read it can normally read it again after a few turns have been played.

Tellos Athenaios
12-10-2008, 21:54
Could you share a source code version, pretty please. :beam:

Senshi
12-12-2008, 11:44
A really really big THANK YOU.

Nobody expects it to be perfect, considered no one has come close to what you achieved up to now at all ;)

It's just natural that good ol' Real Life manages to stop our planned activities so no worries there either...


Is it possible the Viewer is incompatible with EB 1.2 or with the Alexander Minimod package?

I get this error with both my savegames, will test further...



************** Ausnahmetext **************
System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
bei EBSaveGame.U.ReadInt()
bei EBSaveGame.SaveGame.City..ctor(Boolean fromFile)
bei EBSaveGame.SaveGame.LoadCities()
bei EBSaveGame.SaveGame.LoadFromFile()
bei EBSaveGame.SaveGame..ctor(String filename)
bei EBSG.MainForm.loadToolStripMenuItem_Click(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Chris_
12-12-2008, 11:50
It's possible. It was made with EB 1.1 and RTW/BI, since I dont have ALEX and 1.2 wasn't around at the time. Also, I didn't understand the format as much back then, and so was relying on things which I later found to be incorrect.

If anything it's more likely that Alex would be causing problems, as EB doesnt alter the save format.

I might be able to make some time to carry on working on the whole savegame business soon too, and I should do a better job this time round.

Shadowwalker
12-12-2008, 22:01
First I like to thank you, Chris, for making this and sharing it with us.
For me it runs without serious problems (CTD) with EB 1.2, although there are of course some things not working:

(1) "units" and "options" folders are blank, the same for all options under "Queues"
(2) saving (map images work, savegames not)

But even in this very early stage of progress it is quite obvious that this can grow into a very powerful tool to edit campaigns. I'm looking forward to see more. :2thumbsup:

Chris_
12-12-2008, 23:49
Yes, the only section that works mostly is cities, but not all of that. I wasn't exactly sure how units worked when I made it, so thats why they are empty. Also, to reliably save an edited savegame I need to know the whole format really. I can make edits, but without complete knowledge of the format, this usually requires me to manually snoop around inside it a bit.

Gaius Sempronius Gracchus
06-30-2010, 22:39
Wow! and then, what happened to this? Has there been any more work on it?

vartan
07-01-2010, 08:41
Wow! and then, what happened to this? Has there been any more work on it?
Chris hasn't been on the Guild since January. I suppose you can hope he'll be back, or if you or anyone knows about the way savegames work and can read their code then perhaps we'll see a progression. I wish I knew.

Chris_
07-01-2010, 08:58
Yeah, real life kind of got in the way, with University and everything. I can see if I can dig up what I had, I know it's somewhere on my computer (or backup). I also don't have RTW with me at the minute, I would have to go and pick it up.

Edit - I bought RTW on Steam. Cheaper than a train ticket back to my parents' house, I suppose.

Gaius Sempronius Gracchus
07-01-2010, 10:34
Yeah, real life kind of got in the way, with University and everything. I can see if I can dig up what I had, I know it's somewhere on my computer (or backup). I also don't have RTW with me at the minute, I would have to go and pick it up.

Edit - I bought RTW on Steam. Cheaper than a train ticket back to my parents' house, I suppose.

I'm really impressed with what you've done so far, you're either a genius and/or a masochist... I've tried unlocking these data streams before and, frankly, it hurts. You've managed to do what no-one else seems to have..., really, really good work.

I've started the prelimanary work on a mod of my own, based around EB and have started with the grandest ideas, and then looked to scale back those plans as and when the limitations of the RTW engine and it's peripharies (such as SAV. files) demand. What you have here might.., just might, allow me to keep the grand scale I was originally looking for.

But, I'm all too aware of how real life gets in the way of such things, and I'm not here to nag. Good luck with your uni, and keep us updated with progress on this. Stunning work mate :2thumbsup:

Chris_
07-01-2010, 10:48
I'm really impressed with what you've done so far, you're either a genius and/or a masochist... I've tried unlocking these data streams before and, frankly, it hurts. You've managed to do what no-one else seems to have..., really, really good work.

...

But, I'm all too aware of how real life gets in the way of such things, and I'm not here to nag. Good luck with your uni, and keep us updated with progress on this. Stunning work mate :2thumbsup:

Thanks. Yes, the masochist bit sounds about right, I like a good puzzle :laugh4:. However, going wrong usually means a CTD, which sometimes makes things slow going.

I finished Uni about a month ago anyway, so looking into this would give me something else to work on.



I've started the prelimanary work on a mod of my own, based around EB and have started with the grandest ideas, and then looked to scale back those plans as and when the limitations of the RTW engine and it's peripharies (such as SAV. files) demand. What you have here might.., just might, allow me to keep the grand scale I was originally looking for.

Hopefully the savegame stuff can be helpful, just depends what you want to do really.

Chris_
07-07-2010, 09:52
Well, things are going better than I thought they would. I've almost managed to reliably parse to the end of a save file - by reliably parse I mean I either understand what the data means, or I can figure out how much of it there is and skip over it. I've tried not to skip over too much stuff and I only skip 30% of the file at the minute. Because there are a lot of repeated sections I can quickly reduce this amount by figuring out small parts, which is what I'll be doing soon.

I've also figured out a few things that were confusing me before, such as visibility information. I'm also writing a specification document for the save format that I'm updating as I go along - it probably won't be 100% accurate since I'm only working from observation, but it should be useful anyway.

vartan
07-07-2010, 18:39
I've also figured out a few things that were confusing me before, such as visibility information. I'm also writing a specification document for the save format that I'm updating as I go along - it probably won't be 100% accurate since I'm only working from observation, but it should be useful anyway.
This sounds hauntingly familiar to what some employees do here:
https://img594.imageshack.us/img594/3673/screenshot1qx.jpg

You sure you don't work there?

Gaius Sempronius Gracchus
07-07-2010, 21:38
You make it sound so simple..., and I know its not. I think you may be a genius.

Chris_
07-09-2010, 10:17
This sounds hauntingly familiar to what some employees do here:
https://img594.imageshack.us/img594/3673/screenshot1qx.jpg

You sure you don't work there?

Ha, the building I work in is much, much, much smaller.

In other news, I can now find out how many seconds (well, frames, but seconds can be extrapolated) a game has been going on for! Hurray for sort of useful information!

vartan
07-10-2010, 03:32
Ha, the building I work in is much, much, much smaller.

In other news, I can now find out how many seconds (well, frames, but seconds can be extrapolated) a game has been going on for! Hurray for sort of useful information!
That's more than useful. If there was a piece of software that, given a save file, would either read (output to screen, PRINT) or produce (output to file, FILE) such meta-data, it'd be lovely!

Chris_
07-11-2010, 08:32
That's more than useful. If there was a piece of software that, given a save file, would either read (output to screen, PRINT) or produce (output to file, FILE) such meta-data, it'd be lovely!

That's one of the eventual goals. I have one from a while ago, but it isn't reliable since I knew much less about the format back then.

Chris_
08-01-2010, 16:56
Well I thought I would just post a mini update. I've figured out a lot more stuff*, and I'm getting close to the point where I can start working on an editor properly. Also, I finally got around to having a look at a M2TW save file, and it looks almost identical - obviously there are a few extra bits and bobs for the new features, but it's not like I would have to start from scratch. I was concerned that after EB2 came out it would have been a bit of a waste of time, but it looks like working on both Rome and Medieval at the same time will help to move my knowledge of both formats along.

* Stuff I figured out since I last posted : Siege weapon construction, character paths, settlement captured/battle dialog windows, battle statistics, pirate and brigand spawns.

Unintended BM
08-02-2010, 19:20
This thread is cool.

Megas Methuselah
09-01-2010, 22:56
Niiiiice. So how was your summer?


I remember seeing you editing family trees through the savegame files on your website. Didn't you switch a boy to a girl? And marry a family member to a city? Honestly, a savegame editor would be... glorious.

Gaius Sempronius Gracchus
09-01-2010, 23:14
Niiiiice. So how was your summer?


I remember seeing you editing family trees through the savegame files on your website. Didn't you switch a boy to a girl? And marry a family member to a city? Honestly, a savegame editor would be... glorious.

Oh it would, indeed, be glorious....especially if one were able to run mutliple instances of EB......

Tellos Athenaios
09-02-2010, 12:08
Oh it is possible to run multiple instances of EB side by side: https://forums.totalwar.org/vb/showthread.php?123455-Unofficial-Trivial-Script-update&highlight=Trivial+Script+update+unofficial

Gaius Sempronius Gracchus
09-02-2010, 13:31
Oh it is possible to run multiple instances of EB side by side: https://forums.totalwar.org/vb/showthread.php?123455-Unofficial-Trivial-Script-update&highlight=Trivial+Script+update+unofficial

I know...it was your mod here that got me thinking about the possibilities of that and the replay viewer (save game editor...). I was very impressed with this. Can I ask a couple of questions though. I tried the setting to run it in a window, and to then run a second instance (I wanted to see how my PC would deal with such heavy use..) and it just ran full screen....?? How do I get two instances running? Also, the one problem that I encountered with the AI only facility was that... I couldn't start the 'show me how' script - is there a workaround for that?

Cheers.

Tellos Athenaios
09-02-2010, 14:25
To run two instances of EB side by side you'd run them in windowed mode and use the multirun option. Then you can Alt+Tab between the two.

Gaius Sempronius Gracchus
01-02-2011, 19:02
Well I thought I would just post a mini update. I've figured out a lot more stuff*, and I'm getting close to the point where I can start working on an editor properly. Also, I finally got around to having a look at a M2TW save file, and it looks almost identical - obviously there are a few extra bits and bobs for the new features, but it's not like I would have to start from scratch. I was concerned that after EB2 came out it would have been a bit of a waste of time, but it looks like working on both Rome and Medieval at the same time will help to move my knowledge of both formats along.

* Stuff I figured out since I last posted : Siege weapon construction, character paths, settlement captured/battle dialog windows, battle statistics, pirate and brigand spawns.

Just bumping this thread to ask...any more progress on this? A save-game editor, or even access to save-game data (in a congruent, readable form) has so many possible uses....

Chris_
01-04-2011, 11:19
Unfortunately I've not really had time to work on savegame stuff. I'll probably get back into it when I finish some of my other projects, or when EB 2 gets released (MTW2 and RTW saves are pretty similar).

jirisys
08-13-2011, 08:08
Never surrender chris! We love you! Have our babies!

~Jirisys ()

vartan
08-13-2011, 17:38
Never surrender chris! We love you! Have our babies!

~Jirisys ()
This is total spam.

Chris if you're reading this, do you still have the source? If you can use some help just PM me.