Transgenesis (Alpha 2): Smart XML Editor for Transcendence

General discussion about anything related to Transcendence.
Post Reply
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Transcendence modding has a difficult learning curve primarily due to the expansiveness of the modding API and the lack of documentation. It can be difficult for a beginner to create something such as a new ItemType because one has to remember the element and attribute hierarchy for that type, which can be exceedingly complicated. For instance, just look at the attribute list for <Armor>, which is merely a subset of the entire ItemType hierarchy.

Code: Select all

* Armor
** blindingDamageAdj= [whole] 
** blindingImmune= [boolean] 
** chargeDecay= [whole] 
** chargeRegen= [whole] 
** completeBonus= [whole] 
** damageAdjLevel= [integer_sequence] 
** decay= [whole] 
** decayRate= [whole] 
** deviceCriteria= [string] 
** deviceDamageAdj= [whole] 
** deviceDamageImmune= [boolean] 
** deviceHPBonus= [whole] 
** disintegrationImmune= [boolean] 
** distribute= [whole] 
** EMPDamageAdj= [whole] 
** EMPImmune= [boolean] 
** enhancementType= [hex_number] 
** idlePowerUse= [whole] 
** installCost= [whole] 
** installCostAdj= [whole] 
** maxHPBonus= [whole] 
** maxSpeedBonus= [whole] 
** photoRecharge= [boolean] 
** photoRepair= [boolean] 
** powerUse= [whole] 
** radiationImmune= [boolean] 
** reflect= [string] 
** regen= [whole] 
** repairCost= [whole] 
** repairCostAdj= [whole] 
** repairRate= [whole] 
** repairTech= [whole] 
** shatterImmune= [boolean] 
** shieldInterference= [boolean] 
** stealth= [whole] 
** useHealerToRegen= [boolean] 
With a program like Notepad++, there is the frequent possibility of making typos and having to look back and forth between the wiki and the editor.

There is also the added inconvenience of having to allocate UNIDs and to ensure that UNID groups are expansive enough to add new UNIDs in the future without taking too much from the rest of the space.

TransGenesis aims to address these problems and many more. It can create, load, and save extensions and generate XML. It also provides a graphical tree to display the hierarchy of Types and elements. When a user selects an element on the tree, TransGenesis brings up a list of all valid attributes plus corresponding fields to modify their values. Many of these fields have drop-down menus containing valid values to choose from. For instance, when there is a field that accepts UNIDs of a certain DesignType, TransGenesis will detect all matching local and library-defined types from the parent extension and place them in the field's drop-down menu. TransGenesis also provides a list of buttons to create subelements and a text area to edit the code or text content in the selected element (code detection not available).

Furthermore, this tool provides a UNID/Type Manager that allows you to define Type Entries and Ranges. For the following explanation, I will define the term "UNID" as a number; "Entity" as the XML entity name to be bound to the UNID; and "Design" as the XML code that defines a Type. A Type Entry consists of a UNID (a number), an Entity, and a Comment. A Type Range consists of a Minimum UNID, Maximum UNID, a list of Entity, and a Comment. When TransGenesis generates XML, it automatically assigns each Entity to a Design and shows warnings for conflicts.

Images
Image

Image

Image

Notes
  • The implemented hierarchy definitions for TransGenesis are incomplete, so some Designs will not be recognized; this is shown when all the attributes are classified as strings and no subelements are available.
  • Built-in documentation is completely unavailable right now, but wiki extraction and tooltips are planned for [Future Release]
  • Some warnings may be disabled in the current build.
  • This program requires that you have the latest version of Java installed on your computer.
GitHub Repository

Releases

Please help me develop TransGenesis by providing feedback and suggestions.
Last edited by 0xABCDEF on Tue Sep 19, 2017 6:03 pm, edited 3 times in total.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

ok..Officially Blow Away....WOW.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

This is very impressive, but it doesn't seem to be possible to edit the text inside XML elements. Honestly, even when it is, I probably won't use it because Notepad++ has so many useful search and text editing features. Problems with my mods are usually in the TLisp, and when they're in the XML, the game usually gives adequate error messages about them. But I can see how it would be useful to someone who's less experienced.

Also, there are some minor inconveniences with the UI:
- Attempting to load some mods fails silently, closing the program if nothing else is loaded.
- Initial windows don't appear in the taskbar, making it hard to know if it's just taking a long time to load or has failed.
- The load window doesn't seem to remember last location, although I did apparently get the default to change from system32 to desktop.
- Similarly, it starts out small, doesn't remember previous size or view mode, and starts with columns too narrow to show much text in the case of the initial Open window.
- The loading results window can extend off bottom of screen, hiding the OK button, and it can't be resized. Pressing Enter or clicking the close button works, but neither one is obvious.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

This looks like it could be awesome but I'm not sure how to get it to run.

I'm failry sure I don't have the latest verion of Java and my very old computer recommends opening Transgenesis v11.jar with:
Java(TM) Platform SE binary

but does nothing when I do. It doesn't give a "Run as" option.

Which version of Java would I need and any idea where it can be downloaded from?
Also how do you get a .jar file to run?

Can you tell I'm not very computer-savvy! :o
Stupid code. Do what I want, not what I typed in!
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

The large white text box at the bottom of the editing screen is where you can edit the text content. Any changes to XML data are not saved until you click Save.

For debugging purposes, can you refer to some mods that silently crash the program?

I am not very experienced at creating UI in Java, but I will improve the loading dialogs.

TransGenesis requires "Java SE Runtime Environment 8", which seems to be the default download at java.com (click the Free Java Download button). The JAR file runs under the name "Java(TM) Platform SE binary" when opened.
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

That text field is not editable for me. Neither is the one containing the element tag, which would occasionally be useful to rename an element without having to recreate all its contents. I'm running Java 8 update 141 on Windows 8.

Sorry, I'm not sure if any of the files that failed to load actually should have loaded - they might have been ones without Transcendence modules/extensions/etc. But an error message would be nice, instead of just doing nothing or closing the program if nothing is loaded yet.
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Actually, TransGenesis ignores all files except those with the .xml extension.

Turns out that I forgot to make the text area editable. On another thought, its size is not changeable or dynamic because I do not know enough about the current layout scheme right now; additionally, the unusual way that elements and text appear in the output is the work of Java's DocumentBuilder and is mostly out of my control.

Element names are restricted because they are not supposed to be changed. "Custom" elements are renameable and are available in StaticData/GlobalData/InitialData and Event elements under the names "Data" and "(Custom Event - Insert Name Here)" respectively.
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

Something I noticed is missing: dockscreen <Action>s can specify what they do with subelements, including <Exit/> and <ShowPane pane="pane" />.

Maybe you should allow custom subelements and attributes for all elements?
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

I will be working towards moving all user messages and internal notes into a separate console window. I will try to make the console update independently from the main window using Java's multithreading API.

I plan to define the hierarchy in the program code, but in the meantime I will try to add custom elements.

Here is a release with a basic console window: https://github.com/INeedAUniqueUsername ... %20v12.jar
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

I have implemented SystemType, SystemPartTable, SystemMap (TopologyCreator, TopologyProcessor) elements/attributes and fixed a possible bug with redundant Type Binding during initialization (note: Type Binding usually happens twice at a time to address overrides and external UNIDs).
User avatar
0xABCDEF
Militia Lieutenant
Militia Lieutenant
Posts: 124
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Remade the user interface so that it no longer breaks as much from resizing the window. Also added a simple search bar; begin a search query with a & to find UNIDs and without to find elements. Extensions in the tree menu will now be marked with (B) if they have outdated type bindings and (S) if they have unsaved changes.

Also fixed a bug with the Binding and Saving functions.
Post Reply