Page 1 of 1

Small program to check for scenario errors

Posted: Mon Jun 18, 2007 8:49 pm
by Pecunia
I'm working on a small program that will check the consistency of scenarios, in particular the available resources: for example, it makes no sense to enable a weapons factory if there is no iron available. This program should come in handy for scenario designers.

So far my program is able to detect these errors:
  • Resource gatherer enabled but resource not available (example: marble camp enabled but no marble quarry on the map)
  • Factory enabled but no raw materials available
  • Entertainment school enabled but no required goods available (example: gladiator guild without weapons)
  • Requests for unavailable goods


Before I release this little program (still need to design the GUI so it might take a while), I want to ask you: can you think of other "common" errors that this program should check?

Posted: Mon Jun 18, 2007 10:21 pm
by Hieronymus
Sounds great Pecunia :) Off the top of my head:

  • Not necessarily an error, but it would be nice to be notified if there are other than 3 basic goods, 3 luxury goods or 6 exotic goods available (sometimes this is intended, sometimes it's not :rolleyes: )
  • The most common error I make is failing to match up the message identifiers in the .cs script with those in the .xml... but this may be rather more than you were expecting the program to check for ;)

If I think of any more I'll let you know.

Posted: Tue Jun 19, 2007 8:58 am
by ahk-horus
Well,

- Hieronymus one : oh yes !!
- Hieronymus two : yes, good idea!
- summary of all trade goods (max. 27, because Advisor screen)
- cost for opening trade route

-and an commandline version of minimapper :D

ahk-horus

Posted: Tue Jun 19, 2007 5:39 pm
by ahk-horus
and

- trading prices (!)

-and again an commandline version of minimapper :D

ahk-horus

Posted: Tue Jun 19, 2007 6:20 pm
by Pecunia
Thanks for the suggestions both :)

Not necessarily an error, but it would be nice to be notified if there are other than 3 basic goods, 3 luxury goods or 6 exotic goods available

Good one, added to the list :)

The most common error I make is failing to match up the message identifiers in the .cs script with those in the .xml... but this may be rather more than you were expecting the program to check for

Indeed, I think this would be quite difficult to do (parsing c# code is no fun :p )

summary of all trade goods (max. 27, because Advisor screen)

Also a good one; including total amount of import/export for each good. By the way, I didn't know there was a display limit on the advisor screen...

cost for opening trade route

Hmm, that would also require a list of all available trade routes, right? Doable (though designing this UI is going to take me some more time ;) )

trading prices (!)

To be honest, I don't know where they are stored in the .scn file! As soon as I find out I will add it :D

commandline version of minimapper

As soon as I get this thesis finished and have my master's degree in CS (shouldn't take long now), you'll get your command-line version ;)

Posted: Tue Jun 19, 2007 10:30 pm
by Hieronymus
Pecunia wrote:Indeed, I think this would be quite difficult to do (parsing c# code is no fun :p )

Oh yes, absolutely (if not impossible given all the possible permutations) :D But I can always live in hope :p

Posted: Mon Jul 23, 2007 11:49 pm
by Nakia
:) How's the program doing, Pecunia? Now that I've taken my first baby steps I'm looking forward to your program.

Posted: Sat Jul 28, 2007 8:59 pm
by Pecunia
Nakia wrote: :) How's the program doing, Pecunia? Now that I've taken my first baby steps I'm looking forward to your program.

The program's getting along fine. I started working on the user interface yesterday and it's progressing nicely. I might be able to release a first version of the program tomorrow or else sometime next week :)

Posted: Sat Jul 28, 2007 9:10 pm
by Nakia
That is great news, Pecunia.

Posted: Wed Aug 01, 2007 6:03 pm
by Pecunia
Finally, it's here :)

When you load a scenario, it will check for these things:

- factories that are missing raw materials
- missing natural resources such as clay pits and iron mines
- resources that are available but can never be used
- resources that can be exported but are not available
- requests for unavailable goods
- scenario goals that cannot be achieved, including building and resource goals, and prosperity and culture rating goals

It will attempt to load the XML file and check some more things:
- missing keys for empire level cities, requests and goals
- wrong values for rating goals

In addition to this, it will show you:
- Maximum level that housing can attain (housing tab)
- The number of available foods and basic/luxury/exotic goods (housing tab)
- A list of all used resources, including their total import/export amounts and trade prices (resources tab)
- A list of trade cities with what they buy and sell, including the route type (water/land), cost to open, and their ID in the scenario (handy for writing the XML file) (trade routes tab)

Attached is a screenshot from a dummy scenario to showcase most of the errors that the program can generate.

To install: just unzip the file & run the .exe inside. It requires .net 2.0; if you have C4 installed on the same machine you're set.

I hope you find it useful :)

Posted: Wed Aug 01, 2007 6:16 pm
by Nakia
Thank you, Pecunia. I have downloaded and will try it out.

Update: Just used it to check the scenario I'm working on. Very easy to use and quick. No problems found but I only have 5 exotic goods when I thought I had 6. And I need to make a few changes import/export wise. Love the tab where you can see how much you can get for exports.

Great job!

Posted: Sun Aug 05, 2007 5:19 pm
by ahk-horus
Hi pecunia!

Nice work, good job! :) :) :) :)

Very helpfull to controll the tradeprices and cost of traderoutes!!

Thank you very much !!

ahk-horus


Waiting for commandline version.... :rolleyes: :rolleyes: :rolleyes: :rolleyes:

Posted: Sun Aug 05, 2007 8:51 pm
by Hieronymus
Fantastic job Pecunia - I can see this is going to be incredibly useful. :D

Belatedly checked the two scenarios posted yesterday - no errors found :rolleyes:

Thanks very much! :)

Posted: Mon Aug 06, 2007 5:43 pm
by Pecunia
Great to hear you like it :)

ahk-horus wrote:Waiting for commandline version....

Ah yes, I assume you mean the minimapper? I promised you'd get that after I'd finished my thesis and received my master's degree. Right now I *have* finished my thesis, but I'll get my degree in September at the earliest, so I still have some time ;)
(in other words, it's planned but I'm in no hurry -- I have some other projects that deserve attention now)

Posted: Fri Oct 19, 2007 1:08 pm
by SimetricalJean
hi,

Brilliant, thanks for making this Pecunia. Just tried it out. This will be so helpfull. :)

Regards

Posted: Sat Dec 22, 2007 8:25 pm
by Romus
I've tried it too!
Fantastic!
I'm excitedly waiting for new releases!
A little suggestion: adding "total import cost" column if the good is to be imported.
Look at the attachment below:
Snapshot.jpg