Staredit Network > Forums > Modding Projects > Topic: AI Taunting Script System
AI Taunting Script System
Nov 29 2008, 12:12 am
By: modmaster50
Pages: 1 2 3 >
 

Nov 29 2008, 12:12 am modmaster50 Post #1



Kicking off my return to SEN, I'm here to show you my latest creation: The AI taunt system.

Background: Since The creation of PyAI with string support, the debug opcode can now be used in AI scripts. This script is a separate AI script ID that is imported into an aiscript.bin, randomly choosing the AI to display chat messages.

Usage: At the beginning of your AI script, put "multirun(CHAT:Chat Loops)" to initialize the chat engine. When you import the scripts, make sure you import the chat script and your AI at the same time with the list feature.

Here is the code:
Code
# Chat Library v1.0 by modmaster50
CHAT(0, 010, aiscript):
   goto(Chat Loops)

# Random Taunt Chat
    --Chat Loops--
   random_jump(2,Tlk01)
   random_jump(2,Tlk02)
   random_jump(2,Tlk03)
   random_jump(2,Tlk04)
   random_jump(2,Tlk05)
   random_jump(2,Tlk06)
   random_jump(2,Tlk07)
   random_jump(2,Tlk08)
   random_jump(2,Tlk09)
   random_jump(2,Tlk10)
   random_jump(2,Tlk11)
   random_jump(2,Tlk12)
   random_jump(2,Tlk13)
   random_jump(2,Tlk14)
   random_jump(2,Tlk15)
   random_jump(2,Tlk16)
   random_jump(2,Tlk17)
   random_jump(2,Tlk18)
   random_jump(2,Tlk19)
   random_jump(2,Tlk20)
   random_jump(2,Tlk21)
   random_jump(2,Tlk22)
   random_jump(2,Tlk23)
   random_jump(2,Tlk24)
   random_jump(2,Tlk25)
   random_jump(2,Tlk26)
   random_jump(2,Tlk27)
   random_jump(2,Tlk28)
   random_jump(2,Tlk29)
   random_jump(2,Tlk30)
   random_jump(2,Tlk31)
   random_jump(2,Tlk32)
   random_jump(2,Tlk33)
   random_jump(2,Tlk34)
   random_jump(2,Tlk35)
   random_jump(2,Tlk36)
   random_jump(2,Tlk37)
   random_jump(2,Tlk38)
   random_jump(2,Tlk39)
   random_jump(2,Tlk40)
   random_jump(2,Tlk41)
   random_jump(2,Tlk42)
   panic(AI Panic)
   time_jump(45,AI Bored)
   wait(200)
   goto(Chat Loops)

    --Tlk01--
   debug(Random Wait,You're going to lose this game :D)
    --Tlk02--
   debug(Random Wait,Oh crap! I hate this map!)
    --Tlk03--
   debug(Random Wait,GTFO<44> man!)
    --Tlk04--
   debug(Random Wait,Just shut up and play the game.)
    --Tlk05--
   debug(Random Wait,*sigh* People on battle.net these days...)
    --Tlk06--
   debug(Random Wait,Hmmm...Maybe I'll attack you.)
    --Tlk07--
   debug(Random Wait,Seriously how many of you have played SC before? :P)
    --Tlk08--
   debug(Random Wait,I know everything there is to know about strategy!)
    --Tlk09--
   debug(Random Wait,Its ownage time!)
    --Tlk10--
   debug(Random Wait,Let's see you survive this attack!)
    --Tlk11--
   debug(Random Wait,Hehehe...)
    --Tlk12--
   debug(Random Wait,Who wants to die first?)
    --Tlk13--
   debug(Random Wait,I'm going to win within five minutes.)
    --Tlk14--
   debug(Random Wait,This is going to be an interesting game...)
    --Tlk15--
   debug(Random Wait,Am I being annoying?)
    --Tlk16--
   debug(Random Wait,Lol I play SC way too much.)
    --Tlk17--
   debug(Tlk17b,I'm way samrter than you!)
    --Tlk17b--
   wait(35)
   debug(Random Wait,*smarter)
    --Tlk18--
   debug(Random Wait,Shh...<40>I'm plotting against you<41>)
    --Tlk19--
   debug(Random Wait,Your weak strategies won't work on me!)
    --Tlk20--
   debug(Random Wait,I'm going to play WC3 after I finish you.)
    --Tlk21--
   debug(Random Wait,Omg I hate hackers!)
    --Tlk22--
   debug(Random Wait,Geez<44> this map is really lame.)
    --Tlk23--
   debug(Random Wait,Why do I always get the worst race? :<40>)
    --Tlk24--
   debug(Random Wait,Can you take any more of my 1337 skillz?)
    --Tlk25--
   debug(Random Wait,Whoops...Wrong unit...)
    --Tlk26--
   debug(Random Wait,I dare you to attack. XD)
    --Tlk27--
   debug(Random Wait,I may have to leave soon. :<40>)
    --Tlk28--
   debug(Random Wait,I thought this was a no newb game<44> but I guess not. :<41>)
    --Tlk29--
   debug(Random Wait,Worst game ever!)
    --Tlk30--
   debug(Random Wait,No<44> no<44> no<44> no<44> NO!!! Not enough gas!!!)
    --Tlk31--
   debug(Random Wait,NO U!)
    --Tlk32--
   debug(Random Wait,Hey did you see what you just did? Epic fail!)
    --Tlk33--
   debug(Random Wait,Awww<44> I have to expand again! xC)
    --Tlk34--
   debug(Random Wait,I'm the <35>1 Starcraft player on Battle.net! Well<44> my own

Battle.net.)
    --Tlk35--
   debug(Random Wait,This is lame<44> I want a RM!)
    --Tlk36--
   debug(Random Wait,Somebody call for an exterminator? XD)
    --Tlk37--
   debug(Random Wait,You want a piece of me? Come and get it!)
    --Tlk38--
   debug(Random Wait,This map is so simple<44> go download some better ones.)
    --Tlk39--
   debug(Random Wait,Wait until you see me unveil my EVIL plan! Muahaha!)
    --Tlk40--
   debug(Random Wait,...Well? Anyone going to make a move?)
    --Tlk41--
   debug(Random Wait,Who's going to host the next game?)
    --Tlk42--
   debug(Random Wait,The onslaught has begun! :D)

# Bored Computer Player
    --AI Bored--
   random_jump(5,Bored01)
   random_jump(5,Bored02)
   random_jump(5,Bored03)
   random_jump(5,Bored04)
   random_jump(5,Bored05)
   random_jump(5,Bored06)
   random_jump(5,Bored07)
   random_jump(5,Bored08)
   goto(Chat Loops)

    --Bored01--
   debug(Random Wait,Cmon<44> this game is taking foreverrrrrr!)
    --Bored02--
   debug(Random Wait,Jesus! Can this game go any slower?)
    --Bored03--
   debug(Random Wait,I'm starting to get bored now...)
    --Bored04--
   debug(Random Wait,Hurry this up<44> I'm not wasting any more of my time here.)
    --Bored05--
   debug(Random Wait,............)
    --Bored06--
   debug(Random Wait,If this doesn't finish soon<44> I want to leave)
    --Bored07--
   debug(Random Wait,Longest game ever...)
    --Bored08--
   debug(Random Wait,End this please!)

# Panic Computer Player
    --AI Panic--
   random_jump(12,Panic01)
   random_jump(12,Panic02)
   random_jump(12,Panic03)
   random_jump(12,Panic04)
   random_jump(12,Panic05)
   random_jump(12,Panic06)
   random_jump(12,Panic07)
   random_jump(12,Panic08)
   random_jump(12,Panic09)
   random_jump(12,Panic10)
   goto(Chat Loops)

    --Panic01--
   debug(Random Wait,Ahhhhhh! My precious base is under attack!)
    --Panic02--
   debug(Random Wait,Come on! What did I ever do to you?)
    --Panic03--
   debug(Random Wait,Hey! Go pick on someone your own size!)
    --Panic04--
   debug(Random Wait,Please<44> stop attacking me! :<40>)
    --Panic05--
   debug(Random Wait,This may just be GG for me...)
    --Panic06--
   debug(Random Wait,Ouch<44> my base is being destroyed!)
    --Panic07--
   debug(Random Wait,Dang can't you let me win once?)
    --Panic08--
   debug(Random Wait,I'm really getting owned now...)
    --Panic09--
   debug(Random Wait,Hmph! You'd better prepare for my counter-attack!)
    --Panic10--
   debug(Random Wait,Awww! You just screwed up my plan... :<40>)

# Wait Randomization
    --Random Wait--
   random_jump(8,Wait01)
   random_jump(8,Wait02)
   random_jump(8,Wait03)
   random_jump(8,Wait04)
   random_jump(8,Wait05)
   random_jump(8,Wait06)
   random_jump(8,Wait07)
   random_jump(8,Wait08)
   random_jump(8,Wait09)
   random_jump(8,Wait10)
   wait(100)
   goto(Random Wait)

# Wait Scripts
    --Wait01--
   wait(360)
   goto(Chat Loops)
    --Wait02--
   wait(500)
   goto(Chat Loops)
    --Wait03--
   wait(600)
   goto(Chat Loops)
    --Wait04--
   wait(250)
   goto(Chat Loops)
    --Wait05--
   wait(280)
   goto(Chat Loops)
    --Wait06--
   wait(300)
   goto(Chat Loops)
    --Wait07--
   wait(1000)
   goto(Chat Loops)
    --Wait08--
   wait(800)
   goto(Chat Loops)
    --Wait09--
   wait(425)
   goto(Chat Loops)
    --Wait10--
   wait(910)
   goto(Chat Loops)

# How to use:
# Insert this line at the beginning of the AI script of choice:
# multirun(CHAT:Chat Loops)
# to start the script directly! :)
# Make sure you compile using PyAI and import this in a list with your other scripts.


I'm happy to recieve comments and suggestions. Also, plz forward this to broodwarai.com. I'm sure it could be used there.



None.

Nov 29 2008, 12:30 am Lord Malvanis Post #2



Cool, I like your code and taunts.



None.

Nov 29 2008, 12:34 am Fisty Post #3



Quote
debug(Random Wait,Am I being annoying?)
No....

Anyway Modmaster, good to see you back.



None.

Nov 29 2008, 12:52 am modmaster50 Post #4



Quote from name:Deathman101
Quote
debug(Random Wait,Am I being annoying?)
No....

Lol when the AI says that, the correct response is yes :P. The AI sometimes really make you want to rip their heads off with this script :D.

Thanks for the warm welcome back, guys.

Btw, be sure to try this out. I put it on the default script and it was kinda funny. The panic thing doesnt work very accurately though.



None.

Nov 29 2008, 1:31 am A_of-s_t Post #5

aka idmontie

I already did this :P But good to see you back.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Nov 29 2008, 12:42 pm Corbo Post #6

ALL PRAISE YOUR SUPREME LORD CORBO

I'd lol at a computer bitching about the map :P



fuck you all

Nov 29 2008, 11:14 pm modmaster50 Post #7



Lol this AI bitches about plenty of things. It even gets pissed at which race it gets. If I got the panic thing to work right, it would say things when you attack it. It gets bored after 45 minutes and starts complaining about how long the game is.



None.

Nov 29 2008, 11:22 pm A_of-s_t Post #8

aka idmontie

Quote from modmaster50
Lol this AI bitches about plenty of things. It even gets pissed at which race it gets. If I got the panic thing to work right, it would say things when you attack it. It gets bored after 45 minutes and starts complaining about how long the game is.
Panic is the worst command ever. It works once every 10 times it gets attacked.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Nov 29 2008, 11:29 pm modmaster50 Post #9



Well, theres no other command to check for being attacked. Ive also noticed panic activating when the AI wasnt being attacked :P.

Also, theres a problem with the AI talking after its been eliminated. Apparently the script doesnt stop when the AI is killed. I could check if it has certain buildings left or not (main structures) to determine if the AI is screwed and cut it off, but that would be a lot of extra processing all the time to check for it.



None.

Nov 29 2008, 11:32 pm A_of-s_t Post #10

aka idmontie

Quote from modmaster50
Well, theres no other command to check for being attacked. Ive also noticed panic activating when the AI wasnt being attacked :P.

Also, theres a problem with the AI talking after its been eliminated. Apparently the script doesnt stop when the AI is killed. I could check if it has certain buildings left or not (main structures) to determine if the AI is screwed and cut it off, but that would be a lot of extra processing all the time to check for it.
Put a check for main buildings (if_owned) and if it doesn't own these units, stop the script.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Nov 29 2008, 11:43 pm modmaster50 Post #11



Ah! Thanks. I was wondering how to check if the AI owns a certain unit. It turns out this is listed in "unsure commands", so I didnt find it. Now I can do all sorts of other checks to make AI say certain things.



None.

Nov 29 2008, 11:46 pm A_of-s_t Post #12

aka idmontie

Quote from modmaster50
Ah! Thanks. I was wondering how to check if the AI owns a certain unit. It turns out this is listed in "unsure commands", so I didnt find it. Now I can do all sorts of other checks to make AI say certain things.
I'm really unsure as to why its in "Unsure" (its in that category in my list as well), but It only checks if it as one or more -- incomplete buildings don't count.

You can use the "region_size" command as well to add some more variety. Experiment with it a bit, I haven't used it in a while.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Nov 29 2008, 11:50 pm Doodle77 Post #13



Non-random taunts would be so much better.



None.

Nov 29 2008, 11:58 pm modmaster50 Post #14



What exactly does region_size do?

With if_owned, I can have the AI check if it has certain units capable of pwnage. I could check if the AI's enemy has certain units. The only problem is that this would have to be edited for mod AIs.

As for random taunts, some of them do work ok. A few I may need to edit (like "Im gonna attack u" and stuff like that). Im gonna make the AI say something like "Im screwed" or such if it has no main buildings. I need a way to check if the main script it launching an attack...



None.

Nov 30 2008, 12:17 am Biophysicist Post #15



This will be the first thing I download after I get my computer back.

Maybe you could make it say something like "Zergling rush time!" or "You're SO getting 4pooled..." if it builds a Spawning Pool as the Zerg? Or "Battlecruiser massing is FUN!" if it builds 10 Battlecruisers? Stuff like that would make this even moar fun/annoying.

And you should make it say "I just lost the game!" about 10% of the time when it loses all of it's buildings.



None.

Nov 30 2008, 12:37 am modmaster50 Post #16



if_owned cannot detect if the AI owns more than one of a certain unit. I can have make the AI check to see if all of its main structures are lost, then say "I lost!" sometimes and then stop the chat script. The AI script system has way too many limitations...I need to be able to check if the AI is attacking or if the AI is being attacked. The zergling rush taunts and battlecruiser taunts would have to be done from the main script; this add-on script unfortunately cannot check what the main script is doing.



None.

Nov 30 2008, 12:50 am Biophysicist Post #17



Quote
The zergling rush taunts and battlecruiser taunts would have to be done from the main script; this add-on script unfortunately cannot check what the main script is doing.
Use if_owned to detect if it commands a Spawning Pool for the Zergling rush taunt. You could make the Battlectuiser taunt play if the AI owns a Physics Lab. Although I just realized that those taunts would give the human player free intel, which probably wouldn't be a good thing.



None.

Nov 30 2008, 2:59 am modmaster50 Post #18



The free intel is not good :P. And...Simply owning a spawning pool or physics lab does not necessarily mean that AI will rush lings or mass BCs.



None.

Nov 30 2008, 6:25 am A_of-s_t Post #19

aka idmontie

Quote from modmaster50
The free intel is not good :P. And...Simply owning a spawning pool or physics lab does not necessarily mean that AI will rush lings or mass BCs.
Use rush() to detect any enemy buildings in association to time. Check out BWAI for specifics on that command.

Post has been edited 1 time(s), last time on Nov 30 2008, 6:30 am by A_of-s_t.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Nov 30 2008, 7:16 am Lord Malvanis Post #20



Is there a download for this?



None.

Options
Pages: 1 2 3 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[04:31 pm]
Zoan -- where's the option to delete my account
[04:30 pm]
Zoan -- goodbye forever
[04:30 pm]
Zoan -- it's over, I've misclicked my top right magic box spot
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are some real members mixed in those latter pages, but the *vast* majority are spam accounts
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- there are almost 3k pages
[2024-4-14. : 9:21 pm]
O)FaRTy1billion[MM] -- the real members stop around page 250
[2024-4-14. : 9:20 pm]
O)FaRTy1billion[MM] -- look at the members list
[2024-4-12. : 12:52 pm]
Oh_Man -- da real donwano
da real donwano shouted: This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
it's pretty common
[2024-4-11. : 9:53 pm]
da real donwano -- This is the first time I've seen spam bots like this on SEN. But then again, for the last 15 years I haven't been very active.
Please log in to shout.


Members Online: Ultraviolet, Roy