Changing Cargo conditions.

Rayki

Chieftain
Joined
Nov 19, 2014
Messages
78
Location
Australia
After replacing a bunch of units I noticed that choosing the cargo option doesn't use the new units as it's set to <Unit(Type)> not <Unit(Classes)>, removing the vanilla units makes the Cargo options disappear altogether as there is no object to load. So what I'm wondering is if there is a way to get it to use <Unit(Classes> as well/instead of <Unit(Type)>? And what would be the quickest and easiest basic method of achieving this?

Would be easy if <UnitClassOverrides> worked properly but alas it doesn't. :(

BTW: I have unique Melee units for each Sponsor so having them fully defined is my only option for implementation as far as I can see, I can replace all the Marine references with 1 unit but that still leaves 7 Sponsors who can't use the unit Cargo options. If anyone knows an easier/better way of doing this than what I am asking then please I'd love to know. :)
 
Welcome to the wonderful world of "Firaxis didn't need it, so they didn't code it" and "Jumping through hoops"

Perversely, the free Clinic is granted via BuildingClass (not type), so you may be able to use this.

For the weapons cargo, don't grant a unit type, grant a building class instead.
Have a unique building of that class for each sponsor.
Have each unique building do nothing but grant a free unit for the associated sponsor.

Depending on how much of the CivV code is still functioning within BE, this may work
 
That seems workable enough, I could even apply the unit bonus/restriction via the building and make it a functional and visible part of the game, a Barracks structure or Training Facility could work in quite well with the over-all effect I'm trying for. Thanks for the idea, I'll give it a go and see if it works, can't see why it wouldn't...But like you say some things just don't exist or don't function anymore. :)

I'll post back here once I've given it a try. :)
 
It could be neater to do it through Lua code. Have the cargo type do nothing through XML, and through Lua, when a faction lands and founds their capital, check their house and their cargo. If they selected the right cargo, give them the unit explicitly through code.
 
Back
Top Bottom