UNIT file ucontainX

Have a question about how to mod something? Or have an issue with one of our mod tools? Post here.

Moderators: Balthagor, Moderators

Post Reply
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

UNIT file ucontainX

Post by evildari »

What does the entry "ucontainX" in the unit file define and wich values are useful?
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
d-bassett
BattleGoat Team
Posts: 85
Joined: May 03 2018
Human: Yes

Re: UNIT file ucontainX

Post by d-bassett »

It is a boolean type that defines what containers the facility may be built around. If uContainCiv is non zero than the facility may be built around a city container. If uContainInd is non zero than the facility may be built around an Industrial Complex. If uContainMil is non zero than the facility may be built around a Military Complex. If uContainWater is non zero than the facility may be built around an Oceanic Complex.
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: UNIT file ucontainX

Post by evildari »

Thank you very much for all your replies,
here in SRU in the default.unit file i could not find uContainCiv, uContainInd, uContainMil. Only uContainX (literally X no placeholder)
The only entries that resemble your flags are:
NavalPort uBase uIndustry uUrban uContainer

In the past i thought it was like this:

if the unit-id 21003 "Industrial Complex" has ucontainer 1 and ucontainX 2 then it is the base(container, center tile of that hex) that can hold other units which have ucontainer 0 and also ucontainx 2 - but then uIndustry would be redundant except maybe to filter it in the building menu to industrial facilities.
More easy to see just for the 2 entries with ucontainx 8 :
21018 "Oil Derrick"
21004 "Oceanic Complex"

especially weird since the "boolean type" goes from 1 to 8
are you talking about GR 8)

ps:still think this thread would have a better home in modding support
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
d-bassett
BattleGoat Team
Posts: 85
Joined: May 03 2018
Human: Yes

Re: UNIT file ucontainX

Post by d-bassett »

You are right, sorry about that. Confusion between what i was seeing in the Asset Manager front end. The value is actually a bitmask, the values are:

Civillian = 1
Industrial = 2
Military = 4
Oceanic = 8

you can set a facility to be able to be built on civilian and oceanic complexes by giving a value of 9. Or you could make it available everywhere by using value 15. Hope this makes sense.
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: UNIT file ucontainX

Post by evildari »

d-bassett wrote: May 30 2020 You are right, sorry about that. Confusion between what i was seeing in the Asset Manager front end. The value is actually a bitmask, the values are:

Civillian = 1
Industrial = 2
Military = 4
Oceanic = 8

you can set a facility to be able to be built on civilian and oceanic complexes by giving a value of 9. Or you could make it available everywhere by using value 15. Hope this makes sense.
Thank you - this makes sense
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
Post Reply

Return to “Modding Issues & Support”