Sins of a Solar Empire : Real-Time Strategy. Unrivalled Scale.
© 2003-2013 Ironclad Games Corporation Vancouver, BC. All rights reserved.
© 2006-2013 Stardock Entertainment

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

By on April 20, 2010 8:39:12 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums External Link

ZombiesRus5

Join Date 02/2009
+231

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.

Project Home
Downloads (Current version 1.0.0, last stable version 0.9.0)
Wiki Syntax

  Issues
  FAQ
  System Requirements 
  Version History

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

 

How To's:
How To Convert Reference Files
How To Install Eclipse

How To Setup Entity Validation Eclipse Plugin (Updated for new preference with v0.6)
How To Use Ant build.xml
How to Setup Subversion for Eclipse and code.google.com

(New) Video: How to setup and configure the Soase Eclipse Plugin


References:

Modding Tools (Weebly)

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
(NEW) 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
(NEW) Explosiondata Validation: Validates sounddata files for correctness including referenced sound files
(NEW) 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


 

Manifest Generator
Collects entities from multiple source directories and builds the Entity Manifest File for Deployment. 

 


Brush Generator


Takes a csv delimited template and generates a properly formatted brush file.

 

 

Sins Eclipse Editor used by:

     

I'd love to know if you use the Sins Eclipse Editor in your mod 

Pinned Post   |   257 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
June 12, 2010 11:04:24 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Thanks, I have it working. The "invalid" error for ResearchField entry should be "Diplomacy". These are things I have not been able to pick up with any other method.

It is curious that your tool has picked these entries as errors. SoaSE doesn't seem to mind them being "Invalid",  I guess either or my mod wouldn't work. I will fix these things however.

This tool is really going to be helpful to a code ammeter like myself. Awesome job & thank you!

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2010 1:19:54 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Well I had no problems with doing the version you posted a link for, and it would seem no problems with Distant Stars + Aha. although I can't seem to find the problem I'm looking for. One thing I have noticed in comparing the way the files were set up is that the Distant Stars + Aha has no Build folder with build file. Could this effect the way it works?

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2010 10:49:56 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I'm glad to hear you got the tool working. In regards to the build directory, it contains a build.xml that I put together for your mod to deploy from your project folder to the mod installation directory.

If you update the properties to reflect the right directory structures. You can open the build.xml and right click deploy_mod in the Outline view, select Run As/Ant Build. This will generate the entity manifest and deploy the mod to the deployment directory (Note: only changed files will be copied).

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2010 10:50:34 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

although I can't seem to find the problem I'm looking for.

What is it you are trying to track down?

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2010 7:46:25 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Well, that means I do have it working correctly then which is good. I am not to worried about the deployment thing As I can just move the new cleaned up mod manually no problem.

The thing I have trying to track is an issue in the Distant Stars + A,ha's combo I have made. It for some reason has a Tech player portrait in the Vasari portrait window. Also the button to select what race you want to be before you start the game only cycles through in the reverse, right mouse button, direction. I have gone over and over the brush's to find an entry that is not right but to no avail. I guess the reason why the Validation tool can not pick it up either is because if the brush is just giving a wrong location, technically it is not an error in the code string.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2010 8:12:36 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Ok, cool. I have that picture thing working in my mod. I will look at yours if you don't mind.

Also, you might give the build.xml a try. It is really fast to copy files (only changed ones are actually copied), plus it can regenerate the entity.manifest as part of the deployment.

Reason for Karma (Optional)
Successfully updated karma reason!
June 14, 2010 9:33:27 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Ok, cool. I have that picture thing working in my mod. I will look at yours if you don't mind.

Yes by all means. It is in (bin.) here is the link if you don't have it already;

http://www.filefactory.com/f/3907c9a54e193e91/

On my running of the tool over it I only found 1 error with brush's and that was for the planetbonus "BLACK" which just had the C in lower case. Also I have checked PlayerPhase, PlayerTech, PlayerPsi brush files and there are no wrong entries as far as I can see. It may be a problem with the brush's that relate to "BackDropFronteEnd" texture file but I can't locate the brush's or what have-you for that.

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 8:04:02 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

So to get this build file can I just copy the file you sent with the AHA mod. Then just change the name

<property name="deployment.dir" value="${mod.dir}/AHA TEST" />                    to

<property name="deployment.dir" value="${mod.dir}/Distant Stars + Aha TEST" />

I have no idea how to make these build files.

Also there is a small typo in this line                                                                          !!

<property name="entrenchment.reference.dir" value="${basedir}/../Sins Reference Fiels/Entrenchment 1.051" />

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 8:31:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Also there is a small typo in this line !!

 

Sorry about the typo... I missed that when I was putting together an example buildout. Fortunately that line is only used in the ant validate task so it shouldn't cause any issues. I use the installation directories when building the entity and brush manifests.

Distant Stars also has a few other directories I haven't incorporated into the copy portion:

<echo message="Copying Galaxy folder"/>
<copy todir="${deployment.dir}/Galaxy" failonerror="false">
    <fileset dir="Galaxy"/>
</copy>

<echo message="Copying PipelineEffect"/>
<copy todir="${deployment.dir}/PipelineEffect" failonerror="false">
  <fileset dir="PipelineEffect"/>
</copy>

<echo message="Copying TextureAnimations folder..."/>
<copy todir="${deployment.dir}/TextureAnimations" failonerror="false">
  <fileset dir="TextureAnimations"/> 
</copy>


 

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 8:38:53 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

So to get this build file can I just copy the file you sent with the AHA mod. Then just change the name

to



I have no idea how to make these build files.

Assuming you have the lib directory in your eclipse project with the sins_build_tools.jar inside it.

1) Open the build.xml into an eclipse editor.

2) Locate the outline view. (Upper right in Java perspective, lower left in resource perspective). Perspectives can be changed by selecting Window/Open Perspective. (See reply 28 for a visual).

3) Right click in the "Outline View" the line saying "deploy_mod".

4) Select Run As/Ant Build.

This should generate new entity.manifests and brush.manifests based on the current build rules. Any other existing manifests will remain unaltered.

It will also copy all source files to the target directory you mentioned above. Note my previous posts as there are a few directories I did not originally account for but are easy to add.

Let me know if you are having any issues performing this.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 8:54:14 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Yep, I got it working. It, as you said, missed the Galaxy, PiplineEffect, TextureAnimation & Sound Folders. (did an experiment before I read your post above). I will add the code you have posted and give it another whirl.

Another thing, I don't think this effects anything, but I did get some warnings about " couldn't find SoaSE install directory in C:/" or something. This to be precise;

[generatemanifest] Warning: C:\Program Files (x86)\Stardock Games\Sins of a Solar Empire\Window not found.
[generatemanifest] Warning: C:\Program Files (x86)\Stardock Games\Sins of a Solar Empire\Entrenchment\Window not found.
[generatemanifest] Warning: C:\Program Files (x86)\Stardock Games\Sins of a Solar Empire\Diplomacy\Window not found.

This would be because I have it installed on a different drive. Does this matter?

Thanks for your help.

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 9:55:33 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

OK! I have it working. All except the sound folder copied over. The mod crash's though, and I did paste in the sound folder from the original mod into the test mod.

Big difference in entity manifest count. Was 2176, after 1855. was this the same with yours?

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 10:40:51 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting SuperZERO0,
OK! I have it working. All except the sound folder copied over. The mod crash's though, and I did paste in the sound folder from the original mod into the test mod.

Big difference in entity manifest count. Was 2176, after 1855. was this the same with yours?

Sorry, was out mowing

Yes, the entity issue definately doesn't appear to be yours. Maybe there a double entries... I'm not really for sure yet.

Anyway, I get 1896 in the entity manifest file. And I am able to run both versions of the mod (yours and mine) so far without any crashes.

Here is the entity manifest that generates from your original files and is identical to my re-merge attempt.

http://dl.dropbox.com/u/5790092/Temp/entity.manifest

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 15, 2010 10:46:39 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

This would be because I have it installed on a different drive. Does this matter?

Big difference in entity manifest count. Was 2176, after 1855. was this the same with yours?

Ahh, makes sense now. Yes, it does matter. Pretty much all the Entity manifest generators out there use both your mod and the sins installation directories to build all the Entities that are used in the game. If you can change the property to point at your Sins installation directory you should be good to go.

<property name="sins.installation.dir" value="C:\Program Files (x86)\Stardock Games\Sins of a Solar Empire"/>

What you are getting right now is the 1855 files that are contained in the your mod's GameInfo. This means there are a few stragglers in the Sins Installation directory that weren't modified or included in your mod or DS's.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 16, 2010 12:22:42 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Yep! that entity manifest done the trick. Thanks this has been a great help

I have changed the "sins.installation. dir" value="G:\

and I still get the same 3 errors, only with a G instead of a C

Is the (x86) significant? that's the only thing that is different that I can see.

Reason for Karma (Optional)
Successfully updated karma reason!
June 16, 2010 12:32:08 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Is the (x86) significant? that's the only thing that is different that I can see.

Not important at all. That's just the Windows 7 path that the sins installation defaults too. The property should be changed to reflect your installation path. For example, I could have an install path be g:\games\Stardock Games\Sins of a Solar Empire.  So just right click on your "Sins of a Solar Empire.exe" and copy the entire location path into this property and you should be good to go.

Reason for Karma (Optional)
Successfully updated karma reason!
June 16, 2010 1:21:12 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Yep that (x86) was the issue. Runs perfectly now and have got the 1896 files.

This an extremely helpful tool. You have done an awesome job. Well done!

I would recommend this tool to all. I think even experienced coders would find the speed & ease at finding errors that this tool gives would be well worth it.

To the mighty ZombiesRus5

Reason for Karma (Optional)
Successfully updated karma reason!
June 16, 2010 4:47:10 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Downloading now. This looks like it will be very helpful.

EDIT: Ok, I'm having some problems. When I try to stat Eclipse it gives me an error, "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\Program File (x86)\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH"

I know you said Java 1.6 needs to be installed, but as far as I can tell, it is installed, so I have no idea what the problem is.

Reason for Karma (Optional)
Successfully updated karma reason!
June 16, 2010 11:50:57 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting kyogre12,
Downloading now. This looks like it will be very helpful.

EDIT: Ok, I'm having some problems. When I try to stat Eclipse it gives me an error, "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\Program File (x86)\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH"

I know you said Java 1.6 needs to be installed, but as far as I can tell, it is installed, so I have no idea what the problem is.

Ok, lets try this first. If you can look at your system properties/environment variables. Do you have a JAVA_HOME defined and a Path that links in Java 1.6?

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 3:36:18 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting ZombiesRus5,



Quoting kyogre12,
reply 43
Downloading now. This looks like it will be very helpful.

EDIT: Ok, I'm having some problems. When I try to stat Eclipse it gives me an error, "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:\Program File (x86)\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH"

I know you said Java 1.6 needs to be installed, but as far as I can tell, it is installed, so I have no idea what the problem is.



Ok, lets try this first. If you can look at your system properties/environment variables. Do you have a JAVA_HOME defined and a Path that links in Java 1.6?


No, I don't, so I assume that's the problem?

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 4:19:13 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums



No, I don't, so I assume that's the problem?

Yes, I would start there. Generally the java's bin directory is in the Path and the JAVA_HOME is set to the bin directory as well. This should allow Eclipse to locate Java and start successfully.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 5:00:09 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Working on a view to display the definition rules for the currently opened entity. The "Entity Definition View" shown below is a tree view containing all of the allowed fields and possible values currently defined. The view changes based on the type of entity that is opened.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 5:15:20 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting ZombiesRus5,



No, I don't, so I assume that's the problem?


Yes, I would start there. Generally the java's bin directory is in the Path and the JAVA_HOME is set to the bin directory as well. This should allow Eclipse to locate Java and start successfully.

Ok, I got Eclipse working, and now I'm trying to install the plug-in, but it isn't working. I unzipped it and but it in the Dropins folder, but I don't have a "Add/Remove Entity Validator" like your screenshot.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 5:18:04 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

The dropins are installed only when eclipse is started, unfortunately they won't install while eclipse is already running. If you haven't restarted Eclipse yet that is most likely the issue. Let me know.

Reason for Karma (Optional)
Successfully updated karma reason!
June 17, 2010 5:24:32 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting ZombiesRus5,
The dropins are installed only when eclipse is started, unfortunately they won't install while eclipse is already running. If you haven't restarted Eclipse yet that is most likely the issue. Let me know.

Nope, I've restarted Eclipse about 15 times now , still nothing.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108434  walnut1   Server Load Time: 00:00:00.0000390   Page Render Time: