Modding the FfH2 dll? Maybe just Python?

sunamonster

Chieftain
Joined
Aug 10, 2009
Messages
7
Edit: Maybe I just need to edit python? I'm too new to know.

Hello again! High off my last modding success, I have two questions for the great sages that browse these forums.

1.
I've noticed in "vanilla" FfH2 that exploring units will ignore lairs. While playing Fall Further, the exploring units will move to lairs and stop exploring, giving me the opportunity to loot them as I wish. Is there a way I can implement this feature in my vanilla FfH2?

2.
Edit: Found the answer to my second question.

Thanks again everyone, you're all very helpful!

PS - Sorry for the edits, haven't written many forum posts the last few years!
 
Thanks for the info. I'm not sure if I can do it, but now I at least know where to start looking!
 
All you have to do is a little bit of XML. Exploring lairs is done by spells and you can enable the AI to use such spell with the <bAllowAI> and <iAIWeight> XML tags.
 
All you have to do is a little bit of XML. Exploring lairs is done by spells and you can enable the AI to use such spell with the <bAllowAI> and <iAIWeight> XML tags.

Its not so much that I want the AI to be able to explore the lairs. I don't know how to be quite clear on this. I spent some time doing more research and found in the Fall Further mod-modders thread this reference:

<bExplorable> - Tells any unit on Automated Exploration to stop at this tile and wake up (request user input). Also makes them desire to move to this tile like it was a GoodyHut. This last part MIGHT get a bit annoying if you don't WANT to explore the lair and attempt to re-automate the unit without first moving him away a little bit. (NOTE: This field makes it so that the AI rather aggressively pursues Lairs to explore. Also note that since most units spawned from a lair are spawned by Goody, it isn't easy to have units popping up too close to your only city, or too early in the game)

From how I understand it, this tag isn't usually in the xml, it's somewhere in the dll, but I don't know how they brought it out into the xml. I tried just inserting it into the ImprovementsInfo xml, but that went over like a butcher trying to perform open-heart surgery. Anyway, any more advice is greatly appreciated!
 
Making the AI chase lairs does require some DLL work, or LOTS of python work (I assume) could also accomplish it. Waking up units which walk onto a lair when automated is something you really need to be in the DLL to accomplish. I believe you could do it with Python as well, doing a check in onUnitMove, but it would slow the game down a fair chunk I imagine (unless onUnitMove is already being used for something else)
 
From how I understand it, this tag isn't usually in the xml, it's somewhere in the dll, but I don't know how they brought it out into the xml. I tried just inserting it into the ImprovementsInfo xml, but that went over like a butcher trying to perform open-heart surgery. Anyway, any more advice is greatly appreciated!

Sorry, misunderstood your question. If you know some python, you can write a function there. If you want to use the XML tag, you have to modifiy the DLL first (there are some guides on the forum how to do that).
 
Top Bottom