Logo Platform
logo amplifiers simplified

A Linter for mods

Reply
Copied to clipboard!
4 years ago
Jun 3, 2020, 12:42:53 AM

I'm not entirely sure if this is the right area for modding tools, if it should have gone somewhere else I'm sorry.


Since the xml files of mods tend to get pretty complicated and typos are hard to stop, I started working on a small tool to find those quicker. It currently validates all files according to the schematas as well as checking Properties used by Modifiers for existance.

While it parses all avaible files, there may be connections that are not clear from the xmls themselves. Manually added Subtypes are currently:

  • ClassStarSystem is a parent of ClassColonizedStarSystem
  • ClassColonizedStarSystem is a parent of ClassExploitedStarSystem
  • ClassPlanet is a parent of ClassColonizedPlanet
  • ClassGarrison is a parent of ClassGarrisonFleet

Additionally all references to SimulationDescriptors are checked for existance, so forgetting those should be next to impossible.


I hope it helps someone besides myself: https://github.com/Idrinth-s-Endless-Space-2-Mods/modvalidator/releases/latest


Releases

  • 1.0.0
    • XSD-Validation for all files
  • 1.1.0
    • simple checks for existance of properties in SimulationDescriptors
  • 1.1.1
    • fixing splitting of classes
    • fixing scaling of output
  • 1.2.0
    • Checking References to SimulationDescriptors in other files
  • 1.2.1
    • add missing population and system related hierarchy information provided by @captaincobbs
Updated 4 years ago.
0Send private message
4 years ago
Jun 3, 2020, 4:36:21 AM

Here's the official tree, which may be a bit confusing for what you are doing. If you open the game's modding tools (set the launch options to --enablemoddingtools, then start an ES2 game and hit F1, then go to Gameplay > Simulation, you should be able to see a simulation tree) you will be able to get any other information you might need.


(From the Amplitude discord modding channel, posted by MonAmiral)

> Empire: ClassEmpire, EmpireTypeMajor/Minor/Pirate/Lesser, GameSpeedXX

  > ColonizedStarSystem: ClassStarSystem, ClassColonizedStarSystem

    > ColonizedPlanet: ClassPlanet, ClassColonizedPlanet

      > PopulationPlanet: ClassPopulation, ClassPopulationPlanetAffinityXX

      > ColonizedResourceDeposit: ClassResourceDeposit, ClassColonizedResourceDeposit

      > PlanetImprovement: ClassImprovement

    > Hangar: ClassGarrison

      > Ship (ship, hero ship): ClassShip

    > Hero: ClassHero

    > PopulationStarSystem: ClassPopulation, ClassPopulationStarSystemAffinity

    > StarSystemImprovement: ClassImprovement

  > DepartmentOfCommerce

    > TradingCompanies

  > DepartmentOfForeignAffairs ("Diplomacy")

    > DiplomaticEmpire

  > DepartmentOfEducation ("Education")

  > Fleet: ClassGarrison, ClassGarrisonFleet

    > Ship (ship, hero ship, mothership): ClassShip

      > Section: ClassSection

        > Module: ClassModule

    > Hero: ClassHero

  > LostSystems (systems that have been captured): ClassLostSystems

  > Unassigned hero: ClassHero

  > Relations with minor empires: ClassMajorRelationWithMinor

  > "Phantom garrison": ClassGarrison

    > Fake ships for empire's ship designs: ClassShip

      > Section: ClassSection

        > Module: ClassModule

  > PopulationEmpire: ClassPopulation, ClassPopulationEmpireAffinityXX

  > Quests: ClassQuests

  > DepartmentOfResearch ("Research"): ClassResearch

  > Senate: ClassSenate

    > Active law: ClassLaw

    > Senator: ClassSenator

  > Uniques

> Marketplace: ClassMarketplace, GameSpeedXX

  > TradableCategory: ClassTradableCategory

    > TradableSubcategory: ClassTradableSubCategory

      > Tradables: ClassTradable

> Galaxy

  > Star system: ClassStarSystem

    > Planet: ClassPlanet

      > ResourceDeposit: ClassResourceDeposit

> VictoryManager: ClassVictoryManager

Updated 4 years ago.
0Send private message
4 years ago
Jun 3, 2020, 3:32:21 PM
CaptainCobbs wrote:

Here's the official tree, which may be a bit confusing for what you are doing. If you open the game's modding tools (set the launch options to --enablemoddingtools, then start an ES2 game and hit F1, then go to Gameplay > Simulation, you should be able to see a simulation tree) you will be able to get any other information you might need.

thanks, may actually use the tree for some further path validation on top of the current one

0Send private message
4 years ago
Jun 5, 2020, 1:45:28 PM

With 1.2.1 the remaining hierarchy checks are now in, next up is the path validation

0Send private message
4 years ago
Aug 23, 2020, 8:58:08 AM
CaptainCobbs wrote:

Here's the official tree, which may be a bit confusing for what you are doing. If you open the game's modding tools (set the launch options to --enablemoddingtools, then start an ES2 game and hit F1, then go to Gameplay > Simulation, you should be able to see a simulation tree) you will be able to get any other information you might need.

Hello CaptainCobbs,


I did add the launch option but nothing happens then hitting F1.
I guess i'am missing something.

Would you have an idea ?


Thanks

0Send private message
0Send private message
?

Click here to login

Reply
Comment