Hi,
I'm creating a mod that adds a new Great Person. I want this unit to be able to "construct a wheat farm," that is, set the resource of the tile they're in to wheat and then place a farm on it. In other words, they will be able to instantaneously create an improved wheat tile anywhere a farm can be built regardless of whether wheat was actually on that tile to begin with.
I understand XML (more or less), and I've successfully created the Great Person and part of the ability.
XML (abridged):
<Builds>
So, I currently have a new Great Person that is consumed by building a farm. Of course, my profound lack of Lua savvy limits me here. (I know next to nothing about Lua.) I tried my best to finish this myself, but I really just need a solution here rather than a comprehensive beginner's guide to Lua.
I need to know how to set the tile's resource to wheat when the above build is prompted. (The resource should be set to Wheat BEFORE the farm is placed so that the improvement graphic looks like the normal wheat farm.)
Hopefully, this is a simple thing to figure out. Let me know if anything needs clarifying.
Thanks!
I'm creating a mod that adds a new Great Person. I want this unit to be able to "construct a wheat farm," that is, set the resource of the tile they're in to wheat and then place a farm on it. In other words, they will be able to instantaneously create an improved wheat tile anywhere a farm can be built regardless of whether wheat was actually on that tile to begin with.
I understand XML (more or less), and I've successfully created the Great Person and part of the ability.
XML (abridged):
<Builds>
<Row>
</Builds><Type>BUILD_WHEAT</Type>
<ImprovementType>IMPROVEMENT_FARM</ImprovementType>
<Description>Construct a Wheat Farm</Description>
<Help>Unit will be consumed.[NEWLINE][NEWLINE]Will transform this tile into an improved source of [ICON_RES_WHEAT] Wheat.</Help>
<Kill>1</Kill>
<EntityEvent>ENTITY_EVENT_MINE</EntityEvent>
<HotKey>KB_W</HotKey>
<OrderPriority>96</OrderPriority>
<IconIndex>21</IconIndex>
<IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
</Row><ImprovementType>IMPROVEMENT_FARM</ImprovementType>
<Description>Construct a Wheat Farm</Description>
<Help>Unit will be consumed.[NEWLINE][NEWLINE]Will transform this tile into an improved source of [ICON_RES_WHEAT] Wheat.</Help>
<Kill>1</Kill>
<EntityEvent>ENTITY_EVENT_MINE</EntityEvent>
<HotKey>KB_W</HotKey>
<OrderPriority>96</OrderPriority>
<IconIndex>21</IconIndex>
<IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
So, I currently have a new Great Person that is consumed by building a farm. Of course, my profound lack of Lua savvy limits me here. (I know next to nothing about Lua.) I tried my best to finish this myself, but I really just need a solution here rather than a comprehensive beginner's guide to Lua.
I need to know how to set the tile's resource to wheat when the above build is prompted. (The resource should be set to Wheat BEFORE the farm is placed so that the improvement graphic looks like the normal wheat farm.)
Hopefully, this is a simple thing to figure out. Let me know if anything needs clarifying.
Thanks!