How do I ... ? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios



Message


Mog1 -> How do I ... ? (2/3/2019 1:51:54 AM)

How can I add a datalink for, say a ship, to an aircraft? I have added weapons and sensors but I dont see how to add a datalink.
Thanks in advance,
Mog




M1A2G -> RE: How do I ... ? (2/3/2019 5:32:30 AM)

Add comm link(First you must create a CONFIG FILES.If you do not know what this file is,please read the Command Manual ebook): Missile datalink with database ID# 3 used as an example:
<CommAdd_3 />
<!--SA-10 Missile Datalink-->

Here is a fully example:
<Unit_20541cc5-e6ff-47af-8b3f-df4e088d010a>
<!--Type 055 Zheng He (Type 055 Renhai [Zheng He] [2834])-->
<CommAdd_261 />
<!--SA-17/SA-N-12 Command Datalink [12 Channels]-->
</Unit_20541cc5-e6ff-47af-8b3f-df4e088d010a>




Mog1 -> RE: How do I ... ? (2/3/2019 5:54:50 PM)

I found that post last night and gave it a try. So to add "126 AEGIS Command Datalink [AN/SPY-1B] AEGIS Weapon Link" the entry would read:

<CommAdd_126 />
<!--AEGIS Command Datalink [AN/SPY-1B] AEGIS Weapon Link -->

I am just copying from your post. I dont really understand whats happening here.

Thanks,
Mog




KnightHawk75 -> RE: How do I ... ? (2/3/2019 7:30:35 PM)

Another option is just pop into the LUA console in the editor and run the following AFTER Changing the name= and guid = parts to match your unit (which you can get from right clicking the unit and selecting scenario editor\copy id to clipboard and then pasting into console script:

local myunit =  ScenEdit_GetUnit( {name='SAM Bn (SA-21a/b Growler [S-400 Triumf])', guid='9c291657-7c61-4935-a6d3-25face9f7897'} );
--example adding 20 extra channels for sa21\25 missile links, change for what your unit needs. 
ScenEdit_UpdateUnit( {guid=tostring(myunit.guid),mode='add_comms',dbid='267'} );  


Then press Run.
--If you want to check a units comms list before or after you can run this to dump output just make sure it comes after the 'local myunit' line above so that 'myunit' exists for this part of the code:
print('--comms list---');
for i, v in ipairs(myunit.components) do
   if v.comp_type=='CommDevice' then
   print(v);
   end
end
print('--end comms list---');


Also in some cases extra 'Comms' will get added automatically if adding certain Mounts, usually it's a vehicle component for SAM sites that do that, but not always, just saying. For example on the s400 if you add a Vehicle GraveStone 92N2 as Mount it will also add comms links that come with it. Note if you remove the mount though the comms entry that was added will get removed (most of the time anyway). Just wanted to mention it as another round about way to do this without code or ini files, but it will not apply to all things, like if you wanted to add milstar comms to said unit you must do it via LUA or ini's.







Primarchx -> RE: How do I ... ? (2/3/2019 9:43:14 PM)


quote:

ORIGINAL: KnightHawk75

Another option is just pop into the LUA console in the editor and run the following AFTER Changing the name= and guid = parts to match your unit (which you can get from right clicking the unit and selecting scenario editor\copy id to clipboard and then pasting into console script:

local myunit =  ScenEdit_GetUnit( {name='SAM Bn (SA-21a/b Growler [S-400 Triumf])', guid='9c291657-7c61-4935-a6d3-25face9f7897'} );
--example adding 20 extra channels for sa21\25 missile links, change for what your unit needs. 
ScenEdit_UpdateUnit( {guid=tostring(myunit.guid),mode='add_comms',dbid='267'} );  


Then press Run.
--If you want to check a units comms list before or after you can run this to dump output just make sure it comes after the 'local myunit' line above so that 'myunit' exists for this part of the code:
print('--comms list---');
for i, v in ipairs(myunit.components) do
   if v.comp_type=='CommDevice' then
   print(v);
   end
end
print('--end comms list---');


Also in some cases extra 'Comms' will get added automatically if adding certain Mounts, usually it's a vehicle component for SAM sites that do that, but not always, just saying. For example on the s400 if you add a Vehicle GraveStone 92N2 as Mount it will also add comms links that come with it. Note if you remove the mount though the comms entry that was added will get removed (most of the time anyway). Just wanted to mention it as another round about way to do this without code or ini files, but it will not apply to all things, like if you wanted to add milstar comms to said unit you must do it via LUA or ini's.


Thanks! That looks great. Where's the comms db listing at these days? I used to know... :(




KnightHawk75 -> RE: How do I ... ? (2/5/2019 1:51:45 AM)

I replied in another thread about the dump location, but it's in \DB\Database Component ID Number List\db3k_442.txt

Probably time for another dump of it for the next db release, though you can always load up something like sql-lite db browser and just query\dump the related tables.
It's easier usually if you're trying to replicate something that exists on an existing unit though to just query that unit via LUA and see what's what.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.328125