Sins of a Solar Empire: Rebellion Map Validator
Contents:
What Even Is?
This program (herein called MV) is a fully stand-alone program thats main purpose is to analyse a galaxy file and correct any errors or inconsistencies found. MV is aimed at completely new and veteran map creators and possibly, other unfortunate people like myself. Effectively it ports maps from Trinity to Rebellion whilst checking all data for errors, omittance and possible issues.
Features of MV include: 1. Ports maps from Trinity to Rebellion. Since v1.22. Validates, finds and fixes any errors in a Galaxy file. Since v1.23. Supports both Galaxy Forge and Map Developer Galaxy files. Since v1.44. Converts Map Developer galaxy files to Galaxy Forge galaxy files. These converted maps can be opened up in Galaxy Forge. Since v1.55. Converted files can be played in-game as soon as they have been converted. Since v1.66. The ability to exchange the positions of all stars and planets of one map with the positions of all stars and planets in another map, which may be useful to some. Since v1.3.
Why Even Do?
I acquired Sins:Rebellion on the 18th of July after a friend suggested it to me (previously never even knowing anything about the game). After I installed the game I found out there was a Galaxy Forge, I then went looking for it but alas it had - for some reason - not installed with the rest of the game. I then went online and (not knowing that other versions of the game existed) downloaded the Galaxy Forge for Trinity. Of course the maps created in that Galaxy Forge just made the game crash upon browsing; assuming that this was the only Galaxy Forge I decided seek out what makes the game crash and to create my own program to fix those issues. After I found the stock galaxy files MV was soon created.
Although originally quite small and direct, MV soon expanded into it's own stand-alone program. If I would have been looking I would have realized that most of the community already has the Eclipse (and thus the Java JRE) so I didn't actually need to create a GUI for MV. Oh well
How Do I Do?
I have tried to make this program as simple as possible to install and use, however those that have installed this mod or minecraft will find MV even easier to install and run.
To install and run:
Any problems installing or running the MV please post.
Screenshots!
The main Graphic User Interface:
Example of the File Chooser in action:
The Preferences window:
Validation:
Looks interesting. I have a couple of maps I like to use in Rebellion.
EDIT: Just tested it. It also works in a Linux environment (running Rebellion on an Ubuntu machine).
java -jar "Sose Map Validator.jar"
I will give this a spin first thing in the morning and report back what I think. Thanks for posting!
Can you explain more clearly what you mean about exchanging stars between maps?
How does it handle (or not) in-map templates?
Oddly enough I didn't even know that converting Trinity to Rebellion was the main feature until I released it So as you can imagine I was working with limited resources with no outside knowledge (not exactly a good thing).
Thanks for confirming, knowing Java I just assumed it would work, but I never tested it on Ubuntu (or any other OS) despite having access to Ubuntu. So thanks
No worries I'm just hoping that it may prove useful to people other than myself.
This was actually something I added because I had different versions of a map. It only pseudo-exchanges positions - in that it just records the positions from one map and then replaces all of a maps' positions with the ones that were recorded. As you can see it isn't very straight forward so I'm glad you asked; here's an example of how to use the exchange positions feature:
The button Exchange Positions is probably the least straightforward feature of this program. The original intent of the button is to be able to copy all of the positions of the stars and planets from one map and be able to replace the positions of another map.It works like this: In the preferences file there is an option called createPosFile that must be enabled for this to work. After createPosFile has been enabled, validate the file that has the positions that is wanted to be copied. In the directory that the validated file was saved to there should be a file with the same file name but with a POS.txt appended to the end. This file should be renamed to only contain pos.txt;. After the file has been renamed, open up the program and browse for the map that wishes to receive the other maps' positions. Then, instead of validating, click Exchange Positions and hopefully you will have achieved a successful Exchange Positions.
The button Exchange Positions is probably the least straightforward feature of this program. The original intent of the button is to be able to copy all of the positions of the stars and planets from one map and be able to replace the positions of another map.It works like this:
The process may be confusing at first so just post if you get stuck
As I have explained earlier my knowledge before releasing this program was limited at best, this is because the only templates I encountered were the stock templates found in the original scenarios. This means that the Templates that I have seen were already in Rebellion format.
Nevertheless it validates the template as follows:subTemplates is checked for validity (makes sure that it is present/isn't set to an unreal number). groups is checked with the number of group objects found. condition integrity is checked. colonizeChance is recorded and checked. items is checked with the number of item objects present. Any missing data is automatically added.
Cool.
Now I am wondering if the swap stars is from the game save or in-game map creator maps or just from GF?
Are you porting game maps to GF?
That would be incredibly cool.
Currently just from GF. I haven't checked the game-save syntax so possibly from the game-save, but I'm going to take a guess and say that it's not currently supported.
Honestly I had never even thought of that but no, this program does not currently support that either I just had a peak at the MD syntax and conceivably it is possible to convert one to the other, however making that a reality is a different matter. I'm quite interested by the idea though and I will pursue the possibility just because I'm interested to see the extent MD data can be converted reliably to GF data (what trade-off will need to be made etc.). If I get the time after releasing version 1.3 I will seek to add this into the program also Just a word of information, MV won't be getting this feature within the week - looking at about a month depending on how much uni work I have to do
Just being able to convert in-game editor maps to GF would be great. Keep up the good work!
Added version 1.51. Biggest new features include:
1. Support for validating *.galaxy files made in Map Designer has been added.
2. Conversion from Map Designer .galaxy files to Galaxy Forge .galaxy files has been created by utilizing the Convert class.3. Text to GUI has been added so that users now know when conversion has finished.
Converted maps are not playable! But can be opened in Galaxy Forge.
Big Bump--great add here for map makers.
Version 1.52 has now been released. Fixed almost all of the issues found in versions 1.5 & 1.51, this is definitely one of most stable releases since version 1.2. All of remaining issues (most evidently when validating Map Developer galaxy files) have been resolved and will be released, along with a bunch of features, in version 1.6 which should be available for download within the week.
Version 1.6 has been released.Fixed some minor issues that were present in 1.52, but most importantly FULL CONVERSION from Map Developer to Galaxy Forge has been implemented. It is now seriously simple stuff - just a case of create, convert and play. View the changelog at the download page for full details.
Hey Khan, a few questions for you.
Right now I'm working on a complete editor for mods.
First question, would you be fine with me using some of your code in my project, as long as I attribute it to you?
Second question, which class/method it the top-level method to call to do the conversion from Map Developer to Galaxy Forge maps, and what does each parameter represent?
@jkmaster9918Sorry for the late reply, but yes it is fine if you use my code - just be sure to credit the respectful parts to me
As for the second question, unfortunately the way that the conversion is dealt with converting from MD to GF uses almost every class. It is a bit complex so let me detail it for you.
The top level method is found in the class GUIMain.java at line 264. This line creates a new Validation instance with the parameters of: the map file, the User Interface, true to convert file. The file is then validated as per usual (so that all the data can be read and stored), but right before the the map is usually output to file it is converted by the method ConvertOutput(), line 1251 in the Validation class. This method creates a new instance of the Convert class - which handles all of the conversion from MD to GF, like planet/star creation and so forth.
@KhanAndSteak
Thanks. The line numbers aren't going to be much help considering I'm using IKVM to convert it to .NET code and then using JustDecompile to decompile it, but the path of execution you posted is very useful. I wouldn't have been able to figure that out very easily. I'll make sure to credit you for your work if I ever get around to finishing my application. School is taking up all my time...
Hi,
Does not work with me. The map will be converted, but is not in "Galaxy Forge" menu, select still in the game.
JB
if the map is still in the map designer folder after the conversion to galaxyforge format then it will cause a minidump, just as map designer maps in the galaxyforge folder will, and the converted maps would need to be in the 'my documents/my games/..../GalaxyForge' folder. and not in the steamapps folders.
hope this helps
harpo
Attempted to use version 1.6 to update this GalaxyForge 3 map for use in Rebellion, and it didn't want to work, for reference I'm on Win 7 64-bit Ultimate; tried running the program with just JRE 32-bit, just JRE 64-bit, and both versions of JRE, installed, to no avail. Error log:
Thanks, but the map is in the Galaxy Forge folder. There is also a new self-created, which I can start without problems. the old, converted, is not even in the game appear to choose, even though it is in the same folder.
@ JackBauer36, I'm sorry but your words really confuse me in some parts. Can you please carefully explain what "The map will be converted, but is not in "Galaxy Forge" menu, select still in the game." means, also in your last post you said: "There is also a new self-created, which I can start without problems." are you talking about a map? if so, how was it self-created?Really confused and cannot be of much help until I know exactly what is happening @ Lavo_2, is the link you provided the base map? I'm not sure how my validator will handle the more than 10 players and the custom planet types - among other things. I'll test the map myself and get back to you.
Edit: I re-downloaded MV 1.6, via the link in the OP and then validated the map you provided via the link. This is the output from the MV and this is the validated product; unfortunately I could not test the map since it contains various modified content (extra planets that I don't have etc.). As far as I can tell there was no errors?
Thank you both for your time and patience while I attempt to fix the problems.
There are many great features available to you once you register, including:
Sign in or Create Account