[BNW] Add building action to Maori Warrior

OctopusA

Chieftain
Joined
Jan 7, 2017
Messages
5
Edit: I am sorry I posted this on Civ6 subgroup by mistake. How can I move it to Civ5 section?

Hi everyone,

I am trying to make Polynesian Maori Warrior able to build fishing boat (just like Samurai) and the Moai. I copied xml code from Samurai and changed the unit type to Maori Warrior. It works perfectly fine for Moai, the Maori Warrior can build Moai on coastal tiles. But somehow it cannot build fishing boat on sea resources. Has anyone met similar issues before? I really appreciate any help. Is this related to lua function unit:canbuild(), which may hide the build action from a unit?

Best,
Alwin
 
Last edited:
Use the report button and ask for the thread to be moved.

lua function Unit:CanBuild() would not have any bearing on your unit not being able to construct fishing boats on sea resources. The function merely returns true or false as to whether a unit can perform a particular build-action on a particular plot based on game rules within the xml/sql database. It does not allow you to alter the state as to whether or not the unit can perform the build. You would need to zip up and attach or provide a download link to your mod to allow people to see what your code actually looks like in order for anyone to give any more meaningful answer than this.
 
Back
Top Bottom