Jump to content

Recommended Posts

Posted

Hi! I'm running into a very bizarre issue when trying to make a seraph-based NPC using the EntityPlayerBot class. It randomizes the skin (but not the eyes, which might be related? I'm not sure) when the NPC is spawned, but as soon as I restart the world, they go pale. The hair shapes, hair textures, & expressions remain randomized, just not the skin nor the eyes. This happens with the regular playerbot that you can spawn with commands. Does anyone know if there's some sort of solution for them to keep their skin options between restarts, or maybe where I could start looking?

I've got the relevant bits of code attached here, though I took them right from the playerbot.json and player.json files. I've also got two pictures of the same NPC, from before and after the world restarted, to show what I'm talking about.

thing 3.png

thing4.png

thing1.png

thing2.png

  • Like 1
  • 2 weeks later...
Posted

Hi @cyberlogia 

I don't know coding, but see that you don't have a reply here.
You may want to put a post over to the Modding section of the forum here: 
https://www.vintagestory.at/forums/forum/27-mods-mod-development/

There is also a Discord area for modding.

I'm guessing that whoever can help will want to see the full mod details, such as whether this information is being saved to a file.
I see a save to file being done for SkinnableParts in this forum question as an example: 

You may wish to also stand on the shoulders of those who have come before by examining published mods that work in the same space and seeing how they handle things, such as:
https://mods.vintagestory.at/playermodellib

Lastly, here are the standard mod pages if you haven't found them already:
https://wiki.vintagestory.at/Modding:Getting_Started
https://wiki.vintagestory.at/Modding:Theme_Pack

Professor Dragon.

 

 

Posted

@Professor Dragon Hi!

I'm not sure why I didn't think to post it in the modding section of the forums, thanks for the pointer! Luckily since I posted this I finished up the rest of the mod, so I'm able to post there what is basically complete aside from this specific bug :D

  • Amazing! 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.