phungus420
Deity
- Joined
- Mar 1, 2003
- Messages
- 6,296
In my mod that's in an alpha build state right now I've incorporated Legend Units. Just a dozen units that like wonders can only be built once. Now in early testing I can see the main problem with them is that the AI just doesn't understand how useful they are. In a recent test game I saw the AI actually throw in a legend unit as a sacrifice first because it was low level
I was hoping better AI would have dealt with some of this, but it appears not...
I know hero units have been around for a while now, so I assume there is some decent code out there to improve the AI's use of them. I haven't added any unique promotion or anything like that to them (but I suppose I could, I'd just have it do nothing but mark the unit as such for the AI if that's how the code out there works to determine a hero unit).
Does anyone have some easy to understand & commented source code out there, hopefully limited to a few files like UnitAI.cpp that teaches the AI how to more effectively use such units? I'd really appreciate it if I could use such code, it would make things far more enjoyable. I'm a complete novice when it comes to code, I can understand some of it, and written a few things in the SDK and for python (with some help from these forums), so while I may have a few difficulties merging in some complex code related to the AI's handling of hero units, I'm pretty sure I could get it to work if there was some commented code out there.
Thanks for any help

I know hero units have been around for a while now, so I assume there is some decent code out there to improve the AI's use of them. I haven't added any unique promotion or anything like that to them (but I suppose I could, I'd just have it do nothing but mark the unit as such for the AI if that's how the code out there works to determine a hero unit).
Does anyone have some easy to understand & commented source code out there, hopefully limited to a few files like UnitAI.cpp that teaches the AI how to more effectively use such units? I'd really appreciate it if I could use such code, it would make things far more enjoyable. I'm a complete novice when it comes to code, I can understand some of it, and written a few things in the SDK and for python (with some help from these forums), so while I may have a few difficulties merging in some complex code related to the AI's handling of hero units, I'm pretty sure I could get it to work if there was some commented code out there.
Thanks for any help