Page 8 of 9
Re: UE Map Editor
Posted: Fri Jan 06, 2023 6:27 am
by Spocks-cuddly-tribble
Flocke wrote: ↑Fri Jan 06, 2023 3:43 amIn case of GWTForce I don't think there is any alternate order for re-grouping ships.
A possible exception purpose, explains separated files instead of sub sections (empsInfo/systInfo).
Purpose of two pointer to task-forces in sector IDs in sector.lst (monster don't need an extra list)?
Re: UE Map Editor
Posted: Fri Jan 06, 2023 1:52 pm
by Flocke
Spocks-cuddly-tribble wrote: ↑Fri Jan 06, 2023 6:27 am
Purpose of two pointer to task-forces in sector IDs in sector.lst (monster don't need an extra list)?
Monsters use the same list, I'm pretty sure I've seen it before.
Re: UE Map Editor
Posted: Mon Jan 09, 2023 2:34 pm
by driscoj
Recently found this tool and made good use of it. Took me a bit to get a full handle on things, but recently edited a Turn 1 map to be mostly like what I wanted, but only because it had the minor races I wanted (mostly). I was wondering if it is possible to add a minor race to a map via the editor? Not a whole new race, but one from the game list. I mostly play AAM, and would like to make a "canon-ish" map to play on. Searching here was not fruitful, but my search fu may just be weak. I'd appreciate being pointed in the direction of anything I missed! Thanks!
PS: I set the number of maximum minors per small/med/large map to 29, what the UE help says the max is, but I think I still only got the normal "amount" on my small AAM Turn 1 map mentioned above. Is it possible to make it spawn more minors/all minors?
J
Re: UE Map Editor
Posted: Mon Jan 09, 2023 5:43 pm
by Flocke
Welcome driscoj,
although I successfully added whole new systems by hex-edited before, support for editing systems with UE is rather limited. You find some options in Edit-Systems menu, where on second view you can also edit planets. Editing minors sadly is not supported at all, but chance is that it is not too much of an issue to add some by hex-editing.
What you easily can do with latest soon to be released UE is move around systems, ships and starbases. With previous versions it still was a bit bugged, specially at later turns.
The tutorial at
https://www.armadafleetcommand.com/botf ... ial-for-ue indeed states that max minors is 29. UE actually however limits to 30 minors, which matches with
viewtopic.php?f=111&t=769 found in structered modding index documentation on the forums. From what is told there I guess the game executable has a hard limit there - maybe some fixed array size. The tribble master might know more on it.
cheers
edit: I just had a look, improving the system editability on map view should be easy. I might include some improvements.
Re: UE Map Editor
Posted: Mon Jan 09, 2023 7:29 pm
by Spocks-cuddly-tribble
There is many code anomalies with minor races:
viewtopic.php?p=57487#p57487 +
viewtopic.php?p=57496#p57496
But main issue for (older) mods is minor density/placement vs readrace crash/errors.
If you edit the map anyway, just increase the density value and set max minors to 30 (depending on used code hex value 31 0x1F).
Re: UE Map Editor
Posted: Wed Jan 11, 2023 5:52 pm
by driscoj
Can either of you better inform me on the "density" value? I played with it, but it resulted in a crash 100% of the time. So I left it alone.
One option may be to simply play on AAML (large version) and I think it will add all the minors on the largest maps. Then I could simply edit the map accordingly, and perhaps have large blank/empty areas beyond the "known galaxy"; in other words, just don't use all the sectors of the map and create a smaller "galaxy" in the middle-ish.
Re: UE Map Editor
Posted: Thu Jan 12, 2023 3:08 pm
by Spocks-cuddly-tribble
Trek.exe at 0x17D668 (double float 8 bytes) vanilla default 0.2. (UE handling?)
Set this to max 1.0 (most minors on left side of map - doesn't matter for you).
Example with hex editor HxD (just click right box double float [here 0.2] and enter new value):

- Screenshot (46).png (116.13 KiB) Viewed 296 times
Then set max minors to 31 due to code deviation -1 (current UE handling should convert 30 to 31 in trek.exe?)
Re: UE Map Editor
Posted: Sat Feb 25, 2023 4:56 pm
by Flocke
Flocke wrote: ↑Mon Jan 09, 2023 5:43 pm
edit: I just had a look, improving the system editability on map view should be easy. I might include some improvements.
A little update, I got adding systems work and implemented some basic system generation options. Further I got the system remove work, which has been much more challenging, since it requires to update all onfollowing existing system ids.
With the system remove I however still face two bugs that I havn't solved yet.
1) One is that already first turn the AI major races have some connection to some minor races so the major race must be removed first. In the image below e.g. the Federation has some connection to the Yridians and the game crashes on load when I remove the Yridians. Likewise the Ferengie had some connection to the Zakdorn, and the Cardassians to the Vulcans.
2) Second is that on evolution jump of the minor races, the game crashes when I removed the system.
Beside of this it already works pretty well even when I tested 400+ turns. But only tested for editing first turn saves yet.

- UE_SysRemove.jpg (311.94 KiB) Viewed 204 times
Re: UE Map Editor
Posted: Sun Feb 26, 2023 11:13 am
by Flocke
I have it, there was a race id integer overflow for setting the beaten empires in the gameInfo file.
Now with latest version from
https://gitlab.com/stbotf/ultimate-edit ... ap_sys_gen branch you can create some nice scenarios I guess.

- UE_FixedSysRemove.jpg (332.49 KiB) Viewed 196 times
Btw, here my score graph for building up some defence

:

- Cheated_SysRemove.jpg (207.05 KiB) Viewed 195 times
Re: UE Map Editor
Posted: Sat Mar 18, 2023 2:52 pm
by Flocke
Making progress with editing later turn games...

- all mine.jpg (305.97 KiB) Viewed 124 times
I won!

Re: UE Map Editor
Posted: Sat Mar 18, 2023 3:30 pm
by Spocks-cuddly-tribble
Flocke wrote: ↑Sat Mar 18, 2023 2:52 pmall mine
I won!
Outstanding Victory! Congratulations! How about a detailed after action report of this challenging match?

Re: UE Map Editor
Posted: Tue Mar 21, 2023 4:28 am
by Flocke
Spocks-cuddly-tribble wrote: ↑Sat Mar 18, 2023 3:30 pm
Outstanding Victory! Congratulations! How about a detailed after action report of this challenging match?
The ups and downs are when I fix one issue and there comes the next one.
Some are obvious issues that are easy to fix, some require more in depth analysis and alot of try and error. And all the time I hope I have it and then again there comes a crash.
Right now I'm hunting a crash with the diplomatic relations. Doing some testing I found that I missed to remove dead race relations in alienInfo and AgtDp, that still some AIAgent files are kept that should have been removed, and that there are also some trade routes listed for that I removed the other system. Fixing those issues, again I hope that was the final larger bug.
One other crash I get every other savegame load is:
Code: Select all
Name des fehlerhaften Moduls: trek.exe, Version: 0.0.0.0, Zeitstempel: 0x37965563
Ausnahmecode: 0xc0000005
Fehleroffset: 0x000b6c66
No crash log of course.
This one sometimes even shows up when I solely keep loading unmodified vanilla games. But with modified files it often becomes more frequent. With some games it repeatedly already shows up each second time I load the save. Then when I have rebooted it becomes less frequent again. Therefore my guess is that it is related to some dead memory references, e.g. some array index like a system index that I missed to update. But since it also happens on vanilla games it might also be just random bad luck.

Re: UE Map Editor
Posted: Tue Mar 21, 2023 9:22 am
by Spocks-cuddly-tribble
Flocke wrote: ↑Tue Mar 21, 2023 4:28 amOne other crash I get every other savegame load is:
This one sometimes even shows up when I solely keep loading unmodified vanilla games. But with modified files it often becomes more frequent. With some games it repeatedly already shows up each second time I load the save. Then when I have rebooted it becomes less frequent again. Therefore my guess is that it is related to some dead memory references, e.g. some array index like a system index that I missed to update. But since it also happens on vanilla games it might also be just random bad luck.

It's sub_4B77E0 race_rst_start_set_races_in_game_via_RToSInfo -> updated races in game bitmask for race IDs 32+ -> loaded [gameInfo+274h]
A strange code also related to the readrace crashes during galaxy generation. Shouldn't be used for loaded games, but there is some odd x-ref calls.
Since it also happens with unmodded vanilla trek.exe it can't be outdated/flawed patches in that subroutine?
Re: UE Map Editor
Posted: Tue Mar 21, 2023 3:13 pm
by Flocke
Spocks-cuddly-tribble wrote: ↑Tue Mar 21, 2023 9:22 am
Since it also happens with unmodded vanilla trek.exe it can't be outdated/flawed patches in that subroutine?
I have BOTF_Top_10_mods_2.0.2_Beta2 installed (1366x768) and havn't modified the files. For testing I always kept a copy and I just did a binary compare.
I will try other vanilla installs when the error keeps occuring and I completed next UE release.
Re: UE Map Editor
Posted: Thu Mar 23, 2023 6:59 am
by Flocke
So, with many further code fixes I now seem to have a mostly stable version ready. For sure there are some issues left, but for the moment none that poke into my face. The save games I tried I can edit without issue. Even a late turn MUM save I got working.
I created two merge request and hope Alan finds time soon. But I might also create a release anyhow.
For those that like to test, best check out the 16bitTGA branch:
https://gitlab.com/stbotf/ultimate-edit ... e/16bitTGA
- That branch includes everything from the map_sys_gen branch.
- In addition it changes to load TGA files in 16bit rather than converting them to 32bit color space. Instead the color space is converted on the fly, which speeds up the stbof.res load time.
- Hope was that it also reduces the memory usage, but that turned out to be rather marginal, at least for the images I tried. For UI editing the effect seems to be a bit better, cause there are many image overlappings where the images now are processed in native 16bit format. It's however hard to track cause Java doesn't free any memory unless the limit is reached.
- Other than that there are only a few minor UI fixes.
Since I wasn't sure on memory and performance benefits, nor on possible rendering issues, I made it a separate branch. This way the 16-bit rendering changes can be directly compared to the previous TGA load and rendering. But from my testing the 16bit TGA changes are worth to be merged. Give it a try!
