Heroes becoming unavailable and a new button in the hero select menu. Looking for Help!

Ive been slowly making a gamemode based on the TF2 custom game Roll The Dice
I have currently added 140 different unique perks, some being references to certain media.

Here is the code:
**4C92C
**
I am currently having issues with it though, after adding the most recent batch of perks ive been running into issues such as heroes not being able to be picked at all and a new white button that says “0” next to the hero select menu.

Once you pick a hero from the force limited hero pool, the rest of the heroes quickly become unavailable the longer the match goes on.

I am only new enough to coding so i feel that this is due to poor memory usage or too much rules or something like that, but im not sure how to fix it!

If someone smarter than me could have a look into the mode and give me a quick rundown of what could be done to fix this I would greatly appreciate it.
Thank you!

I’ll have a look for you - sounds cool!

1 Like

Ok I’ve having a look now, first off really great work on the mode - this bug is so weird!

1 Like

After looking at it, the heroes seem to just delete themselves in reverse order of being added to the game, slowly whittling down to the original cast and then even less. The server CPU load is about 40% with all slots filled and there’s not really that many rules flying around in the grand scheme of things.

This definitely isn’t a programming error on your part and I’ve seen report of similar things happening in the hero gallery.

Edit: I know that’s not very helpful to finding a solution! I’ll keep thinking

Edit 2: I just randomly started removing some of the rollable perks, and eventually it started acting normally, I’d recommend removing any you think are boring or unfun, and optimising the rest so that they take as few rules as possible if you can.

1 Like

Thank you for checking it out and the compliments :slight_smile:
I might have to do that and remove some unneeded perks, hopefully that can fix it.
There are so many times where im playing with my friends and theres just no more heroes to pick ;-;. It ruins the gameplay for us so we might just have to say RIP to some boring perks.
Again thank you so much for checking it out and giving me some insight :D.

Of course, please keep updating the code and consider putting it out on Workshop.codes when it’s done/almost done. I had a few other little suggestions regarding effects (specifically nano) but I’ll let you finish it before nitpicking. I can see how it would be really fun with friends!

1 Like

I dont mind nitpicks at all, i will happily take any constructive criticism or suggestions. I would love to keep updating it and adding more stuff but it seems ive reached the limits of workshop with the amount of perks :disappointed_face:.

I’ll might give the mode another try tomorrow and give some suggestions, it was mainly effects and polish the actual gameplay was super fun and well done.

I hope we get a workshop 2.0 some day.

1 Like

That would be great!
I have not removed any perks yet but ive been slowly optimizing some of the perks so far (i will not update the public code until im happy enough. Ive made some of the perks that have a base rule and an “effect rule” merged into just one rule with a while action to do the unique perk stuff. At the time of making the mode I had not known about the While action. I have not tested with a large group of friends yet but it seems to put off the issue for at least a little longer.

1 Like

That would have been my suggestion so glad you’ve made it work. If I don’t try it again today it’ll be sometime soon.

Just out of interest - are you using the workshop on PC or console?

I mostly use PC, with a mix of the actual workshop and overpy in visual studio code. Every so often for late night coding ill hop on ps4 tho. just for quick things.

Ah perfect! I was just wondering whether you could copy and paste stuff - even better that you’re using external tools, they’re all really well made, I use the workshop.codes editor mostly because it saves to my account rather than a local file. It’s so much easier than drop down box after drop down box. They should really add a text based IDE in game but that’ll never happen. Still planning on taking another look but it’ll be a few days now, so apologies!

1 Like

No worries at all, there is no rush :slight_smile: