In Lua: Spring.SetTeamResource() allows you to do this trivially for M/E, and you don't have to cheat. With custom resources, that's straightforward as well.cheating is not trivial, since the mod would have to at the very least provide means of giving a player resources on demand
And yes, economy is a Big Deal. It's also something that most AIs perform dismally at.
Cheating is just a way to get to the part that's important, from a game designer's perspective: giving players an objective (destroy the enemy's base) while growing their own economy and blowing stuff up.
And it's always possible to cheat. In KP, you get resources from something that can only be built by a player on geos. So, just allow your cheating AI to build it anywhere it feels like, or just give it free resources. Not a big deal, commercial game AIs do this all the time, and nobody really cares, except for whiners who don't understand AI very well.
I think that, for my first "AI", to clearly demonstrate my philosophical position, I'm going to sit down and just figure out how to make it possible for AIs to start with a functional base, then just have them spam units. That's easy, and should be fun for players.
After that, greater complexity can be developed, if it's even necessary- it may be enough to just make "easy", "medium" and "hard" AIs that simply get more stuff in their bases.
Is that an "AI", in the sense that you guys think about? No, but it's a functional thing that plays the game. And eventually I can tackle coding stuff to handle using Unit abilities, which is very trivial on the Lua end- what's hard, admittedly, is figuring out under what circumstances to do so, and coding the checks for that to be reasonably efficient.
The point I'm trying to get at is that, beyond research purposes, it's entirely un-necessary for AIs to actually do anything like a player does, and they shouldn't bother to follow the same rules. I've been saying that for three years straight, and it's gotten me absolutely nowhere. This approach that I'm advocating would allow me to put what I'm talking about into practice, and I suspect that people's reactions after that would pretty much tilt the argument strongly in favor of my POV.
Fun is the goal, for practical game development. Having fancier stuff available would be great, though, because then it's possible to make the AI look a lot smarter, without really having to be smart.
If it was that simple, I'd already have done that. Unfortunately, it's not. Try any current AI with Resistance, and you'll see them just sit there, doing nothing, if they do not crash. And we're talking P.U.R.E. here, not something like THIS...if you want to make life easier for AIs, you'll have to cheat for them in LuaRules - give them resources, more units, faster build speeds, etc.