Ultimate Editor

Ultimate Editor; support/discussion/questions

Moderator: thunderchero

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Given the long stalled progress on improving this awesome tool, I set up a new project repository at https://gitlab.com/stbotf/ultimate-editor, updated and replaced those messy old build scripts with the more modern Gradle build system, and in addition fixed the trek.exe verification so it now runs well with enlarged exe files. 8)

First commit in there is the original 0.7.2dev5c source, so you can track each single change I made.

I also added detailed build instructions and a simplified main readme with short build instructions. It is mostly reduced to:
  • download and install Eclipse
  • download the Ultimate Editor source
  • import the project following the default Gradle import wizard settings
  • run the Gradle build task and wait on completion
I didn't test this on other machines yet but expect no issues. But if there are, please let me know.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Ultimate Editor

Post by Tethys »

Ohhhh boy.. this sounds like it could be fun! So many changes and not so many ways to edit them these days.. this should solve that
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

Wow! Now I know why it was snowing outside. Apparently Christmas comes very early this year. :up:

But, if I'm not mistaken after a quick research, the Eclipse Gradle import and build task is still useless without java programming knowledge (wrt updating UE)?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Lathon
Lieutenant-Commander
Lieutenant-Commander
Posts: 116
Joined: Thu Oct 15, 2009 2:00 am

Re: Ultimate Editor

Post by Lathon »

I have pushed two changes that Thunderchero asked me to do years ago (sorry :\ )

The first one is to fix this bug where the Ship list under Ship stats would pretty much disappear. I extended the amount from 40 characters to 80 (this may not be supported ingame. I have not tested that piece)

Before
Image

After
Image

The next one was a very simple change. Its to enable the Experimental features by default (as most mods require this).
Image

Spocks-cuddly-tribble wrote: Thu Apr 15, 2021 7:47 am Wow! Now I know why it was snowing outside. Apparently Christmas comes very early this year. :up:

But, if I'm not mistaken after a quick research, the Eclipse Gradle import and build task is still useless without java programming knowledge (wrt updating UE)?
Yes, this project is in Java. However, if you are familiar with C/C++, it's not too hard to pick up.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

nice work,

if you want one a little more challenging you could look at fixing extending shipname.bin UE issue.

this was started by Dcer but never completed

viewtopic.php?p=50935#p50935

one other project would be to add the EdificePatcher

UE would need to check if Edifice.bst is edited if so run patcher then when saving rerun patcher? (this might be easiest way)

it might also be possible to make major edits to how UE does Edifice.bst file (if structures above tech 10)

I know there are other edits if you are interested.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Apr 15, 2021 2:23 pmif you want one a little more challenging you could look at fixing extending shipname.bin UE issue.

this was started by Dcer but never completed

viewtopic.php?p=50935#p50935
Wrong link. Here you go: viewtopic.php?p=49689#p49689

Note: Unused (empty, 0 entries) name groups in between used name groups should be represented by zero valued four byte entries before start of name list!

It was a misunderstanding by Dcer wrt my structure changes of shipname.dat (saved game file) and shipname.bin (stbof.res) itself.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Lathon
Lieutenant-Commander
Lieutenant-Commander
Posts: 116
Joined: Thu Oct 15, 2009 2:00 am

Re: Ultimate Editor

Post by Lathon »

thunderchero wrote: Thu Apr 15, 2021 2:23 pm nice work,

if you want one a little more challenging you could look at fixing extending shipname.bin UE issue.

this was started by Dcer but never completed

viewtopic.php?p=50935#p50935

one other project would be to add the EdificePatcher

UE would need to check if Edifice.bst is edited if so run patcher then when saving rerun patcher? (this might be easiest way)

it might also be possible to make major edits to how UE does Edifice.bst file (if structures above tech 10)

I know there are other edits if you are interested.
So not saying It's complete (still need to do more testing), but for UDM, how many name groups did you have in there? was it 60?
Image
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

Lathon wrote: Thu Apr 15, 2021 3:26 pmfor UDM, how many name groups did you have in there? was it 60?
UDM does not use extended name groups.

It's about allowing UE to add and edit up to 248 shipname groups instead of the default limit of 62 groups (due to old shipname.dat limitations) using this trek.exe patch: viewtopic.php?p=31850#p31850 (link corrected)

Dcer mistakenly changed the structure of shipname.bin when developing this extension feature.

Note after ever change in shipname.bin you must start a new game to test this (otherwise shipname.dat won't match changed groups and entries in shipname.bin)!
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Spocks-cuddly-tribble wrote: Thu Apr 15, 2021 7:47 am But, if I'm not mistaken after a quick research, the Eclipse Gradle import and build task is still useless without java programming knowledge (wrt updating UE)?
Be honest, you just fear that you might get the taste to it! :razz: :lol:

If you manage to read some text, I mean actual text and not such crazy asm code, you will easily find into it. The most challenging actually is not the programming part, but to set up an account and join for write access. You actually even might skip to install Eclipse and Git, but simply use the text file editor of the webpage. And if not writing any code, you can still write some bug tasks and directly link into the source code.

For serious contibution however I recommend to install Git https://git-scm.com/ and some handy commit environment like GitHub Desktop https://desktop.github.com/, SmartGit https://www.syntevo.com/smartgit/, or some other fancy client from this list: https://git-scm.com/downloads/guis. In addition you should generate an ssh key and add it to your GitLab ssh keys so you can skip the login process.

With git you can locally maintain a full copy of the repository, easily switch between commits and have your own branches that you can work on independently. It is not restricted to source code but you can use it for tracking your changes on other work too. And it doesn't rely on an external server and an account either, but you can even use it to manage local changes on different machines, or create and send in little patch files. It's however best to be used with smaller files in readable text format.
I'd be happy to write some tutorial, but you already find countless on the web.

Oh and modern C++ is much more complex than lame old Java. Java is made for people that love to play in a sandbox and fear to touch their system. But still the most C++ programmers will freak out when they try to look into assembler programming. That is for sure!
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Lathon wrote: Thu Apr 15, 2021 3:26 pm So not saying It's complete (still need to do more testing), but for UDM, how many name groups did you have in there? was it 60?
@Lathon dunno what you implemented already, but if you started on this, check on my analysis over here for reference. Or if you prefer, push your changes to some branch and I'll fix what is left. :up:

Oh and please update the changelog for the changes you already pushed! :grin:

Regarding the auto trek.exe fix, I think we should add another preference option for whether UE is actually meant to fix trek.exe while editing other files. And to my opinion it should default to no, given that is pretty intrusive!
Further the GUI warning should be added to the text mappings of the language.properties, and with a second mode there should be an alternative text for just notifying the user on the patch requirement.
In addition in ShipnameGUI there should be an option that controls whether to save in old or in new format so even when the list is smaller than 62 it can be saved in new format.
Spocks-cuddly-tribble wrote: Thu Apr 15, 2021 4:07 pm Dcer mistakenly changed the structure of shipname.bin when developing this extension feature.
@Spocks-cuddly-tribble Please let us know whether you will fix the asm patch to read the group count. When you changed the file structure by lengthening the group count anyhow, I'd really prefer a proper fix for that broken offset pointer issue. :smile:
User avatar
Lathon
Lieutenant-Commander
Lieutenant-Commander
Posts: 116
Joined: Thu Oct 15, 2009 2:00 am

Re: Ultimate Editor

Post by Lathon »

So I have implemented the fix to save more than 62 name groups :grin: . I just misunderstood at first what the ask was (it's been almost a decade since I've messed around with BOTF code)

However, I did find a little bug when this is running in game. For name group 62 (a newly added name group), it will grab the last entry of Group 61 and use that name in the rotation as well. Screenshots below

Image

Image

Screens of UE of the two name groups

Image

Image

However, when you create name group 63, it does not take names from any other group (in my limited testing). Perhaps we would need to skip using Group 62? what does everyone think?

As floke pointed out in the other thread, I still have some changes that need to be made. I will push the code to the repo probably early next week sometime after I finish up.
User avatar
Lathon
Lieutenant-Commander
Lieutenant-Commander
Posts: 116
Joined: Thu Oct 15, 2009 2:00 am

Re: Ultimate Editor

Post by Lathon »

Another question comes to mind is if we want UE to enable the patch into shipbin.dat (inside Trek.exe). Currently that feature is not working. If i use QD patcher to enable the patch, UE will work correctly. I can change the message to state to run the patcher first before adding new name groups, or I can try to fix UE's patching of Trek.exe.

What option would everyone prefer?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

Lathon wrote: Sat Apr 17, 2021 2:19 pm Another question comes to mind is if we want UE to enable the patch into shipbin.dat (inside Trek.exe). Currently that feature is not working. If i use QD patcher to enable the patch, UE will work correctly. I can change the message to state to run the patcher first before adding new name groups, or I can try to fix UE's patching of Trek.exe.

What option would everyone prefer?
It does not matter to me

one other thing I did in a test version that I compiled was to add a warning message in editing saved game
risk.jpg
risk.jpg (105.05 KiB) Viewed 3103 times
I added this message in MapGUIv2RightClickMenus.java
at line 83

Code: Select all

        {
                    JOptionPane.showMessageDialog(UE.WINDOW,
                    "Moving objects within saved game will cause" +
                    " the saved game to become corrupt" +
                    " Use at your own risk!!!!",
                    UE.APP_NAME, JOptionPane.INFORMATION_MESSAGE);
        }
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

I guess I'll have a look at fixing the object movement then. I already noticed alot of unfinished test code regarding ship placement when I fixed the 1000 compile warnings today. And I remember I successfully moved ships and systems and even added new ones when I manually edited files during savegame analysis. Can't be that much of an issue, but of course such a warning should be added anyhow.
Lathon wrote: Sat Apr 17, 2021 2:19 pm I can change the message to state to run the patcher first before adding new name groups, or I can try to fix UE's patching of Trek.exe.

What option would everyone prefer?
I just checked the source code some little. The patch is hard-coded in ShipnameCode.java. Given there is no more general implementtion but it is exclusive to patching trek.exe for shipnames, and given it is a bad idea to have such a patch hard-coded and possibly overwrite and break already patched code, and given we have another patcher tool that has much better support, best just remove it.

For a more fine granular identification of the warnings to show, you could re-use it or some hash comparision for patch identification. But that is luxury.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

I added a more general save corruption warning to the map gui now:
https://gitlab.com/stbotf/ultimate-edit ... 48e1876dc6
map_corruption_warning.jpg
map_corruption_warning.jpg (91.52 KiB) Viewed 3072 times
I always hated when I need to click aways intrusive popups.
Post Reply

Return to “Ultimate Editor”