ZombiesRus5 ZombiesRus5

[Mod Utility] Entity Editor and Validation Tool (Fan made, Supports Rebellion)

[Mod Utility] Entity Editor and Validation Tool (Fan made, Supports Rebellion)

http://code.google.com/p/soaseplugin/

I have a set of eclipse and ant based tools for modding with Sins that others may find useful when validating or building their projects.

Current Downloads (older downloads: Downloads

FAQ

System Requirements 

Syntax Wiki - A syntaxual representation of almost all of the Sins editable files.

 

How To's:
How To Install Eclipse

How To Setup Entity Validation Eclipse Plugin (Updated for new preference with v0.6)

Video: How to setup and configure the Soase Eclipse Plugin


References:

Mod Development with Eclipse (Forum link providing a general overview of Eclipse)

Eclipse download site (http://eclipse.org/downloads)

 


Tools Supported:

Entity Editor (Click me for cool stuff about visual Entity Validations)

Eclipse Editor builder/nature extension that provides visual feedback to the following validations.

Entity Definition View - Displays the syntax rules for the currently opened entity file.

 

Summary of validations currently supported:

Boolean: Validates boolean entries contain TRUE or FALSE only
Brush: Validates a referenced brush entry exists for the value entered
Conditional Validation: Allows conditional structures to follow based on a field value
Key word: Validates all entity file key words are spelled correctly
Quotes: Validates any values requiring qoutes have beginning and ending quotation marks
Integer: Validates integer entries contain digits
Decimal: Validates decimal entries contain ####.#####
Entity References: Validates a referenced entity file exists for the value entered
String Reference: Validates a referenced String entry exists for the value entered
Sound Reference: Validates a referenced Sound entry exists for the value entered
Enumeration Validation: Validates an entry confirms to an allowed set of values (i.e. buffInstantActionType)
Iteration Validation: Validates repeating elements are correct
Structure Validation: Validates entries appear in the correct order in the entity file (configurable to allow unordered structures)
Explosion Validation: Validates a referenced explosion entry exists for the value entered
Texture Validation: Validates a referenced texture exists for the value entered
Particle Validation: Validates a referenced effect exists for the value entered
Sounddata Validation: Validates sounddata files for correctness including referenced sound files
GalaxyScenarioDef Validation: Validates galaxyScenarioDef files for correctness with 2 pass validations
StringInfo Validation: Validates English.str for correctness
Brushes Validation: Validates brushes files for correctness
Gameplay.constants: Validates the Gameplay.constant file for correctness
Explosiondata Validation: Validates sounddata files for correctness including referenced sound files
Galaxy Validation: Validates galaxy files for correctness and performs additional validations on referenced templates and design names.

Content Assistance: [ctrl]+[space bar] on keywords or constants and get suggested completions
Syntax Coloring: change syntax coloring of entity files to suit your preferences (defaults to all black currently)
Hover Help: hover over a keyword and get additional details about the value or structure
Quick link to wiki syntax

1,202,926 views 278 replies | Pinned
Reply #226 Top

Quoting ZombiesRus5, reply 225
Abilities

Allowed: AlwaysPerform

I can't remember using anything but AlwaysPerform.

Instant actions seem to allow everything but AlwaysPerform and OnChance.

For Periodics I've also only used AlwaysPerform and OnChance.

Reply #227 Top

Quoting GoaFan77, reply 226

Quoting ZombiesRus5, reply 225Abilities

Allowed: AlwaysPerform

I've can't remember using anything but AlwaysPerform.

I was curious if anyone had tried OnCondition in the Ability file.

Reply #228 Top

Quoting ZombiesRus5, reply 226
So nobody knows anything on instant action usage... That's disturbing.

Here's some of the planned new features with the next version:


Option to choose if warning should be displayed for dead or un-referenced items.
Optional warning on dead or un-referenced entity files.
Optional warning on sound files that are not referenced in any sounddata.
Optional warning on particle files that are not referenced in any entity or mesh.
Optional warning on mesh files that are not referenced in any entity or particle effect.
Warning when known limits are exceed on iterative fields like NumWeapons.
Warning on usage violations for instantActionTriggerType such as using OnDelay in Abilities

I'd like to add support for identifying other entries that aren't used like brushes, but as I don't validate all structured files currently. This won't be possible until definitions are built for every structured file in Sins.

The above is working in my build except for the checking of particles in meshes and meshes in particles.

I need to write some new code to validate the meshes up to the vertices (i.e. not going to validate the entire file). I then need to create xml definitions for the particle files.

 

Reply #229 Top

It'd be nice to edit down that long list of warnings.  I pretty much ignore it due to the amount.

Reply #230 Top

Quoting XATHOS, reply 230
It'd be nice to edit down that long list of warnings.  I pretty much ignore it due to the amount.

The problem is on your end if your getting that many warnings.

My suggestion to edit them down would be to analyze the warning, why it is given and fix the issue.

 

In the rare event I'm reporting something incorrectly please feel free to report it.

 

Reply #231 Top

I was just wondering how you use and set up the Manifest Generator, that would make modding a lot easier.

Reply #232 Top

Quoting ZombiesRus5, reply 231

Quoting XATHOS, reply 230It'd be nice to edit down that long list of warnings.  I pretty much ignore it due to the amount.
In the rare event I'm reporting something incorrectly please feel free to report it.

 

I'm under the impression it's invalid entries from the devs.  I just got down playing a 4 hour game on my most recent build with no issue.

Reply #233 Top

Quoting XATHOS, reply 233

Quoting ZombiesRus5, reply 231
Quoting XATHOS, reply 230It'd be nice to edit down that long list of warnings.  I pretty much ignore it due to the amount.
In the rare event I'm reporting something incorrectly please feel free to report it.

 
I'm under the impression it's invalid entries from the devs.  I just got down playing a 4 hour game on my most recent build with no issue.

There are some invalid items in the core game, most are in PlayerPirate.entity.

I'm not surprised the mod works as that is the purpose for leaving several things as warnings and not errors. These are things you can fix or can ignore. It's up to you as the mod maker.

 

Reply #234 Top

Quoting kcirtap42593, reply 232
I was just wondering how you use and set up the Manifest Generator, that would make modding a lot easier.

Are you using Eclipse? Do you understand Ant?

I've thought about removing that from the OP as it seems there aren't any modding this game that understand or are interested in using development tools like Ant. 

My recommendation to most people is to use Harpo's manifest generator.

Reply #235 Top

Quoting ZombiesRus5, reply 235

Quoting kcirtap42593, reply 232I was just wondering how you use and set up the Manifest Generator, that would make modding a lot easier.

Are you using Eclipse? Do you understand Ant?

I've thought about removing that from the OP as it seems there aren't any modding this game that understand or are interested in using development tools like Ant. 

My recommendation to most people is to use Harpo's manifest generator.

 

I have found that your tool sets give us modders much more flexiblity , also with harpos tools sometimes they dont always function correctly .  Do you have any tutorials on how to use ant with eclipse ?

 

 

thanks jay

Reply #236 Top

Quoting ZombiesRus5, reply 235

Quoting kcirtap42593, reply 232I was just wondering how you use and set up the Manifest Generator, that would make modding a lot easier.

Are you using Eclipse? Do you understand Ant?

I've thought about removing that from the OP as it seems there aren't any modding this game that understand or are interested in using development tools like Ant. 

My recommendation to most people is to use Harpo's manifest generator.

 

Yeah, I am using eclipse, but I have no idea what Ant is or how to use it, I am interested in using it though as it would make modding just a little bit easier.

Reply #237 Top

Ant is a fairly stand tool used to execute build scripts.

There are tutorials on how to use Ant that you should be able to find with Google. I'd recommend doing some research and trying to use it to execute simple commands. If you are able to get some beginner comfort level with Ant then you might be able to incorporate some of what I've done.

I don't have any personal tutorials unfortunately.

 

Here is a snapshot of my current manifest generation for Trinity.

Code: xml
  1. ...
  2. <taskdef name="generatemanifest" classname="sose.ant.ManifestGenerator" classpathref="common.classpath"/>
  3. ...
  4. <target name="generate_entity_manifest">
  5. <generatemanifest manifestType="entityName" manifestFieldName="entityName" manifestFileName="${entity.manifest}">
  6. <fileset dir="${mymod.dir}/GameInfo" includes="*.entity"/>
  7. <fileset dir="${race.entrenchment.dir}/mod/GameInfo" includes="*.entity"/>
  8. <fileset dir="${races.dir}/GameInfo" includes="*.entity"/>
  9. <fileset dir="${races.diplomacy.dir}/GameInfo" includes="*.entity"/>
  10. <fileset dir="${sins.installation.dir}/GameInfo" includes="*.entity" excludes="*AntiMatterRestore.entity,*EvasiveManeuvers.entity,QuestKillTacticalModulesLow.entity"/>
  11. <fileset dir="${entrenchment.installation.dir}/GameInfo" includes="*.entity" excludes="QuestKillTacticalModulesLow.entity"/>
  12. <fileset dir="${diplomacy.installation.dir}/GameInfo" includes="*.entity" excludes="QuestKillTacticalModulesLow.entity,RESEARCHSUBJECT_PACTBONUS_METAL.entity,RESEARCHSUBJECT_PACTBONUS_MISSILE.entity,RESEARCHSUBJECT_PACTBONUS_SHIPSTRUCTUREMAX.entity,RESEARCHSUBJECT_PACTBONUS_SHIPSTRUCTUREREGEN.entity,RESEARCHSUBJECT_PACTBONUS_STRIKECRAFT.entity,RESEARCHSUBJECT_PACTUNLOCK_METAL.entity,RESEARCHSUBJECT_PACTUNLOCK_MISSILE.entity,RESEARCHSUBJECT_PACTUNLOCK_SHIPSTRUCTUREMAX.entity,RESEARCHSUBJECT_PACTUNLOCK_SHIPSTRUCTUREREGEN.entity,RESEARCHSUBJECT_PACTUNLOCK_STRIKECRAFT.entity"/>
  13. </generatemanifest>
  14. </target>

Reply #238 Top

Version 2.1.1 updated. Includes changes for all version of Sins.

Version History:

Eclipse Plugin:

** Warning: Warnings are something you should note, but don't necessarily indicate a problem with the mod. **

11/1/2012 v2.1.1 (Compatible with Eclipse 3.6.x or higher)

  1. Enhancement: Warns of entity files that "may" not be referenced
  2. Enhancement: Warns of mesh files that "may" not be referenced (Could be referenced from a Particle Effect).
  3. Enhancement: Warns of sound files that "may" not be referenced
  4. Enhancement: Warns of particle files that "may" not be referenced (Could be referenced from a Mesh).
  5. Enhancement:Reports needsToFaceTarget should not be set to TRUE when applying buff to self or multiple targets in Ability entities
  6. Enhancement: instantActionTriggerType should not be set to OnDelay? in Ability entities
  7. Enhancement: Added new hasWeaponEffects Reporter
    1. Reports 'canWeaponEffectHitHull' and 'canWeaponEffectHitShields' only make sense when then ImpactOffsetType? is 'RandomMesh?'. If the impact isn't on the mesh then these values are ignored.
  8. Enhancement: Preferences now include Rebellion Installation and Rebellion Reference options in the Preferences Dialogue.

 

9/12/2012 v2.1.0 (Compatible with Eclipse 3.6.x or higher)

  1. Enhancement: Added Compare Reference right click option in project explorer. Compares the mod file against the matching named reference file. (Rebellion Compatible).
  2. Enhancement: instantActionTriggerType now does additional validations based on the scope of it's usage: Ability, instantAction, periodicAction
  3. Enhancement: Added support for limit constraints on iterative fields such as NumWeapons? constrained to a limit of 5.
  4. Enhancement: Added HasBuff? aiUseTargetCondition.
  5. Enhancement: Supports Rebellion 1.04 release.
 

Reply #239 Top

Sweet. I don't suppose you added the new instantActionType "ApplyBuffToFirstSpawnerNoFilterNoRange"? I think I have over 100 errors from that. Might be more, I decided that when adding a lot of new files it's better to turn the validator off, do the skeleton work of copying/renaming buffs, then turn it back on to catch the errors before actually testing them.

Reply #240 Top

Quoting GoaFan77, reply 240
Sweet. I don't suppose you added the new instantActionType "ApplyBuffToFirstSpawnerNoFilterNoRange"? I think I have over 100 errors from that. Might be more, I decided that when adding a lot of new files it's better to turn the validator off, do the skeleton work of copying/renaming buffs, then turn it back on to catch the errors before actually testing them.

Updated a new version same name with that. I forgot they added that for some modder requests.

Edit:

The xml changed is buffInstantActionType.xml:

<condition><value version="Rebellion">ApplyBuffToFirstSpawnerNoFilterNoRange</value>
<field required="true" name="instantActionTriggerType"/>
<field required="true" name="buffType" validation="Entity" />
</condition>

Reply #241 Top

Quoting GoaFan77, reply 240
I decided that when adding a lot of new files it's better to turn the validator off, do the skeleton work of copying/renaming buffs, then turn it back on to catch the errors before actually testing them.

Ya, I do the same thing too. Especially if you are moving a file around at a time. It's pretty intensive adding new files as it prompts a "full" validation versus modifying a single file which does only validates that change. This is essentially done as references may have been fixed or removed updating the errors/warnings appropriately.

 

Reply #242 Top

Got this running recently and I tip my hat to you for it Zombie. I have a suggestion, for the asteroidTemplate and dustCloudTemplate checks, the tool should load up the mod's AsteroidDef.asteroidDef and DustCloudsDef.renderingDef files rather than using some default values. As, if someone uses any custom templates, the error checker can return hundreds of false positives, as it does whenever I run it, which is extremely annoying.

Reply #243 Top

Quoting Lavo_2, reply 243
Got this running recently and I tip my hat to you for it Zombie. I have a suggestion, for the asteroidTemplate and dustCloudTemplate checks, the tool should load up the mod's AsteroidDef.asteroidDef and DustCloudsDef.renderingDef files rather than using some default values. As, if someone uses any custom templates, the error checker can return hundreds of false positives, as it does whenever I run it, which is extremely annoying.

Ya, I see what you mean. I hadn't had any comments about this prior so didn't think about people modding those files. You could unzip the jar file and modify the planet.xml to in the meantime.

<field name="asteroidTemplate" validation="Any"></field>

And do the same for dust cloud templates.

Then zip it back up with the jar extension as before.

 

I need to see how much effort would be involved pre-processing those templates and adding them to validation.

Reply #244 Top

As Vader said, "impressive.".

Reply #245 Top

Another thing of alarm, concerning AsteroidDef.asteroidDef, if that isn't parsed there's a chance you will get false positives regarding mesh files that the plugin thinks is not referenced; once again, as is my case.

Reply #246 Top

Quoting Lavo_2, reply 246
Another thing of alarm, concerning AsteroidDef.asteroidDef, if that isn't parsed there's a chance you will get false positives regarding mesh files that the plugin thinks is not referenced; once again, as is my case.

That is an option that can be turned on/off. I included it as a way to help cleanup my mod with the knowledge I can't handle every file and reference in Sins. You should turn it on when you want to analyze what "might" be dead. It's really useful, but not absolute.

 

Reply #247 Top

That's what I figured; it actually has been quite helpful in finding a bunch of mesh files that aren't used, which has freed up some valuable space. This has been invaluable so far.

Unrelated, but is there a way to get the error and warnings tabs to display anything, versus just 100?

Reply #248 Top

Quoting Lavo_2, reply 248
That's what I figured; it actually has been quite helpful in finding a bunch of mesh files that aren't used, which has freed up some valuable space. This has been invaluable so far.

Unrelated, but is there a way to get the error and warnings tabs to display anything, versus just 100?

It's the little triangle in the upper right of the frame. Look at Preferences then Configure Contents for another useful filter.

Reply #249 Top

That preferences or configure contents should do the trick, if I can find the thing, which I seem to be unable to do.

Quoting ZombiesRus5, reply 244
Then zip it back up with the jar extension as before.

Hate to sound like an idiot here, but using what program exactly? Putting it all into an archive (without compression) and then simply changing the extension doesn't seem to want to work.

Reply #250 Top

Quoting Lavo_2, reply 250
That preferences or configure contents should do the trick, if I can find the thing, which I seem to be unable to do.

Click on the little triangle shown in this screenshot for "View Menu". It will popup a small menu with those two options.

 

It's the little triangle in the upper right of the frame. Look at Preferences then Configure Contents for another useful filter.

 

Reduced 55%