vinfamy / LifePlay

Free, Open-Source and Moddable Lifesim RPG (Link NSFW). I had to change my dev PC and couldn't set up Git correctly on the new PC so the full source code for the game will be available here: https://mega.nz/folder/1XYSXbRb#nFHZ1wdwTbL6rS1oUdMe0g
https://mega.nz/folder/1XYSXbRb#nFHZ1wdwTbL6rS1oUdMe0g
GNU Affero General Public License v3.0
71 stars 36 forks source link

Question: Anyway to know if player or actor is wearing a skirt/dress vs pants/shorts? #184

Closed Rizean closed 3 years ago

Rizean commented 3 years ago

Question: Anyway to know if player or actor is wearing a skirt/dress vs pants/shorts?

I've tried lots of different ways to include digging into the unreal blueprints. I've not worked with unreal before so it's taken me a few days to figure things out. Seems like it should be doable but not sure with what is currently exposed to the scripting engine? Goal is to know if player is wearing a skirt/dress and not underwear.

I'd love to have unreal.js as another scripting option and would be willing to put in some work to help with that effort but would need some guidance on how the current scripting engine works. If time permits I'm going to try and go through some unreal courses this weekend as long as I don't get any side jobs. Sadly, need to do the paying work first.

On a side note I've written a script to extract all the exposed functions/variable in a blueprint and output a json file. I'm looking at making a documentation generator that outputs markdown. I've done this before in my day job. Once I get something useful will do a pull request for the generator and output.

NickNo-dev commented 3 years ago

About your question "what the actor is wearing": I usually go the other way round. I explicitly dress the actor the clothing I want. For example the HomeExtensions Mod does this.

In the bathromm scene the Actor is either Naked (10%) chance, or wearing a fixed combination of underwears that are hard wired into random blocks like this: Random Tenant.dress(Cool-Bra_1_F,Cool-Panties_1_F) Tenant.dress(Cool-Bra_1_F,Cool-Panties_2_F) Tenant.dress(Cool-Bra_1_F,Appealing-Panties_1_F) //ETC EndRandom

This solves several issues for me:

Honestly I would have done it another way round if the LP engine allowed this:

// Dress bra Random Tenant.dress(Cool-Bra_1_F) Tenant.dress(Cool-Bra_2_F) Tenant.dress(Cool-Bra_3_F) A=1 // no bra EndRandom
// Dress panties Random Tenant.dress(Cool-Panties_1_F) Tenant.dress(Cool-Panties_2_F) Tenant.dress(Appealing-Panties_1_F) //ETC EndRandom //Dress stockings Random Tenant.dress(Stockings1) Tenant.dress(Stockings2) A=1 // no stockings EndRandom

But this is not supported. The actor will be completely invisible if you execute it like this. If you add a pause it will put on the cloth but off anything else. Looks like a "dressAdd()" fctn would be required for this to work.

NickNo-dev commented 3 years ago

About the other two points (unreal.js) / docs generator: Docs generator is always welcome. unreal.js as a secondary engine won't make modders life easier. (or the one of the ppl working on the LP engine) as you need to support both then. I would concentrate on the already esisting engine fixing bugs and adding APIs.

AND: I would suggest having own tickets for this ;-)

vinfamy commented 3 years ago

v4.0 will add a lot of new clothes and some new systems for it, I'll keep this in mind for then since with diversity of clothes comes new potential for clothing-specific content and functions like htis

vinfamy commented 3 years ago

For now though, in v3.19, I added Actor.isSlotOccupied(Slot) Slot being:

vinfamy commented 3 years ago

in v3.19, I also added Actor.ClothesContain(Keyword) which checks all the clothes the actor is wearing for the keyword in their filenames the original names for the clothes are shown when you hover over them in the inventory meny Keyword isn't case sensitive and it's a string contains function so you can just use keywords like dress or bra , doesn't have to be a full name