Few questions regarding new units

Maddox911

Chieftain
Joined
Oct 4, 2010
Messages
13
Hey there, I am currently working on a small pack of 4 civs and as complete modding newb I came across few roadblocks :P
I would like to ask if it is possible to make those units and if so, does anyone have idea how?:

1) Kheshig - Emperors Guard, can occupy only your own tiles
I was basicaly planning this to be additional unit to the mongol civ im adding, as replacing spearman would quite cripple them on offense. However I have no clue how to set them to be able to move only on your tiles or 1 tile max away from them, if that is even possible.
Also how can I add the unit to be another option when discovering bronze working, instead of replacing the spearman?

Any ideas how could that work?

2) Nomad Caravan - Either a unit (probably using one of the specialist models) that can produce other units, but doesnt allow buying them with gold. - I didnt even bother putting deeper thought into this as I have just no clue how to put this to work.

OR

Unit that allows others around it to heal(fortify) as if they were on friendly territory.
Only way I got this to work was culture bomb effect but that turned out to cause alot of balance issues obviously. I guess Medic specialization on the unit could work but that feels kind of bland. Maybe it would be possible to use general like aura?

3) Hwacha (anti-personnel gunpowder weapon developed and used in Korea. It had the ability to fire steel-tipped rockets or flaming arrow projectiles)
- I was planning to use balista model for this one and use the city attack animation with rockets, would that be possible? Or is there any other workaround for this?

If you have any ideas how to put those to work in practice post your thoughts here please, any kind of help is welcome ^.^
 
Bump, I cant really find a way how to put any of those to work. Are the modding tools that limited or am I just being dumb ?:lol: I guess this will require greater knowledge then just messing around with the XML :blush:
 
the first two would probably require the source code, the third I am unsure about.
 
Awww, thats shame. Guess I should start with something more simple then, put too much thought into this thing and found out about 80% of the ideas I had wont work out :(
 
they could work out, but not until the source code is released.
 
1) Kheshig - Emperors Guard, can occupy only your own tiles
I was basicaly planning this to be additional unit to the mongol civ im adding, as replacing spearman would quite cripple them on offense. However I have no clue how to set them to be able to move only on your tiles or 1 tile max away from them, if that is even possible.

Shiggs is right when he says you can't do it without the source code, but if I wanted to do this, I'd cheat.

Firstly, I'd make the new unit such that it was quite a bit weaker than the one I wanted to replace, or fight along side. For example, spearmen are strength 7 by default. We could make the Kheshig strength 4. Then give it a free promotion (which we can add) that doubles that units strength on freindly territory. (so strength 8 when fighting on own lands). This is easy, and it can be done now. Furthermore, it doesn't hamstring the player. He can send his Kheshig over seas, sure, but they'll take a big strength hit (and you needn't make it so brutal, you could make them strength 6. +33% on freindly territory, for example, for a total strenth of 8). It encourages, rather than forces, the player to use them defensively.

If you want a step by step guide on how to do it, say so. ;)

Also how can I add the unit to be another option when discovering bronze working, instead of replacing the spearman?

I'm not sure that you can add a whole unit class, and restrict it to one civ. You have to replace an existing unit (at least for now). In which case, you might want to take the Strength 6, +33% Approach, and replace spearmen. :)

If you're NOT making a unique unit for a civ, then that's easier.
 
You can add a new unit ... the trick is adding the class name to the unitclasses.xml...

my new unit I called <class>unitclass_semaphore</class>

Then I had to add it to unitclasses like this
<UnitClasses>
<Row>
<Type>UNITCLASS_SEMAPHORE</Type>
<Description>TXT_KEY_UNIT_SCOUT</Description>
<DefaultUnit>UNIT_SCOUT</DefaultUnit>
</Row>
</UnitClasses>

When I did this I was able to add it to the research menu where ever I wanted and it would show up in the production menu. I also was able to get one as a free unit when I started the game.

Not sure if this is exactly what you are looking for or not... This unit is a unique unit to my custom civ... I assumed it would be added to my civ if I didnt have it as one of the 2 unique units, but I havnt tried that yet.
 
Like I said, the trick is adding a unit class, then restricting it to a single civ. If you've found a way to do that, you'll have to let me know.
 
Back
Top Bottom