Garry's Mod

Garry's Mod

NieR: Automata 2B ENHANCED (V2) [PM/NPC]
kuma7  [developer] 25 Jul, 2017 @ 7:50am
TOO MANY INDICES FOR INDEX BUFFER
It seems that the solution I provided in the description is not working for some people. If you are having this issue please post here.
< >
Showing 1-15 of 15 comments
Mr.Samurai 27 Jul, 2017 @ 8:57am 
I have the problem.
kuma7  [developer] 27 Jul, 2017 @ 9:03am 
server?
Mr.Samurai 27 Jul, 2017 @ 9:16am 
no server singleplayer.
kuma7  [developer] 27 Jul, 2017 @ 9:20am 
did you try the r_drawmodeldecals 0 command?
Mr.Samurai 27 Jul, 2017 @ 9:22am 
no why ?
kuma7  [developer] 27 Jul, 2017 @ 9:23am 
That command is supposed to make the fix. Read the description of this addon.
Mr.Samurai 27 Jul, 2017 @ 9:24am 
Ohhh ok thx
Krischa 31 Jul, 2017 @ 10:45am 
as the nocrash version still seems to make the game engine crash in some circumstances (have not really found out how to reproduce easy... might be a side effect of some maps or weapons... but after 3 to 30 mins it occours) I searched for an workaround:
You can make all clients set their model decal to zero on "PlayerInitialSpawn" event. This should include map changes.

simply create a new lua file inside the garrysmod/lua/autorun/server directory with following content:
hook.Add("PlayerInitialSpawn", "anti-crash", function(ply) ply:SendLua("RunConsoleCommand('r_drawmodeldecals', 0)") ply:SendLua("RunConsoleCommand('r_maxmodeldecal', 50)") end)

found this code line at github:
https://github.com/C0nw0nk/Garrys-Mod-Zombie-Survival/blob/master/garrysmod/lua/autorun/server/crash.lua

this also sets r_maxmodeldecal to its default value 50

Best Regards o/
silentquote 31 Jul, 2017 @ 1:18pm 
Another way to get the indices error is if a decal is trying to display in out of bounds. e.g. if you found a prop or ragdoll, and stuck it out of bounds, and sprayed a decal on it so it stretched from the model to out of bounds, it will add too many indices, crashing the game.
Nararana 7 Aug, 2017 @ 12:02am 
Reposting this from the comments section for the creator of this PM in the case that it's not seen:

Instead of just having people type in r_drawmodeldecals 0 for fixing crash issues, just put this in your materials' VMTs:

$nodecal 1

It basically does "r_drawmodeldecals 0" automatically for the model only, so no indices error pops up. It should completely eliminate the need to make a separate model.
Last edited by Nararana; 1 Oct, 2019 @ 2:39pm
kuma7  [developer] 7 Aug, 2017 @ 2:52am 
I added that parameter just for the skin vmt, that seems to be the origin of this issue. Expect that is finally fixed!
Last edited by kuma7; 7 Aug, 2017 @ 3:04am
Danny 15 Jan, 2018 @ 2:06am 
I put this on my server and the issue still occured. Just letting you know. I added it, played for awhile it was good for awhile but then ultimately it crashed it. I have not tried the lua fix mentioned above but I don't think the $nodecal 1 worked.
kuma7  [developer] 15 Jan, 2018 @ 2:18am 
That vmt command definitily does something. Before I added it, 1 hit every 3-4 hits in the face crashed the game, after I added it, I have not had a single crash in 5 months. Tested in singleplayer several times.
Check recent addons you have added to your server. If the issue is still there, tell me what part of the body is crashing the game when you shoot at it. Addons that create blood effects are proven to be incompatible.
Danny 15 Jan, 2018 @ 2:27am 
It is not my server, I've gotten this error once in my life and it was from a player-model with the same exact issue xD I haven't added anything to the server in days. I add your PM and within a half an hour of adding it I get the index buffer issue. I add PM's one at a time and test them because of specifically this issue. If I get the opportunity to test it more I will try to find out which limb is causing it but I removed it as of right now because its 5:30 AM.

hook.Add("PlayerInitialSpawn", "anti-crash", function(ply)
ply:SendLua("RunConsoleCommand('r_drawmodeldecals', 0)")
ply:SendLua("RunConsoleCommand('r_maxmodeldecal', 50)")
end)

May work, I haven't tried it. But along the lines of $nodecal 1 fixing the issue without it; I don't think it does. I am not doing this in single player. I am doing this on a dedicated NFO game server.
Last edited by Danny; 15 Jan, 2018 @ 2:28am
kuma7  [developer] 15 Jan, 2018 @ 2:37am 
Check also if you (or other players having the issue) have and outdated version of the addon on your own PC, not in the server, Maybe downloaded from a server that has the old files via FastDL.
This was supposed to be solved long time ago.

[EDIT] The update done 2 days ago only fixed fingers and arms issues, and should have done nothing else.
Last edited by kuma7; 15 Jan, 2018 @ 2:39am
< >
Showing 1-15 of 15 comments
Per page: 1530 50