Small program to check for scenario errors

Discussion and help with using the in-game editor
Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Small program to check for scenario errors

Postby Pecunia » Mon Jun 18, 2007 8:49 pm

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?

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Mon Jun 18, 2007 10:21 pm

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.

ahk-horus
Posts: 139
Joined: Thu Sep 02, 2004 5:53 pm
Location: Germany
Contact:

Postby ahk-horus » Tue Jun 19, 2007 8:58 am

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

ahk-horus
Posts: 139
Joined: Thu Sep 02, 2004 5:53 pm
Location: Germany
Contact:

Postby ahk-horus » Tue Jun 19, 2007 5:39 pm

and

- trading prices (!)

-and again an commandline version of minimapper :D

ahk-horus

Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Postby Pecunia » Tue Jun 19, 2007 6:20 pm

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 ;)

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Tue Jun 19, 2007 10:30 pm

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

Nakia
Posts: 349
Joined: Sat Sep 17, 2005 7:35 pm
Location: NJ, USA

Postby Nakia » Mon Jul 23, 2007 11:49 pm

:) How's the program doing, Pecunia? Now that I've taken my first baby steps I'm looking forward to your program.

Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Postby Pecunia » Sat Jul 28, 2007 8:59 pm

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 :)

Nakia
Posts: 349
Joined: Sat Sep 17, 2005 7:35 pm
Location: NJ, USA

Postby Nakia » Sat Jul 28, 2007 9:10 pm

That is great news, Pecunia.

Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Postby Pecunia » Wed Aug 01, 2007 6:03 pm

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 :)
You do not have the required permissions to view the files attached to this post.

Nakia
Posts: 349
Joined: Sat Sep 17, 2005 7:35 pm
Location: NJ, USA

Postby Nakia » Wed Aug 01, 2007 6:16 pm

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!
Last edited by Nakia on Wed Aug 01, 2007 6:30 pm, edited 1 time in total.

ahk-horus
Posts: 139
Joined: Thu Sep 02, 2004 5:53 pm
Location: Germany
Contact:

Postby ahk-horus » Sun Aug 05, 2007 5:19 pm

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:

Hieronymus
Posts: 537
Joined: Fri Dec 08, 2006 9:10 am
Location: Londinium, with the insane parakeets

Postby Hieronymus » Sun Aug 05, 2007 8:51 pm

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! :)

Pecunia
Posts: 317
Joined: Tue May 04, 2004 4:00 pm
Location: The Netherlands
Contact:

Postby Pecunia » Mon Aug 06, 2007 5:43 pm

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)

SimetricalJean
Posts: 46
Joined: Mon Oct 15, 2007 4:19 pm

Postby SimetricalJean » Fri Oct 19, 2007 1:08 pm

hi,

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

Regards

Romus
Posts: 4
Joined: Fri Dec 21, 2007 11:57 pm

Postby Romus » Sat Dec 22, 2007 8:25 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by Romus on Sat Dec 22, 2007 8:36 pm, edited 1 time in total.


Return to “Editing”

Who is online

Users browsing this forum: No registered users and 1 guest