Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Mass Editing

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mass Editing Page: [1]
Login
Message << Older Topic   Newer Topic >>
Mass Editing - 11/16/2021 12:37:47 AM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Hi All

Does anyone have any advice for editing units, I'm currently using delta templates but applying probably 100 delta templates to over 4000 ships and aircraft is getting incredibly frustrating are there any other ways to do it using steam version, beta .36

Thanks for your time.
Post #: 1
RE: Mass Editing - 11/16/2021 1:48:36 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
Depends on what you're trying to do to the 4000 units.
Script the changes or script the application of deltas (done with UpdateUnit() mode=delta).
or
You can write your own wrappers for making changes and then process them from a table of inputs per unit or per type etc, basically you make your own unit generator that then makes changes associated with the add after it's been added according to your own table of data attached to the basic unit generation data per unit (or per unit type) depending on what you're doing. Take time to write and test upfront but useful when generating basically an entire scene programmatically, or when doing more complex inserts or changes during a scenario.
Just give you a sort of example:
You have a table of unitgenerationdata.. entries are each a table like....
{type = 'Submarine', name = 'MySub', heading = 0, dbid = 553, side = 'US', latitude="N30.02.51",longitude="W110.55.50", altitude=-105,depth=105, autodetectable="false",holdfire="true",proficiency=4,speed=0, applychanges={ListInOrderofWhatChangesToApply for example [1]=4,[2]=5}},

then you've got the customization table and entries that are linked too be applied in that applychanges list^ like...
quote:


{id=4,name='AN/APG-63(V)3 AESA',action='add_sensor', dbid=4478,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=nil},
{id=5,name='Sa400 20channel',action='add_comms', dbid=267,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=nil},
--{id=6,name='SA-21 a/b site s400',action='add_mount', dbid=2284,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=nil}
{id=7,name='SA-21 a/b site s400',action='remove_sensor', foreach=true,dbid=4478,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=3},
{id=8,name='SA-21 a/b site s400',action='remove_mount', foreach=false,dbid=2284,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=nil},
{id=9,name='SA-21 a/b site s400',action='remove_weapon', foreach=false,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil},
{id=10,name='SA-21 a/b site s400',action='remove_weapon', foreach=false,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=nil},
{id=11,name='SA-21 a/b site s400',action='remove_weapon', foreach=true,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=6},
{id=12,name='SA-21 a/b site s400',action='remove_weapon', foreach=true,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=nil},
--{id=7,name='SA-21 a/b site s400',action='add_weapon', foreach=true,dbid=2104,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=nil},
{id=13,name='SA-21 a/b site s400',action='add_weapon', foreach=false,dbid=7716,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=5},
{id=14,name='SA-21 a/b site s400',action='add_weapon', foreach=false,dbid=7716,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=2284,commsid=nil,mountidx=nil},
{id=15,name='SA-21 a/b site s400',action='add_weapon', foreach=false,dbid=7716,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,weaponid=nil,mountid=nil,commsid=nil,mountidx=nil},
{id=16,name='SA-21 a/b site s400',action='delta', file='\\KHTests\\inisaves\\MyS400x12Default3.ini',deltaUnitname='My S400x12Default'},
{id=17,name='SA-21 a/b site s400',action='change_munition', foreach=false,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,
weaponid=nil,mountid=nil,commsid=nil,mountidx=nil,magid=nil,magnew=nil,magidx=nil,number=132,magmaxcap=0},
{id=18,name='SA-21 a/b site s400',action='change_munition', foreach=false,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,
weaponid=nil,mountid=nil,commsid=nil,mountidx=nil,magid=1185,magnew=nil,magidx=nil,number=200,magmaxcap=0},
{id=19,name='SA-21 a/b site s400',action='change_munition', foreach=false,dbid=2104,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,
weaponid=nil,mountid=nil,commsid=nil,mountidx=nil,magid=1185,magnew=nil,magidx=nil,number=100,magmaxcap=0,remove=true,fillout=false},
{id=20,name='SA-21 a/b site s400',action='change_munition', foreach=false,dbid=2103,arc_track=nil,arc_detect=nil,arc_mount=nil,sensorid=nil,
weaponid=nil,mountid=nil,commsid=nil,mountidx=nil,magid=nil,magnew=nil,magidx=nil,number=32,magmaxcap=0,remove=true,fillout=false},

.... yada yada.. this is just sample yanked from how I happen to do it..there are infinite ways, and the above dates back to late CMANO time frame.

The harder\labor intensive part is writing all the option code for handling all possible options existing or not etc, and advanced stuff like being able to optionally apply foreach's or not to remove certain things, or to remove things like mounts etc at specfic indexes or different match criteria vs firstmatching dbid etc. That said, once you have it all done you have it for a long while only having to make minor edits as things in the api change or newer easier ways come along to make you go back and revisit how you apply a change. As you might imagine from what all this sounds like I've been down this road because writing delta's for every unitguid just isn't practical, especially when you just want a set of changes replicated on to lots of different units, and said units are dynamically generated units (ie guid are not known so can't be matched to deltas).



If you're just trying to swap one set of units for another type in mass (replace all f-15 of dbid X with loadout Y to f-16's of dbid Z with loadout W ) I know I wrote something for doing the basics of swapping one set of unit(s) to another type, but doesn't sound like that's what your doing, sounds like just applying customization to each.
https://www.matrixgames.com/forums/tm.asp?m=4908508 (post 6).

< Message edited by KnightHawk75 -- 11/16/2021 2:29:12 AM >

(in reply to FifthDomain)
Post #: 2
RE: Mass Editing - 11/16/2021 2:29:41 AM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Thanks for your reply

I'm trying to over hall pretty much every unit to add modern radar and ECM/ESM as well as weapons on ships. They only require one delta template per class. I just implemented the first 280 units at one air base for a total of 17 different aircraft types and its taken nearly three days to do just that and I have the rest of the UK air and naval bases still to do I've no idea on the true count but its very high. I'm currently having to export each airbase one at a time generate a template from it then apply the deltas to each individual unit and import it back in to the scenario. I've included a file of the ones I've just completed as a reference.

Any advice is welcome, I will do it the long way if I have to but thought I'd see if there are other options available before I start the next airbase.

Thanks

Attachment (1)

(in reply to KnightHawk75)
Post #: 3
RE: Mass Editing - 11/16/2021 2:52:19 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
I made some updates while you replied (so maybe re-eyeball it).

No matter how you slice it there is upfront time investment only question is do you make that investment semi reusable for other scenes or not, along with does it cover what you're doing.

The delta thing can and often is easier in some ways when said units will always exist at scene start (guids are known and not changing), the build your own custom unit generator thing I discuss above that I do is more toward cases where the guids for delta's may never be known, and now (update this year) that magazines can be added via lua is more flexible - but more work.

knowing more I would say at first glance you could probably at least script the application of the already made delta's against the unit in question.

so for example... (side and unitname are include here more for sanity while editing\using then actual need)
local listofUnits{[1]={side="someside",unitname="E-4B NAOC1-1",filepath="Unit Editing 1 - Aircraft - E-4B NAOC 1-1.ini",guid='abcdef-blablablabla'},
[2]={..data for next one here }, etc..etc..
}

for k,v in ipairs(listofUnits) do
-- if you have pro...here you could go generate a file with data based on a real template and the guid changed to unit you are operating on to match.
--
ScenEdit_UpdateUnit({mode="delta",guid=v.guid,file=v.filepath});
end

Again though the key with delta's unless something has changed lately is whatever guid (guids) are in the .ini need to exist and match what you're applying it too, and without professional version one can't use the io namespace to dynamically gen entries from 'templates' to match the guid. I think though from what I see in the sample you should be ok, and can at least use that to automate the application of the already generated files.


< Message edited by KnightHawk75 -- 11/16/2021 2:54:14 AM >

(in reply to FifthDomain)
Post #: 4
RE: Mass Editing - 11/16/2021 4:01:35 AM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
I'll have a try at the Lua stuff but not really up to date on it. I've just been creating the deltas by Changing sensors and weapons in a standalone scenario then lifting the coded bit out and pasting it back into the a basic template containing all the specific aircraft I want it to apply to or in this case at a single airbase at a time. Then I reapply that to the specific airbase and reimporting it back into the scenario.

(in reply to KnightHawk75)
Post #: 5
RE: Mass Editing - 11/16/2021 5:11:42 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
Yeah that works, and when you have a dozen or two it may be the fastest, but if you actually have hundreds or thousands to do ...maybe not so much - but it does avoid having to dip into Lua. ;)

(in reply to FifthDomain)
Post #: 6
RE: Mass Editing - 11/16/2021 7:50:30 PM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Thanks for your input, I assume currently there is no database editing feature available it would be ideal for these situations.

For now I'll just do one airbase at a time as I rebuild the airbases as well to reduce unit numbers because it currently at 28,000 across about 5 countries while it doesn't seem to have to much issue running so far but anything I can do to bring that number down will improve game speed, part of the reason for editing so I don't have to have as many units.

(in reply to KnightHawk75)
Post #: 7
RE: Mass Editing - 11/17/2021 12:28:53 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

I assume currently there is no database editing feature available it would be ideal for these situations.

Not for non-pro, and in some ways it wouldn't really help (specific airbases), when it come to having tons of airbases, use the single-unit ones where you can it'll save you a lot of trouble, and perf overhead. The only downside is SUA's generally can't be targeted by anything other than nukes (or with right comm links by re-targeting bol a very select few bol-launch capable cruise missiles, and left to it's auto-targeting as for what subunits of the SUA get hit).

(in reply to FifthDomain)
Post #: 8
RE: Mass Editing - 11/17/2021 9:39:42 PM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Yer I quite like having a few components to an airbase but I have been considering using single unit.

Do you know is it possible to to edit the number of aircraft a ship can host, at the minute I'm using American ships as they hold two aircraft and require less overall editing for the weapons and sensors I want.

(in reply to KnightHawk75)
Post #: 9
RE: Mass Editing - 11/17/2021 11:14:03 PM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Just had a little mess with the scenario the edited aircraft just revert back to normal when importing the airbase back into the game unsure if that is what's supposed to happen.

(in reply to KnightHawk75)
Post #: 10
RE: Mass Editing - 11/18/2021 1:29:54 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

ORIGINAL: FifthDomain

Yer I quite like having a few components to an airbase but I have been considering using single unit.

Do you know is it possible to to edit the number of aircraft a ship can host, at the minute I'm using American ships as they hold two aircraft and require less overall editing for the weapons and sensors I want.

You can not edit the number of aircraft a ship can host without professional and modifying the database entries for the ship, it driven by associated facility subcomponents (that cannot be added by script ).

quote:

ust had a little mess with the scenario the edited aircraft just revert back to normal when importing the airbase back into the game unsure if that is what's supposed to happen.


If you're re-importing them and the unit guids are the same as a prior import...yeah thats probably normal\expected to overwrite what already there.


BTW there are ways to sort of get best of both worlds with SUA in some cases where you want the facility to be able to be 'shutdown' by opposition. You use the base SUA for storage and then add external runways or RAPs, then disable the runways and\or RAPS inside the SUA's sub-components (damage screen), then group'em. You end up with an functioning airbase that uses the external runways, and if the opponent targets and destroyed\damages those the airbase is shutdown. Nice trick of the trade to use when you want to keep overhead lower but still let the opponent target key components. Another way is just attaching a dummy unit to an airbase and on destruction of said marker unit damage the rest of the airbase (or units at it..or whatever) via a script. Having several dozen or more airbases all nicely drawn up with like 30-120 grouped unit components each adds up quick - avoid it where practical for the scene.

Also when done.. and for componets\units of an airbase that will always just 'sit there' and never have things attached or modifications done to them (sensors or defenses added say to an ammo dump or hanger etc) you can disable certain AI processing on them via modifications via lua changing each's AI_EvaluateTargets_enabled and AI_DeterminePrimaryTarget_enabled properties to false. I do this last after I already have a working scene.



< Message edited by KnightHawk75 -- 11/18/2021 1:42:41 AM >

(in reply to FifthDomain)
Post #: 11
RE: Mass Editing - 11/18/2021 3:21:20 PM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
That's interesting I'll have a try of that with the SUA.

I think beta .36 broke something because when I imported the Airbase back in, in beta .35 all the aircraft were modified still but now they just reverted back to standard so what I was doing at the beginning of this post doesn't work now. I'm not 100% sure though so later on I will attempt it again just to make sure I've not just messed something else up.

When I saved it the aircraft were modified but when I reloaded the save they had reverted back to standard again. I deleted the airbase and imported the one with all the deltas applied which I checked had all modified aircraft but once imported they were all standard.

For keeping numbers down with SAM sites I'm currently trying out just doubling the internal units in the weapons tab so I can just have one placement with double the fire power I've also given the Patriot & THAAD 360 degree radar because again don't need to place as many. I don't like that they are only 120 degree either, might give them some jamming capability too.

Same with bunkers instead of having 7-8 of them I put all the sensors in one.

The scenario is huge but it seems to run ok its only issue is reloading it (after testing certain parts) once its been running means I have to exit the game completely and come back in because it throws out of memory warnings. I suspect once its been running a few day I might experience some issues with memory but only time will tell. I might start playing while building still and see how it goes. I intend to play it in editor anyway and control all side so I will be both player and AI. I think mostly it'll be ISR, patrols and air intercepts not to sure yet on what I can truly make it do because I'm sure I'm moving way outside its intended use.


(in reply to KnightHawk75)
Post #: 12
RE: Mass Editing - 11/18/2021 5:58:54 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

so I can just have one placement with double the fire power

Keep in mind they may still be rate-limited from a reaction time perspective per-unit (so sometimes less units is less effective then you think it might be from an at-once firepower perspective).
quote:

I've also given the Patriot & THAAD 360 degree radar because again don't need to place as many. Same with bunkers instead of having 7-8 of them I put all the sensors in one.

yup yup I do that too, including the consolidating where practical. ;)

quote:

I have to exit the game completely and come back

Yup you burn up the 3.xgb quick I imagine with that many units, especially if your moving around (caching map layer and elevation data to memory too along the way) with bunch of layers enabled while placing stuff, only way to clear that part of the cache is restart (scene reload generally does not do it).

< Message edited by KnightHawk75 -- 11/21/2021 2:45:38 PM >

(in reply to FifthDomain)
Post #: 13
RE: Mass Editing - 11/19/2021 9:55:48 PM   
FifthDomain

 

Posts: 82
Joined: 8/5/2020
Status: offline
Yer its definitely memory heavy but I expect that ill have issues at that size now. Cant wait for a 64bit version hopefully a year or two it'll come round.

Going to try re-implement the deltas that vanished it said they were improperly formatted after the last update so might be back to the beginning on them.

(in reply to KnightHawk75)
Post #: 14
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mass Editing Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.719