Q: Adding Items Automatically to AI Heroes?
Posted: Tue May 21, 2024 5:48 pm
So a friend of mine, whom some of you may know, YogDog, just had the brilliant idea when I complained AI heroes don't know how to shop, that maybe I could just make a mod that automatically gives them items every X number of turns.
My thought right now, is that it seems like I could add a Cooldown Condition to every hero unit in the game, that has, say, a 20 turn timer, and when it runs out, it spawns an Item and a new 20 turn Cooldown Condition that does the same thing, until their inventory is full.
But there's at least 1 snag...
How do I actually add an item to a unit? I can't find a command that does anything like that.
I believe I can fix the problem "But what if it's a human player unit?" with the Check Faction function, but I could use some details on exactly how it works
My thought right now, is that it seems like I could add a Cooldown Condition to every hero unit in the game, that has, say, a 20 turn timer, and when it runs out, it spawns an Item and a new 20 turn Cooldown Condition that does the same thing, until their inventory is full.
But there's at least 1 snag...
How do I actually add an item to a unit? I can't find a command that does anything like that.
I believe I can fix the problem "But what if it's a human player unit?" with the Check Faction function, but I could use some details on exactly how it works