GC2 Twilight of the Arnor Mod Validation program.

Modding made easy

https://www.dropbox.com/s/m447rgrdev1bp30/GC2TOAMV.zip

Hello everyone. While making APT 2.0 I got sick of finding errors in my test games. Missing connection, missing descriptions. Arg! It was just to much data to go through every time. So I wrote a program to do it.

GC2 ToA Modvalidation (the program) will check the your mod for errors and it can be downloaded here. Use at your own risk. The download is a ZIP file so you need to extract the .EXE file first. No installation is needed just run it from where ever you want to.

First select your mod and game folders, Tick/untick the checks you want to perform and hit Go. The program will log anything it finds. You can copy and paste this freely. The program will reload all files each time you hit Go so you can edit, check, edit, check, etc.

The program is NOT compatible with double values. So multiple requirements, AIValue, etc. DO NOT WORK.

Please report any bugs or ideas by replying to this thread. Thanks.

Enjoy,

Regards Altarn

30-01-2013 Bugfixes:

  • Fixed module requirement tech requirement notification
  • Removed module requirement check from techtree check, this is done during StarbaseModule check
  • Fixed two bugs that resulted in a object link-error.
  • Fixed a bug where the category from a racial tree would be overwritten by one from techtree.xml.
  • Added Null as acceptable technology category.

It will only check these files if they are present in your mod folder! The program will NOT load files from your game if it can't find them.

All racial techtrees files:

  • Check for properties (if not found TechTree.XML is checked):
    • DisplayName
    • Details
    • Requires
      • Race TechTree is checked for presence of requirement.
      • Values None and ImpossibleTech are ignored
    • AIValue
    • Cost
    • Category
      • Category is checked for validity
    • Race Tree Branch is compared to TechTree branch for differences
  • Checks Starbase Module prereqs.
    • If a tech unlocks a starbase module, then the starbase module's module requirement tech requirement is checked for in the Racial Techtree.

PlanetImprovements.XML

  • Check for properties
    • S_InternalName
    • S_Name
    • AI
    • S_Type
    • Maintenance
    • Cost
    • S_IconName*
    • S_QueryGraphicName*
      • * the program checks if these files exist in:
        • The mod folder
        • GC2
        • DarkAvatar
        • Twilight
    • S_TechRequirement
      • Each race techtree is checked if this tech exists.
      • Values None is ignored
    • S_UpgradeTarget
      • Checked if it exists in PlanetImprovements.XML
      • None is ignored
  • Ignored:
    • BasicStarbase
    • Decomission
    • CapitalCity
    • InnitialColony

StarbaseModules.XML

  • Check for properties
    • Name
    • Model
    • Tech_Requirement
      • Each race techtree is checked if this tech exists.
      • Value None is ignored
    • Module_Requirement
      • Checked if it exists in StarbaseModules.xml 
      • Value None is ignored
    • Description
    • StarbaseAbility
    • Type

GC2Types.XML

  • Check for properties
    • There are various types in this file and their properties vary a lot. Suffice to say the essential properties are checked for each type. Types with a Class and Category are checked for valid combinations, e.g. Shield/S is valid Shield/A is not. Engined are checked for speed, weapons for damage, etc.
    • Tech_Requirement is checked vs all racial techtrees
      • Value None is ignored

TechTree.XML

  • Each tech is looked up in the Racial techtrees to see if it is used or not.
  • Ignored:
    • SporeWeapons
    • GermWarfare

 

 

21,666 views 12 replies
Reply #1 Top

Good work! k1

This program works very well. However, I noticed a little error when it comes to starbase modules. Here is an example:

Dreadlords_TechTree.xml the module RoboticMiningCenter requires module InterstellarMiningRefinery but the tech requirement AdvancedRobotics not present in techtree

This sentence implies, that the Robotic Mining Center requires the Interstellar Mining Refinery to be build. However, it is the other way around.

Other than this, it works perfectly. I already noticed two bugs in my mod due to it.

 

 

Reply #2 Top

Glad to hear it. The SB thing is easy enough to fix.

Reply #3 Top

All I get is an error loading the TechTree.XML file.  Nothing more specific than that.

Oh wait.  There's an invalid token warning when I load up the file using my XML editor.  Figured out it was a punctuation mark causing it.  Moving on. :)

Looks good.  Now I just have to move a whole bunch of things to the main techtree.  I haven't done it up until now because the supplied editors won't load descriptions from a mod folder TechTree.xml file and nobody's thrown a better editor at me.

Reply #4 Top

Quoting MarvinKosh, reply 3
All I get is an error loading the TechTree.XML file.  Nothing more specific than that.

Oh wait.  There's an invalid token warning when I load up the file using my XML editor.  Figured out it was a punctuation mark causing it.  Moving on.

Looks good.  Now I just have to move a whole bunch of things to the main techtree.  I haven't done it up until now because the supplied editors won't load descriptions from a mod folder TechTree.xml file and nobody's thrown a better editor at me.

Which XML Editor do you use?

Reply #5 Top

Well, I found one more bug and one thing I'm not exactly sure what to make of it.

The bug is, that the program doesn't recognise if a tech is set to a different Category in the racial tech tree than what it is in the main tech tree.

For example, I set the fleet module and Terror Star techs to Category Null in the TechTree.XML. I set them intentionally to an invalid Category to prevent the AI from researching those techs. While it doesn't really do that, it at least slows the AI down. For the Korath, I set those techs to Category Invasion, because that makes definitely sure, that they will never be researched. The program, however, still reports, that those techs are set to Null in the Korath tech tree.

The thing I'm not sure about is this:

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

Roughly translated it means: The object-link hasn't been set to a object-instance. This message shows up several times, when testing the PlanetaryImprovements.XML. I'm not sure, if this means, that there is a bug in my file or if there is something wrong with your program.

Reply #6 Top

Quoting Gaunathor, reply 6
Well, I found one more bug and one thing I'm not exactly sure what to make of it.

The bug is, that the program doesn't recognise if a tech is set to a different Category in the racial tech tree than what it is in the main tech tree.

For example, I set the fleet module and Terror Star techs to Category Null in the TechTree.XML. I set them intentionally to an invalid Category to prevent the AI from researching those techs. While it doesn't really do that, it at least slows the AI down. For the Korath, I set those techs to Category Invasion, because that makes definitely sure, that they will never be researched. The program, however, still reports, that those techs are set to Null in the Korath tech tree.

The thing I'm not sure about is this:

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

Roughly translated it means: The object-link hasn't been set to a object-instance. This message shows up several times, when testing the PlanetaryImprovements.XML. I'm not sure, if this means, that there is a bug in my file or if there is something wrong with your program.

It means there's something in your file file it didn't handle to well I'll have to test that with your file. Have you got multiple Requirements or something like that in PlanetaryImprovements.XML? It can't handle those.

I'll look into the category in the techtree as well as the program should read the racial techtree first and use techtree.xml later.

Reply #7 Top

Quoting MabusAltarn, reply 7
It means there's something in your file file it didn't handle to well I'll have to test that with your file. Have you got multiple Requirements or something like that in PlanetaryImprovements.XML? It can't handle those.

The Neutrality Learning Center has multiple requirements, but the message occurs even if I remove them.

Reply #8 Top

Quoting Gaunathor, reply 8

Quoting MabusAltarn, reply 7It means there's something in your file file it didn't handle to well I'll have to test that with your file. Have you got multiple Requirements or something like that in PlanetaryImprovements.XML? It can't handle those.

The Neutrality Learning Center has multiple requirements, but the message occurs even if I remove them.

I ran your mod through Mod Validator and found a few bugs. Could you check if the problem persists?

 

Reply #9 Top

Quoting MabusAltarn, reply 9
I ran your mod through Mod Validator and found a few bugs. Could you check if the problem persists?

I didn't notice, that you uploaded a new version before. It now says, that S_UpgradeTarget is missing for a lot of improvements. As that is normal, I'd say the problem is fixed now. Good job. :thumbsup:

 

 

Reply #10 Top

Quoting MabusAltarn, reply 5

Which XML Editor do you use?

I use Komodo Edit.  Although I'm fairly sure I used Notepad for editing TechTree.xml in the past and not that, otherwise I would have noticed the problem earlier.

Reply #11 Top

Quoting MarvinKosh, reply 11

Quoting MabusAltarn, reply 5
Which XML Editor do you use?

I use Komodo Edit.  Although I'm fairly sure I used Notepad for editing TechTree.xml in the past and not that, otherwise I would have noticed the problem earlier.

I can recommend using Visual Studio Express. Any version will do. It's XML editor is excelent, it has on-the-fly error ditection, syntax hilighting, autocompletion.

The thing is you can easily search through multiple files at once and step through you search results.

It's really, really good.

Top it off by getting TortoiseSVN from sourceforce and and setup a repository on your local harddrive. Then you'll have version control on your mod, automatic backups and the ability to see differences between versions in a snap.

Reply #12 Top

Quoting Gaunathor, reply 10

Quoting MabusAltarn, reply 9I ran your mod through Mod Validator and found a few bugs. Could you check if the problem persists?

I didn't notice, that you uploaded a new version before. It now says, that S_UpgradeTarget is missing for a lot of improvements. As that is normal, I'd say the problem is fixed now. Good job.

 

 

Excelent!