AI Scripts
This topic is locked. You can no longer write replies here.
Jan 19 2010, 1:48 pm
By: Pinky  

Jan 19 2010, 1:48 pm Pinky Post #1



Hey Pinky here.

My scripts are having problems if you all remember before in my thread (http://www.staredit.net/topic/9414/#198691) about the SCV mining I had the same problem where my Area Town script just "gave up" after running for approximately a minute.

Right now I am using randomized spawning system to generate monsters roaming the wilderness.
The monsters are spawned, then ordered to roam using Junk Yard Dog.

When playing through my map I notice the first couple spawns work fine then after about a minute (just like with Area Town script :O) they spawn but don't roam.

For some reason there is something that is making the scripts not work? (in my SCV problem it was a different player on a different force, so the error must be global)

I am just wondering what could cause all scripts for multiple players to just "give up" after a minute?? This didn't always used to happen it must have been something I have done in the last couple months.

Concerned mapper,
Pinky.


EDIT: I just realised that my Dropship (which I use as an inventory system) also fails after approx 1minute!! (it uses the script Enter Transport)

What sort of error causes all my scripts to stop working after 1 minute I've never heard of such a thing aaaagh if I don't correct this error its GG!!!

EDIT: I have been trying to backtrack (from memory) to see what could have caused the problem (it didn't always happen I've only just noticed it now) and I did recently incorporate P9-12 usage in my map, I have preplaced units as well as units given to P9-12 through triggers. I read in the FAQ that these players do not respond to scripts, but do they fuck everyone elses scripts as well? Please does anyone know about this error lol I'm freaking out.

Post has been edited 3 time(s), last time on Jan 19 2010, 3:57 pm by Pinky.



None.

Jan 19 2010, 5:21 pm NudeRaider Post #2

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

No, having Neutral units does not affect other players.
But I'm assuming you have the junkyard dog/dropship in an always trigger without delay. Spamming AIs makes them stop.




Jan 19 2010, 11:16 pm Pinky Post #3



No my dropship AI script only runs when the player drops the unit. It detects that there is a player on the ground (using location with air boxes unticked) and then fires the script. Your explanation also doesn't cover why multiple scripts all running on seperate triggers and players would all fail at the exact same time (around 1 minute 23 seconds) into the game.

Your explanation also doesn't cover the fact that the scripts used to work fine, there has just been some change that is made them start bugging.

Could map corruption be a source of the error? I'm not too sure how map corruption works but I hear its sorta like a virus where things get deleted here or there which cause weirdo errors.



None.

Jan 20 2010, 4:27 am Pinky Post #4



Mapstats:





None.

Jan 20 2010, 4:38 am Newb Post #5



It's just a completely wild guess... But it could be wait blocks. If you use wait commands, then it more than likely is. If not then you're not a newb. :D



None.

Jan 20 2010, 4:59 am CecilSunkure Post #6



Hmm, well it sounds like your triggers may just stop firing, or you may have a location moving. If you delete a location on your map while triggers are using it, the section in the triggers where the location was used will be filled by the next location created. This can cause some odd problems, and this might be happening to you. By the sound of your problem, this seems more like a trigger error rather than odd Ai behavior. You should probably post up the map.



None.

Jan 20 2010, 5:00 am Falkoner Post #7



Are you constantly running the AIs non-stop? Because as Nude said, it seems to overload computer players after a while.



None.

Jan 20 2010, 5:33 am Pinky Post #8



Define "non stop".

None of my triggers go like this:

CON
Always
ACT
AI Script
Preserve

Most of them have death count waits.



None.

Jan 20 2010, 8:27 am 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

The death count wait could be not enough. Try running them very infrequently (like every 30s), or on demand (only when a unit is dropped from the dropship).

Also, why does it say 0 strings used?




Jan 20 2010, 8:57 am Pinky Post #10



i dont know, thats a glitch? i have heaps of strings, i think str capacity represents the strings i have.

also wtf are CUWP slots?

also whats the minimum safe interval between running scripts so they don't stop?

everyone also seems to be forgetting that my scripts USED to work fine, there has been some change that i have implemented that has stopped them all, does anyone know what the catalyst might be? because i have no idea i have never come across or heard about this problem before.

Post has been edited 1 time(s), last time on Jan 20 2010, 9:06 am by Pinky.



None.

Jan 20 2010, 9:35 am NudeRaider Post #11

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 had mentioned it if the situation triggered another idea.

I'm not sure if there's something like a safe interval, but you're free to test that out.

CUPW = Create Units With Properties. You can only have 64 (?) Sets of different properties. So things like Create Marine with 1% hp, Create Ghost with 2% hp, etc. up until 100% are not possible. You'll have to create them and set the properties afterwards. Not possible for every property (burrow, cloaked, etc.) though.

Did you go over 1024 strings?




Jan 20 2010, 9:42 am Pinky Post #12



Oh I see. I thuogh the CUPW limit only applied to the old editors, not SCMDraft2?

I currently have 1111 strings, I thought the string limit was only a problem if the bytes exceeded X amount though?

Also I used to use transmissions with waits to space things out and then I realised that they were the same as waits (even though i never noticed any wait-block like effects in-game) so I started changing them all to death counters, I'm currently about 50% through changing them all, maybe that triggered the wait blocks to "kick in"?? I dunno I have so many things going on in my map and I only just realised that my AI Scripts have stopped working NOW, they've probably not been working for at least a month, which means I am going to have a hard time trying to find what the problem is unless someone knows what the specific catalyst to ai scripts failing are... :S

Anyway I'm giong to continue to remove all my transmission waits, and if that doesn't fix the problem, I'll delete all my scripts except 1 and see if that's the problem.

Please if anyone has any insight on this your comments would be much appreciated if I can't get my scripts working again thats it my map is over.



None.

Jan 20 2010, 5:08 pm NudeRaider Post #13

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

The CUWP slots are limited by the .chk format (aka StarCraft) not the editor.

Going over 1024 is possible with ScmDraft but it becomes unstable. The risk of corrupting your map usually isn't worth it.
Best bet: get rid of (most) comments and make good use of string recycling.

Transmissions definitely can cause wait blocks as they obviously contain a wait.




Jan 20 2010, 5:27 pm Pinky Post #14



Ok my map has been over 1024 strings for many months now, is it possible that my map is already heavily corrupted? Could this be the main factor as to why my scripts suddenly start shutting down?

How does corruption work exactly? How does one fix the damage??



None.

Jan 20 2010, 6:20 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

Afaik the damage is unfixable except with a lot of manual work but it's restricted to strings.




Jan 20 2010, 9:32 pm Pinky Post #16



how do you tell if damage has been done?
string-wise everything appears to go normallly when playing my maps. no missing unit names or anything. that is the sort of corruption i had when i tried to protect a map once.



None.

Jan 21 2010, 3:33 am NudeRaider Post #17

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

If your strings mess up or ScmDraft tells you.




Jan 21 2010, 8:43 am Pinky Post #18



Alright well I'm gonna go remove all my waits and get back to you guys.

If that doesn't work I'm going to try and disable all my script triggers, then start them up one at a time and see if any of them work.

If that doesn't work... I don't know what I'll do. If anyone knows the specific reason for all scripts for all players shutting down after 1 minute 23 seconds into a game that would be very much appreciated because right now I have no idea what the problem is.



None.

Jan 21 2010, 9:01 am Pinky Post #19



PRAISE BE TO THE STARCRAFT GODS

Quote
The death count wait could be not enough
Nuderaider was correct. I found a trigger that goes like this:

CON
Death Count is 50
ACT
Run Area Town Script
Preserve

When I disabled this all my scripts began working again.

I have another set of triggers that work by counting down from DC 60, and they work fine, however there are randomized switches involved. But at the moment I'm guessing the minimum safe distance is somewhere between the 50-60 range.

PHEW

EDIT: Further testing reveals that there is no "range". What causes all the scripts to stop is the fact that I have it running on preserve. I'm not sure how many frames it takes for a script to run on preserve before it shuts down all scripts across the board, someone might want to test this phenomenon further. If anyone has any insights they would like to proffer I would be grateful to hear them!

Post has been edited 2 time(s), last time on Jan 21 2010, 9:39 am by Pinky.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
Please log in to shout.


Members Online: Vrael