Resource icon

[Open Assets] Character Diceroll (xl_cdr_v2_0.lua)

This content may be freely modified and/or maintained by anyone.

toaster

トースタちゃん
Kart Krew™️
  • 2.0 - Ported to 2.2, and now supporting all the new skin properties that are available! Also added several admin commands for it; see below.
  • 1.2 - Now prevents mid-map skin changing!
  • 1.1 - Minor version lost to time/netgame testing.
  • 1.0 - First release.
Inspired by Let's Play Together SRB2 with combiring.lua "german", a YouTube series which I love so much even though I can't understand a word of it (and that's with 5 years of German classes...)

Randomly selects your character out of all the ones you have accessible, each time the level changes (no suicide to get you out of this unless the host wills it) to keep things fresh and interesting! Although it's intended for netgames, it does work in singleplayer as well (where it also changes your colour to the prefcolour). Plus, it's compatible with SRB2Kart!

Several admin options are now available starting with version 2.0.
  • cdr_adminenable <On/Off> (default: On)
    Enable/disable Character Diceroll for all players in the server.​
  • cdr_twiceinrow <On/Off> (default: Off)
    Permits all players in the server to roll the same character two times in a row. Please note this does not force any result, just allow for more chaos.
  • cdr_deathrerolls <Integer> (default: 0)
    Rerolls character on death, up to this many times per level (or not at all if 0). If set to a negative number, infinite death rerolls are allowed.
For best results, play with every character wad of reasonable quality on the mb - and if you're in a netgame, with combiring.lua! Once they're ported, I mean. Sorry for breaking all the old scripts and characters with 2.2 :V

And of course, the real reason I had to port this at all: the unlockable characters! They make this script extra relevant and fun going forward, I think, even without lots of non-vanilla characters added. Have you got them all? :D
 

Attachments

  • xl_cdr_v2_0.lua
    7.6 KB · Views: 1,014
Last edited:
Hey, sorry to be quite so picky about filenames after release. But in the name of getting our filenaming conventions completely uniform, could you rename your file to VL_cdr-v2.0? The prefix needing to be corrected and in capitals, and the suffix connected to the rest of the file with a hypen instead of an underscore.
 
Nice mod but quite unstable. It increase synch issue making stable netplay harder. When someone join it can cause synch failure to the one just joined and someone else including sometimes loopback/host. I don't think It's from my server because someone else tried it and worked even less and without it the game work better. Also hybrid : People getting a character but the game try to put another one but fails, finishing with a synch failure when the ability is used or jump for few chars.
 
Last edited:
Strange, that wasn't found in testing. Can anyone help confirm/troubleshoot the above, because that description by itself isn't actionable information from my perspective...
 
Lamibe: Nice mod but quite unstable. It increase synch issue making stable netplay harder. When someone join it can cause synch failure to the one just joined and someone else including sometimes loopback/host. I don't think It's from my server because someone else tried it and worked even less and without it the game work better. Also hybrid : People getting a character but the game try to put another one but fails, finishing with a synch failure when the ability is used or jump for few chars.
giphy.gif

Can confirm this issue exists. Was hosting earlier and had it happen in mass.
Just hosted a test server while in GIF mode and happened to catch it in action.
EDIT: Also another "bug" I found is that the diceroll only seems to get up to 2 added characters, any others are never landed on.
 
Last edited:
Seems this have a link with character hybrid. For some people it work well but some will not. Seems synch failure happens when moving, when standing nothing wrong happens. The fact about added character is that add character will break it which is not a big surprise : Did it and it gift only Blaze(the first added character) until I closed the server...
 
Just recently used this for a netgame. The resync issue occurs whenever a new player joins the game if they move unless maybe it lands on the same character for both the host & joiner, though this is only a guess. Say you see the new player appear as Knuckles due to the dice roll, however on their side they're a different character, let's just say Metal. If at this point they move or do anything... resyncs will occur and then they will get kicked out.

According to a user that I was talking to during the netgame... I had some custom characters loaded and on my screen he was Whirl but on his side he was Tails and he said it kept switching between the two as he moved around and then got sync failed & kicked.

Here's what occurs on my screen as well as what occurs on his screen in these gifs below. Note that these attempts were different from each other & Diceroll was the only addon added during these attempts.

characterdicerollresyncbug1.gif
This is my screen. In this gif... when the user joined... he was Tails on my end but on his end he was Fang. If you look closely... you can see for one frame that his life icon & character changes to Amy before going back to Tails and then for one other frame he changes to Fang before going back to Tails. He then sync fails.

characterdicerollresyncbug2.gif
This is on his side. In this gif... he resyncs while cycling between Sonic & Fang. Shortly after that he sync fails. He also told me that after he was kicked out due to the sync fail, he got a sigsev.

Hope this helps with the narrowing down the issue. As for the other bug related to diceroll picking custom characters... I had about 5+ custom characters added and diceroll was able to pick those characters without any issue, just have to hope that you get lucky with the selection.
 
Last edited:
Thanks for the detailed bug report; this is way more of a lead than "oh no sync fail", and with any luck I'll have a fix soonish.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top