Howdy, even more new blood on the modding scene here. I'm working on a civ with a UU that essentially has the Ottoman Prize Ships promotion, but on land. The concept is a marine that has a 25% chance to convert defeated melee and gunpowder units while fighting in rough terrain. I've been looking at the code for Prize Ships, but my brain is too smooth to figure out how to convert the ability to work on land. Does anybody know how I can set this up? Pleas note that I am an absolute doofus at anything code-related.
Howdy, even more new blood on the modding scene here. I'm working on a civ with a UU that essentially has the Ottoman Prize Ships promotion, but on land. The concept is a marine that has a 25% chance to convert defeated melee and gunpowder units while fighting in rough terrain. I've been looking at the code for Prize Ships, but my brain is too smooth to figure out how to convert the ability to work on land. Does anybody know how I can set this up? Pleas note that I am an absolute doofus at anything code-related.
The Prize Ships promotion seems to handle capture through the <CaptureDefeatedUnits>-column in the <UnitPromotions>-table. By inspecting the DLL source it seems that such capturing is not limited to naval units only. A unit of some type may capture another unit of the same type if the capturerer has such a promotion (it is unclear which units exactly count though, as we do not have access to that part of the DLL). The only way to find out what units are valid is through testing in-game.
The capture chance is hardcoded to be based on the difference between combat strenghts of the units; The higher the difference (in favour of the attacker), the more likely the capture is.
The "while fighting in rough terrain"-part can be done using Lua, by granting or removing a promotion with <CaptureDefeatedUnits> in GameEvents.UnitSetXY(..)
The Prize Ships promotion seems to handle capture through the <CaptureDefeatedUnits>-column in the <UnitPromotions>-table. By inspecting the DLL source it seems that such capturing is not limited to naval units only. A unit of some type may capture another unit of the same type if the capturerer has such a promotion (it is unclear which units exactly count though, as we do not have access to that part of the DLL). The only way to find out what units are valid is through testing in-game.
The capture chance is hardcoded to be based on the difference between combat strenghts of the units; The higher the difference (in favour of the attacker), the more likely the capture is.
The "while fighting in rough terrain"-part can be done using Lua, by granting or removing a promotion with <CaptureDefeatedUnits> in GameEvents.UnitSetXY(..)
Forgive my ignorance, but I can't pinpoint what it is you're looking at. I'm looking in CIV5Traits.xml at the Prize Ships promotion, and there is no CaptureDefeatedUnits column. I've dug through the SDK's GameCoreDLL and I can't locate it there, either. I also can't find any dll files related to traits in the Civ 5 folder. Where should I be looking?
Forgive my ignorance, but I can't pinpoint what it is you're looking at. I'm looking in CIV5Traits.xml at the Prize Ships promotion, and there is no CaptureDefeatedUnits column. I've dug through the SDK's GameCoreDLL and I can't locate it there, either. I also can't find any dll files related to traits in the Civ 5 folder. Where should I be looking?
Check the <UnitPromotions>-table. Everything regarding unit capturing is through a promotion (The Ottoman trait just happens to give all ships that promotion).
Check the <UnitPromotions>-table. Everything regarding unit capturing is through a promotion (The Ottoman trait just happens to give all ships that promotion).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.