[ian-reeds-games] Re: AI control

  • From: Ian Reed <support@xxxxxxxxxxxxxxxxxxx>
  • To: ian-reeds-games@xxxxxxxxxxxxx
  • Date: Wed, 28 Aug 2013 15:11:56 -0600

Hi Carlos,

I hear you on the step_effects, maybe with the new script flags this is something a scripter could create. I'll need to get terrain working in the new parser version, but then they could do it.

I think my best bet for ai_empty_tile_curse is to make it so scripters can write custom AI, that way they could solve a lot of problems and I would be less of a bottleneck.

You make a very good point about maintaining old parser versions, which is why I had the version number in the files in the first place, so that I could support old versions while still making improvements in newer versions. And as much as I'd love to clean up the code by getting rid of them I think you're right that they should stay.
So they will stay and parser version 10 will continue to be optional.
It is currently optional, but if you want some of the latest features you have to upgrade, and on that note you only need to upgrade the files that need the new versions. So if only one unit file needs script flags then you only need to upgrade 1 unit file and the other unit files will still parse using the old version.

In retrospect I probably should have made the load_scripts flag associated with a new map pack settings file version, and left the old behavior of loading all scripts if you were using the old version, but I haven't done that for flags in the past so it didn't jump out to me as an obvious solution.
Oh well, hopefully it hasn't caused too much pain.

Ian Reed


On 8/28/2013 3:37 AM, Carlos Macintosh wrote:
I was thinking that perhaps you could put in a command, such as ctrl shift-A, into the map editor, that could toggle the AI status on units. It could toggle from “this unit starts out AI cotrolled” to “this unit starts out without AI control”, and this way you wouldn’t have to go into the map pack by hand and find the line containing the unit you want to keep unfettered and disable it. Come to think of that, you can’t really disable a boolean flag if it’s set In the default unit flags file. Maybe you can add =false to the flag to turn it off? I’ve never really tried. In other things, we need a step_effects flag for terrains and effects. I’m making my capture the flag map and I put in a feature called the tripwire which, if stepped upon, immediately stops the unit on it from moving. I made it a tile effect and gave it the no_movement flag so there is no way to get the unit off the tile once it’s stepped on to it, as wel as no way to reuse it because the tripped unit iss just stuck there. This does present some problems though. The AI, for one, tries to move past the tripwire and it says there’s a bug in the AI if a unit steps on it and still has movement points left, because the effect stops the unit from moving. I also can’t use the announce flag to say that the unit triggered the tripwire, so unles you are looking out for them, you’ll never know your unit was hobbled. I also plan to make a spike terrain that deals damage and also causes bleeding, but without the step_effects flag I can’t really make the bleding work. Also, I asked for this a while back, but I’d love an ai_empty_tile_curse option. Currently, the AI doesn’t know weree to place traps. It would be nice to just tell the AI to choose a random square in range and place it there. It’s better than nothing, at any rate. The AI_summon flag does a similar thing, but since the trap placement only changes the terrain or adds effects to it, the AI uses it on the same square over and over again. Sadly, the lac of these flags has slowed me down a bit for some unexplained reason. I focus on them even when I realize there’s nothing to be done about them, and it stops me from working as effectively on the other stuff that I can' actually control. Also, converting all 60 or whatever units of tomb robber into the new unit format is going to kill me. Maybe you could keep parser versions below 10 for simple maps that still use the old syntax and keep parser vversion 10 optional for the new/more advanced stuff? Besides scripting flags,map creators who used the older stuff would be conceding their use of the newest features you would be putting in, but, usually I don’t really overhaul my maps to take advantage of the latest features, so that’s not really a problem with me And we’d all use the new syntax for any new stuff we create so it can take advantage of those features. I say this on behalf of creators like Allan Thompson, whose warlords pack has over 170 unitss and structures to convert to the new system. And I haven’t found a global find and replacer so I’ll be doing tomb robber by hand for sure when I’m warned of the eminent disappearance of parser version 2, unless some other development comes up.

Other related posts: