PDA

View Full Version : C4 Lister


ahk-horus
04-23-2007, 11:47 AM
Something: C4Lister is created to give informations about all the scenarios in your scenariofolder - the map, invasions, requests, Wagechanges, number of cities, missiontext and of course the goals .

C4Lister V2 (http://www.citybuilder.de/download/caesar4/C4ListerSetupUS.exe)

http://www.citybuilder.de/sample/C4ListerUS.jpg


The installer setup the program and 3 DLL, required to show the maps.(.dds graphics format)

ahk-horus

Hieronymus
04-23-2007, 02:05 PM
Another very useful utility - just installed it and it picked up the two new scenarios I'm currently working on correctly. Thanks ank-horus!

EDIT: But I did note a couple of bugs. It didn't spot the 100 culture requirement in Cyrene Revisited, nor did it detect the nature events in Lugdunum Revisited. Everything else seems fine.

ahk-horus
04-24-2007, 01:06 AM
Okay, exploring userscenarios ist sometimes a bit difficult. Mostly the CS file in these scenarios are quite complex and not really equivalent to the original structure of CS files. Its also the same in the XML.

We will take the Cyrene revisited / Lugdunum revisted scenario and have a look.

ahk-horus

ahk-horus
04-24-2007, 04:01 AM
Okay.

As you know. Both files - cs and xml - includes information about the scenario. Some inforamtion as CULTURE only appears in the XML, also the number of cities.
The programm reads both files as a stream and search for significant strings. To read the needed CULTURE rating it searches for "<String id="CULTURE">25</String>" and extract the number (here 25). Normally if this string where found, the searching for this element should stopp. In the Version V1.0 it doesn't stopp. So have a look on the file CyreneReviseted.xml.

At first, the programm finds this string :

<String id="CULTURE">100</String>

extracts the 100, okay, but near the end of file the programm finds this

<!-- CULTURE AWARDS -->

So the progamm means : Hey, babe, CULTURE again, but no number, okay, no CULTURE Rating. Ups. That was the problem, fixed in V2.

The NatureEvent : the programm only searches for the string <mNatureEvent = new NatureEvent>, not for <TriggerWeatherEffect>. Also fixed.

Thank you for your helpful comments!!

ahk-horus

P.S. I hope you understand my version of english.....

Pecunia
04-24-2007, 04:21 AM
Ahk-horus: wouldn't it be better to pick the ratings, trade cities and whatnot directly from the .scn files? That way the information is much more reliable than if you pick it from the (possibly not 100% matching) XML file. I've been digging into the .scn files so I can give you information on how to extract that information from it.

ahk-horus
04-24-2007, 07:25 AM
pecunia:
Yes, of course, and also the traderequests ("Rome needs...."). If you have any information on of adresses or how to "unpack" the scn files - we'll be glad!

ahk-horus

Hieronymus
04-24-2007, 11:39 AM
Impressive work (again), ank-horus! Thanks for fixing the bugs. :D

Ahk-horus: wouldn't it be better to pick the ratings, trade cities and whatnot directly from the .scn files?
Just a cautionary tale here, if I may. When testing Lugdunum Revisited I encountered a phantom (i.e. unscripted) invasion, which I presume must have been a remnant of a previous invasion still lurking in the .scn file. I stopped it occurring by using game.ClearInvasions, but it goes to show that even the .scn file may not represent reality as we know it ;)

Pecunia
04-24-2007, 12:04 PM
Just a cautionary tale here, if I may. When testing Lugdunum Revisited I encountered a phantom (i.e. unscripted) invasion, which I presume must have been a remnant of a previous invasion still lurking in the .scn file. I stopped it occurring by using game.ClearInvasions, but it goes to show that even the .scn file may not represent reality as we know it ;)
True enough. However, most scenario designers are not as devious with scripting as you ;) (and yes, there's one "hidden" invasion in Lugdunum that's only present in the .scn file)

ahk-horus: I've asked Reed whether it would be OK to post information about the file format on this forum. If not, I'll contact you over PM.

Hieronymus
04-24-2007, 03:36 PM
Thanks Pecunia. At least, I'm taking it as a compliment. ;) Not that I should take any credit for the phantom invasion, as it was completely unintentional on my part, and I only found the solution by looking through the list you posted some time ago. Now, actually finding that invasion in the .scn file - that I call devious :p

ank-horus: tried out the new version and it works fine now - good work!

Pecunia
04-24-2007, 04:05 PM
Now, actually finding that invasion in the .scn file - that I call devious :p
Nah, wasn't that difficult to find, after unpacking the Lugdunum.scn and looking through it with a hex editor, there it was, screaming at me: ENEMY_GAUL_HVY (3 cohorts) and ENEMY_GAUL_AUX (1 cohort), 8500 Dn to buy off :p

Since you edited the Lugdunum scn, the invasion stayed in there because the editor doesn't touch that section. Actually, Lugdunum is the *only* scenario with such a hidden invasion, just bad luck you took that scenario to edit ;)

Hieronymus
04-25-2007, 02:16 PM
OK, I'll believe you :) I do occasionally play around with a hex editor, but the .scn files remain a mystery to me (for now).

goonsquad
05-06-2007, 03:50 PM
Is it at all possible to make this utility run on Windows 2000?

ahk-horus
05-07-2007, 12:15 AM
Should work on Win 2000, seems to be a problem with the xp-manifest. At the moment we "expand" the informations (thanks to pecunia!) and will test the new version also on Win 2000.

ahk-horus