SR2 Declasser v2.0

This programme takes a .txt file of classes in a certain format, and turns it into Vizzy Custom Instructions

What it is used for

Say you want to add many entries into a Custom Instruction. It will convert a text file of classes:

into;

You could manually input each parameter in-game, but you are probably going to write them out in a text file first to easily edit later.
This programme takes that txt (in a certain format), and adds each class into the Custom Instruction.

Format

Classes must be in the format of:

{Aitem1, Aitem2, (Aitem3a, Aitem3b), Aitem4}
{Bitem1, Bitem2, (Bitem3a, Bitem3b), Bitem4}

There is no limit to the number of objects in a class
You cannot have different number of objects in the classes (used to work, but now doesn't)
Classes must have same number of , commas, as it is the delimiter
There is no limit to the number of classes you can have

Input Rules

Each class must be enclosed in {}, and its objects separated by a , comma
Objects in () brackets are converted to vectors. [] square brackets are ignored
Whitespaces are also ignored and trimmed out. This applies to object-NAMES too
Object-NAMES cannot contain the following characters; ( ) { }
Vectors must have 3 components. So {Class1, (1,2)} is an invalid class as it has only 2 components

How To Use


  1. Make sure the Custom Instruction is created in your craft

  2. Double click exe file and wait a few seconds. It will open up window's console. This will be your input;

    If you click any other window while it is loading, you'll have to press enter in the console


  3. Follow instructions;

    -Insert your Classes file

    -Name your Custom Instruction (must be exact same name as in the craft programme in step 1)

    -Insert xml file of craft you want to add Instructions to

    -Name the output craft.xml file

    You can get this from C:\Users\name\AppData\LocalLow\Jundroo\SimpleRockets 2\UserData\CraftDesigns

    Every time you enter something into the console, it will unfocus the window. You'll have to click it again.

  4. Drag the newly-created xml file into the CraftDesigns folder

  5. Load craft file in game, and open the Vizzy programme


If the programme crashes, there's most likely a problem with your input classes. If you are unsure, you can test the programme with the test files (see below).


Lists

If you want to convert your classes into lists of objects separated by their object number, in the form of:
{Aitem1, Aitem2, (Aitem3a, Aitem3b), Aitem4}
{Bitem1, Bitem2, (Bitem3a, Bitem3b), Bitem4}
{Citem1, Citem2, (Citem3a, Citem3b), Citem4}
{Ditem1, Ditem2, (Ditem3a, Ditem3b), Ditem4}

it will output 5 lists, each of 4 items;
List 1: Aitem1, Bitem1, Citem1, Ditem1
List2: Aitem2, Bitem2, Citem2, Ditem2
List3: Aitem3, Bitem3, Citem3, Ditem3
List4: Aitem4, Bitem4, Citem4, Ditem4
List5: Aitem5, Bitem5, CItem5, Ditem5

which you can copy and paste into Vizzy.

Input Rules

Similar to Custom Instructions, but with some changes;

All () and [] are ignored; I couldn't get vectors to work in Vizzy lists.'


Download Here
Download the SR2DeclasserV2.exe
If you would like the source code, download the Python .py file
The other 2 files (XML craft, and inputClassesPy.txt) are for testing purposes


Testing

If you want to see if the programme works, whether to test if the programme is broken, or there is something wrong with your input files, there are 2 input files in the downloads folder you can use to check.
The first one is the inputClassesPy.txt file. Use this for inputting the classes into the programme.
The second one is the test craft file. Use this for inputting the craft. The Instruction name for this craft is "A".
Name the output craft whatever you want, drag into your CraftDesigns folder, open the craft, open Vizzy, and you should see the custom instructions.


I wrote this script 6 months ago so I can't remember the exact details of things, but if you have any questions, I'll try to help.

Tags
Mod

17 Comments

  • Log in to leave a comment
  • Profile image
    1,732 DrexxVolv

    @t4zcomz They do. You have to become a rocket expert to figure it out.

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX That's usually how it works. Most of the things I do with Vizzy I don't know already. SR2 makes you learn things.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    You know Vizzy apparently. I am trying to build a targeting missile as a demo for someone, and don’t know how to target a craft. If I put effort into this, I could probably find out. But I can’t, sooooooo.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    @t4zcomz A perfect explanation.

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX But then they forget their teaching skills and have to relearn it, which in turn makes them forget their subject.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    @t4zcomz heh. They suddenly lose everything they learned, and have to relearn it. But in the teacher version. Which is longer. Wwwaaaaaayyy longer.

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX Your quote inspires highly qualified experts to become teachers.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    @t4zcomz You managed to write it. Explaining something is harder than doing.

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX You're absolutely right, kind of. I have to try to understand what I'm reading. Maybe I'm just not smart enough.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    @t4zcomz Heh. If you actually read it, you kinda learn from what it’s saying.

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX It's okay, sometimes me neither.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    @t4zcomz Your welcome! I didn’t understand one word of this…

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @NebulaX Fancy seeing you here. Thanks you.

    2.8 years ago
  • Profile image
    1,732 DrexxVolv

    :0 this is amazing

    2.8 years ago
  • Profile image
    950 SCaxaR

    @t4zcomz xD, I managed to :D

    2.8 years ago
  • Profile image
    1,454 t4zcomz

    @SCaxaR Whew, that was quick. I didn't even get to finish proof reading it.

    +1 2.8 years ago
  • Profile image
    950 SCaxaR

    wow!

    2.8 years ago

6 Upvotes

Log in in to upvote this post.