Various questions about possibilities

seZereth

FfH´s art monk(ey)
Joined
Feb 3, 2006
Messages
3,900
Location
Bayreuth
Ok, hope i get some answers from all u modding pros:
Questions:
1. Is it possible to add unique units to barbarians? and how
2. is it possible to let a unit "summon" another unit? like a necromant or a wizard summoning a demon...
3. Is it possible to get a unit (for example a missionary) to make an explosion (like the pillaging one) when he attacks (u know magic effects...)
4. How can i make a unit based on the archer model, ut using the melee animation only, so when idle and combat he should use his 2 swords not the bow!
5. What is the best way, to make a unit upgrade to another unit, when i want the upgraded version being only available by upgrade (not being buildable without building the unit it upgrades from) ? ?

Thanks for any answer, you simply can give me links to threads, if anyone has asked this before!
 
Don't know about #1, but Kael has 2 in FfH and I think 3 as well. He definitely has cool explosions!
 
I don't see why you wouldn't be able to add UU to barbarians...
 
1) See above. Never tried myself.

2) Yes - python.

3) Do you mean change the default attack animation?

4) Not really sure.

5) Not as easy as it sounds. You'd think you'd just stick <icost> to "-1" in the .xml file... but that doesn't work - you can only upgrade to a unit if you can train it. The cannotTrain method in CvGameUtils.py doesn't work either, for the same reason. I can think of methods that would work for a human player (custom buttons/adding and removing a tech if you have the unit selected), but these won't work for AI units. You'd have to write separate code for the AI in python for it to be able to handle this.
 
seZereth said:
Ok, hope i get some answers from all u modding pros:
Questions:
1. Is it possible to add unique units to barbarians? and how

I haven't tried it.

2. is it possible to let a unit "summon" another unit? like a necromant or a wizard summoning a demon...

Summoning is going to require some programming, I had to jump through quite a few hurdles to get it to work in Fall from Heaven. But I do have conjurers that summon fire Elementals, demon summoners that summon demons, etc.

3. Is it possible to get a unit (for example a missionary) to make an explosion (like the pillaging one) when he attacks (u know magic effects...)

Creating the spell effect is easier. I use the system Talchas devised in this thread: http://forums.civfanatics.com/showth...=154225&page=2

4. How can i make a unit based on the archer model, ut using the melee animation only, so when idle and combat he should use his 2 swords not the bow!

I think their is a definition in the art xml file that tells it if it is a melee or ranged unit.

5. What is the best way, to make a unit upgrade to another unit, when i want the upgraded version being only available by upgrade (not being buildable without building the unit it upgrades from) ? ?

There is no easy way to do this. I fought with this for a few days and came up with a few options, none of which were ideal 9usually because the AI didn't understand or ignored the blocks. For example it was easy to remove the buttons for that unit from the build options, but the AI ignores those lists and buidls them anyway.
 
seZereth said:
Ok, hope i get some answers from all u modding pros:
Questions:
1. Is it possible to add unique units to barbarians? and how

very possible. in the civilizationinfos.xml file, there is a list at the barbarian civ, with ALL the units they can build, so adding a unit in here shouldn't be difficult. keeping it clear from the other civs can be done, by making the unit upgrade to warrior (so you can't build a previous/unupgraded unit, that the barbs have) and making the warrior unavaiable for all the other civs.
 
Haarbal said:
very possible. in the civilizationinfos.xml file, there is a list at the barbarian civ, with ALL the units they can build, so adding a unit in here shouldn't be difficult. keeping it clear from the other civs can be done, by making the unit upgrade to warrior (so you can't build a previous/unupgraded unit, that the barbs have) and making the warrior unavaiable for all the other civs.

Thats actually a list of all the untis they can't build. But the problem with barbarians is that they typically don't build their untis, they are "gifted" them. So the hard part about switching warrior to barbarian specific warriors is changing the gifting process to recognize the change.
 
Back
Top Bottom