Shipname Appendix Fix & Adding new name groups
Moderator: thunderchero
-
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
Shipname Appendix Fix & Adding new name groups
Ever wanted to stop those pesky USS Ubership ABCD appendix addons? Well now you can! Billy Mays here... erm.. ok
Thanks SCT, Peter and everyone who posted to help me with this, greatly appreciated! Hope this helps you modders out!
Thanks SCT, Peter and everyone who posted to help me with this, greatly appreciated! Hope this helps you modders out!
You do not have the required permissions to view the files attached to this post.
-
- Lieutenant-Junior Grade
- Posts: 85
- Joined: Tue Jun 15, 2010 2:00 am
- Location: Banbury, Oxon
-
- Code Master
- Posts: 1963
- Joined: Sun Apr 27, 2008 2:00 am
Shipname Appendix Fix
Topic cleaned up (removed outdated/flawed info)
Shipname Appendix Fix (no fnt-file changes needed!)
To still have appendixes but the first ship with the name starting without appendix instead of A, use:
Note; Group 0 (UPN Invalid) now is a standard appendix group!
To disable appendix addons for name groups (required if groups are shared by different races e.g. Outpost/Starbase), adapt checks for the non-appendix groups.
Example to set non-appendix groups 32h, 33h, 34h & 35h:
Extending shipname.bin (i.e. adding new name groups) is problematic due to internal memory limitations wrt shipname.dat.
Shipname Appendix Fix (no fnt-file changes needed!)
To still have appendixes but the first ship with the name starting without appendix instead of A, use:
Code: Select all
Trek.exe at 0x17959D change 41 to -> 40
trek.exe at 0x748BB - 0x74A1A replace 352 bytes with:
74 F2 89 74 24 30 8D 41 FF E8 97 2C 09 00 89 C2 8B 44 24 3A C1 F8 10 89 44 24 34 8B 74 24 34 C1 E0 02 29 F0 8D 34 85 00 00 00 00 8B 86 6C 55 5B 00 01 C2 89 D0 C1 FA 1F F7 F9 89 D1 31 C0 89 96 6C 55 5B 00 89 DE 8B 54 24 3A C1 FA 10 39 D0 0F 8D A8 00 00 00 8B 16 83 C6 04 40 01 D7 EB E7 BE 70 B7 57 00 89 D8 89 EF E8 08 FC 09 00 57 8A 06 88 07 3C 00 74 10 8A 46 01 83 C6 02 88 47 01 83 C7 02 3C 00 75 E8 5F 31 C0 83 C4 40 5D 5F 5E 59 5B C3 BA D9 00 00 00 B8 74 B7 57 00 E8 94 2A 09 00 89 C2 C1 FA 1F F7 F9 8B 44 24 3A C1 F8 10 89 44 24 34 8B 74 24 34 C1 E0 02 29 F0 8D 34 85 00 00 00 00 89 96 68 55 5B 00 89 96 6C 55 5B 00 66 FF 86 70 55 5B 00 8B 96 6E 55 5B 00 B8 1A 00 00 00 C1 FA 10 80 FA 1B 75 02 33 D2 89 54 24 30 90 90 66 89 96 70 55 5B 00 E9 09 FF FF FF 01 CF 89 F8 C1 E7 02 29 C7 C1 E7 02 29 C7 8B B3 F8 00 00 00 C1 E7 02 8B 4C 24 2C 01 FE 89 E7 01 CE B9 2C 00 00 00 57 89 C8 C1 E9 02 F2 A5 8A C8 80 E1 03 F2 A4 5F B9 28 00 00 00 8D 74 24 04 89 EF 8B 5C 24 30 57 89 C8 C1 E9 02 F2 A5 8A C8 80 E1 03 F2 A4 5F 66 85 DB 74 71 66 83 FA 32 74 6B 66 83 FA
code changes:
004754BB ^74 F2 JE SHORT 4754AF
004754BD 897424 30 MOV [ESP+30], ESI
0047559F 80FA 1B CMP DL, 1B
004755A2 75 02 JNZ SHORT 4755A6
004755A4 33D2 XOR EDX, EDX
004755A6 895424 30 MOV [ESP+30], EDX
004755AA 9090 NOP
004755F9 8B5C24 30 MOV EBX, [ESP+30]
00475612 66:83FA 32 CMP DX, 32 // non appendix group (Outpost)
00475618 66:83FA 33 CMP DX, 33 // non appendix group (Starbase)
To disable appendix addons for name groups (required if groups are shared by different races e.g. Outpost/Starbase), adapt checks for the non-appendix groups.
Example to set non-appendix groups 32h, 33h, 34h & 35h:
Code: Select all
00475612 66:83FA 32 CMP DX, 32
00475616 7C 06 JL SHORT 47561E // appendix group
00475618 66:83FA 35 CMP DX, 35
0047561C 7E 65 JLE SHORT 475683 // non appendix group
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Code Master
- Posts: 1963
- Joined: Sun Apr 27, 2008 2:00 am
Adding new shipname groups
Adding new shipname groups - extending shipname.bin & shipname.dat
The following code modifies shipname.dat to support up to 248 shipname groups i.e. IDs 0-D7. It includes the above appendix fix & modding options for non-appendix groups.
So even outposts and starbases now can have unique names and/or appendixes.
Note: The new code auto-locates start of the namelist in shipname.bin in order to facilitate the editing (& UE support).
After this, new name groups can be added in shipname.bin (stbof.res):
Name groups do not have to be sorted in blocks via owner races!
patch for Bof_patcher
The following code modifies shipname.dat to support up to 248 shipname groups i.e. IDs 0-D7. It includes the above appendix fix & modding options for non-appendix groups.
So even outposts and starbases now can have unique names and/or appendixes.
Note: The new code auto-locates start of the namelist in shipname.bin in order to facilitate the editing (& UE support).
Code: Select all
Trek.exe at 0x17959D change 41 to -> 40
trek.exe at 0x74827 – 0x74A50 replace 0x22A bytes with:
89 90 64 55 5B 00 90 90 90 3D E8 02 00 00 75 DC 5A C3 00 00 00 00 00 00 00 53 51 56 57 55 83 EC 40 66 89 44 24 3C 89 D5 BB 28 00 00 00 31 D2 89 E8 89 54 24 2C E8 F2 83 0A 00 8D 5C 24 30 8D 54 24 2C B8 60 B7 57 00 E8 8D FD 09 00 8B 44 24 3A C1 F8 10 8B 5C 24 2C 8D 14 85 00 00 00 00 01 DA 8B 0A 31 FF 85 C9 0F 8E 87 00 00 00 89 C2 C1 E0 02 29 D0 8A 90 69 55 5B 00 0F B6 B0 6A 55 5B 00 89 74 24 30 90 90 90 90 90 90 90 90 90 90 3A 90 68 55 5B 00 0F 84 8C 00 00 00 8D 41 FF E8 97 2C 09 00 89 C2 8B 44 24 3A C1 F8 10 89 44 24 34 8B 74 24 34 C1 E0 02 29 F0 8B F0 0F B6 86 69 55 5B 00 90 90 90 90 01 C2 89 D0 C1 FA 1F F7 F9 89 D1 31 C0 88 96 69 55 5B 00 89 DE 8B 54 24 3A C1 FA 10 39 D0 0F 8D A8 00 00 00 8B 16 83 C6 04 40 01 D7 EB E7 BE 70 B7 57 00 89 D8 89 EF E8 08 FC 09 00 57 8A 06 88 07 3C 00 74 10 8A 46 01 83 C6 02 88 47 01 83 C7 02 3C 00 75 E8 5F 31 C0 83 C4 40 5D 5F 5E 59 5B C3 BA D9 00 00 00 B8 74 B7 57 00 E8 94 2A 09 00 89 C2 C1 FA 1F F7 F9 8B 44 24 3A C1 F8 10 89 44 24 34 8B 74 24 34 C1 E0 02 29 F0 88 90 68 55 5B 00 88 90 69 55 5B 00 FE 80 6A 55 5B 00 90 90 90 90 90 90 90 90 0F B6 90 6A 55 5B 00 90 90 90 90 90 90 90 80 FA 1B 75 02 33 D2 89 54 24 30 90 90 88 90 6A 55 5B 00 90 E9 09 FF FF FF 01 CF 89 F8 C1 E7 02 29 C7 C1 E7 02 29 C7 C1 E7 02 8D 34 93 83 C6 04 F6 46 03 80 74 F7 03 F7 8B FC B9 2C 00 00 00 57 89 C8 C1 E9 02 F2 A5 8A C8 80 E1 03 F2 A4 5F B9 28 00 00 00 8D 74 24 04 89 EF 8B 5C 24 30 57 89 C8 C1 E9 02 F2 A5 8A C8 80 E1 03 F2 A4 5F 66 85 DB 74 71 66 83 FA 32 74 6B 66 83 FA 33 74 65 BE 9C B7 57 00 8D 7C 24 38 57 8A 06 88 07 3C 00 74 10 8A 46 01 83 C6 02 88 47 01 83 C7 02 3C 00 75 E8 5F 8D 04 95 00 00 00 00 29 D0 8A 80 6A 55 5B 00 90
Code changes:
00475427 8990 64555B00 MOV DWORD PTR DS:[EAX+5B5564],EDX
0047542D 90 NOP
0047542E 90 NOP
0047542F 90 NOP
0047549A 8A90 69555B00 MOV DL,BYTE PTR DS:[EAX+5B5569]
004754A0 0FB6B0 6A555B00 MOVZX ESI,BYTE PTR DS:[EAX+5B556A]
004754A7 897424 30 MOV DWORD PTR SS:[ESP+30],ESI
004754AB 90 NOP
004754AC 90 NOP
004754AD 90 NOP
004754AE 90 NOP
004754AF 90 NOP
004754B0 90 NOP
004754B1 90 NOP
004754B2 90 NOP
004754B3 90 NOP
004754B4 90 NOP
004754B5 3A90 68555B00 CMP DL,BYTE PTR DS:[EAX+5B5568]
004754DF 8BF0 MOV ESI,EAX
004754E1 0FB686 69555B00 MOVZX EAX,BYTE PTR DS:[ESI+5B5569]
004754E8 90 NOP
004754E9 90 NOP
004754EA 90 NOP
004754EB 90 NOP
004754F9 8896 69555B00 MOV BYTE PTR DS:[ESI+5B5569],DL
00475577 8890 68555B00 MOV BYTE PTR DS:[EAX+5B5568],DL
0047557D 8890 69555B00 MOV BYTE PTR DS:[EAX+5B5569],DL
00475583 FE80 6A555B00 INC BYTE PTR DS:[EAX+5B556A]
00475589 90 NOP
0047558A 90 NOP
0047558B 90 NOP
0047558C 90 NOP
0047558D 90 NOP
0047558E 90 NOP
0047558F 90 NOP
00475590 90 NOP
00475591 0FB690 6A555B00 MOVZX EDX,BYTE PTR DS:[EAX+5B556A]
00475598 90 NOP
00475599 90 NOP
0047559A 90 NOP
0047559B 90 NOP
0047559C 90 NOP
0047559D 90 NOP
0047559E 90 NOP
0047559F 80FA 1B CMP DL,1B
004755A2 75 02 JNZ SHORT 4755A6
004755A4 33D2 XOR EDX,EDX
004755A6 895424 30 MOV DWORD PTR SS:[ESP+30],EDX
004755AA 90 NOP
004755AB 90 NOP
004755AC 8890 6A555B00 MOV BYTE PTR DS:[EAX+5B556A],DL
004755B2 90 NOP
004755C6 C1E7 02 SHL EDI,2
004755C9 8D3493 LEA ESI,DWORD PTR DS:[EBX+EDX*4]
004755CC 83C6 04 ADD ESI,4
004755CF F646 03 80 TEST BYTE PTR DS:[ESI+3],80
004755D3 ^74 F7 JE SHORT 4755CC
004755D5 03F7 ADD ESI,EDI
004755D7 8BFC MOV EDI,ESP
004755F9 8B5C24 30 MOV EBX,DWORD PTR SS:[ESP+30]
00475612 66:83FA 32 CMP DX,32
00475618 66:83FA 33 CMP DX,33
0047564A 8A80 6A555B00 MOV AL,BYTE PTR DS:[EAX+5B556A]
00475650 90 NOP
Name entries start with the group ID (2 byte) + FF FF followed by 40 bytes for the ship name.thunderchero wrote:shipname.bin
there are 62 groups that can be edited
the first 248 Bytes hold info of how many entrys for each group 4 Bytes per group.
next is "FC 00 00 00" for pointer for start of name list [-> can be ignored/overwritten/removed now]
after that it is only each name entry of 44 Bytes.
Name groups do not have to be sorted in blocks via owner races!
patch for Bof_patcher
You do not have the required permissions to view the files attached to this post.
Last edited by Spocks-cuddly-tribble on Sun Mar 24, 2024 3:13 pm, edited 1 time in total.
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
a little typo: there are only 0x2A02 bytesSCT wrote:
trek.exe at 0x74827 – 0x74A50 replace 0x22A bytes with:
-
- 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
from what I understand 0x22a is the same as 2A 02 they both equal 554 bytesEnPhreg wrote:a little typo: there are only 0x2A02 bytesSCT wrote:
trek.exe at 0x74827 – 0x74A50 replace 0x22A bytes with:
but 0x2A02 would equal 02 2A or 10754 bytes
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
can't follow your conversions.
i used the calculator within UE to convert the values.
and cause all the further given "number of bytes" values in other patches were also easy to convert with UE, i assumed that must be a typo.
i used the calculator within UE to convert the values.
and cause all the further given "number of bytes" values in other patches were also easy to convert with UE, i assumed that must be a typo.
-
- 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
with UE enter 0x22a into "hexadecimal address" box of the convert addresses and press convert button.EnPhreg wrote:can't follow your conversions.
this will convert to 554 in decimal address.
the "0x" in front of number changes how it is converted.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
ah ok,
didn't noticed that, cause for single bytes it doesn't matter if i use the calculator or the converter.
you're right, so my post is obsolete.
didn't noticed that, cause for single bytes it doesn't matter if i use the calculator or the converter.
you're right, so my post is obsolete.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
have a strange problem with extending the shipname groups.
i used the patch and/or UE itself, to implement the necessary changes for adding more shipname groups. i used a vanilla botf install.
if i create a new shipname group (e.g. group 62) i can't choose the new created shipname groups with ship models and the game crashes if i want to launch a new game. very strange. the patch should work fine, or?
i used the patch and/or UE itself, to implement the necessary changes for adding more shipname groups. i used a vanilla botf install.
if i create a new shipname group (e.g. group 62) i can't choose the new created shipname groups with ship models and the game crashes if i want to launch a new game. very strange. the patch should work fine, or?
-
- 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.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
no,
can't figure out any reason. very strange. cause patch code should be fine and also UE didn't make it.
did anybody else reported similar problems? one indication is, that i can't select the new name groups for ships within the ship stats screen. the shipname.bin looks fine so far. i think it has to do with the code within the trek.exe. but i used a vanilla install, so the patch should work fine. if i use the patch without making new name groups, i have no problem, but if i create a new name group, the game crashes if i start a new game.
can't figure out any reason. very strange. cause patch code should be fine and also UE didn't make it.
did anybody else reported similar problems? one indication is, that i can't select the new name groups for ships within the ship stats screen. the shipname.bin looks fine so far. i think it has to do with the code within the trek.exe. but i used a vanilla install, so the patch should work fine. if i use the patch without making new name groups, i have no problem, but if i create a new name group, the game crashes if i 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
UE will make all required code changes. so manually patching is not required.
-
- Lieutenant-Commander
- Posts: 130
- Joined: Thu Jul 10, 2008 2:00 am
Re: Shipname Appendix Fix & Adding new name groups
i know. but if i use UE, than UE asks for the code change in trek.exe and i click yes and save (saving is always successful, no errors), but UE does nothing with trek.exe, cause if i than use the patcher, it shows me, that no code changes are done in trek.exe, cause the patch ins't colored red or green. so no code changes are done by UE. but it is indifferent, if i use UE or patch trek.exe manually. i have always the same problem like already stated above. it's really strange. and i always used fresh trek.exe and stbof.res for testing.
-
- 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
unless you have a patch for Adding new ship name groups, patcher will not show changes.
? have you created a new group with UE and tested?
? have you created a new group with UE and tested?