Hi Flocke,
first of all, you are a great guy and we all love you.
Now to your points:
Flocke wrote: ↑Fri Apr 16, 2021 7:37 pmFrom my stand point you completely messed this topic and DCER implemented exactly what he has been asked for.
You lack the context to assess the situation:
- at this time (10+ years ago) Peter1984 and Tethys demanded so much support for their countless (and sometimes pointless) projects to extend many stbof.res files, that it bugged even you at some point
- changing the shipname.bin header structure (dword to byte) would require rewriting almost the entire asm code and even worse, when used with a not matching trek.exe code, can cause not only the game to crash or freeze with no crashlog, but also can freeze the entire OS (due to the very unfortune coding of the memory allocation of shipname.dat)
- due to the complex, multifactorial nature of the problem wrt shipname.bin vs. shipname.dat, I stepped in and provided a solution, delaying more important projects
- thunderchero and Peter1984 mistakenly claimed my code doesn't read namegroups 63+ in game, it turned out they used UE to add their manually hex-edited, extended shipname.bin files to stbof.res, and UE auto removed groups 63+ when doing so
- Dcer (at this time already being out of business) was just asked to keep UE from doing this, but Peter1984 thronged Dcer to implement the extension feature, providing a wrong link detailing my structure changes of shipname.dat (dword -> byte)
- Dcer never again posted after this and he probably never read this topic, not sure the patch info wasn't even posted by the time of his last UE update attempt
- thunderchero and Peter1984 were able to extend shipname.bin using my patch instructions i.e. they understood the header structure is still dword and the byte change refered to shipname.dat
- shipname.bin file size (and header size) is variable, it's data structure not (dword before start of names list and 44 byte name entries)
- you CAN use a fixed position for start of name list with no issues (e.g. 4*248) if you don't want to check for number of used name groups
Flocke wrote: ↑Fri Apr 16, 2021 7:37 pmI however wonder why with the asm patch the limit was set to 248. Why not fix the file format and add a group counter to the front or move the entry pointer? Why exactly 248 group entries and not 1000 or something?
Again, this limit is determined by shipname.dat, not shipname.bin itself. Today you could just create a new dynamic area and relocate all references to it, at this time we did not know how to do this (even with your and QDs support).
Flocke wrote: ↑Fri Apr 16, 2021 7:37 pmIf I'm interpreting that correct, that is a flawed implementation. Sure, the entry counts never reach FFFF I guess, but each programmer will hate you to place a redundant check just to deviate from the explicit file format
More precisely, it's the only workaround for the flawed implementation you describe below, which works for default and extended shipname.bin files.
Flocke wrote: ↑Fri Apr 16, 2021 7:37 pmI guess here the developers wanted to implement a dynamic group list but messed it up when they added the entry list pointer to the header, forgetting on that new groups in the header of course resize the header and thereby break the location pointer.
Correct, and that's only the shipname.bin part of this mess (which my patch ignores now). See my notes above about potential issues with the messy default memory allocation of shipname.dat.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.