Transgenesis (Alpha 2): Smart XML Editor for Transcendence

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

Thu Jul 27, 2017 7:52 am

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.

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1384
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska

Fri Jul 28, 2017 3:02 am

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 Commander
Militia Commander
Posts: 379
Joined: Tue Mar 05, 2013 8:26 am

Mon Jul 31, 2017 2:56 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 Commander
Militia Commander
Posts: 385
Joined: Tue Nov 05, 2013 9:56 am

Tue Aug 01, 2017 7:09 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

User avatar
0xABCDEF
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Tue Aug 01, 2017 6:57 pm

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.

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

NMS
Militia Commander
Militia Commander
Posts: 379
Joined: Tue Mar 05, 2013 8:26 am

Tue Aug 01, 2017 7:08 pm

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
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Tue Aug 01, 2017 8:12 pm

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.

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

NMS
Militia Commander
Militia Commander
Posts: 379
Joined: Tue Mar 05, 2013 8:26 am

Wed Aug 02, 2017 7:05 pm

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
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Thu Aug 03, 2017 4:52 am

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

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

User avatar
0xABCDEF
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Fri Sep 01, 2017 8:34 am

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).

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

User avatar
0xABCDEF
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Thu May 19, 2016 12:58 am
Location: Was destroyed by a Phobos-class dreadnought in the Eridani system

Mon Sep 11, 2017 2:03 am

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.

Code: Select all

<OnFireWeapon>
	(gamEnd Nil "encountered an unexpected error")
</OnFireWeapon>
-Command Screen Library: RTS in a dockscreen
-Extended Justice: A safer Commonwealth for all
-Playership Bones: Revisit your old ship wrecks!
-Please help out our official Documentarist (me) by editing the wiki

Post Reply