I was looking at stock Insane AI's and Campaign AI's (like last BW Zerg) but I couldn't find something like (attack together) or (defend ally base) or something like that. Is it possible?
While we are at it, is there a place where I could find all PyAI functions? Like a standard library or something like that. Thanks!
None.
It's the help_iftrouble() command that makes the AIs defend each other. It's not in the main scripts usually (like in the BW Zerg 10 ones) but in that mission it's invoked through a dedicated script, ZB1F.
It can be used in a combat AI script, too. Does not work with human players to make the computers defend them, unfortunately, even if you use a human-compatible script as base.
Trial and error... mostly error.
I thought so, but from
hereThere are relatively few cases where campaign AIs end up defending state 4 regions, and while some of them involve default_min, it can also be consistently done if you concentrate 2+ state 4 regions that border each other and rely on state 7 switching
I read about region states at the bottom of the document, but I didn't understand it.
If there isn't a way to coordinate attacks, I guess if I'm in an UMS scenario, I could use something like
Someplayer
Current player has units near anotherPlayer --it means, it will attack
Order some units of allyofSomeplayer attack a region inside base of anotherPlayer
None.
The state 4 region stuff basically means, that if you want an AI player to help another one(which of course requires help_iftrouble), they should have at least 1 defendable building per pathfinding region close together in a cluster of several regions in their base
You can't coordinate attack targets without mods, i'm afraid
I guess the AIs can be synched by forcing wait loops on them until a common condition (death counter?) is achieved, and then ordered to attack the same target using
attack_to opcode?
BTW the guide to all the new commands introduced in AISE is floating around here somewhere. Maybe this one, although I don't know how up-to-date it is (I'm using a locally saved copy of another reference sheet). Thx Pr0nogo!
http://pr0nogo.wikidot.com/rs-ext-aiEDIT: this guide does not seem to denote which AI opcodes work in 1.16 only (there are several that don't work in Remastered). So take care. It also contains several opcodes that are specific to an extended build of AISE not in general circulation. Nekron, do you have a link to the guide that is Remastered-compliant?
Trial and error... mostly error.
There's no guide for RM, since no one made one: also, based on Fruitdispenser's threads I'm fairly sure he's using EUDs to add aiscripts, so AISE is completely out of the question

Obviously attack_to could be used to sync them otherwise
Obviously? Not really, since this is in the "Modding" section (I checked that, for once.

)
Alright, the opcodes that do not work in SCR are the following:
-
player_jump-
kills (with a remark that, quote, though the bulk of this command's functionality is only usable in 1.16.1, you can still read values you've written elsewhere when writing scripts for 1.2. You will not be able to track kills in-game, unquote.)
-
reveal_area (works in SCR with the latest update to AISE by Neiv)
-
lift_land (not sure what practical purpose it does serve anyway)
-
aicontrol -> only the
dont_focus_disabled / focus_disabled bit.
-
ping-
unit_name-
base_layout - very much a pity.
-
remove_creep - also could be handy.
Trial and error... mostly error.
Obviously? Not really, since this is in the "Modding" section (I checked that, for once.

)
As Nekron said, I'm using EUD's. I asked in the MOD sections because I figured that most info on modifying aiscript and bwscript would be related to MODs. But then, in half the forums I'm a regular I sometimes post in the wrong section
The state 4 region stuff basically means, that if you want an AI player to help another one(which of course requires help_iftrouble), they should have at least 1 defendable building per pathfinding region close together in a cluster of several regions in their base
That means I should take a look at pathfinding regions and see if they are close together in the scenario, right?
None.
I wonder if help_iftrouble works if a computer player invoking it does not have a running town script?
Trial and error... mostly error.