SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-18-16, 07:01 PM   #11
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by vdr1981 View Post
I'm talking about new playable submarine type, not about AI graphical eye candies...
Sorry man, I felt I had not got your idea correctly...

Quote:
Originally Posted by vdr1981 View Post
Would it really be necessary to remap all IDs if , for example, I wish to use VII C gr2 body/hull + U-FlaK conning tower in order to add one more playable submarine to the game?

Do you think that in that case appearance of new u-boat and type VIIC in the same area would crash the game because of duplicated IDs?

Do you actually know any fast scenario to artificially reproduce CTD caused by duplicated IDs?

Sry because of many questions but , right now, only you can help me..
No, as long as you use the same granny file with unchanged bone names, there is no need to remap controller IDs. There are still some unsolved problems though:

1 - Most of the times, the name of the main model (within an unit's gr2 file), the name of the gr2 file, and the name of the folder containing the gr2 file, are matched. This is not always true for AI-controlled units, but it is for playable U-boats. If we change model name, we need to remap controller Id's. If we don't, there will be a mismatch between model name and gr2 and/or folder name. Honestly I don't know if such a mismatch can cause any problem, but this is something we should factor in.

2 - Even supposing that the above wasn't an issue, we would have two U-boats sharing the same bone IDs. It would be impossible for the two of them to appear in the same time and location, as they both would be playable U-boats, and the player can only command one U-boat at any given time. Nonetheless, we should consider that controllers are loaded in memory based on their parent IDs. Name and folder location of the binary files where the controllers are stored might play a role as well, but I am not too sure about this last statement. If the above was true, duplicating two units which share the same ID's shouldn't cause any issue until they both spawn in player's area (which, as stated above, is impossible for two playable units), but if on the contrary file name and location are unrelevant, the game would crash as soon as one of the two units is loaded in memory (because of the two sets of controllers clashing with each other). Testing this scenario on AI controlled units is easy: pick an unit, move one of its essential binary files in any folder and rename it to a random name. Set a test mission with the picked unit and run it. If the game crashes it means it couldnt locate the essential controllers, i.e. file name and location are relevant. If not, only IDs matter, and your idea is not viable. Another possible test: duplicate an unit copying its files to a new folder, and change the cfg file of the duplicated unit so that the game will recognize them as two different units. To be sure to put yourself into the worst possible circumstance, change a bit controller settings of the duplicated unit; set a test mission with either of the two units and load it. If the game crashes, then the two sets of controllers are loaded because the have the same parent Ids, no matter their name or folder.

3 - More importantly: how do you "tell" the game that there is a new playable unit that the player can get assigned to? As far as I know, at least in SH5, playable units are hardcoded.
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 02-18-16 at 07:11 PM.
gap is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.