Loading .inst Files (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support



Message


SeaQueen -> Loading .inst Files (12/30/2021 2:56:43 PM)

I've constructed a .inst file of a Russian Airborne BTG (basically a reinforced battalion). My intention was to build out tactical level units as .inst files to facilitate the rapid construction of scenarios involving ground forces. I want to build an Airborne Brigade of 3x Airborne BTG. I'm having some trouble in the scenario editor loading the same .inst file more than once, for example, I might load one ABN BTG, put it in its position, then load a second one, put it in its position, etc.





stilesw -> RE: Loading .inst Files (12/30/2021 3:42:05 PM)

Hi SeaQueen,

Simplistically, I tried making duplicates of the .inst file with different names and that didn't work. It appears to me that the problem comes from the fact that reloading the .inst file or even duplicates of that file does not work as all the units involved retain their same GUID's along with the positions associated with each. So, the import function just overlays itself.

When I have run into this same problem in the past I have ended up having to make copies of the specific units within the group - "Airborne BTG" in this case. It is laborious but each new unit will have another unique GUID and can be saved/loaded on its own.

I cannot claim that this is the only way to do this and the devs/Lua experts may well have another method to do what you would like.

-Wayne Stiles
WarefareSims




SeaQueen -> RE: Loading .inst Files (12/30/2021 3:50:52 PM)

Poop! That seems a little inefficient. I wondered if the original use case (adding airbases and ports, where you only want one) entailed something like that. I see that "Member_GUID" is retained in the .inst file. Is there a way I could create my own GUIDs and replace them in that field?

quote:

When I have run into this same problem in the past I have ended up having to make copies of the specific units within the group - "Airborne BTG" in this case. It is laborious but each new unit will have another unique GUID and can be saved/loaded on its own.




stilesw -> RE: Loading .inst Files (12/30/2021 5:39:40 PM)

Well, I'm not sure.

In theory it might be possible to change the Guid's in a copy of the .inst file which would create "new" member units. However, I am not sure if that would screw up how CMO handles the creation of new Guid's. If it randomly creates them it might work. If it maintains an internal master table of Guid's used it might create a new one that duplicates one you have created which could potentiality create unforeseen problems. The guys who work on the simulation's code would know how Guid's are assigned and kept track of but I do not.

-WS




SeaQueen -> RE: Loading .inst Files (12/30/2021 5:41:43 PM)

quote:

In theory it might be possible to change the Guid's in a copy of the .inst file which would create "new" member units. However, I am not sure if that would screw up how CMO handles the creation of new Guid's. If it randomly creates them it might work. If it maintains an internal master table of Guid's used it might create a new one that duplicates one you have created which could potentiality create unforeseen problems. The guys who work on the simulation's code would know how Guid's are assigned and kept track of but I do not.


Huh... Maybe the best approach is just to write some LUA code to create the units?




stilesw -> RE: Loading .inst Files (12/30/2021 5:42:27 PM)

P.S. I also combed through the online Lua documentation for CMO and didn't find any useful for this question.




stilesw -> RE: Loading .inst Files (12/30/2021 5:44:52 PM)

quote:


Huh... Maybe the best approach is just to write some LUA code to create the units?

That should work as anything created that way would have a unique Guid and keep CMO happy with uniqueness requirements.




KnightHawk75 -> RE: Loading .inst Files (1/6/2022 10:02:00 PM)


quote:

ORIGINAL: SeaQueen

Poop! That seems a little inefficient. I wondered if the original use case (adding airbases and ports, where you only want one) entailed something like that. I see that "Member_GUID" is retained in the .inst file. Is there a way I could create my own GUIDs and replace them in that field?


You can, so long as you're careful not to duplicate guids when doing your edits, there should be no issue if you're careful about that when making copies\edits. I too would recommends scripting it, but if .inst works better or is just less work for you have at it. [:)]







Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.96875