Shipname Appendix Fix & Adding new name groups
Moderator: thunderchero
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
i already have the patch, that's why i can easily control with the bof_patcher if any code changes done by UE or not.
i already installed the patch and tested, but same results like with UE.
yes, like i already stated, i've created new groups with UE and with the patch manually installed, but always with same results,
can't select them for a ship model and game crashes if i want to start a new game.
i already installed the patch and tested, but same results like with UE.
yes, like i already stated, i've created new groups with UE and with the patch manually installed, but always with same results,
can't select them for a ship model and game crashes if i want to start a new game.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
well after several hours of testing I realized this was the last addition Dcer made to UE and it was never completed/100% functional.
I am not sure what the exact issue is, but this is what I found.
with sct code changes game will still load (with original shipname.bin)
UE makes no changes to trek.exe for "Adding new shipname groups"
UE 0.7.2dev5b fixed UE corrupting shipname.bin
UE 0.7.2dev5c will corrupt shipname.bin (again)
since we have no support for UE anymore this would be difficult to get fixed.
hopefully SCT will chime in with some ideas to issue.
I am not sure what the exact issue is, but this is what I found.
with sct code changes game will still load (with original shipname.bin)
UE makes no changes to trek.exe for "Adding new shipname groups"
UE 0.7.2dev5b fixed UE corrupting shipname.bin
UE 0.7.2dev5c will corrupt shipname.bin (again)
since we have no support for UE anymore this would be difficult to get fixed.
hopefully SCT will chime in with some ideas to issue.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
great info so far.
sadly, the crashlog of BotF didn't mention anything about the CTD's if i create new name groups and try to start a new game. this would help to find the problem. but what i didn't understand, why the patch also didn't work. so the patch posted here by SCT seems also not working correctly?!
do you know any mod where new name groups successfully created? i've checked UDM and there are also no new name groups.
sadly, the crashlog of BotF didn't mention anything about the CTD's if i create new name groups and try to start a new game. this would help to find the problem. but what i didn't understand, why the patch also didn't work. so the patch posted here by SCT seems also not working correctly?!
do you know any mod where new name groups successfully created? i've checked UDM and there are also no new name groups.
-
- Code Master
- Posts: 1964
- Joined: Sun Apr 27, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
I'm afraid I can't provide much help on the subject.
The code was tested with manually edited shipname.bin [edit: and shiplist.sst] (manually added via winrar resp. older winzip).
viewtopic.php?f=286&t=1001&start=30#p31799
Problem is that manually editing of shipname.bin is a pain (and these days I don't even know how to add a file manually to stbof.res without corrupting it).
But even if anyone writes a patcher for shipname.bin, there is the theoretical possibility my latest code has some sort of minor bug, rendering the efford pointless.
So i don't feel comfortable with this solution, since I couldn't even understand/fix my code these days.
The code was tested with manually edited shipname.bin [edit: and shiplist.sst] (manually added via winrar resp. older winzip).
viewtopic.php?f=286&t=1001&start=30#p31799
Problem is that manually editing of shipname.bin is a pain (and these days I don't even know how to add a file manually to stbof.res without corrupting it).
But even if anyone writes a patcher for shipname.bin, there is the theoretical possibility my latest code has some sort of minor bug, rendering the efford pointless.
So i don't feel comfortable with this solution, since I couldn't even understand/fix my code these days.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
I had an idea this morning, and it worked.
SCT code works properly. UE is not writing edited shipname.bin properly.
I was able to load a new game with manually edited shipname.bin and shiplist.sst and used SCT code from above. The main problem was adding edited files, when I used UE to add edited shipname.bin and shiplist.sst, UE would re-write it before it would save. so I had to create a command line tool to add files to stbof.res with 7-zip.
SCT code uses 4 byte per group (as vanilla) and the pointer for start of name list is adjusted for each new group added.
I added new group "name" at end of file, and have not tested if placement matters?
SCT code works properly. UE is not writing edited shipname.bin properly.
I was able to load a new game with manually edited shipname.bin and shiplist.sst and used SCT code from above. The main problem was adding edited files, when I used UE to add edited shipname.bin and shiplist.sst, UE would re-write it before it would save. so I had to create a command line tool to add files to stbof.res with 7-zip.
SCT code uses 4 byte per group (as vanilla) and the pointer for start of name list is adjusted for each new group added.
I added new group "name" at end of file, and have not tested if placement matters?
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
Spocks-cuddly-tribble wrote: ↑Thu Dec 27, 2018 11:07 am Problem is that manually editing of shipname.bin is a pain (and these days I don't even know how to add a file manually to stbof.res without corrupting it).
i simply add files with winrar, just rename stbof.res to stbof.rar or stbof.zip, open it, drag n drop the files into the archive to import them and rename.thunderchero wrote: ↑Thu Dec 27, 2018 11:49 am so I had to create a command line tool to add files to stbof.res with 7-zip.
don't know if this work also with 7-zip.
but i didn't understand, in which way UE corrupts the shipname.bin. if i use HexEditor to check the shipname.bin, the structure is very simple and clear.
group numbers and names added correctly. and at start of the file, every group has 1 byte to describe number of names in it -> 248 possible name groups.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
the version I use of winrar will allow extract of files but will not compress properly. if you use an older version they might compress properly. this goes for all zip software (winrar, winzip, 7-zip). Even the 7-zip command line I use is an older version.
shipname.binEnPhreg wrote: ↑Thu Dec 27, 2018 12:52 pm but i didn't understand, in which way UE corrupts the shipname.bin. if i use HexEditor to check the shipname.bin, the structure is very simple and clear.
group numbers and names added correctly. and at start of the file, every group has 1 byte to describe number of names in it -> 248 possible name groups.
looks to use original format just extended.
UE edits this file to 1 byte for number of names per group
original format is 4 byte for number of names per group
shipname.dat
I am not sure and have not compared as to format it uses? but trek.exe writes this file to saved games. SCT's new code changes how it is written. SCT may have been talking about shipname.dat when he said "every group has 1 byte to describe number of names in it"
I have successfully added 3 new groups (1 new name for each group) using this format. next test would be multiple name per new group.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
I just tested 3 new groups with 10 new names per group with no issues.
here is my test files. shipname.bin and shiplist.sst and patch file used for bofpatcher (QD's patcher)
new groups used by fed Science Vessel (group 62), fed Troop Transport (group 63), ferengi Colony Ship (group 64)
new names test62, test62a, test62b, test62c,..... test62g, test63, test63a, test63b, test63c,..... test63g, test64, test64a, test64b, test64c,..... test64g,
here is my test files. shipname.bin and shiplist.sst and patch file used for bofpatcher (QD's patcher)
new groups used by fed Science Vessel (group 62), fed Troop Transport (group 63), ferengi Colony Ship (group 64)
new names test62, test62a, test62b, test62c,..... test62g, test63, test63a, test63b, test63c,..... test63g, test64, test64a, test64b, test64c,..... test64g,
You do not have the required permissions to view the files attached to this post.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
sounds good.
tested a bit on my own this morning.
installed SCT patch manually (QD's patcher).
edited shipname.bin manually (extended the list by one new name group with two names (correct structure), set ID for total number of names for new group, set new pointer for start of name lists) and also shiplist.sst (set new name group ID for ship models). game worked, but when i produce ships using new name group 62, the last name of name group 61 (Perception, Yridian) is also used for the new name group 62. all other name groups/ship names working well.
now tested your files. they working good. no problems.
what i'm doing wrong with my files?
at first sight, the base structure of our shipname.bin doesn't differ in any way.
so i don't know why it reads the last name of group 61 also for group 62.
tested a bit on my own this morning.
installed SCT patch manually (QD's patcher).
edited shipname.bin manually (extended the list by one new name group with two names (correct structure), set ID for total number of names for new group, set new pointer for start of name lists) and also shiplist.sst (set new name group ID for ship models). game worked, but when i produce ships using new name group 62, the last name of name group 61 (Perception, Yridian) is also used for the new name group 62. all other name groups/ship names working well.
now tested your files. they working good. no problems.
what i'm doing wrong with my files?
at first sight, the base structure of our shipname.bin doesn't differ in any way.
so i don't know why it reads the last name of group 61 also for group 62.
Last edited by EnPhreg on Fri Dec 28, 2018 10:37 am, edited 1 time in total.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
as SCT said "manually editing of shipname.bin is a pain". It is not difficult, but any wrong values could cause that issue.
most common mistake would be wrong pointer for start of name list, or mistake on spacing/size of each new ship name data area
shiplist.sst only 1 value per ship (ship name group used), just don't forget upgrade ships
most common mistake would be wrong pointer for start of name list, or mistake on spacing/size of each new ship name data area
shiplist.sst only 1 value per ship (ship name group used), just don't forget upgrade ships
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
i controlled the values.
no mistakes so far. all seems to be correct.
crazy.
no mistakes so far. all seems to be correct.
crazy.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
but overall good news so far for extending the name groups.
but only if all other things set in shipname.bin & shiplist.sst,
because after implementing new name groups in this both files, UE won't be able to edit them anymore.
but only if all other things set in shipname.bin & shiplist.sst,
because after implementing new name groups in this both files, UE won't be able to edit them anymore.
-
- Site Administrator aka Fleet Admiral
- Posts: 7972
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: Shipname Appendix Fix & Adding new name groups
If I saw the shipname.bin I might be able to explain error.
correct, UE is not up to date with some of the new code. example; new code for building structures above tech 10, setting starting structures tech levels above tech 9 and fewer than 8 main structure upgrades. Just to name a few more.
correct, UE is not up to date with some of the new code. example; new code for building structures above tech 10, setting starting structures tech levels above tech 9 and fewer than 8 main structure upgrades. Just to name a few more.
-
- Code Master
- Posts: 1964
- Joined: Sun Apr 27, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
In theory the following two changes of the patch 'Adding new shipname groups - extending shipname.bin & shipname.dat' might work with the 'one byte per group in shipname.bin' change by DCER.
Happy testing.
Code: Select all
at 0x74910 change 8B 16 83 C6 04 -> 0F B6 16 46 90
at 0x749C6 reset 0x13 bytes to 8B B3 F8 00 00 00 C1 E7 02 8B 4C 24 2C 01 FE 89 E7 01 CE
-asm-
AUTO:00475510
movzx edx, byte ptr[esi]
inc esi
nop
restore original code sequence at:
AUTO:004755C6 mov esi, [ebx+0F8h]
AUTO:004755CC shl edi, 2
AUTO:004755CF mov ecx, [esp+2Ch]
AUTO:004755D3 add esi, edi
AUTO:004755D5 mov edi, esp
AUTO:004755D7 add esi, ecx
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
i have attached the shipname.bin file. at the end of the list is group 62 (132 new bytes - each name 44 bytes) (ID 3E - starting at (hexadecimal) 0xF4B8), three names copied and altered from yridian name list (group 61 - 3D).thunderchero wrote: ↑Fri Dec 28, 2018 6:27 pm If I saw the shipname.bin I might be able to explain error.
at position 0xF8 4 new bytes for number of names in new group 62.
at position 0xFC 4 bytes with new pointer for start of the name group list.
shipname.bin is attached within a zip-file. wasn't able to attach the single file.
You do not have the required permissions to view the files attached to this post.