SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > SRB2 Discussion > Bug Reports

Reply
 
Thread Tools Search this Thread
Old 12-22-2019   #1
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default R_SkinUsable doesn't work for Players

Spoiler: Discord Logs

[10:46 AM] HUE: @Zipper if i want to include the unlockable chars, i would need to check some flag for such thing?
[10:47 AM] Zipper: see that's the part where I can't help you
[10:47 AM] Zipper: cause I don't know
[10:47 AM] HUE: oof
[10:47 AM] Zipper: :lizPain:
[10:47 AM] HUE: let's go to wiki yey
[10:47 AM] HUE: oh wait
[10:47 AM] Zipper: the wiki doesnt have it
[10:47 AM] Zipper: that's why I don't know yet
[10:48 AM] Cassie (DerpyBubblez): You can't detect unlockable characters
[10:48 AM] Cassie (DerpyBubblez): You're supposed to be able to do so, but it doesn't work
[10:48 AM] HUE: it has to have some type of "unlocked thing flag" to be checked to do so
[10:48 AM] HUE: but we don't know what that is
[10:48 AM] SteelT: You can actually
[10:49 AM] HUE: oh rly?
[10:49 AM] HUE: could you gimme some help then?
[10:51 AM] Cassie (DerpyBubblez): SteelT: I sure would love to see how that works, because not even the character randomizer can detect unlockable characters
[10:51 AM] HUE: wait
[10:51 AM] HUE: not even RANDOMIZER?
[10:51 AM] HUE: oh boy
[10:51 AM] SteelT: The way it works is that you use R_SkinUsable(player_t player, int/string skin) to check if the skin is usable.
[10:51 AM] SteelT: Returns a boolean
[10:51 AM] Cassie (DerpyBubblez): That doesn't work
[10:51 AM] Cassie (DerpyBubblez): That will only work IF you select an unlockable character before hand
[10:52 AM] Cassie (DerpyBubblez): Even after unlocking ALL THREE, you still can't choose the character
[10:52 AM] HUE: i didn't even try cause this is 2.2, so i didn't know if it was working or not
[10:52 AM] Cassie (DerpyBubblez): I actually ran the randomizer from start up, and went to CEZ, and never got Fang Amy or Metal
[10:53 AM] HUE: that seems i've got a big problemo here
[10:53 AM] SteelT: What randomizer did you use
[10:53 AM] Cassie (DerpyBubblez): https://mb.srb2.org/showthread.php?t=45617
[10:54 AM] Cassie (DerpyBubblez): From what I understand, the check for unlockables is always false, until you select one
[10:55 AM] Cassie (DerpyBubblez): With my quick shitty character swap lua, it returned an error when attempting to switch to Amy, until I loaded an unlockable
[10:55 AM] Cassie (DerpyBubblez): Then I could switch to any of them
[10:58 AM] HUE: i can't have the smallest idea of what the problem is here
[10:59 AM] SteelT: that doesn't sound right
[10:59 AM] Cassie (DerpyBubblez): It does detect that I haven't unlocked Metal on a custom gamedata at least
[10:59 AM] SteelT: what's loaded an unlockable though
[11:00 AM] Cassie (DerpyBubblez): Select Amy/Fang/Metal on the Character Selection Screen
[11:01 AM] Cassie (DerpyBubblez): https://cdn.discordapp.com/attachmen.../quickswap.lua
[11:01 AM] HUE: so, let me get this straight
[11:01 AM] Cassie (DerpyBubblez): This is my bad lua that's supposed to switch between all characters
[11:01 AM] Cassie (DerpyBubblez): It barely works
[11:01 AM] HUE: it doesn't switch to any unlockable UNLESS you start the game with one
[11:02 AM] Cassie (DerpyBubblez): Yes
----------
[11:12 AM] SteelT: wait
[11:12 AM] SteelT: quickswap isn't even using R_SkinUsable
[11:12 AM] Cassie (DerpyBubblez): It's not
[11:12 AM] Cassie (DerpyBubblez): Character Randomizer is though
[11:12 AM] Zipper: nice
[11:13 AM] Cassie (DerpyBubblez): It rarely chooses Amy, but only for the Tails bot
[11:13 AM] Cassie (DerpyBubblez): Otherwise it's the original 3
----------
[11:23 AM] Cassie (DerpyBubblez): https://cdn.discordapp.com/attachmen...9/srb20501.png
[11:23 AM] Cassie (DerpyBubblez): I think R_SkinUsable doesn't even apply to the bot actually
[11:24 AM] Cassie (DerpyBubblez): Amy/Fang/Metal show up on the bot in the randomizer, but not the player
[11:26 AM] Cassie (DerpyBubblez): https://cdn.discordapp.com/attachmen...0/srb20502.png
[11:26 AM] Cassie (DerpyBubblez): R_SkinUsable properly applies to the bot, but not the player
[11:26 AM] Cassie (DerpyBubblez): So there's the root of the bug I guess



tl;dr "R_SkinUsable" works on the Single Player Bot, but not Players.
Edit: R_SkinUsable will ONLY run for the Bot in Sonic & Tails, so the Player is assumed to not have unlocked characters.

Last edited by DerpyBubblez; 12-22-2019 at 07:59 PM.
DerpyBubblez is offline   Reply With Quote
Old 12-22-2019   #2
toaster
トースタちゃん
 
toaster's Avatar
Default

I don't wanna be the kind of dinkbutt that says "it works for me", but Character Diceroll v2.0 (which is mentioned in the discord log) was the test case for R_SkinUsable's exposure to Lua, and it doesn't fail there like what you're describing. To help track down the cause of this bug, it would be helpful if you could compare the mechanics of how the skin is set in your script with mine - preferably with a public exposure of your code?
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
shameless plug: please check out my sonic mania lego ideas project, it could become a real thing if yalls support it

Last edited by toaster; 12-22-2019 at 07:10 PM.
toaster is offline   Reply With Quote
Old 12-22-2019   #3
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default

If you look at the gif I have provided, there is not even a single frame where the Player turns ito an unlockable chaacter.
The Bot does change into unlockable characters.
If the player selects an unlockable character (before choosing a regular character), then the randomizer will allow you to switch into an unlockable character.


I don't want to be a dinkbutt either, but this is my conclusion based on my experience.
Attached Thumbnails
Click image for larger version

Name:	srb20032.gif
Views:	35
Size:	1.34 MB
ID:	24119  
DerpyBubblez is offline   Reply With Quote
Old 12-22-2019   #4
toaster
トースタちゃん
 
toaster's Avatar
Default

Does not behave like that for me with an all-characters-but-not-100%-savedata. The only parameter I can think of as different on my end to yours - have you set a default skin/colour in the multiplayer character select menus? If not, set one and try again. If that parameter causes things to behave as they do in my copy of the game, that narrows things down a little.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
shameless plug: please check out my sonic mania lego ideas project, it could become a real thing if yalls support it
toaster is offline   Reply With Quote
Old 12-22-2019   #5
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default

I have Amy with the color Rosy set in multiplayer.
Edit: I checked with the non-100% save I have, and achieved the same result.


Edit 2: Okay, I've actually figured out the issue. R_SkinUsable will ONLY run for the Bot in Sonic & Tails, so the Player is assumed to not have unlocked characters.

Last edited by DerpyBubblez; 12-22-2019 at 07:58 PM.
DerpyBubblez is offline   Reply With Quote
Old 12-22-2019   #6
toaster
トースタちゃん
 
toaster's Avatar
Default

Again, that doesn't make sense; I was the one who wrote both the Unlockable Character code for the game and Character Diceroll, and there's nothing that checks for bots in R_SkinUsable directly. Are you saying that the script you've been working on didn't check R_SkinUsable for non-bots?
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
shameless plug: please check out my sonic mania lego ideas project, it could become a real thing if yalls support it

Last edited by toaster; 12-22-2019 at 08:31 PM.
toaster is offline   Reply With Quote
Old 12-22-2019   #7
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default

If I load the diceroll script with Sonic & Tails, then only the bot can be one of the unlockable characters (without selecting one previously).
If I load the diceroll script with Sonic alone, then it can choose one of the unlockable characters.
DerpyBubblez is offline   Reply With Quote
Old 12-22-2019   #8
toaster
トースタちゃん
 
toaster's Avatar
Default

Please upload your gamedata.dat and config file, because I cannot recreate this issue on my own.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
shameless plug: please check out my sonic mania lego ideas project, it could become a real thing if yalls support it
toaster is offline   Reply With Quote
Old 12-22-2019   #9
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default

gamedata.dat is all characters

gamedata.dat.new is 100%
windows.cfg is the config.cfg


Windows.cfg is being used with th "-config windows.cfg" parameter.
I have tried with both ficklecam and unmodified SRB2, so that should be a non-issue.
Attached Files
File Type: zip Requested.zip (3.0 KB, 11 views)
DerpyBubblez is offline   Reply With Quote
Old 12-22-2019   #10
toaster
トースタちゃん
 
toaster's Avatar
Default

Using both windows.cfg and your gamedata.dat, I cannot recreate this issue, even when using a launcher.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands
shameless plug: please check out my sonic mania lego ideas project, it could become a real thing if yalls support it
toaster is offline   Reply With Quote
Old 1 Week Ago   #11
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default

Update: I ran SRB2 on my Chromebook (my final option) and it works. No "Error skin 6 not found" and diceroll selects the unlockables.
This happened on two of three computers and they were all under the same ruleset.
__________________
Check out my trash: https://www.4shared.com/folder/KSb4wX5P/_online.html
DerpyBubblez is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.