| Author |
Changing Default Weapon Loadouts |
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-10-16 17:45  
While scrounging about in the various dll's I noticed that in \Interfaces\...\TextE.dll there are string resources that give the entity number and name of the weapon loadouts of the playable subs. I was wondering if anyone has tried changing these to see if one can load different weapons? For those who wish to drive other subs, this may be a way to get the proper loadouts.
Cheers, jsteed
 
|
Thomasew
Joined: Feb 28, 2002 Posts: 1898 From: Bluewater Bay, South Africa
| Posted: 2002-10-16 22:56  
Hi John
Oh ... if only it were that simple. The TextE.dll file only contains the Entity Info, as you pointed out. However, somewhere ... probably buried in the SC executable, ... is the link to the Parent Object. So, although you can change the Entity ID ... you cannot change the Object ID ... and therein lies the problem. If you have an Entity ID that is not linked to the Program specified Object ID ... the game will crash.
Every 'object' we see whilst playing Sub Command is, in fact, an Entity .... which is a child of the Parent Object. The Main Program uses the info in the OBJECT DB file to determine the specifications of each Entity in the game.
I've found that a lot of the restrictions in SC, are as a result of specific hard-coding of certain functions, or functionality ... in the main program executable.
One example is Sonobuoy Searches. Logic dictates that if I create a new Helo ... and equip it with Sonobuoys ... then I should be able to assign that Helo to a 'Sonobuoy Search' in the Mission Editor. Alas, this is not the case ... as you are not given the option of assigning it the 'Sonobuoy Search' Tactic in the Mission Editor.
Why? .... well, quite simply because the 'Sonobuoy Search' Tactic has been assigned to specific Object IDs in the Database ... and have been specified/hard-coded in the main Program. Therefore, if the Entity ID of the Helo is not linked to one of the specific Object IDs, it will not be given the Option of .. 'Sonobuoy Search'. (one of Oleg's main gripes)
Fortunately, in this case, we can work around this 'drawback', by editing the Mission manually i.e. using a Text Editor etc, and change the 'temporary' assigned Tactic, to 'Sonobuoy Search'.
Anyway, the point of the story is ... that Entities are tied to Objects ... and many of those Objects are hard-coded into the Program. So, you can't change one ... without changing the other.
However, you can change the string descriptions in the TextE.dlls, which is what I have done for the Akula's new Torps in SCX 1.3. Fortunately, I was able to change them, and still maintain the same string length.
53 cm to UGST
53-65K to 53-65M
65 cm to 65-76
So, all the Loadout and Weapon Control screens will reflect the correct info. This TextE.dll will be supplied with SCX 1.3
Cheers
Tom
_________________
He Who Will Not Risk Cannot Win

[ This Message was edited by: Thomasew on 2002-10-17 03:50 ]
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-10-17 03:39  
Well that's not all bad news. We can see the new torps in the loadout screen.
I wonder how much SA would have to change the code to allow us more able to alter things in the dbase?
Also anyone heard anything from Sonalysts re the patch? I e-mailed them the other day but haven't heard anything from them.
Can't wait to try these new torps out.
 
|
DeerHunter UK
Joined: Feb 27, 2002 Posts: 56 | Posted: 2002-10-17 06:56  
Oh can you imagine using a Spearfish torpedo?
I can't wait,pass the drool mop please.
_________________
Rich "Cheeks" Dawson
Audentis Fortuna Iuvat

[ This Message was edited by: DeerHunter UK on 2002-10-17 07:03 ]
 
|
Bill Nichols
Joined: Feb 27, 2002 Posts: 664 | Posted: 2002-10-17 07:06  
Quote:
|
On 2002-10-16 22:56, Thomasew wrote:
One example is Sonobuoy Searches. Logic dictates that if I create a new Helo ... and equip it with Sonobuoys ... then I should be able to assign that Helo to a 'Sonobuoy Search' in the Mission Editor. Alas, this is not the case ... as you are not given the option of assigning it the 'Sonobuoy Search' Tactic in the Mission Editor.
Fortunately, in this case, we can work around this 'drawback', by editing the Mission manually i.e. using a Text Editor etc, and change the 'temporary' assigned Tactic, to 'Sonobuoy Search'.
|
|
Which aircraft/helos have sonobuoys (in SCX) and can be given an effective Sonobuoy Search tactic through text editing? Could you or someone provide a list?
_________________
My Sub Command website: www.subguru.com

[ This Message was edited by: Bill Nichols on 2002-10-17 07:07 ]
 
|
jsteed
Joined: Apr 08, 2002 Posts: 253 | Posted: 2002-10-17 10:41  
Hi Tom,
I suppose I shouldn't be surprised that the object index is hardcoded into the program but that is really poor programming technique. Every time SA would want to change a loadout, they would have to change and recompile the program rather than some small dll.
The entity db record has the name of the object to which it belongs. I would have thought the program would use this variable as an index to get the correct object information. It is the only variable that links the object and entity db's together. Every other object/entity must use this technique, otherwise, new objects and entities could not be added to the db. I don't understand why SA would do anything differently for the player sub loadouts. Yet another programming mystery.
Cheers, jsteed
 
|
Te Kaha
Joined: Feb 28, 2002 Posts: 1697 From: Austria & Aotearoa
| Posted: 2002-10-17 11:20  
On 2002-10-17 07:06, Bill Nichols wrote:
Quote:
| Which aircraft/helos have sonobuoys (in SCX) and can be given an effective Sonobuoy Search tactic through text editing? Could you or someone provide a list?
|
|
One of them is Aussie Seahawks.
_________________ Te Kaha's Missions
America's Cup 2003, Auckland, NZ; Alinghi - Team New Zealand 3-0
 
|
Thomasew
Joined: Feb 28, 2002 Posts: 1898 From: Bluewater Bay, South Africa
| Posted: 2002-10-17 13:21  
Hi Bill
This is most of them, as per SCX 1.2:-
United States: SH-60 B, F, R Seahawk ; P-3 Orion ; S-3 Viking
United Kingdom: MR-2 Nimrod
Japan: SH-60J Seahawk ; P-3 Orion
Russia: KA-27 Helix ; TU-142 Bear F ; IL-38 May
India: KA-28 Helix ; TU-142 Bear F ; IL-38 May
Pakistan: HAS-3 Lynx
Taiwan: S-70 Thunderhawk ; S-2E Tracker
Australia: S-70 SeaHawk ; P-3 Orion
New Zealand: S-70 Seahawk ; P-3 Orion
Spain: SH-60B Seahawk
Netherlands: Lynx SH-14D
Brazil: Super Lynx
Thailand: SH-60 Seahawk
France: Atlantique
Germany: Atlantic
Argentina: SE-2 Tracker
South Africa: Avro Shackleton
Cheers
Tom
_________________
He Who Will Not Risk Cannot Win

[ This Message was edited by: Thomasew on 2002-10-17 13:28 ]
 
|
novafluxx
Joined: Oct 14, 2002 Posts: 70 From: Tampa, FL
| Posted: 2002-10-17 13:25  
What are the chances of them releasing the Sub Command code to one of us to edit and keep updated? Like what happend with SH2? Is anyone up for that task in the first place?
 
|
XabbaRus
Joined: Feb 28, 2002 Posts: 2792 | Posted: 2002-10-17 16:23  
Quote:
|
On 2002-10-17 13:25, novafluxx wrote:
What are the chances of them releasing the Sub Command code to one of us to edit and keep updated? Like what happend with SH2? Is anyone up for that task in the first place?
|
|
If you were to say your chances were somewhere between earth and the nearest Solar system, I'd say next to that Solar system.
We've asked and they said no. Besides they are working on another sim which I think is using the same engine.
It's a pity but if they would just open up enough of the code to sort weapons loadout for/and create other playable subs (including diesel and all that that brings) that would be enough. But then we have a whole new game really, and besides if we had the SDK they'd have to trust us not to abuse it and run off with it.
_________________
Project 971
 
|
novafluxx
Joined: Oct 14, 2002 Posts: 70 From: Tampa, FL
| Posted: 2002-10-17 17:55  
Thats why man invented NDA! Non-Discosure Agreements...I'm sure some of you in here have decent credit and an attorny!
 
|