aliens

Author Topic: OXC Ruleset Editor  (Read 12542 times)

Offline SonOfRainbow

  • Squaddie
  • *
  • Posts: 7
    • View Profile
OXC Ruleset Editor
« on: September 03, 2014, 08:15:20 pm »
Hi,

I couldn't really find a ruleset editor (saw some posts) so took a couple days to create one in .NET WPF.
 
It's currently Version 0.1 but it's able to parse through the default ruleset without any errors. If you use the tool make sure to make a backup before making any modifications! Also, it could be a good idea to compare the output with the input (with a tool such a BeyondCompare) before using the generated ruleset.

Tool Link: https://www.openxcom.com/mod/oxc-ruleset-editor

Current Features:
  • Load and edit any ruleset
  • Create a new ruleset
  • Add new Items and Units

Some known issues:
  • Serialization - Missing tilda (~) for nulls (i.e. StatStrings)
  • Serialization - Arrays are messed up after serialization, instead of [a, b, c] it turns into YAML list format
  • Databinding - Some challenge with databinding list/dictionary with the View
  • Add/Remove to any lists are missing (marked with "TODO" labels (Exception is Units and Items)
  • All data are in string format so no validation at all
  • Save prompts twice
  • UI is unintuitive and looks funny

Let me know if you encounter any issues, I'll try to fix them when I have time but will look into cleaning up the source code and sharing it with the community.

Have fun and keep the mods coming!
 ;D
« Last Edit: September 04, 2014, 02:26:09 am by SonOfRainbow »

Offline SonOfRainbow

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: OXC Ruleset Editor
« Reply #1 on: September 04, 2014, 01:21:36 am »
Just uploaded Version 0.15 which allows you to Add/Delete a lot of the entries in the ruleset.

Since the data is now presented in a TreeView you can right click on the nodes to Add/Delete rules.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: OXC Ruleset Editor
« Reply #2 on: September 04, 2014, 01:46:06 am »
This tool looks really great.  I can't wait to take it for a test drive. :)

Offline Roxis231

  • Colonel
  • ****
  • Posts: 484
  • Catching the feral kitten hiding in my rubish bin
    • View Profile
Re: OXC Ruleset Editor
« Reply #3 on: September 04, 2014, 06:52:26 am »
Just downloaded and gave it a try - got this result.

Offline SonOfRainbow

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: OXC Ruleset Editor
« Reply #4 on: September 04, 2014, 05:48:24 pm »
What version of Windows do you have? (XP/7/8/8.1) Also 32-bit or 64-bit installation?

Offline Roxis231

  • Colonel
  • ****
  • Posts: 484
  • Catching the feral kitten hiding in my rubish bin
    • View Profile
Re: OXC Ruleset Editor
« Reply #5 on: September 04, 2014, 10:12:20 pm »
MS Windows XP Professional 32-bit with SP3

Current with all updates (except Windows Genuine Advantage)

Any Help?

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: OXC Ruleset Editor
« Reply #6 on: September 04, 2014, 11:14:51 pm »
do you have .net installed?

Offline Roxis231

  • Colonel
  • ****
  • Posts: 484
  • Catching the feral kitten hiding in my rubish bin
    • View Profile
Re: OXC Ruleset Editor
« Reply #7 on: September 05, 2014, 02:21:23 am »
Versions 1.1, 2.0, 3.0 and 3.5 SP1

There hasn't been any more right?

Edit : Just found and Instaled 4.0 - Still get the Invalid Application result.
« Last Edit: September 05, 2014, 05:10:31 am by Roxis231 »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: OXC Ruleset Editor
« Reply #8 on: September 05, 2014, 07:07:08 pm »
It could be 4.5 that is unavailable for XP.

Offline SonOfRainbow

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: OXC Ruleset Editor
« Reply #9 on: September 05, 2014, 11:08:43 pm »
Yeah, version 0.1 and 0.1.5 were built with .NET 4.5

I'm working on a completely redesigned version, Had to do some major work around since YamlDotNet seems to interpret the YAML nodes in a different way then intended...so the version will jump to 0.5.0.

But the layout has been redesigned and the tool will be much more optimized (XCOM1 ruleset loads in 5 seconds) and supports the serialization/deserialization of 99% of it.
It will be built in .NET 4.0 to increase compatibility but  but that's the lowest framework the application can go since it uses datagrids extensively.

Stay tuned, should be ready very soon.

Offline SonOfRainbow

  • Squaddie
  • *
  • Posts: 7
    • View Profile
Re: OXC Ruleset Editor
« Reply #10 on: September 07, 2014, 07:02:19 am »
I'm happy to announce that version 0.5.0 has been released. It should support the entire ruleset as of the openxcom_git_master_2014_09_06_0652 build.
Visit the tool page for download and screenshots.

Still not fully tested in-game so use with caution. Enjoy!

------------------------------
Version 0.5.0
------------------------------
 + Implemented full de-serialization and serialization of Xcom1Ruleset.
    + De-serialization with YamlDotNet; Serialization with custom code.
 + Added summary counts of loaded counts beside TreeView.
 + Removed right-click context for Add/Delete; Use of DataGrids instead.


------------------------------
Instructions
------------------------------
 + Use File menu options to Load/Save/Create New rulesets.
     *** Remember to make backups of your Ruleset and do a text compare once the ruleset is generated. ***
     + Generated ruleset has not been tested extensively in-game.
     + Editor will generate ruleset in the same order as the Xcom1Ruleset. Please refer to it for formatting.
 + Create new entry by clicking on the bottom-most empty row of a data grid.
 + Delete entries by hitting Delete on keyboard.
 + Arrays must be entered in this format: [1, 2, 3, 4, 5]
 + If a loaded ruleset contains an error the Editor will indicate the row number in the Output panel.
 + Save and backup regularly.

------------------------------
Known Issues:
------------------------------
 - Issue with non-English string localization.
 - No field validation.
 - Trying to open a new ruleset while trying to edit a grid entry may free the Editor.


Please report any bugs on the OXC Forum.
Visit: https://www.openxcom.com/mod/oxc-ruleset-editor
Ruleset Reference: https://www.ufopaedia.org/index.php?title=Ruleset_Reference_(OpenXcom)
« Last Edit: September 07, 2014, 07:11:34 am by SonOfRainbow »

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: OXC Ruleset Editor
« Reply #11 on: September 08, 2014, 04:05:34 am »
If you're looking for ideas for additional functionality, the ability to generate a manufacturing profitability report (such as the one here), based on a list of loaded rulesets, would be very nice indeed.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: OXC Ruleset Editor
« Reply #12 on: December 21, 2015, 12:09:22 am »
Your work is appreciated, but i do not believe that your editor will beat Vi-Improved :)

Offline Bloax

  • Colonel
  • ****
  • Posts: 322
  • do you want to be any of those things
    • View Profile
Re: OXC Ruleset Editor
« Reply #13 on: December 21, 2015, 06:09:37 am »
I'm sure it'll beat vim for those that don't happen to know how to use it.

Which just happens to be quite a lot of people.

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: OXC Ruleset Editor
« Reply #14 on: December 21, 2015, 08:59:54 am »
Do you plan to load more than one ruleset at the same time, at least as readonly  ?

Some big mods have a lot of rulests and it is possible to
build mod on other mod :Piratez as example.

good work  !