Hello all!
After a six month hiatus from working on my Spartan Civilization mod, I'm back and ready to get back in the swing of things! Now I'm trying to write code to convert conquered foes. The idea would be that groups of Hoplites could either kill all of their enemies, as per normal gameplay, or they convert enemy villagers into 0 population Helots with low hitpoints and all the regular villager duties (and then some).
I've looked through proto(x), techtree, and unittransform files, but I haven't figured out how Priests convert GAIA animals into animals of Set. Once I can figure that out, I'll work from there. I've made example code of how I think I could make it work.
This is what I'm hoping I would use as aproto action:
But even then, I would have Greek Villagers with the same hitpoints and no new name. So I think I would go intounittransform and change the unit name/type there:
Does this sound like a viable option to anyone? Any help or ideas are appreciated. I'll update what I've learned as it happens. My old laptop crashed so I'm forced to use some of my older code and designs as a starting point, but I'm confident that it can work.
Admittedly I'm currently running Vanilla. I know, I know I'm cheap lol. However if the above issue has been solved in Titans, EE, or TOTD, please point me in the right direction; I might be forced to upgrade!
Thank you all, especially WoolieWOolz for all of the feedback and troubleshooting. I'm happy to be back working on a project that I enjoy.
Sincerely,
Phantom31014
UPDATE!!!!
I just found two guides,ra 5946's Making a unit transform and Monkish_man's Guide to conversion , that have answered the bulk of my questions. But is there a way to transform units for only one civilization?
Would I just go into the techtree and change one of the major gods, Hades Age 1 for example, to allow this upgrade? The only downside is that I'd want it available for Age 3, but I don't want to risk making it available for Zeus & Poseidon's civilizations in the Heroic Age.
Thanks for all your help!
Phantom31014
Current projects:
Spartan Civilization
Completed mods:
Shield Modpack
Egyptian Hypaspist & Egyptian Ajax
After a six month hiatus from working on my Spartan Civilization mod, I'm back and ready to get back in the swing of things! Now I'm trying to write code to convert conquered foes. The idea would be that groups of Hoplites could either kill all of their enemies, as per normal gameplay, or they convert enemy villagers into 0 population Helots with low hitpoints and all the regular villager duties (and then some).
I've looked through proto(x), techtree, and unittransform files, but I haven't figured out how Priests convert GAIA animals into animals of Set. Once I can figure that out, I'll work from there. I've made example code of how I think I could make it work.
This is what I'm hoping I would use as a
<action name="Convert">
<param name="MaximumRange" value1="10"> < /param>
<param name="MinRate" type="AbstractVillager" value1="15"> Villager Greek< /param>
<param name="Rate" type="AbstractVillager" value1="0"> < /param>
</action>
But even then, I would have Greek Villagers with the same hitpoints and no new name. So I think I would go into
<transform>
<from> Villager Greek< /from>
<to> Helot< /to>
</transform>
Does this sound like a viable option to anyone? Any help or ideas are appreciated. I'll update what I've learned as it happens. My old laptop crashed so I'm forced to use some of my older code and designs as a starting point, but I'm confident that it can work.
Admittedly I'm currently running Vanilla. I know, I know I'm cheap lol. However if the above issue has been solved in Titans, EE, or TOTD, please point me in the right direction; I might be forced to upgrade!
Thank you all, especially WoolieWOolz for all of the feedback and troubleshooting. I'm happy to be back working on a project that I enjoy.
Sincerely,
Phantom31014
I just found two guides,
Would I just go into the techtree and change one of the major gods, Hades Age 1 for example, to allow this upgrade? The only downside is that I'd want it available for Age 3, but I don't want to risk making it available for Zeus & Poseidon's civilizations in the Heroic Age.
Thanks for all your help!
Phantom31014
Current projects:
Spartan Civilization
Completed mods:
Shield Modpack
Egyptian Hypaspist & Egyptian Ajax
[This message has been edited by phantom31014 (edited 07-11-2017 @ 03:27 AM).]