Hi, I'm new to starcraft scripting and was wondering if its possible to script an emeny army to perform a series of predetermined actions for its game... Is there a system for setting or delivering timed commands to do everything a normal player could do in the game?
I guess part of my question would be what are the types of things i can program my enemy to do?
Look at all the actions under AI and AI Advanced, you can give an AI player orders to send attack waves, to train units in a specific base etc, difficulty parameters will also make him smarter and better, like defending with SCVs and harvesting resources better.
Would it be possible for my script to have exactly the same degree of control over a computer controlled enemy army as a human player has over their army?
To explain a little, I'm currently in the process of selecting a method for analyzing human responses to various strategically competitive inputs. It doesn't have to be done in the starcraft engine but I like starcraft and am looking for reasons to get permission to use the engine, and to satisfy theory, the research requires that the system it's executed in provide an environment where the computer controlled enemy have no material limitations in comparison to the human counterpart.
Basically meaning that the computer has to be capable of receiving and processing the exact same degree of detail in control input that a human can. Otherwise the research would be invalid because the script was incapable of "doing" everything a human could, making the competition 'unfair'.
As far as I know triggers (and thus action definitions/scripts) have the exact same amount of input possibilities as human players have. You can obviously also make the computer have an unfair advantage if you want to, because triggers can do a lot of more stuff than the player can do ingame.
Obviously a fully working AI via triggers can get as complicated as you want it to be if you script everything it has to do. But I don't think you can actually change the code of the existing AI with scripts.
As for the existing AI of Starcraft which you can control with the AI and AI Advanced Triggers, I really don't know if they fulfill your conditions, sorry.
Since in theory all players do is give orders, which you can do through triggers, the only limitation is the extent of your script. I highly doubt anyone will make an AI as versatile as a player, but that is because it simply takes too much time to program all responses to all possible strategies, and interpretations of scouting info.
the AI and AI advanced trigger actions will make your life easier if you're making an AI, but again, all players do is issue orders to units, so in theory all you need is the "Issue Order to Unit" trigger action (obviously combined with tons of conditions to know what the right response to your enemy currently is)
Hey, thanks for the responses. I'm not trying to make an AI that's 'challenging' according to starcraft battle tactics. I need to observe human reactions to computer input, and the input needs to be able to cover the extremes, including things that would be tactically stupid. :)
I guess I'm just concerned about precise unit selection and point/object selection, attacking specifically selected units, buildings, points, etc (exactly like a human player). I thought about trying to pre-record the computer's test input myself for the various 'behaviors' and use it in a kind of custom 'replay' mode against a human participant, but it didn't look like there was any way to feed the computer player a series of inputs to perform other than via the *actual* replay feature, in which case then you can't have a human play too, and even if you could, there's no way that I know of to record data from a replay.
So basically what I thought was yo dawg, I need to be able to get a replay of a human's interactions with different inputs from a computer's 'replay'. Ack! Too many words!
well, there's no way to really record all actions done and have the game read that and repeat everything. At least not directly. You can use banks and save a value into them every time an action is done, then have the game read the bank the next time you open the map and repeat those actions (You'd have to write the code that interprets the bank though). This could possibly cause lag when saving the orders to a bank, seeing as players can easily go over 100 APM, which means lots of triggers.
But yeah, as I said before, all players do is issue orders, and that can be done through triggers. Orders include what ability, what unit gets it, and what the target unit/point is, the same as what a player would have to pick. So the triggers are only limited by the person making them.
Hi, I'm new to starcraft scripting and was wondering if its possible to script an emeny army to perform a series of predetermined actions for its game... Is there a system for setting or delivering timed commands to do everything a normal player could do in the game?
I guess part of my question would be what are the types of things i can program my enemy to do?
@scdeveloper: Go
Look at all the actions under AI and AI Advanced, you can give an AI player orders to send attack waves, to train units in a specific base etc, difficulty parameters will also make him smarter and better, like defending with SCVs and harvesting resources better.
Would it be possible for my script to have exactly the same degree of control over a computer controlled enemy army as a human player has over their army?
To explain a little, I'm currently in the process of selecting a method for analyzing human responses to various strategically competitive inputs. It doesn't have to be done in the starcraft engine but I like starcraft and am looking for reasons to get permission to use the engine, and to satisfy theory, the research requires that the system it's executed in provide an environment where the computer controlled enemy have no material limitations in comparison to the human counterpart.
Basically meaning that the computer has to be capable of receiving and processing the exact same degree of detail in control input that a human can. Otherwise the research would be invalid because the script was incapable of "doing" everything a human could, making the competition 'unfair'.
As far as I know triggers (and thus action definitions/scripts) have the exact same amount of input possibilities as human players have. You can obviously also make the computer have an unfair advantage if you want to, because triggers can do a lot of more stuff than the player can do ingame.
Obviously a fully working AI via triggers can get as complicated as you want it to be if you script everything it has to do. But I don't think you can actually change the code of the existing AI with scripts.
As for the existing AI of Starcraft which you can control with the AI and AI Advanced Triggers, I really don't know if they fulfill your conditions, sorry.
@scdeveloper: Go
Since in theory all players do is give orders, which you can do through triggers, the only limitation is the extent of your script. I highly doubt anyone will make an AI as versatile as a player, but that is because it simply takes too much time to program all responses to all possible strategies, and interpretations of scouting info.
the AI and AI advanced trigger actions will make your life easier if you're making an AI, but again, all players do is issue orders to units, so in theory all you need is the "Issue Order to Unit" trigger action (obviously combined with tons of conditions to know what the right response to your enemy currently is)
Hey, thanks for the responses. I'm not trying to make an AI that's 'challenging' according to starcraft battle tactics. I need to observe human reactions to computer input, and the input needs to be able to cover the extremes, including things that would be tactically stupid. :)
I guess I'm just concerned about precise unit selection and point/object selection, attacking specifically selected units, buildings, points, etc (exactly like a human player). I thought about trying to pre-record the computer's test input myself for the various 'behaviors' and use it in a kind of custom 'replay' mode against a human participant, but it didn't look like there was any way to feed the computer player a series of inputs to perform other than via the *actual* replay feature, in which case then you can't have a human play too, and even if you could, there's no way that I know of to record data from a replay.
So basically what I thought was yo dawg, I need to be able to get a replay of a human's interactions with different inputs from a computer's 'replay'. Ack! Too many words!
well, there's no way to really record all actions done and have the game read that and repeat everything. At least not directly. You can use banks and save a value into them every time an action is done, then have the game read the bank the next time you open the map and repeat those actions (You'd have to write the code that interprets the bank though). This could possibly cause lag when saving the orders to a bank, seeing as players can easily go over 100 APM, which means lots of triggers.
But yeah, as I said before, all players do is issue orders, and that can be done through triggers. Orders include what ability, what unit gets it, and what the target unit/point is, the same as what a player would have to pick. So the triggers are only limited by the person making them.
Irrelevant question removed. lols