Page 1 of 2

Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Wed Mar 12, 2014 8:40 pm
by mikmykWS
You can add new magazines to any ship, sub or facility using an INI config fil. This is basically a script that can apply various mods to the units in the scenario without having to edit the database.

To rebuild a scenario using an INI file you first need to make an INI template file. Go to Editor -> SBR -> Generate Template. This will generate a template file listing all units in the simulator. If you have manually altered magazines, mounts, etc, in the scenario editor, go to Editor -> SBR -> Generate Delta Template to only export the diff between the scenario setup and the database.

Then edit the exported INI file by opening it in Notepad. When you open the file it contains an entry for all platforms in the scenario. Delete everything except the unit you want to edit, like this:

<?xml version="1.0" encoding="utf-8"?>
<ScenarioUnits>
<Unit_a25be2bd-d06f-4162-959b-b3d7ccc1e5ff>
<!--LCS 1 Freedom (LCS 1 Freedom [1839])-->
</Unit_a25be2bd-d06f-4162-959b-b3d7ccc1e5ff>
</ScenarioUnits>

Note that 'Unit_a25be2bd-d06f-4162-959b-b3d7ccc1e5ff' is the unique identifier for the LCS 1 in the test scenario that I've used on this end. It will be different on your end. The line '<!--LCS 1 Freedom (LCS 1 Freedom [1839])-->' is a comment and can be altered as you see fit. It is good practice to always add comments for all lines in the INI.

Then add a 'Add Magazine' line, like this:

<MagAdd_240 /><!--Torpedo Magazine [Internal Tubes] -- USN, 2005-->

The above line will add Magazine #240 to the ship. I've also added a comment for future reference.

The full file look like this:

<?xml version="1.0" encoding="utf-8"?>
<ScenarioUnits>
<Unit_a25be2bd-d06f-4162-959b-b3d7ccc1e5ff>
<!--LCS 1 Freedom (LCS 1 Freedom [1839])-->
<MagAdd_240 /><!-- Torpedo Magazine Internal Tubes, USN 2005 -->
</Unit_a25be2bd-d06f-4162-959b-b3d7ccc1e5ff>
</ScenarioUnits>

Then go to Editor -> SBR -> Apply SBR to apply the changes. Open the Magazines window for the LCS and check that the magazine has been added.

Magazine with ID# 240 adds 8 Mk54s. If you want 18 torps used ID# 244, and for 30 torps use ID# 246.

Neat, huh :)

RE: Adding a Magazine via config file

Posted: Wed Mar 12, 2014 8:43 pm
by mikmykWS

emsoy
INI Config file commands are:

Add mount, ID# 434 used as an example. Note that Coverage has to be added as well, either each segment of a limited arc, or a full 360 deg arc:

<MountAdd_434>
<!--CADS-N-1 [3M87 Kortik]-->
<Cov>
Alternative 1:<Seg>PMA1,PMA2,PMF1,PMF2,PS1,PS2,PB1,PB2</Seg>
Alternative 2:<Seg>360</Seg>
</Cov>
</MountAdd_434>

Add magazine, ID# 240 used as an example:

<MagAdd_240 /><!-- Torpedo Magazine Internal Tubes, USN 2005 -->

Add sensor, ID# 4 used as an example. Note that Coverage has to be added as well, both search coverage and illumination/target tracking coverage (the two coverages have been given different arcs for illustration purposes):

<SensorAdd_4>
<!--Toad Stool [RBP-2]-->
<Cov>
<Seg>360</Seg>
</Cov>
<Cov_Ill>
<Seg>PMA1,PMA2,PMF1,PMF2,PS1,PS2,</Seg>
</Cov_Ill>
</SensorAdd_4>

Add comm link (typically missile guidance link), ID# 3 used as an example:

<CommAdd_3 /><!--SA-10 Missile Datalink-->

Delete mount, mag, sensor and comm link, item #3 on the unit used as an example, with ID#222 (a ship may carry several instances of a given mount/mag/etc, so have to specify exactly which one to remove):

<MountRemove_3_222 />
<MagRemove_3_222 />
<SensorRemove_3_222 />
<CommRemove_3_222 />

Edit, add and remove weapon record on mount, in mount magazines or in magazines. In this case mount #3 on the ship, which has ID# 552 and is a Sea Sparrow mount (as per comment). Also note that we're playing around with the mount magazine a bit:

<Mount_3_552><!--Mk29 Sea Sparrow-->
<WeaponRecAdd_5188 /><!--RIM-8J Talos-->
<WeaponRecAdd_1557 /><!--RUM-139A VLA [Mk46 Mod 5]-->
<WeaponRecAdd_2626 /><!--Roland 3-->
<WeaponRecAdd_944 /><!--RUR-5A Mod 3 ASROC RTD [10kT Nuclear DC]-->
<WeaponEdit_1687_2 /><!--RIM-7M Sea Sparrow-->
<WeaponEdit_885_22 /><!--RIM-8J Talos-->
<WeaponEdit_1643_77 /><!--RUR-5A Mod 3 ASROC RTD [10kT Nuclear DC]-->
<WeaponRemove_233 /><!--Mk182 SRBOC Chaff [Seduction]-->
<MountMag>
<WeaponRecAdd_5188 /><!--RIM-8J Talos-->
<WeaponRecAdd_154 /><!--RUM-139C VLA [Mk54]-->
<WeaponRecAdd_4015 /><!--S-8KO 80mm Rocket-->
<WeaponRecAdd_2765 /><!--SAM-3 Kin-SAM [Type 93]-->
<WeaponEdit_885_3 /><!--RIM-8J Talos-->
<WeaponEdit_1193_88 /><!--SAM-3 Kin-SAM [Type 93]-->
<WeaponRemove_233 /><!--Mk182 SRBOC Chaff [Seduction]-->
</MountMag>
</Mount_3_552>

<Mag_1_717><!--Mk36 SRBOC-->
<WeaponRecAdd_2541 /><!--Generic Chaff Salvo [5x Cartridges]-->
<WeaponRecAdd_5188 /><!--RIM-8J Talos-->
<WeaponRecAdd_154 /><!--RUM-139C VLA [Mk54]-->
<WeaponRecAdd_4015 /><!--S-8KO 80mm Rocket-->
<WeaponRecAdd_2765 /><!--SAM-3 Kin-SAM [Type 93]-->
<WeaponEdit_232_222 /><!--Mk182 SRBOC Chaff [Seduction]-->
<WeaponEdit_885_3 /><!--RIM-8J Talos-->
<WeaponEdit_1193_88 /><!--SAM-3 Kin-SAM [Type 93]-->
<WeaponRemove_233 /><!--Mk182 SRBOC Chaff [Seduction]-->
</Mag_1_717>

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Wed Mar 12, 2014 8:49 pm
by Jorm
brilliant.. thanks for the pointer :-)

you guys really do give excellent support to the game.. huzahhh !!!

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Thu Mar 13, 2014 6:09 am
by Sardaukar
It's great, even when bit complicated.

Now we just need someone to make a program or "feature" that does this "automagically"...[:D]

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Thu Mar 13, 2014 9:13 am
by mikmykWS
You can add and delete weapons, mounts, records and sensors from within the game already. Add magazine is on our list.
thanks!

Mike

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Thu Mar 13, 2014 9:24 am
by Sardaukar
ORIGINAL: mikmyk

You can add and delete weapons, mounts, records and sensors from within the game already. Add magazine is on our list.
thanks!

Mike

I meant easier editing of INI config files. [8D]

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Tue Nov 04, 2014 4:17 am
by blh42
ORIGINAL: mikmyk

You can add and delete weapons, mounts, records and sensors from within the game already. Add magazine is on our list.
thanks!

Mike

Is it possible to add thing as helo landing capability too?

Blh

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Tue Nov 04, 2014 2:14 pm
by mikmykWS
Not yet but there are really a ton of ship hulls in the game that would probably match what you're looking for.

If its an error or something missing in a db post to the relevant string and we can bang out a fix in a build or two.

Mike

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sun Dec 14, 2014 7:08 pm
by orca
I know someone posted a link with the datalink id's. I searched but can't seem to find it. Does anyone know that link?

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sun Dec 14, 2014 7:53 pm
by ClaudeJ
ORIGINAL: orca

I know someone posted a link with the datalink id's. I searched but can't seem to find it. Does anyone know that link?

That one?

Image
fb.asp?m=3441817

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sun Dec 14, 2014 9:12 pm
by orca
Yes. Thanks.

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Fri Jan 23, 2015 7:44 pm
by VistaJohn1
This is a great tool! Have learned to use it to add comms, took a bit before I understood the exact steps required. Your examples have the information, just takes some trial and error to see the "/" added to the end of changes. Multiples can be done as long as you remember to end the changes for each unit. Can you post an example of how a loadout is changed via the ini file. Weapons and quantity please. Can you export and import these to a file for use in other scns? Thanks for a great game! It goes where I always wanted Harpoon to go. The changes in the last update really fixed the things I found frustrating with air operations[:)].
In Reply to mikmyk

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sat Jan 24, 2015 10:46 am
by Rudd
ORIGINAL: VistaJohn

...Can you export and import these to a file for use in other scns? Thanks for a great game! It goes where I always wanted Harpoon to go. The changes in the last update really fixed the things I found frustrating with air operations[:)].
In Reply to mikmyk


You can copy and paste specific info from those, to use in others... tm.asp?m=3766341&mpage=1&key=modifications&#65533;

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Tue Jan 27, 2015 6:03 pm
by VistaJohn1
Thanks for the info. I have no problem with mounts, sensor, or comms. Cannot figure out how to change weapons/quantities for aircraft loadouts. For example, change all the aim-120 load out for carrier aircraft to all be the 120D instead of a mix. F-24A, F-35C, A-12A aircraft. I can change the quantities to for the 120c to zero, but when I add the record for the 120d, it goes into the defensive stores mount. How do I get it to go into the weapons mount for aims.

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Wed Jan 28, 2015 3:06 pm
by Mgellis
In case anyone needs this information...

<MagAdd_120 /> adds a carrier magazine
<MagAdd_10 /> adds a helicopter magazine

(Both come with certain weapons, but you can delete those and add whatever weapons you want to include, then use the delta template command to record those changes to the .ini file so when the scenario is updated to new versions of the database the changes are not erased/reset to the default. But these work well as sort of "generic" magazines if you want to add a magazine to a ship that does not have any at all. I'm sure there are others, but these are the ones I've found so far.)





RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Fri Jan 30, 2015 2:49 am
by VistaJohn1
Thanks for the response. I am trying to edit aircraft as was explained for ships. It seems to work for planes aloft, but not for ones on a base or carrier. The script runs without error, but only the planes aloft are changed. I copied the unit info from the template to the delta template and made the changes to jammers I wanted. Save the file and run the SBR script, says it's done. Save the scn., then load as a game. The airborne planes are good, the ones on the base and carrier are unaffected. Am I missing something? Is it just not possible to change planes not airborne? Anyone with an answer, please respond.
Thanks


RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Wed Feb 18, 2015 12:43 pm
by orca
Thanks Mgellis for info on magazines.

Is there a link with a list of all magazines similar to the link out there for datalinks?

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sat Apr 25, 2015 2:42 pm
by jptheronmd
Sorry for the dumb question, but I am trying to change one sensor for another on a particular ship but don't know how to look up sensors in the DB in the first place. Any ideas?

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Sat Oct 10, 2015 10:04 pm
by Splinter00S
What you can do is add the sensor through the mission editor, make a delta ini for that ship, then the sensor being added should be listed with it's relevant id.

Anyone know if you can add properties (e.g. refuel, replenish, etc.) in the same way you can add sensors weapons and mags? If so, does anyone know the property reference number for refuel from port/starboard and replenish from port/starboard?

RE: Adding Ship Components via Config File (Add Magazine, Add Comms, Add Weapons etc).

Posted: Wed Oct 21, 2015 10:05 am
by taffthomas
Can I bump the last request
I would like to replenish Frigates & destroyers with munitions They will refuel but not replenish so do I need to add a From port/starboard to their properties?