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,203,216 views 278 replies | Pinned
Reply #51 Top

Quoting kyogre12, reply 50



Quoting ZombiesRus5,
reply 49
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.

Well, thats not any fun at all :)

Ok... Next questions... What version of Eclipse are you running and What version of Windows? I can try and recreate here and see if there is maybe a compatibility issue.

Edit: I'm assuming you downloaded the 3.5.x Eclipse Classic but just want to make sure. I'm using Windows 64 but I have a Windows XP machine I could try on too.

Reply #52 Top

Windows 7 Home Premium 64-bit, and Eclipse is 3.5.2, also 64-bit.

Reply #53 Top

Quoting kyogre12, reply 52
Windows 7 Home Premium 64-bit, and Eclipse is 3.5.2, also 64-bit.

Hmm, same environment as me. If you placed only the jar into the dropins directory it should have installed. I'll try and do some research on what might have happened. I'm curious does the Windows/Preferences/Sose Preferences show for you?

Reply #55 Top

Quoting ZombiesRus5, reply 53



Quoting kyogre12,
reply 52
Windows 7 Home Premium 64-bit, and Eclipse is 3.5.2, also 64-bit.



Hmm, same environment as me. If you placed only the jar into the dropins directory it should have installed. I'll try and do some research on what might have happened. I'm curious does the Windows/Preferences/Sose Preferences show for you?

That would be a no as well. I also re-downloaded the plugin, just to make sure I didn't get a bad download or anything, but still no luck.

EDIT: The newer version didn't work either, and no Sose Preferences.

Reply #56 Top



That would be a no as well. I also re-downloaded the plugin, just to make sure I didn't get a bad download or anything, but still no luck.

Sorry about this. I've performed all those steps from scratch and didn't have any issues locally, nor SuperZERO. I will need to do some research and see if I can come back with something. I would really like to get some more feedback on this tool so hopefully I can find something useful.

+1 Loading…
Reply #57 Top

Quoting ZombiesRus5, reply 56



That would be a no as well. I also re-downloaded the plugin, just to make sure I didn't get a bad download or anything, but still no luck.


Sorry about this. I've performed all those steps from scratch and didn't have any issues locally, nor SuperZERO. I will need to do some research and see if I can come back with something. I would really like to get some more feedback on this tool so hopefully I can find something useful.

No worries:thumbsup: I might try reinstalling Eclipse later today/tomorrow, depending on when I have time.

Reply #58 Top

Hey, kyogre12. I downloaded the Sins of the 13th Tribe (one of my favorite mods btw) and opened it in an updated entity validator, if you're interested and hope you don't mind. I was able to find a few things not handled properly in my tool such as reference meshes that end in .MESH that I'm able to handle now. I'll do some more testing on the current version and hopefully upload it this weekend.

http://dl.dropbox.com/u/5790092/Temp/sot13t.txt

Anyway here is the result. Two errors show up. One is a problem with my tool. I need to add BuffWormHoleTeleport as a builtin buffType. The second one that shows up is for a entity file in the particle directory. So I'm guessing it just needs to be removed.

The other stuff is just warnings like missing StringInfo(s) and a couple of miss-spelled sounds like WEAPON_TECHCAPITALAUTOCANNONLMEDIUM_MUZZLE.

Hopefully you will have some luck getting this installed :)

Reply #59 Top

Just got it working, reinstalling Eclipse worked. On my current build it says I have 683 errors and 725 warnings:P But I'm pretty sure most of those are because some of the files are in binary:P

I don't mind at all, and I'm glad you like the mod. To be honest though, I'm don't really think that will help me much, I'm basically rebuilding it from the ground up, to eliminate as many of those errors/warnings as possible. But I appreciate it nonetheless:thumbsup: And thanks for the great tool!

Reply #60 Top

Just got it working, reinstalling Eclipse worked. On my current build it says I have 683 errors and 725 warnings

Excellent, I'm glad you got it working. Many of the errors and warnings in the current version of the tool are due to expecting case to match on referenced files. The tool I will be releasing this weekend will have that as a preference you can turn on/off.

I also found a couple of things trying to validate your currently released mod, so I appreciate that.

Reply #61 Top

Ok, it seems that a lot of the errors/warnings I'm getting are because your tool expects [.particle] or [.entity], etc at the end of where they are referenced. Like in my CAPITALSHIP_COLGALACTICA.entity file, all of the weapon particle effects say there should be a .particle at the end. The fighter squadrons say there should be a .entity, as do some of the abilities, but not all of the abilities, which is weird.

+1 Loading…
Reply #62 Top

Quoting kyogre12, reply 61
Ok, it seems that a lot of the errors/warnings I'm getting are because your tool expects [.particle] or [.entity], etc at the end of where they are referenced. Like in my CAPITALSHIP_COLGALACTICA.entity file, all of the weapon particle effects say there should be a .particle at the end. The fighter squadrons say there should be a .entity, as do some of the abilities, but not all of the abilities, which is weird.

It should only be capitalization. The currently release tool will show "AbiltiyXYZ" referenced as an error if the file name is Abiltiyxyz.entity. The error listed is just to show it is tied to a .particle or .entity.

Here is a stable version you can load that will do case insensitive validation against reference entities, particles, etc. Simply shutdown eclipse and delete the previous jar from the dropins directory and place this jar instead. If you open the Sose Preferences via Windows/Preferences you will see three new options with one to ignore case on referenced files.

It's not as much of a problem when you are modding from scratch but shows up more when validating an existing mod since case sensitivity only matters in some areas of the files.

http://dl.dropbox.com/u/5790092/SinsTools/com.zombiesrus5.plugin.sose_1.0.0.201006181610.jar

 

Edit- I should probably think about changing the error and warning strings printed to avoid confusion. This is great feedback and thank you.

Reply #63 Top

Sorry about the confusion. It helps to have more input when creating a validation tool like this.

Here's an example error with case sensitivity on references. This error says it can't find a file matching the name CapitalShip_colonialBattleship.mesh. Now this file does actually exist but the name is CapitalShip_ColonialBattleship"

Description Resource Path Location Type
missing reference [.mesh]:  meshName "CapitalShip_colonialBattleship" CAPITALSHIP_TECHBATTLESHIP.entity /Sot13T/GameInfo line 251 Entity Problem

If I turn on "Ignore Case on Reference Files" then I do not see this as an warning.

Note: changes to "Sose Preferences do not take immediate effect currently. You will need to select Project/Clean... to perform mass re-validations. This step is not necessary when saving an individual entity file.

Reply #64 Top

Hm, even with the new version and Ignore Case turned on I still get the same errors. Here's a screenshot to hopefully show what I'm talking about:

The error is covering up the text, but it is 'squadTypeEntityDef:0 "SquadColViperMkII"' Same problem with the Raptor, and the meshes want a .mesh at the end, etc.

+1 Loading…
Reply #65 Top

Hm, even with the new version and Ignore Case turned on I still get the same errors. Here's a screenshot to hopefully show what I'm talking about:

Ok, I think I see what part of the problem is (thanks for the screen shot). You have uncovered one of the alpha features :grin:

Basically, the tool is expecting the mod folders such as GameInfo, Texture, Sound, String, etc to be physically in the project directory and not in a sub-directory or linked to a seperate directory outside of eclipse. When the tool attempts to locate a refereshed Entity in your mod it is looking in Sot13T/GameInfo, etc which doesn't exist. I think I have a way to fix this issue and might be able to test and upload it later tonight.

Although temporarily relocating the mod files to the Sot13T level should help the tool to locate references properly.

Here's an example of an eclipse project that shows the GameInfo, etc located in the project folder.

Reply #66 Top

Now for the Sins of a Solar Empire Vanilla/Entrenchment/Diplomacy Referenced files the sub-directories work because the tool is told where to look via the Window/Preferences/Sose Preferences.

Reply #67 Top

Ok, so just to clarify, this is what the file stucture should look like, right?

It certainly cut down on the number of errors and warnings, but I still get a bunch of occurances of the same problem as before but some of them went away.

Besides that, there is one thing I was hoping you could clarify for me. If I make a change with the tool, is it supposed to be changed in the actual mod files as well, or is there an additional step that I'm missing or something? Maybe it has something to do with how I load the files? I tried using the Import function originally, but it was tedious, and apparently no different from just copy/pasting. I suspect it probably has something to do with that, but I'm not really sure.

Reply #68 Top

Ok, so just to clarify, this is what the file stucture should look like, right?

Yes.

It certainly cut down on the number of errors and warnings, but I still get a bunch of occurances of the same problem as before but some of them went away.

Besides that, there is one thing I was hoping you could clarify for me. If I make a change with the tool, is it supposed to be changed in the actual mod files as well, or is there an additional step that I'm missing or something? Maybe it has something to do with how I load the files? I tried using the Import function originally, but it was tedious, and apparently no different from just copy/pasting. I suspect it probably has something to do with that, but I'm not really sure.

I use copy/paste and not the import/export to put files into the eclipse project sturcture. At it's core eclipse acts no differently from windows explorer and notepad when editing and saving files. The files are still accessible under your workspace and project directory even if eclipse is not running. You can also copy/paste from the Resource or Project explorer to windows explorer.

My validation tool doesn't actually modify any of your source files. What eclipse provides is a way to associate markers to source files that are displayed in the eclipse text editor. So if you save a file in eclipse the contents are saved to the harddrive like any other editor. You can then copy that file to the Sins mod directory for testing without worry.

Although, I would recommend looking at the build.xml and modifying the directories for your environment. The build.xml is a series of ant tasks with the purpose of automating deployment activities. This allows you to not modify files directly in the Sins mod directory or have to copy/paste entire mod files from your project to Sins mod directory. The ant tasks will validate if the file has changed and only copy it if needed. This applys to binary files such as textures as well.

Here is an example of the build.xml and the GameInfo files I used from your originally released mod to validate (left out the big stuff). With these files I only shows 2 errors and 74 warnings, most of this around PlayerPirate.entity missing references.

http://dl.dropbox.com/u/5790092/Temp/Sot13T.7z

One of the errors was Description Resource Path Location Type invalid value! expected: [PerPlayer, ForAllPlayers]: buffStackingLimitType "Invalid" BuffDesignateTargetCaster.entity /Sot13T/Particle line 4 Entity Problem. This appears similar to the first several errors in your screenshot. I built the meta-definitions for the Entity validation from the core sins files and the value "Invalid" was used in very few places. I was hesistent to add this as an allowed value for other settings even though many mods make use it in different places. I can compromise though and make it a configurable option if needed (possibly to help when merging other mods which it appears may be the case with your screenshot).

The other error was a built-in buff type that doesn't actually relate to any buff entity file (BuffWormHoleTeleport).

 

+1 Loading…
Reply #69 Top

Ok, sounds good. And yes, the "Invalid" error you mentioned was a result of merging in a mod, one of the Sins Plus varients floating around. I did some checking though, and using "Invalid" isn't necissary, the Distant Stars mod doesn't use it for their planets, so at least in this case using "Invalid" isn't required. More research is probably needed before it can be said it is an error, lazy, or something else, though.

And I just figured out why I was getting all of those errors/warnings. It was the same folder inside a folder problem from before, but with the reference files. I was looking at the researchInfo section of the PlayerCol.entity file, and there were a ton of errors. I noticed that the only items that didn't have an error were "new" research that was introduced in the expansions. Turns out my vanilla reference files were in a \Sins_of_a_Solar_Empire_1.191\Sins of a Solar Empire 1.191 kind of thing. Fixed that and now I'm down to 8 errors and 34 warnings, and all 8 of those errors are the "Invalid" thing.

Reply #70 Top

It certainly cut down on the number of errors and warnings, but I still get a bunch of occurances of the same problem as before but some of them went away.

I'd be happy to look at your current files if you wanted. Optionally, you could select all the errors and warnings and copy that to a text file and upload it for me to look at.

If you notice I use dropbox for small files (not so great for 500mb mods though). It's pretty cool and allows me to instantly share files by copying them to a dropbox location on my harddrive and then copying the shared link. Stardock apparently likes using this tool too.

Also, now that you are eclipse, you might take a look at code.google.com. I've been looking for easy/cheap ways to add source configuration management and have found a couple of tools now. This one currently appears to be the best available as it gives a 2GB limit, and supports other cool things like issue tracking adding project members etc. Using code.google.com and subversion to access the repository would allow you to check-in and create versions of your mod.

I've setup two projects on here, one for my mod and one for this tool. Also, it appears the Sins Star Trek (SoA2) mod is using this too.

If we get my tool working the way you want and you like using eclipse for your mod development ping me and I can help you setup eclipse to access the google repository. (or anyone else that is interested).

-Edit I was working on this post before your response. 

Fixed that and now I'm down to 8 errors and 34 warnings, and all 8 of those errors are the "Invalid" thing.

Woot!!! Thanks for sticking through this and I really hope you like the tool.

 

Reply #71 Top

Ok... now after all this great feedback, I need to re-organize this post and compile some better how to setup documentation. Thanks to SuperZERO0 and kyogre12 for giving all this feedback and working through the installation process.

I will also continue to enhance this tool providing additional editing features (like hover help, content assistence, templates), views, perspectives and hopefully some wizards in the future.

In your version kyogre12 there is a Entity Definition View that you can open by selecting Window/Show View/Other.. then selecting Sose Category/Entity Definition View. When you open an entity file, it will display the meta definition defined in an expandable tree view including supported enumerated values.

I created this view as sort of a primer to start looking at content assistence and hover help when editing. Unfortunately you can't copy from it yet, but it might be useful if you just can't remember what the allowed values where or how they were spelled.

Reply #72 Top

Fixed that and now I'm down to 8 errors and 34 warnings, and all 8 of those errors are the "Invalid" thing.

Woot!!! Thanks for sticking through this and I really hope you like the tool.

No problem. Thanks for a great tool.

code.google.com sounds interesting. It's similar to Windows Live Sync, correct? Do you know if it has an option for public downloads where you don't have to apply for permission? I really need a decent place to upload my mod to when the time comes. Even if it doesn't, it would still be great for private builds, like what I believe SoA2 is doing with it. So yeah, I would like to know how to get Eclipse to work with it.

The one feature I would like for your tool (don't know if it's possible) is what I touched on earlier; editing the actual mod files instead of a copy. Copy/paste is an inconveinence and the build.xml is quite frankly completely over my head. Although some sort of wizard could probably help that, and if Google Code works the way I think it does, it would be completely unnecissary for me. But it's still an awesome tool and very helpful, even without such features.

Reply #73 Top

code.google.com sounds interesting. It's similar to Windows Live Sync, correct? Do you know if it has an option for public downloads where you don't have to apply for permission? I really need a decent place to upload my mod to when the time comes. Even if it doesn't, it would still be great for private builds, like what I believe SoA2 is doing with it. So yeah, I would like to know how to get Eclipse to work with it.

It's probably a little more than Windows Live Sync. It adds a source code repository, issue tracking, wiki support, and team development support. The repository is a powerfule feature as you can tag versions of code and compare current builds against previous builds. Such as my mods not working now, what has changed since the last build type of compares.

http://code.google.com/p/support/wiki/GettingStarted

Downloads are supported but are limited to 100MB uploads which probably isn't enough for your mod.

The one feature I would like for your tool (don't know if it's possible) is what I touched on earlier; editing the actual mod files instead of a copy. Copy/paste is an inconveinence and the build.xml is quite frankly completely over my head. Although some sort of wizard could probably help that, and if Google Code works the way I think it does, it would be completely unnecissary for me. But it's still an awesome tool and very helpful, even without such features.

This is a reasonable request. Although I would recommend splitting your development environment from the mod/deployment environment if you integrate a tool such as code.google.com for the repository support. Adding a repository is a powerful concept but it will add some extra stuff to the development environment that you wouldn't want when you package the mod which is where ant becomes useful. In regards to the complexity of ant, here is a really simplified build.xml that only copies modified files from the development environment to the deployment/mod environment (http://dl.dropbox.com/u/5790092/SinsTools/copy_only_build.xml).

To support your request I have made a version that supports projects outside the eclipse workspace. To setup a eclipse project against the mod directory perform the following.

  1. Download version 0.4 from http://code.google.com/p/soaseplugin/downloads/list
  2. Create a new project with File/New/Project... When it asks for a project name choose "Create project form existing soruce" instead. Select the Browse... and navigate to you mod directory such as "C:\Users\user\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Diplomacy v1.011\Sot13T v0.96"

The only extra files you should end up with are a .project and .classpath in the root mod directory following this approach.

Reply #74 Top

To support your request I have made a version that supports projects outside the eclipse workspace. To setup a eclipse project against the mod directory perform the following.

Download version 0.4 from http://code.google.com/p/soaseplugin/downloads/list

Create a new project with File/New/Project... When it asks for a project name choose "Create project form existing soruce" instead. Select the Browse... and navigate to you mod directory such as "C:\Users\user\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Diplomacy v1.011\Sot13T v0.96"

The only extra files you should end up with are a .project and .classpath in the root mod directory following this approach.

Awesome, thank you! Just downloaded it, I'll try it later today.

code.google.com sounds interesting. It's similar to Windows Live Sync, correct? Do you know if it has an option for public downloads where you don't have to apply for permission? I really need a decent place to upload my mod to when the time comes. Even if it doesn't, it would still be great for private builds, like what I believe SoA2 is doing with it. So yeah, I would like to know how to get Eclipse to work with it.

It's probably a little more than Windows Live Sync. It adds a source code repository, issue tracking, wiki support, and team development support. The repository is a powerfule feature as you can tag versions of code and compare current builds against previous builds. Such as my mods not working now, what has changed since the last build type of compares.

http://code.google.com/p/support/wiki/GettingStarted

Downloads are supported but are limited to 100MB uploads which probably isn't enough for your mod.

Yeah, 100MB isn't enough. But how did SoA2 do it? As far as I know, they have the whole mod hosted there. Or are only the unlimited downloads restricted to 100MB?

I guess I should have clarified about how the build.xml is confusing me. How do I use it? Is it in Eclipse somewhere?

Reply #75 Top

Yeah, 100MB isn't enough. But how did SoA2 do it? As far as I know, they have the whole mod hosted there. Or are only the unlimited downloads restricted to 100MB?

It's only for the download section. 100MB uploads upt to a 2GB limit.

The repository is a seperate 2GB limit so they can host their whole mod there.

I guess I should have clarified about how the build.xml is confusing me. How do I use it? Is it in Eclipse somewhere?

In that case... Here is are the instructions I provided to SuperZERO0...

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.

If you want to use the Manifest Generator you will need to include the lib directory and the sins_build_tools.jar listed above. This jar is separate from the eclipse plugin currently and automates the Manifest file creation. You may already have an Entity Manifest generator so this is optional to use. (Here's an example with the manifest tasks in the build.xml http://dl.dropbox.com/u/5790092/SinsTools/sot13t_build.xml). If you don't have a manifest generator this will work whether you are coding directly in the mod directory or in a separate development directory. If you just want to regenerate manifests follow the step above but right click on "generate_manifests" versus "deploy_mod".

Here's a visual of executing the Ant build.xml from Eclipse: