Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Starbeque Support? Wrong Color During Scenes #146

Open
Foxersthe opened this issue Nov 11, 2024 · 7 comments
Open

[REQUEST] Starbeque Support? Wrong Color During Scenes #146

Foxersthe opened this issue Nov 11, 2024 · 7 comments
Labels
Question Further information is requested Request Request for new feature or changes

Comments

@Foxersthe
Copy link

Foxersthe commented Nov 11, 2024

Describe the bug

With the new update to Starbeque, which is a vore mod for Starbound using the Starbound open source executable (which uses a Steam copy), trying to do a scene has the player be the wrong color during the duration of the scene. Loki, the creator of SBQ, says that "because if they get your portrait and check the specific index in the table where they assume the body image would be in vanilla, but now since there's extra animation parts its at a different layer there's a different image there." The reason for additional color indexes is for additional player parts, which can be colored by transforming NPC's or other players.

Edit: i forgot to mention, Loki said the issue may be with Expanded Animations.

Loki also says "if the devs want to do something to streamline things they can detect if SBQ engine is in used by checking if the humanoid table exists and can use humanoid.getIdentity() which will return a player's customization values."
They wanted me to share the mod's documentation.

documentation.md

Would it be possible to add a patch or some support for this mod? I wasn't sure if this should be a bug report or a request, since it's kind of both.


Log File

starbound.log


Additional context

Wrong colors aside, the mods work fine on a older version of Sexbound, but comes up with a script error on the new version, though I feel like that may be due to other mods being outdated when I went to test this on the latest version of Sexbound.

WrongColor

Look at the player icon at the top left for a idea of my correct color; I'm supposed to be green!

Thanks for the help!

@ErinaSugino
Copy link
Owner

The errors are certainly caused by using the wrong mods.
lustbounad_base is breaking things as it's included in SBR.
The Lustbound SBR patch is hence also outdated.
From what I can read from SBQ's modified log output, you wrongly installed the Aphrodite's Bow SBR Patch wrongly as it's not recognized as a mod id with version number.

As for the Starbecue Engine - their doc you sent doesn't even contain the humanoid.getIdentity() function I am supposed to use. This would also be a very build-specific thing that only works if Starbecue is installed, otherwise errors. Finally, from my understanding humanoid.getIdentity should not be doing anything that would breaks this - as Sexbound literally gets player colors by letting the game render out the entity (as your icon in the top left does), then reading out directives from the generated images. So as long as the entity is actually colored that way (which setting the identity via SBQ should do) and not just a custom Lua-sided renderer being used, this should not cause any issues.

We might need to get an actual SBQ dev in here to talk about this more indepth.

@ErinaSugino ErinaSugino added Request Request for new feature or changes Question Further information is requested labels Nov 11, 2024
@ErinaSugino ErinaSugino changed the title [BUG] Starbeque Support? Wrong Color During Scenes [REQUEST] Starbeque Support? Wrong Color During Scenes Nov 11, 2024
@WasabiRaptor
Copy link

WasabiRaptor commented Nov 11, 2024

I had mistakenly not put humanoid.getIdentity() in the docs but I can assure it does exist, it probably just slipped me while I was writing them, its essentially the same things as npc.humanoidIdentity() (which is in retail) except available on both players and npcs, and I was never suggesting to make it require my engine mod since that would be very silly to ask of you, I was merely suggesting an if else when you're about to check the portrait for color and customization data, check if the humanoid table isn't nil, if it isn't use it, if it is nil, do what you normally do. I know I had to do a similar thing with portraits before I had any source code fuckery.

Sexbound literally gets player colors by letting the game render out the entity (as your icon in the top left does), then reading out directives from the generated images

So the thing about this! I do not know if in your code you're iterating through and checking string.find to find which is the body or the head image or etc and then chopping the directives off, if you're iterating through it might probably be fine but there's still the potential for issue due to player animations now being configurable per species in SBQ engine, and that being how we add our vore animations now, this changes the portrait output the engine gives out from vanilla slightly on any race we have provided support for, their images will have an extra mask directive for masking out a tail to replace with our own, as well as having extra image layers for tail, belly, cock balls, and breasts, so for your purposes it might be better to just use humanoid.getIdentity() if it exists

additional note, it may be wise to check if player.humanoidIdentity() exists and to use it to also streamline things on an OpenStarbound install despite their build not having any of the stuff I've done to make player/npc animations configurable

@ErinaSugino
Copy link
Owner

This is Sexbound's exact current code for player directive fetching

    util.each(world.entityPortrait(player.id(), "full"), function(k, v)
        -- Attempt to find facial mask
        if identity.facialMaskGroup ~= nil and identity.facialMaskGroup ~= "" and
            string.find(v.image, "/" .. identity.facialMaskGroup) ~= nil then
            identity.facialMaskFolder, identity.facialMaskType =
                string.match(v.image, '^.*/(' .. identity.facialMaskGroup .. '.*)/(.*)%.png:.-$')
            identity.facialMaskDirectives = self:filterReplace(v.image)
        end

        -- Attempt to find facial hair
        if identity.facialHairGroup ~= nil and identity.facialHairGroup ~= "" and
            string.find(v.image, "/" .. identity.facialHairGroup) ~= nil then
            identity.facialHairFolder, identity.facialHairType =
                string.match(v.image, '^.*/(' .. identity.facialHairGroup .. '.*)/(.*)%.png:.-$')
            identity.facialHairDirectives = self:filterReplace(v.image)
        end

        -- Attempt to find body identity
        if (string.find(v.image, "body.png") ~= nil) then
            identity.bodyDirectives = string.match(v.image, '%?replace.*')
        end

        -- Attempt to find emote identity
        if (string.find(v.image, "emote.png") ~= nil) then
            identity.emoteDirectives = self:filterReplace(v.image)
        end

        -- Attempt to find hair identity
        if (string.find(v.image, "/hair") ~= nil) then
            identity.hairFolder, identity.hairType = string.match(v.image, '^.*/(hair.*)/(.*)%.png:.-$')

            identity.hairDirectives = self:filterReplace(v.image)
        end
    end)

I do understand that humanoid.getIdentity() makes this a million times easier, and later down the line I'll need support for player.humanoidIdentity() anyway cause I'm adding that through StarGlue - but that's a different issue. For now however, why would this result in the wrong colors? Does SBQ just add additional directives for colors after a mask? Like body.png?replace=<org colors>;?addmask=...;?replace=<new colors>? Cause that's one of the only ways I could see how the actor would end up with the wrong colors entirely. Baby color genetics are much easier to break, but the directives extracted with the above RegEx are just 1on1 slapped onto the parts in the SxB animator.

@WasabiRaptor
Copy link

WasabiRaptor commented Nov 11, 2024

my assumption was that the body mask path would be fudging it but I don't see why that would be the case since our mask is before any replace directives so there's something else going on with it probably?

<bodyImagePath><gender>body.png:<personalityIdle>?addmask=<bodyMaskPath><gender>body.png:<personalityIdle>;0;0<bodyDirectives>

this would be the image tag string we're using for the idle animation when we're a species that gets their tail masked out

@WasabiRaptor
Copy link

I think I may have identified the issue after the user did some more testing

All SBQ supported races have an additional image layer of the body and the legs cosmetic item that have a mask applied to them, this is so I can make sure the leg goes in front of the cock and balls during run anims and etc, the image name for this mask is malebody.png so it can use the same frames file as the rest of the humanoids

Frith found that the reason their colors were wrong is the directives of their legs cosmetic item is what was being used instead of their proper directives, and with nothing equipped things work normally

I believe all you need to do to fix this issue is to make sure the strings you're ripping directives from all start with /humanoid/<species>/ as this issue technically also isn't specific to SBQ engine being used in the rare case someone makes an armor piece where the image path ends with body.png or any other image string you're checking as unlikely as it is it would still cause this same issue

@ErinaSugino
Copy link
Owner

Hmm. I see. While that would be a fix for this specific instance, it would however open up other potential issues which in the end all just sum up to "What the fuck Chucklefish", making the best possible solution to just rely on humanoid.getIdentity and similar after all. The issue with including the filepath is that StarExtensions, Open Starbound and StarGlue all support changing the folder to load images from entirely - a native NPC feature made Lua command on players. In the current scenario Sexbound still loads something whereas including the filepath before the filename opens up potential scenarios where nothing is loaded at all.

@WasabiRaptor
Copy link

the imagePath arg in identity is basically just a string that swaps out the species tag, it still doesn't let one escape the /humanoid/ folder and in those cases where it's made available to players, you'd have the lua callback to get identity data anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested Request Request for new feature or changes
Projects
None yet
Development

No branches or pull requests

3 participants