Barbarians are exploiting my custom units.

Mister_Spaceman

Chieftain
Joined
Oct 23, 2017
Messages
4
I am trying to make a mod wherein you can build world wonders that give you +1 happiness and a special unit.
These units are all unique and only one can exist every game. However, I've noticed Barbarians can also use these units, which is not the intent. They are way too powerful.

I have looked for a way to prevent them from being used as barbarians and found nothing. Does anybody know how this works? Can I prevent Barbarians from hijacking my units?
 
Although a lot less essential to the functionality of my mod, I've also run into three other issues:

-I cannot find a way to change the units to a single unit formation. I've yet to find a tutorial that explains this and Kael's mod guide is outdated in that respect.

-If you found your city, during the first turn, the special units appear as available productions even though they should only be available through the wonders. They are however cancelled immediately the next turn if you try to build them.

-If you start a game in a later Era, some of the special units are given for free and can exist multiple times at once, despite the intent being that the unit is unique in the world. Hence them being built through a world wonder and having a maxglobalinstance flag.

Though the first problem is the only game breaking one, if someone can direct me for these other ones I would also be very grateful.
 
Last edited by a moderator:
You can report your own thread and ask the moderators to move it to the correct forum.

This is how Barbarians are locked out from using certain units
Code:
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_WARRIOR</UnitClassType>
			<UnitType>UNIT_BARBARIAN_WARRIOR</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_ARCHER</UnitClassType>
			<UnitType>UNIT_BARBARIAN_ARCHER</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_SPEARMAN</UnitClassType>
			<UnitType>UNIT_BARBARIAN_SPEARMAN</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
			<UnitType>UNIT_BARBARIAN_SWORDSMAN</UnitType>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
			<UnitType/>
		</Row>
		<Row>
			<CivilizationType>CIVILIZATION_BARBARIAN</CivilizationType>
			<UnitClassType>UNITCLASS_SCOUT</UnitClassType>
			<UnitType/>
		</Row>
	<Civilization_UnitClassOverrides>
See how for the Settler and Scout classes of units nothing is stated for UnitType. The way these rows are stated has the effect of locking the barbarians from using any Settler or Scout class of unit.
 
Thanks for the help, I'll have a look at that. Though, I'm not really sure how it works with these threads. I've already posted a new one on the Civ5 page, but only just found out I couldn't delete this one when I saw your reply.

Moderator Action: Threads merged and moved to Civ V -- C&C -- Browd
 
Last edited by a moderator:
Back
Top Bottom