Importing/Exporting Group of Mobile units

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
tiag
Posts: 130
Joined: Thu Jun 21, 2018 8:33 am

Importing/Exporting Group of Mobile units

Post by tiag »

Hi There,

I am struggling importing a saved inst file with several groups of mobile units. It simply will not import.

Is there any constrain working with inst with groups of mobile units?

It works fine with mobile vehicles (no groups), groups of fixed fixed facilities or facilities (no groups).


EDIT:
I checked the exception log:
10.09.2022 22:49:07 -- B1274.1 -- Requested custom GUID is already in use in this scenario
Exception: Requested custom GUID is already in use in this scenario
Stack Trace: bei Command_Core.Scenario.AddNewFacility(Side theSide, Int32 FacilityDBID, String theName, Double Longitude, Double Latitude, Boolean IgnoreElevationCheck, RemoteSimEntityTypeEnum theRemoteSimEntityType, String theGUID)
bei Command_Core.Scenario.hwiYrdTO0TX(MemberRecord , List`1& , Side& )
bei Command_Core.Scenario.ImportUnitsFromFile(String InstFilePath, Side theSide)
Call Stack & Error details:
Error at 101286,
Error at 200054, Requested custom GUID is already in use in this scenario



It seems a custom GUID is created for my group of mobile units and I cant reimport more than one time.
Well, my inst file contains TOE of formations (=groups), which I would like to import several times. It seems, I cant.
Is there anthing I can do but add everything via LUA?
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Importing/Exporting Group of Mobile units

Post by michaelm75au »

You could try editing the INST file and remove the GUID of the units. It should allocate new GUIDs from memory.
Can you attach the scenario and INST files so I can review.
Thanks
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Importing/Exporting Group of Mobile units

Post by michaelm75au »

You're not trying to use this as a template to copy in multiple 'groups'.

If I create a 'ground' group and export it, and then delete it, I can import again.

You can only import one instance of a file (regardless of the type of units) into a scenario.
Michael
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Importing/Exporting Group of Mobile units

Post by michaelm75au »

Confirmed if you delete the 'Member_GUID' from the INST file for the units, you can load the file multiple times and a new GUID will be generated each time.

BUT you will need to change the group name of the imported group, other wise it will keep adding the imported units to the same group (group name is in the import).
Michael
tiag
Posts: 130
Joined: Thu Jun 21, 2018 8:33 am

Re: Importing/Exporting Group of Mobile units

Post by tiag »

Ty, Michael. I also confirm this works.
I think I will save all my TOE with general names and make a function in lua that renames each group with given parameters passed to that function.

For example: Inst file contains TOE for Air Defence Batteries, with placeholder names from Alpha to Delta, so 4 four groups.
And I want to load all these batteries and put them in 174., 170, 241 and 57. Regiments, of the 57 Guards Motor Rifle Division:
LoadmyInst(filename, {"1AD/174/57", "2AD/170/57", "3AD/241/57", "4AD/241/57"})

Then it loads and rename accodingly. It is scalable, since I can add many parameters, to many groups.
Better idea?
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: Importing/Exporting Group of Mobile units

Post by michaelm75au »

I'm looking at creating a 'template' version of the INST file. If it is marked as a 'template', you will be able to import it as many times as needed - it will automatically ignore the GUID.
The restriction on the 'group name' would still apply. You would need to rename the group after each import, but it save having to muck with the INST files.
Michael
tiag
Posts: 130
Joined: Thu Jun 21, 2018 8:33 am

Re: Importing/Exporting Group of Mobile units

Post by tiag »

That would be nice.
Post Reply

Return to “Tech Support”