Shipname Appendix Fix & Adding new name groups

Shipname Appendix Fix & Adding new name groups; support/discussion/questions

Moderator: thunderchero

User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Shipname Appendix Fix & Adding new name groups

Post by EnPhreg » Sun Dec 30, 2018 7:25 am

Spocks-cuddly-tribble wrote:
Sat Dec 29, 2018 3:48 pm
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.

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
Happy testing. :smile:
nice!
i will give it a try asap.

hi SCT, greetings,
would it be possible to give an answer to my questions in this post? viewtopic.php?p=49396#p49396
or do you have already read it and you're out of business to long to have useful answers for me?

User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Shipname Appendix Fix & Adding new name groups

Post by EnPhreg » Sun Dec 30, 2018 7:52 am

so, first results for testing:
implemented new code and used a shipname.bin with one additional name group and card strike cruiser model I + II was given the new name group 62 (3E) via manually shiplist.sst edit.
within game, the names of all ship types are not set correctly anymore.
within UE, can't edit ship stats, cause UE has still a problem that a ship model is using a name group higher than 61,
but ship name edit in UE works again, cause shipname.bin has the 'one byte per group' structure again.
but the game still can't handle the 'one byte per group' structure of shipname.bin.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: Shipname Appendix Fix & Adding new name groups

Post by thunderchero » Sun Dec 30, 2018 10:55 am

EnPhreg wrote:
Sun Dec 30, 2018 7:17 am
thunderchero wrote:
Fri Dec 28, 2018 6:27 pm
If I saw the shipname.bin I might be able to explain error.
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).
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.
The only difference I see is you used the german version shipname.bin. but this should not matter.
Spocks-cuddly-tribble wrote:
Sat Dec 29, 2018 3:48 pm
Happy testing. :smile:
I had same results as EnPhreg :sad:

EDIT;
EnPhreg wrote:
Sun Dec 30, 2018 7:52 am
within UE, can't edit ship stats, cause UE has still a problem that a ship model is using a name group higher than 61,
playing with UE source code I was able to increase limit to allow selection above 61, but it is a fixed value. from my limited experience with java it should be possible to tell it to read current groups in shipname.bin for max to display.

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 842
Joined: Sun Apr 27, 2008 2:00 am

Re: Shipname Appendix Fix & Adding new name groups

Post by Spocks-cuddly-tribble » Sun Dec 30, 2018 5:41 pm

1.) If UE doesn't support adding more name groups, even apart of the 'one byte glitch', the whole thing seems kinda pointless.

2.) If you solve #1 via altering UEs java code then better revert the 'one byte glitch' as well than messing with the asm code.

3.) Possibility of asm-fixing depends on the way the UE glitch 'corrupts' shipname.bin. I assumed the unused of the 248 name groups are represented by zero bytes with the pointer for start of name list, regardless of number of used name groups, always at vanilla offset and default. But your test results indicate this isn't the case?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: Shipname Appendix Fix & Adding new name groups

Post by thunderchero » Sun Dec 30, 2018 10:23 pm

Spocks-cuddly-tribble wrote:
Sun Dec 30, 2018 5:41 pm
3.) Possibility of asm-fixing depends on the way the UE glitch 'corrupts' shipname.bin. I assumed the unused of the 248 name groups are represented by zero bytes with the pointer for start of name list, regardless of number of used name groups, always at vanilla offset and default. But your test results indicate this isn't the case?
your new code and current way UE sets up shipname.bin will result in CTD on start of game some times. when game does start all ship names will start at wrong point of ship name list. you may get last 1 or 2 letters of a ship name or name maybe blank

UE writes shipname.bin as follows;
0x00 -> 0xf7 preset possible 248 groups
0xf8 -> 0xfb preset FC 00 00 00 for start of name list
0xfc -> to end of file ship names

note test 2; your new code and shipname.bin edited after groups added by UE
0x00 -> 0x3E 62 groups
0x3F -> 0x42 new offset for start of name list starting at end of used groups
0x43 -> to end of file ship names

game will start in all my tests, but all ship names will start at wrong point of ship name list. you may get last 1 or 2 letters of a ship name or name maybe blank.

User avatar
EnPhreg
Lieutenant-Commander
Lieutenant-Commander
Posts: 130
Joined: Thu Jul 10, 2008 2:00 am

Re: Shipname Appendix Fix & Adding new name groups

Post by EnPhreg » Mon Dec 31, 2018 11:11 am

thunderchero wrote:
Sun Dec 30, 2018 10:55 am
The only difference I see is you used the german version shipname.bin. but this should not matter.
how can you identify my shipname.bin as german? what's the difference?
i thought they were 100% identical?!

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: Shipname Appendix Fix & Adding new name groups

Post by thunderchero » Mon Dec 31, 2018 11:21 am

EnPhreg wrote:
Mon Dec 31, 2018 11:11 am
thunderchero wrote:
Sun Dec 30, 2018 10:55 am
The only difference I see is you used the german version shipname.bin. but this should not matter.
how can you identify my shipname.bin as german? what's the difference?
1. spelling of "outpost" and "starbase" are in German
2. second difference of your file some ship names start with 1B 00 instead of FF FF starting at 0xee5e -> 0xef39 all 6 ship names in group 56 (38 hex)

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 842
Joined: Sun Apr 27, 2008 2:00 am

Re: Shipname Appendix Fix & Adding new name groups

Post by Spocks-cuddly-tribble » Tue Jan 01, 2019 2:02 pm

This UE file handling is far worse than expected.

So I kindly recommend:

1.) Cleaning up this topic via deleting all post after my fix codes one page 1 i.e. beginning here:

viewtopic.php?f=212&t=1622#p47330

2.) Adding a warning that the corresponding UE feature is bugged, rendering the game unusable, and shouldn't be used until further notice.

3.) When reworking UE code only note info given in my main fix post.


Some elaborations just to make it hardcore pakled proof:

1.) The code works for both (extended and vanilla) shipname.bin files as long as the file structure is setup correctly

2.) The file structure is 4-byte entries before start of name list and 44-byte entries beginning with start of name list (the FFFF part matters!)

3.) As told twice in my post the pointer for start of name list can be ignored/overwritten/removed since start of name list is auto-located (EU doesn't need to calculate this!) Since I expected that no one cares about reading my instructions properly, I setup auto-location code to work with all possible options (i.e. pointer deleted, adjusted or just overwritten, all the same, BotF won't care as long as #2 is given!)

4.) It follows from #3 that it doesn't matter whether unused name groups are represented by zero valued four byte entries before start of name list or not, giving maximum freedom to setup UE code as long as #2 is given
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6402
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: Shipname Appendix Fix & Adding new name groups

Post by thunderchero » Wed Jan 02, 2019 9:59 am

Spocks-cuddly-tribble wrote:
Tue Jan 01, 2019 2:02 pm
1.) Cleaning up this topic via deleting all post after my fix codes one page 1 i.e. beginning here:

viewtopic.php?f=212&t=1622#p47330
I try not to delete any posts, but I will split topic once/if a solution is found for UE issue.
Spocks-cuddly-tribble wrote:
Tue Jan 01, 2019 2:02 pm
2.) Adding a warning that the corresponding UE feature is bugged, rendering the game unusable, and shouldn't be used until further notice.
Done
Spocks-cuddly-tribble wrote:
Tue Jan 01, 2019 2:02 pm
3.) When reworking UE code only note info given in my main fix post.
Thanks to your pakled proof explanation I now understand what is exactly required :grin:

Edit; just on a side note. I noticed that groups 8, 13, 18, 27, 29, 43, 47 have no ships assigned to those groups in vanilla.

Post Reply

Return to “Shipname Appendix Fix & Adding new name groups”

Who is online

Users browsing this forum: No registered users