Jump to content

Need some help with Overlays


Recommended Posts

Hello, I am working on a few of my mods at the moment.

and I would like to change how condoms work in the games.

 

so I would like to use Overlays and I looked at the Overlays.PSC and I have no Idea how to use them in my mod

 

the idea of the condom mod

you selected what colour the condom is via the armor workbench (it selects a keyword)

you equipped the condom(invisible armor) (a script activates and applies an overlay based on the keywords worn)

you unequipped the condom(invisible armor) (a script activates again and removes the overlay)

 

can anyone help me with this?

 

 

backstory

so at the moment, it uses a full skin textures with a coloured section over the condom area

the Problem with this is that people use different texture mods so there will be unwanted visual changes.

 

so I tried a few different methods to have an universal condom mod that works on all skin textures (not Unique Bodies)

but nothing worked

Link to comment
  • 3 weeks later...

I decided to revisit this idea and it was remarkable easy to do when I had a proper look at the code.

and I made two separate scripts, one skin override and one random overlay.

 

so I will able to redesign the condoms(so you can wear clothes without glitches) for my mod Baby Addon's

Link to comment

Sorry to parade my ignorance so, but overlays.psc from what mod? I can't find an overlays mod on LL or Nexus and a search for the file in my MO2 mods folder draws a blank.

 

I can think of a few things I'd like to do with overlays too,  if I can make them work.

Link to comment

go into LooksMenu - Main.ba2 with a ba2 browser and extracted the contents

 

there should be some source files inside.

 

like I said it is easy(I was just a bit confused by its nature(such as how does it know what overlay to use) to use

 

 

so I am now working on the following

1. Condoms for Family Planning Enhanced Baby Addons

 

2. an random tattoo mod to gives a tattoo(old school skins) to raiders or settlers or etc... (it works the same way as my impregnation mod)

(for my personal use only, because it is really painful to setup and I am not in the mood for users problems(and there will be problems)

 

3. a mod inspired by a 3d artist called "Dialup Hero" which enhances a NPC figure while giving them a love mark tattoo.

(for my personal use only(at the moment))

 

4. if I feel like it (I might add tattoo thing to FPE More Creatures)

Link to comment
3 hours ago, Invictusblade said:

2. an random tattoo mod to gives a tattoo(old school skins) to raiders or settlers or etc... (it works the same way as my impregnation mod)

(for my personal use only, because it is really painful to setup and I am not in the mood for users problems(and there will be problems)

Hmm... more or less what I was thinking. I'd like to be able to apply some tattoos for the Raider Reform School idea I've been kicking around.

 

That looks like it might be doable. Thanks for the info.

Link to comment

if you want it when I finish making the mod, please ask me..

 

so the basic idea of the mod is that it adds a non-playable device to the outfits of random NPC (which should automatically equipped them)

this device then plays a simple script to put a skin override on them.

 

there are a couple of painful parts is that you have to already have the tattoo files on your Data folder and the ability to edit a json file

and you will need(I assumed) three armors in your esp.

 

Master(script & playable & slot 59?) for condoms which require keywords to change the skin

Hidden Master(script & unplayable & slot 59?) for NPC's (so you can't interact with them)

Slave(unplayable & slot33, whatever slots hands use) this does the actual work but will glitch the NPC's when used directly

 

also I should mention that we were talking about tattoo's but this will also work on all kinds of skin overrides so different kinds of pubic hair or different body textures.

 

like I said this is painful to most (so advance users only)

Link to comment
8 hours ago, Invictusblade said:

if you want it when I finish making the mod, please ask me..

 

9 hours ago, Invictusblade said:

there are a couple of painful parts is that you have to already have the tattoo files on your Data folder and the ability to edit a json file

and you will need(I assumed) three armors in your esp.

 

So you're using wearable items  to apply and remove the overlay? Why not just have a full body garment where the overlay image is the only texture? I did that for pubic mons tattoos.

Link to comment
4 minutes ago, DocClox said:

So you're using wearable items  to apply and remove the overlay? Why not just have a full body garment where the overlay image is the only texture? I did that for pubic mons tattoos.

I am not completely sure but are you talking about a naked body with a texture override on it?  (slot 33)

if so, I did use that for years

there is a mod called "AA Lots More Settlers and Enemies" and in that I altered the body skins to have tattoo's on a heap of npc's but that mod does have performance issues

 

well, this is the second day of testing so I may find a better way of doing it but the current setup allows me to have a leveled list of 20 tattoo's going to NPC's.

which is my plan for this idea.

 

also I had an idea a few years ago when a skinned vault suit appeared on nexus. (my idea was to use it as underwear on normal clothes)

 

I am having issues with condoms, with the modification of condoms not working. (but now, it will choose a colour when crafting)

 

and for the player, it is easier to modify the looks via looksmenu

Link to comment
1 hour ago, Invictusblade said:

I am not completely sure but are you talking about a naked body with a texture override on it?  (slot 33)

if so, I did use that for years

 

Not exactly. This is what I'm talking about:

 

 

Basically, I took the idea from the Bodypaint mod on Nexus. The "paint" is basically  a garment with a fully transparent texture, apart from the paint design. I just used more transparent areas than the nexus mod. It works well enough, but I was hoping for something with more of the flexibility of SlaveTats. This setup only gives you one tat or set of tats at a time.

 

I did start to look at setting up the tats as decals and making the mod item configurable at an armor workbench. In some ways that might be the best approach stil, at least for my purposes.

Link to comment
36 minutes ago, DocClox said:

Not exactly. This is what I'm talking about:

 

 

Basically, I took the idea from the Bodypaint mod on Nexus. The "paint" is basically  a garment with a fully transparent texture, apart from the paint design. I just used more transparent areas than the nexus mod. It works well enough, but I was hoping for something with more of the flexibility of SlaveTats. This setup only gives you one tat or set of tats at a time.

 

I did start to look at setting up the tats as decals and making the mod item configurable at an armor workbench. In some ways that might be the best approach stil, at least for my purposes.

that is effectively what I did

 

also here is my script for the condom. (it turns out to be really easy)

Scriptname INVB_Condom extends ObjectReference

string Property Custom_string_01 auto
string Property Custom_string_02 auto
string Property Custom_string_03 auto
string Property Custom_string_04 auto
string Property Custom_string_05 auto
string Property Custom_string_06 auto
Keyword Property kw_Black Auto
Keyword Property kw_Blue Auto
Keyword Property kw_Green Auto
Keyword Property kw_Red Auto
Keyword Property kw_Transparent Auto
Keyword Property kw_White Auto

Event OnEquipped(Actor akActor)
	Utility.Wait(0.5)
	
	if akActor.wornHasKeyword(kw_Black)	
		BodyGen.SetSkinOverride(akActor, Custom_string_01)
	elseif akActor.wornHasKeyword(kw_Blue)	
		BodyGen.SetSkinOverride(akActor, Custom_string_02)
	elseif akActor.wornHasKeyword(kw_Green)	
		BodyGen.SetSkinOverride(akActor, Custom_string_03)
	elseif akActor.wornHasKeyword(kw_Red)	
		BodyGen.SetSkinOverride(akActor, Custom_string_04)
	elseif akActor.wornHasKeyword(kw_Transparent)	
		BodyGen.SetSkinOverride(akActor, Custom_string_05)
	elseif akActor.wornHasKeyword(kw_White)	
		BodyGen.SetSkinOverride(akActor, Custom_string_06)	
	endif
EndEvent

Event OnUnequipped(Actor akActor)
	Utility.Wait(0.5)
	BodyGen.RemoveSkinOverride(akActor)
EndEvent

my hope was to control the keywords in armor workbench (I still don't know what is going with it)

but this script will allow you to select 1 out of 6 skins in a single armor piece.

 

here is an example of the script in action (I was a tattoo making phrase a couple of years ago) (a DC Tattoo)

20200404190833_1.jpg

Link to comment

Hmmp! Turns out I didn't do it the way I thought I did it. I've been playing with Blender 2.8 and making sure I'm using the correct mesh and textures this time. Going to be interesting to see if this works.

 

What's the problem with facials? Just paint onto the head UV rather than the body. Or am I missing something basic?

Link to comment

Hot damn! It worked!

 

ScreenShot61.png

 

Bit of a mismatch in texture colors there because this is using the skin texture. But I think I can fix that.

 

ScreenShot62.png

 

Getting that ass tat to line up was where I came to grief last time.

 

ScreenShot59.png

 

Could do with being a little bit smaller, I feel. Otherwise, that is looking good!

 

 

Link to comment
6 hours ago, DocClox said:

What's the problem with facials? Just paint onto the head UV rather than the body. Or am I missing something basic?

ok then what?

 

I had a look at the overlays(and I couldn't see anything about head overlays)

 

my final solution to make a skinoverride only on the head and have that activate when drinking (maybe that would work)

edit-> that didn't work

 

btw here is a image of what I am trying to do

20200404225351_1.jpg

Link to comment
8 minutes ago, DocClox said:

 

Ah, yes. I see your point.

 

How do tattoos work? I mean the vanilla ones, not the body ones we were talking about. Could you apply the effect as warpaint?

well newer facial tattoos work via facetint but I have no idea how to use them in a script. (I emailed expired6978 who created Looksmenu to ask him about this among others)

 

but I did make a bad workable option with the drinking

so instead of overlays, it uses a skinoverride with a headskin (and it works)

 

20200405142243_1.jpg

Link to comment
33 minutes ago, dagobaking said:

There is no way to apply face tattoos via script currently. But, perhaps Expired will consider adding that capability if you ask? (He has said in the past that there are technical issues with it).

thank you, I email him about that

also I asked him about finding the UID of overlays because that is confusing me. (at the moment, it is an all or nothing removal)

here is the email to LenAnderson and EgoBallistic

 

Hello,

 

I asked this question to expired6978 on Nexus but I will ask you two as well

The basic premise of the mod is that "when you drink some milk, it will spill on you"

so I can get the overlays to work and I can remove all of them.

but I would like to know how to target the removal so it would only remove the overlay that the script gave?

how can I get the UID info?

 

also I would also like to know if there was a way to add facetints to this script?

thank you for your time

Scriptname INVB_Drinking extends activemagiceffect

string Property Custom_string_Skin auto
string Property Custom_string_01 auto
string Property Custom_string_02 auto
string Property Custom_string_03 auto
string Property Custom_string_04 auto
string Property Custom_string_05 auto

Event OnEffectStart(Actor akActor, Actor akCaster)

	int random_seed = Utility.RandomInt(1, 5)
	BodyGen.SetSkinOverride(akActor, Custom_string_Skin)
	if (random_seed == 1)
		Overlays.AddEntry(akActor, true, 6, Custom_string_01)
	elseif (random_seed == 2)
		Overlays.AddEntry(akActor, true, 6, Custom_string_02)
	elseif (random_seed == 3)	
		Overlays.AddEntry(akActor, true, 6, Custom_string_03)
	elseif (random_seed == 4)	
		Overlays.AddEntry(akActor, true, 6, Custom_string_04)
	elseif (random_seed == 5)	
		Overlays.AddEntry(akActor, true, 6, Custom_string_05)
	endif
	Overlays.Update(akActor)
	Utility.Wait(5)	
	BodyGen.RemoveSkinOverride(akActor)
	Overlays.RemoveAll(akActor, true)
	Overlays.Update(akActor)
EndEvent

The code from above should allow an random overlay to be selected and a skinoverride(Head only) would take care of the face

Link to comment

Thinking about your script, am I right in thinking the colors are the colors of worn condoms, and you set the keyword so you know which one to remove afterward?

2 hours ago, Invictusblade said:

also I asked him about finding the UID of overlays because that is confusing me

In the Overlays.psc script, it says that the UID is set by Add() and which also returns the value. Which doesn't help if you use the AddEntry convenience function, but if you use Add() you can assign the value and store it somewhere..

 

Speaking of which, is there a Fo4 equivalent of StorageUtil or JContainers yet? I've been thinking about how to store these things without keeping a big lookup table in memory.

Link to comment

egoBallistic sent me a message a short while ago with a code change

Scriptname INVB_Drinking extends activemagiceffect

string Property Custom_string_Skin auto
string[] Property Custom_strings auto

Event OnEffectStart(Actor akActor, Actor akCaster)

    int random_seed = Utility.RandomInt(0, 4)
    BodyGen.SetSkinOverride(akActor, Custom_string_Skin)
    Overlays.AddEntry(akActor, true, 6, Custom_strings[random_seed])
    Overlays.Update(akActor)
    
int random_time = Utility.RandomInt(10, 30)
    Utility.Wait(random_time)    
    BodyGen.RemoveSkinOverride(akActor)
    RemoveMyOverlays(akActor)
EndEvent

Function RemoveMyOverlays(Actor akActor)    
    Bool isFemale = akActor.GetLeveledActorBase().GetSex() as Bool
    Overlays:Entry[] ActorOverlays = Overlays.GetAll(akActor, isFemale)
    If (ActorOverlays.Length > 0)
        Int i = 0
        While (i < ActorOverlays.Length)
            If (Custom_strings.Find(ActorOverlays[i].template as String) > -1)
                Overlays.Remove(akActor, isFemale, ActorOverlays[i].uid as Int)
            EndIf
            i += 1
        EndWhile
        Overlays.Update(akActor)
    EndIf
EndFunction

I haven't tested it yet (I am going to make slight changes to fit future expansion such as adding an Int property to the RandomInt)

and it works, now the somewhat hard part. (doing the same changes to the other scripts and adding them to the other mods)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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. For more information, see our Privacy Policy & Terms of Use