UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: whippytrout on March 21, 2017, 07:59:19 am

Title: g_spawn on my Alcatraz map
Post by: whippytrout on March 21, 2017, 07:59:19 am
Hey guys I really need some help. I just about have my Alcatraz map finished for Cod Waw but I seem to be running into the dreaded g_spawn error. I've researched it but can't find a whole lot on it so I'm going to ask some questions that maybe you guys can clear up for me.

1. What counts towards g_spawn? I know FX, script_model, origin, etc. but do lights count, pathnodes, info_coronas?

2. I disabled the spawning of gibbing on zombies as well as removed their glowing eyes. I also fixed a zone spawn issue that Harry posted here on the forums that deletes a script_origin that is spawned and not deleted. So is there any other ways to reduce my total entity count? (besides deleting stuff in my map lol)

I'm using a debugging script by either codmodd or MakeCents that tells me the amount of entities in my map. I've got the total number down to 800 but I think it crashes at around 1000 entities.

Any help would be appreciated.

Thanks,

Whippy
Title: Re: g_spawn on my Alcatraz map
Post by: codmoddd1234 on March 21, 2017, 09:04:43 am
These are where i would look to clean up ents.
Each window and boards are a few ents.
Leftover triggers for doors or ee stuff ect.
Check that your deleting script model or struct ingame after they are used in gsc.

G_entinfo  1.  Will show enemy ents
G_entinfo 6. All script models
Look for clusters where you might have used script models to design something by mistake.
In console
Clear (press enter)
Then
G_listentity 1.
It will freeze for a second then print all ent to console
Ent 0 is player
1023 is worldspawn
Null means not used.
Maybe you can find a repeating ent.

If you're getting it solo then with 4 players there will be another 20 - 30 ents to make room for.
Title: Re: g_spawn on my Alcatraz map
Post by: death_reaper0 on March 21, 2017, 12:47:03 pm
i had this issue a while ago, i started using MC's trigger thing-o to reduce ents in my maps and it seemed to do fine, also fixed hintstring issues i had. what it does is basically let you use stuff like script models as use triggers, so you can remove some triggers that are being used next to script models (barriers, perks, ee related stuff etc) isk if it would help your problem though, just a suggestion
Title: Re: g_spawn on my Alcatraz map
Post by: gamer9294 on March 21, 2017, 02:20:30 pm
Hi man,

yes g_spawn error will appear when you reached around 1022 entities (exactly: 1024 I guess) :( ;)

Maybe will also help to use spawn method on the triggers, origins, models when it is needed.

like you can do spawning a EE after amount of rounds that is survived or also possible option is maybe to do a EE in steps like as example:

spawn the EE after round 5 for step 1.
finding 3 different keys to unlock a special door.

when they finished step 1 and have unlocked the door.
you can spawn step 2.
you need to find some items to build and use it somewhere else in the map.

etc.

it is a suggestion ;)


Sorry for my bad english.

Best regards,
Gamer9294
Title: Re: g_spawn on my Alcatraz map
Post by: ihmiskeho on March 21, 2017, 05:09:54 pm
OK so I'm no expert in this stuff so if I get something wrong feel free to correct me. But here are some ways to reduce G_Spawn:

Try using MC's hintstring/icons without triggers:
http://ugx-mods.com/forum/index.php/topic,11221.0.html (http://ugx-mods.com/forum/index.php/topic,11221.0.html)

If the above doesn't remove the issue, try to see if any of your scripts cause this issue (do scripts spawn useless ents) Also instant-nuke scripts can cause this issue if you're using one.

If those don't help, you have to start removing some entities (structs, origins, trigs) that are not essential in your map (for example useless fx on the outside of the map etc)
Title: Re: g_spawn on my Alcatraz map
Post by: DidUknowiPwn on March 21, 2017, 06:51:45 pm
T4M supports the visible output for G_Spawn, also I believe there's a bug within WaW itself that gibbed models don't delete their entities or something.
Title: Re: g_spawn on my Alcatraz map
Post by: whippytrout on March 21, 2017, 08:51:08 pm
Thanks guys for the suggestions. I just ran a solo test and had around 840 - 890 total ents depending on what I was doing at the time. I did notice a large spike when using Harry's magic crate. It went up to 900 - 920 total ents so I may remove it and try and make it myself. I made it to round 34 and did 3/4 of my easter egg before It crashed at a soul chest type step.  :'(  :'(

I've been using your suggestions to free up space and now i'm considering removing risers and replacing them with normal spawners. Would that be good? My map uses 95% risers so I think it would remove hundreds of riser structs and all their FX and anims. I just counted and I have 221 riser structs total.

Please let me know. Thanks,

Whippy

Double Post Merge: March 22, 2017, 06:06:52 am
I'm so confused guys. So I had over 200 riser spawns so I went in and deleted all but 2-3 in each zone thinking that would reduce my total ent count but it didn't even effect it.  :'(
I also don't get the math on this either. How does the following image add up to 829?
Spoiler: click to open...
(https://i.gyazo.com/cb67555c317e6401b20cd7906290e4eb.png)


I'm in some serious need of some help with this one. I know you guys gave me some ideas but I tried them and can't get this number to budge. I'm feeling pretty low right now because my map is done but I can't even play it without crashing.  :'( :'( :'( :'(
Title: Re: g_spawn on my Alcatraz map
Post by: death_reaper0 on March 22, 2017, 08:40:57 am
something you can do its for ee related stuff, spawn through script only when they are needed, and delete them when no longer needed, this may change slightly depending on if the object will still need to be visible or not
Title: Re: g_spawn on my Alcatraz map
Post by: Harry Bo21 on March 22, 2017, 12:59:08 pm
Riser points are script structs - not entities
Title: Re: g_spawn on my Alcatraz map
Post by: whippytrout on March 22, 2017, 08:28:28 pm
So all of my easter egg stuff I spawned in the map at the the beginning of the map. Now some is hidden or disabled by using hide() or disable_trigger_with_targetname() but its all there. So technically my total ents shouldn't really increase right? I'm confused because I start with 760 total ents, then as the rounds progress the total goes up to 870 and I havn't done anything but kill zombies. It's like the zombies are the ones increasing the total ent but even when I kill them all it doesn't go back down. I've left the game sitting for 30 minutes and came back and its still at 870.

Also if i were to have accidentally left some variables in script such as "pointa = getEnt("pointa", "targetname"); even though that doesn't target anything in radiant anymore does that affect anything?
Title: Re: g_spawn on my Alcatraz map
Post by: Harry Bo21 on March 22, 2017, 08:40:37 pm
Send me your scripts folder and I'll see if I can spot anything later
Title: Re: g_spawn on my Alcatraz map
Post by: death_reaper0 on March 22, 2017, 09:41:53 pm
something you could also do is replace some script origins with script_structs, i dont think they add to G_spawn, so if your just using them for an origin related thing (which i assume you would) you could switch it up, would need a bit of script editing but it may help

just remembered, i dont think they can be deleted, so if your origin would need to be deleted, its probably better to not replace it
Title: Re: g_spawn on my Alcatraz map
Post by: whippytrout on March 24, 2017, 08:07:19 am
Well after a lot of optimizing I got rid of the g_spawn.  :nyan: I got my ent count down to 700. Thanks guys for your help. I was kinda freaking out for a little bit because I didn't know much about the error.