A.I Scripts
Apr 26 2009, 10:30 am
By: Bioject  

Apr 26 2009, 10:30 am Bioject Post #1



I don't work much with A.I. scripts but this question should be simple for any one who does.

I tried Random Strategic suicide mission, but computer players don't do anything but stand there. Sometimes they'll attack which leaves me with a theory that they won't attack unless they have enough forces to. I notticed this is the A.I I want to use, it works perfectly when they DO attack. ..which is almost never.

Random Suicide mission on the other hand works everytime, only problem is that they run passed you and attack a different target when i want them to target any enemy attacking them, or attack the nearest target. The CPU literually runs right passed you with this A.I. Assuming they haven't targeted you.

Any suggestions? I know you SEN people are just full of ideas!

..Just don't hurt yourseleves lol. :P



None.

Apr 26 2009, 12:05 pm JaFF Post #2



I've had a similar question some time ago. Yes, Random Strategic makes computer units freeze at times (melee units will still attack if your units are witin their range though, haven't checked ranged units) thus it is unreliable. Random Suicide has some 'prejudice' in choosing its targets, so the players units will not always be targetted.

Your best bet is to use patrol commands wisely, perhaps combined with Junkyard Dog? You didn't say anything about the situation, so that may not work for you. Give more info about what's going on in the map.



None.

Apr 26 2009, 2:36 pm Bioject Post #3



Quote from JaFF
I've had a similar question some time ago. Yes, Random Strategic makes computer units freeze at times (melee units will still attack if your units are witin their range though, haven't checked ranged units) thus it is unreliable. Random Suicide has some 'prejudice' in choosing its targets, so the players units will not always be targetted.

Your best bet is to use patrol commands wisely, perhaps combined with Junkyard Dog? You didn't say anything about the situation, so that may not work for you. Give more info about what's going on in the map.


Alright i'll do the best I can.


It's an rpgish type of game, with a command center that players can take control of, it also acts as a town. if the command center dies game will end.

So cpu units will randomly spawn in every direction and do a random suicide run, hunting players down, going for the cc and attacking any near by threats in their way without ignoring them. I feel if I ordered them to attack the command center after they spawn it wouldn't feel as random. It would then begin to feel repetitive and feel more like a defense game rather than an RPG.

I hope this helps you help me :)

thanks for the reply!



None.

May 4 2009, 11:25 am JaFF Post #4



Quote from Bioject
Quote from JaFF
I've had a similar question some time ago. Yes, Random Strategic makes computer units freeze at times (melee units will still attack if your units are witin their range though, haven't checked ranged units) thus it is unreliable. Random Suicide has some 'prejudice' in choosing its targets, so the players units will not always be targetted.

Your best bet is to use patrol commands wisely, perhaps combined with Junkyard Dog? You didn't say anything about the situation, so that may not work for you. Give more info about what's going on in the map.


Alright i'll do the best I can.


It's an rpgish type of game, with a command center that players can take control of, it also acts as a town. if the command center dies game will end.

So cpu units will randomly spawn in every direction and do a random suicide run, hunting players down, going for the cc and attacking any near by threats in their way without ignoring them. I feel if I ordered them to attack the command center after they spawn it wouldn't feel as random. It would then begin to feel repetitive and feel more like a defense game rather than an RPG.

I hope this helps you help me :)

thanks for the reply!
OK. Say the enemies spawn at several locations, call them S1, S2, etc. Each time you spawn an enemy, you randomize several switches, and determine what will he be ordered to do. There are many possibilities, such as:
-Junkyard Dog
-Patrol to one of many possible pre-set locations of grid locations (meaning you have burrowed units represent locations and use one loc to scan through them)
-Patrol to the location of any specific player
-Patrol to the CC
-anything else?

Also, it would be wise to consider sacrificing one player slot to do this:

Have all enemies Junkyard Dogged when they spawn owned by player N (say). Constantly centre a 5x5 (say) location on the player's hero. When a enemy owned by player N enters this location, center a 1x1 pixel locaion on him, give that specific unit to player M (another enemy computer) and order that specific unt to patrol to the hero's location. This way, each enemy coming close to the hero will be given a partol command once and his AI will hopefully be cancelled (though I haven't tried that myself, so I suggest you test it out).

If you don't feel like using up one more computer player, you can simplify that and jsut give the patrol command once every X loops to all enemy units near your hero, but that will cause the enemies to be slightly retarded - melee units will begin attacking only half a second after approaching their target, will get 'stunned' if their target runs away, etc...


...


So don't let me fucking catch you saying that SEN is worthless again. :P



None.

May 14 2009, 5:03 pm Bioject Post #5



Quote from JaFF
Quote from Bioject
Quote from JaFF
I've had a similar question some time ago. Yes, Random Strategic makes computer units freeze at times (melee units will still attack if your units are witin their range though, haven't checked ranged units) thus it is unreliable. Random Suicide has some 'prejudice' in choosing its targets, so the players units will not always be targetted.

Your best bet is to use patrol commands wisely, perhaps combined with Junkyard Dog? You didn't say anything about the situation, so that may not work for you. Give more info about what's going on in the map.


Alright i'll do the best I can.


It's an rpgish type of game, with a command center that players can take control of, it also acts as a town. if the command center dies game will end.

So cpu units will randomly spawn in every direction and do a random suicide run, hunting players down, going for the cc and attacking any near by threats in their way without ignoring them. I feel if I ordered them to attack the command center after they spawn it wouldn't feel as random. It would then begin to feel repetitive and feel more like a defense game rather than an RPG.

I hope this helps you help me :)

thanks for the reply!
OK. Say the enemies spawn at several locations, call them S1, S2, etc. Each time you spawn an enemy, you randomize several switches, and determine what will he be ordered to do. There are many possibilities, such as:
-Junkyard Dog
-Patrol to one of many possible pre-set locations of grid locations (meaning you have burrowed units represent locations and use one loc to scan through them)
-Patrol to the location of any specific player
-Patrol to the CC
-anything else?

Also, it would be wise to consider sacrificing one player slot to do this:

Have all enemies Junkyard Dogged when they spawn owned by player N (say). Constantly centre a 5x5 (say) location on the player's hero. When a enemy owned by player N enters this location, center a 1x1 pixel locaion on him, give that specific unit to player M (another enemy computer) and order that specific unt to patrol to the hero's location. This way, each enemy coming close to the hero will be given a partol command once and his AI will hopefully be cancelled (though I haven't tried that myself, so I suggest you test it out).

If you don't feel like using up one more computer player, you can simplify that and jsut give the patrol command once every X loops to all enemy units near your hero, but that will cause the enemies to be slightly retarded - melee units will begin attacking only half a second after approaching their target, will get 'stunned' if their target runs away, etc...


...


So don't let me fucking catch you saying that SEN is worthless again. :P



Heh. It just so happends the spawn locatons ARE Named S1, S2, S3, and S4 ect. lol.

Also, I was hoping for a single script rather than any customizing triggers..



None.

May 14 2009, 5:10 pm JaFF Post #6



That seems to be impossible. Atleast with what we know to date. You can experiment for as long as you like, though. If you need any more help on this, contact me via PM any time and/or post in the thread.



None.

May 15 2009, 2:58 am Dungeon-Master Post #7



It looks longer than it is, but what JaFF said is most likely to work, it might take around 2 hours if you are not used to this king of step-by-step triggering to get a single effect, but once done, it iwll have a neat effect. It is worth the try.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: jun3hong