Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: AI Script Failure
AI Script Failure
Jan 11 2011, 3:54 pm
By: Oh_Man  

Jan 11 2011, 3:54 pm Oh_Man Post #1

Find Me On Discord (Brood War UMS Community & Staredit Network)

Yo guys I'm having trouble trying to pin down an AI Script failure that occurs about 40minutes into the game. By AI Script failure I mean all the Scripts stop working, like, all of them. Enter Dropship, Junk Yard Dog, Recall, etc. etc. Naturally, I want to find and correct this problem pronto.

What has already been established:
>at first it was thought that Script failure was due to scripts running without a long enough death count separating them, later it was found that it was when Scripts run on preserve X times in a row before being stopped was the cause. As long as the condition to activate the script is immediately nullified, that (appears to) stop the scripts from failing. Though, perhaps it just delays the failure?

What I am trying to find out:
>Do preserve Recall Scripts cause script failure? I created a test map where the recall script was on preserve and there was no script failure. Perhaps Recall Scripts are an exception to the rule?
>As above for Enter Dropship/Enter Bunker. I have conditional enter dropship scripts that run when a unit is dropped out of the dropship (item system).
>Could script failure be caused by multiple players all activating their own scripts at the same time? Eg. all dropping a unit at the same time, or all recalling at the same time?

Thanks in advance,
OhMan.

ETA: I have ruled out that it is not established by a specific event or something during the game. You can be in the starter area, add 40 minutes, and script failure still occurs.




Jan 11 2011, 7:10 pm Roy Post #2

An artist's depiction of an Extended Unit Death

Having certain AI scripts run multiple times causes problems, especially when there is no pause when preserving. Running some scripts takes a while to kick in, and if you keep running it, it will never execute properly. Several scripts only need to run once. I haven't heard of a enter transport script having issues, even with excessive application.

If I had to guess, I would say that there is a limit to the number of scripts that can run simultaneously for a player, or your conditions are no longer met after a certain amount of time in your game.

Post the triggers causing the problem, please.




Jan 12 2011, 3:36 am Oh_Man Post #3

Find Me On Discord (Brood War UMS Community & Staredit Network)

I don't actually know which trigger is causing the problem. That's what I'm trying to find out. Do you know if Recall scripts cause failures when being used multiple times? I created a test map and they ran constantly on preserve without fail.




Jan 12 2011, 3:59 am Gigins Post #4



No, recall/transport/bunker scripts doesn't stop working after 40 minutes even if abused. Too many maps use that inventory system. From my experience with junk yard dog, it works fine being reset every 4 seconds for extended time. As I understand you are having problems running scripts for human players. you should seek out what stops human players from running scripts. Although I think there is something else.



None.

Jan 12 2011, 6:27 am rockz Post #5

ᴄʜᴇᴇsᴇ ɪᴛ!

If the trigger runs but the AI script doesn't run, then you've got a problem. If it's the other way around, figure out why the trigger isn't running.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 12 2011, 2:36 pm NudeRaider Post #6

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

In my Desert Strike map I have a similar issue: Lurkers work just fine at first and then after the game went on for a while they just sit there burrowed but stop shooting. Sometimes they start shooting for a few waves but then it ceases entirely. My current suspicion is that it has something to do with the amount of units on the battlefield.

Hm, actually that's unit behavior, not an ai script, so it might not be relevant at all, but I thought I might throw it in.

For your case, can you confirm that the player didn't get defeated or got rid of all units and buildings?
Are you giving units a lot from one player to another and back? I noticed this can cause problems too.




Jan 12 2011, 3:15 pm rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

usually when units stop shooting, at least for a computer player it's because they don't have vision with themselves.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 12 2011, 4:19 pm Oh_Man Post #8

Find Me On Discord (Brood War UMS Community & Staredit Network)

I have disabled a Expansion Terran Campaign Area Town Script which was running every 150 death counts (approx. 12 seconds) for a lone computer player. I'll get back to you guys to see if that is the problem.

I'm glad to have established that Recall abuse doesn't cause scripts to fail. I was not looking forward to getting rid of them.

And no, this definitely isn't a condition not being met. This is a certain point in my game where all the scripts just stop working.

It isn't a behaviour problem, its a script problem. After the scripts fail, units spawn and just sit at their spawn points (because Junk Yard Dog no longer works), Recalls no longer work, my Dropship stops picking up items, etc.




Jan 12 2011, 6:23 pm NudeRaider Post #9

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from rockz
usually when units stop shooting, at least for a computer player it's because they don't have vision with themselves.
That's definitely not the problem because all other units work just fine and detectors also still do their job.

Is there any reason you're repeating the town script? Unless you're removing all units from the player it shouldn't have to repeated at all.

Since nobody has an idea what is causing it I recommend you make a 2nd map where you gradually transfer trigger systems over and run test games until you pinpointed which trigger set is responsible. Hard testing work, I know, but what else to do?




Jan 12 2011, 11:12 pm Oh_Man Post #10

Find Me On Discord (Brood War UMS Community & Staredit Network)

Yeah it was the Expansion Terran Campaign Area Town Script. After disabling it I no longer have any Script failure. How interesting.

My hypothesis so far is that certain scripts trigger failure after being run X times during a game. Specifically, the Scripts that aren't meant to be run more then once. Adding DCs only postpones the inevitable. In my case, I was running the script to make an SCV repair a building, and then an order trigger to make it walk over to a bunch of Vespene gas sprites (as if to pick up supplies), and then going back to the building to repair again. Funny, how a tiny little trigger designed for a minor aesthetic effect could cause so much trouble. -.-

40minutes approx. 2400 seconds/12 seconds (everytime the Script was run via DCs) = 200. So running the script around 200 times causes complete script failure?

Someone may wish to examine this phenomenon further. Admins may wish to keep this thread unlocked if other people want to use this thread to share results?

Thanks for the help SEN.




Jan 12 2011, 11:15 pm Lanthanide Post #11



Quote from NudeRaider
In my Desert Strike map I have a similar issue: Lurkers work just fine at first and then after the game went on for a while they just sit there burrowed but stop shooting. Sometimes they start shooting for a few waves but then it ceases entirely. My current suspicion is that it has something to do with the amount of units on the battlefield.

Hm, actually that's unit behavior, not an ai script, so it might not be relevant at all, but I thought I might throw it in.
Yes, lurker attacks is definitely unit behaviour and separate from AI scripts.

I solved this exact problem, anyway: http://www.staredit.net/221693/



None.

Jan 13 2011, 4:05 am Gigins Post #12



Quote from NudeRaider
In my Desert Strike map I have a similar issue: Lurkers work just fine at first and then after the game went on for a while they just sit there burrowed but stop shooting. Sometimes they start shooting for a few waves but then it ceases entirely. My current suspicion is that it has something to do with the amount of units on the battlefield.
It's sprite limit! My first thought. :wtfage:



None.

Jan 13 2011, 4:37 am Lanthanide Post #13



Gigins, I already provided the solution for his lurker problem in the post right above yours. It isn't sprite limit, it's problems when using 'give' between CPU players and players 9-11. My theory for it is that somehow the permanent no-vision of P9-11 is being transferred to the CPU players, because continuously running 'give player vision with itself' on the CPU players mostly (but not completely) also fixes the problem. Thankfully, giving units between P1-8 and P12 does not cause this problem, so there's a solid workaround for it.



None.

Jan 13 2011, 12:34 pm Gigins Post #14



Quote
In my Desert Strike map I have a similar issue: Lurkers work just fine at first and then after the game went on for a while they just sit there burrowed but stop shooting. Sometimes they start shooting for a few waves but then it ceases entirely. My current suspicion is that it has something to do with the amount of units on the battlefield.
It's sprite limit dude. :wtfage:

Vision problems wouldn't be affected by time nor unit count.



None.

Jan 13 2011, 1:50 pm NudeRaider Post #15

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I can confirm it's not sprite limit (neither weapon nor another).

And since Lanth is working on the same map than me (different versions though) I'm pretty sure he's got it. I know his explanation sounds somewhat crazy for someone who hasn't experienced it first hand, but it actually makes sense and fits rockz' intuition as well.

Further discussion should be done in the topic Lanth linked to, since we're way off-topic already. Too bad I can't move posts.




Jan 13 2011, 9:10 pm Lanthanide Post #16



Quote from Gigins
Quote
In my Desert Strike map I have a similar issue: Lurkers work just fine at first and then after the game went on for a while they just sit there burrowed but stop shooting. Sometimes they start shooting for a few waves but then it ceases entirely. My current suspicion is that it has something to do with the amount of units on the battlefield.
It's sprite limit dude. :wtfage:

Vision problems wouldn't be affected by time nor unit count.
Yeah, I only spent like 8 hours investigating the exact problem Nude is talking about, and found a solution for it. What do I know? Clearly you're the expert here.

You know that in a Desert Strike map, units increase over time? That is, the more units you have on the field, the longer the game has been running, right? And that if your method of spawning these units involves giving them between CPU players and P9-11, then the more units you have spawned, the more you have given between those players, so eventually the whole thing falls over in a screaming heap.

Actually that's obviously going to be the case with *any* map that is suffering this problem - it only starts happening after an accumulation of these 'give' events, which generally will occur after at least a few minutes, unless you're 'giving' like 200 units between players within the first 10 seconds of the game, which would be a strange thing to do.

Post has been edited 2 time(s), last time on Jan 14 2011, 12:52 am by Lanthanide.



None.

Jan 13 2011, 10:20 pm Oh_Man Post #17

Find Me On Discord (Brood War UMS Community & Staredit Network)

:nude: Yo while we are talking about Lurkers I got a couple questions bout em. I know you can't keep them from unburrowing for computer players (only human players), yet I've seen bounds that work on lurkers shooting their spines non-stop in a 360 arc. How does that work?

Also, how do you get them to rapidly burrow and unburrow? I've seen that in a couple maps as well.




Jan 13 2011, 10:57 pm Ahli Post #18

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

Quote from name:private_parts
I know you can't keep them from unburrowing for computer players (only human players), yet I've seen bounds that work on lurkers shooting their spines non-stop in a 360 arc. How does that work?
There are burrowed units that the lurker can shot and they should be given whenever a shot was necessary and given back shortly after. Timing is the key here... the lurkers should be allied to the bounders.

Quote from name:private_parts
Also, how do you get them to rapidly burrow and unburrow? I've seen that in a couple maps as well.
Keep computer's lurkers moving (teleporting) with triggers and they behave like that.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[01:05 am]
Vrael -- that's better
[12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[10:18 pm]
Vrael -- who says I'm not a total madman?
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
Please log in to shout.


Members Online: jun3hong, Roy