Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Loading .inst Files

 
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 >> Tech Support >> Loading .inst Files Page: [1]
Login
Message << Older Topic   Newer Topic >>
Loading .inst Files - 12/30/2021 2:56:43 PM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
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.



Attachment (1)
Post #: 1
RE: Loading .inst Files - 12/30/2021 3:42:05 PM   
stilesw


Posts: 1497
Joined: 6/26/2014
From: Hansville, WA, USA
Status: offline
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

_____________________________

“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)

(in reply to SeaQueen)
Post #: 2
RE: Loading .inst Files - 12/30/2021 3:50:52 PM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
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.

(in reply to stilesw)
Post #: 3
RE: Loading .inst Files - 12/30/2021 5:39:40 PM   
stilesw


Posts: 1497
Joined: 6/26/2014
From: Hansville, WA, USA
Status: offline
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

_____________________________

“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)

(in reply to SeaQueen)
Post #: 4
RE: Loading .inst Files - 12/30/2021 5:41:43 PM   
SeaQueen


Posts: 1451
Joined: 4/14/2007
From: Washington D.C.
Status: offline
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?

(in reply to stilesw)
Post #: 5
RE: Loading .inst Files - 12/30/2021 5:42:27 PM   
stilesw


Posts: 1497
Joined: 6/26/2014
From: Hansville, WA, USA
Status: offline
P.S. I also combed through the online Lua documentation for CMO and didn't find any useful for this question.

_____________________________

“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)

(in reply to stilesw)
Post #: 6
RE: Loading .inst Files - 12/30/2021 5:44:52 PM   
stilesw


Posts: 1497
Joined: 6/26/2014
From: Hansville, WA, USA
Status: offline
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.

_____________________________

“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)

(in reply to SeaQueen)
Post #: 7
RE: Loading .inst Files - 1/6/2022 10:02:00 PM   
KnightHawk75

 

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

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.




(in reply to SeaQueen)
Post #: 8
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Tech Support >> Loading .inst Files 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

1.469