dagobaking Posted April 6, 2020 Posted April 6, 2020 That should work. But, why wouldn't you simply not use the "AddEntry" convenience function, use Add to collect the UID and remove them that way?
Invictusblade Posted April 6, 2020 Author Posted April 6, 2020 3 hours ago, dagobaking said: That should work. But, why wouldn't you simply not use the "AddEntry" convenience function, use Add to collect the UID and remove them that way? unfortunately I only started scripting around 5-6 months ago so I am still fairly new to this. (and I only did a couple of semesters of light programming at uni around 5 years ago) so I don't understand how to use Add to collect the UID.
DocClox Posted April 6, 2020 Posted April 6, 2020 51 minutes ago, Invictusblade said: so I don't understand how to use Add to collect the UID. Something like int property uid = 0 function fonc() uid = Overlays.Add( ; lots of arguments ) ; etc endfunction
Invictusblade Posted April 6, 2020 Author Posted April 6, 2020 for the time being, I decide to scale down the overlays on my mods I noticed a few bugs when you use more than a few scripts (basically when you spammed the drink) that one of the overlays get stuck on and doesn't get removed The head skinoverride looks too different than the default so it is noticeable The new materials (with overlays) based on CumWealth don't seem to work (red & blue colour) so I am removing the skin override and reducing the randomize overlays to a single overlay in both White & Green
DocClox Posted April 6, 2020 Posted April 6, 2020 1 hour ago, Invictusblade said: when you use more than a few scripts (basically when you spammed the drink) Give the script a state and a timeout. When the first thing is drunk, go to a "JustDrunk" state which starts a timer and ignores further drinking events. When the timer expires, go back to the default state. Can I ask: what's the second parameter for BodyGen.SetSkinOverride? There's nothing in the script about it and I'm having difficulty finding an example.
Invictusblade Posted April 6, 2020 Author Posted April 6, 2020 24 minutes ago, DocClox said: Give the script a state and a timeout. When the first thing is drunk, go to a "JustDrunk" state which starts a timer and ignores further drinking events. When the timer expires, go back to the default state. Can I ask: what's the second parameter for BodyGen.SetSkinOverride? There's nothing in the script about it and I'm having difficulty finding an example. it is the name of the skin which is the ID in the skin file in F4SE Scriptname INVB_SkinOverride extends ObjectReference string Property Custom_string_01 auto int Property int_time Auto Event OnEquipped(Actor akActor) BodyGen.SetSkinOverride(akActor, Custom_string_01) EndEvent Event OnUnequipped(Actor akActor) Utility.Wait(int_time) BodyGen.RemoveSkinOverride(akActor) EndEvent so for example in the picture below the names you want is AA_Tattoo01 & AA_Tattoo02
Invictusblade Posted April 6, 2020 Author Posted April 6, 2020 2 hours ago, Invictusblade said: for the time being, I decide to scale down the overlays on my mods I noticed a few bugs when you use more than a few scripts (basically when you spammed the drink) that one of the overlays get stuck on and doesn't get removed well, I just tested the new changes and the results are less than good so adding overlays is easy but the real problem is removing the added overlays. and I will have to have a proper think about the script btw thanks for the help and I still have to figure out the help
DocClox Posted April 6, 2020 Posted April 6, 2020 2 hours ago, Invictusblade said: btw thanks for the help and I still have to figure out the help You're welcome, and I know the feeling well. I just set up a BGEM version of one of those designs to apply with LooksMenu: Oh well, back to the drawing board... [edit] This is better. I got the greyscale pverlay working. Now I just need to work out why it's ignoring the gradient map I made. I wonder if it needs to be a particular size?
Invictusblade Posted April 7, 2020 Author Posted April 7, 2020 so I have been working on my script today and I decided to rework one of my mods into an ESM. I still have a bit of trouble with overlays not getting removed. so the script works(I think) for normal gameplay usage but the problem is when the player spams the one(or two) of the Drinks so I added a globalVariable to stop additional overlays from occurring during a cycle. then I added an random timer to delay the spamming. (I have no idea if this works) Scriptname INVB_Drinking extends activemagiceffect string[] Property Custom_strings auto int Property int_count Auto int Property int_priority Auto GlobalVariable Property Overlayed Auto Const Event OnEffectStart(Actor akActor, Actor akCaster) float random_time_F = Utility.RandomFloat(0.1, 1.1) Utility.Wait(random_time_F) If Overlayed.GetValueInt() == 0 Overlayed.Setvalue(1) int i Bool isFemale = akActor.GetLeveledActorBase().GetSex() as Bool int[] UID = new int[0] int random_seed = Utility.RandomInt(0, int_count) Overlays:Entry overlay = new Overlays:Entry overlay.priority = int_priority overlay.template = Custom_strings[random_seed] overlay.red = 0 overlay.green = 0 overlay.blue = 0 overlay.alpha = 0 overlay.offset_u = 0 overlay.offset_v = 0 overlay.scale_u = 1 overlay.scale_v = 1 UID.Add(Overlays.Add(akActor, isFemale, overlay)) Overlays.Update(akActor) int random_time = Utility.RandomInt(10, 15) Utility.Wait(random_time) Overlays.Remove(akActor, isFemale, UID[i] as int) Overlays.Update(akActor) Overlayed.Setvalue(0) else endif EndEvent does anyone have any suggestions?
DocClox Posted April 7, 2020 Posted April 7, 2020 I suspect the problem happens if the event triggers when it's already executing and you get two UIDs being written to the same index. Maybe something like this? state drinking Event OnEffectStart(Actor akActor, Actor akCaster) ; ignore it EndEvent endstate Event OnEffectStart(Actor akActor, Actor akCaster) GoToState("drinking") ; your original code here GoToState("") EndEvent For my part, I managed to get some color into my tats by using one of the CumNWealth grads. It doesn't help that I don't have photoshop, so I'm just guessing as to the format for these things.
Invictusblade Posted April 7, 2020 Author Posted April 7, 2020 4 hours ago, DocClox said: I suspect the problem happens if the event triggers when it's already executing and you get two UIDs being written to the same index. Maybe something like this? state drinking Event OnEffectStart(Actor akActor, Actor akCaster) ; ignore it EndEvent endstate Event OnEffectStart(Actor akActor, Actor akCaster) GoToState("drinking") ; your original code here GoToState("") EndEvent For my part, I managed to get some color into my tats by using one of the CumNWealth grads. It doesn't help that I don't have photoshop, so I'm just guessing as to the format for these things. thank you, I will test it soon. edit->doesn't work so I am giving up on it, and I just going to have it as a known bug and tell people not to spam Milks
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 I finally(I think) got the overlay removal working(again, I think) the solution was to remove it via UID and then remove it via string(egoballistic's solution)) it hasn't been stuck on since I changed the script now, I am playing around negative colours on the Cum from CumWealth the effect below is the drinking Blood
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 19 hours ago, DocClox said: I suspect the problem happens if the event triggers when it's already executing and you get two UIDs being written to the same index. Maybe something like this? state drinking Event OnEffectStart(Actor akActor, Actor akCaster) ; ignore it EndEvent endstate Event OnEffectStart(Actor akActor, Actor akCaster) GoToState("drinking") ; your original code here GoToState("") EndEvent For my part, I managed to get some color into my tats by using one of the CumNWealth grads. It doesn't help that I don't have photoshop, so I'm just guessing as to the format for these things. I was thinking about your problem and I would think about having multiple overlays to create a layered effect and with my experiences, making the blood overlay I would look at the different glow gradients in invert colours in game so for your overlay 1. pink circle background (using glow) 2, White highlights 3. black details if that works then we can create a script to add them in the correct order onto a NPC
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 I am an idiot, I have been bug testing the overlays scripts and running into problems when it removes tattoo overlays along with the cum turns out, that I was hitting the upper limit of overlays you can have. (I had around 10ish existing overlays on the character) so after removing a few of the existing overlays, I tested again and it seems to work perfectly(at the moment)
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 does this look good enough. I decided to add an overlay to blood needle (to make bloodpacks) it is a bit too dark look at arm
DocClox Posted April 8, 2020 Posted April 8, 2020 8 hours ago, Invictusblade said: so for your overlay 1. pink circle background (using glow) 2, White highlights 3. black details if that works then we can create a script to add them in the correct order onto a NPC That would work, 9 hours ago, Invictusblade said: now, I am playing around negative colours on the Cum from CumWealth the effect below is the drinking Blood Very nice. Where do I specify a negative number? There are whole chunks of the material editor that mean nothing to me. I think it's all right in the second one, a bit hard to see in the first - but that could just be the camera angle. Sometimes subtle is good for things like this.
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 7 minutes ago, DocClox said: That would work, Very nice. Where do I specify a negative number? There are whole chunks of the material editor that mean nothing to me. I think it's all right in the second one, a bit hard to see in the first - but that could just be the camera angle. Sometimes subtle is good for things like this. fair enough, sorry I have been looking at it too long today however because you wanted Pink, you might not have to deal with negative numbers (it just because doing it gave me an really good red/black combo) I assume you use paint.net or gimp load the glow files(check zip) and invert the colours CumNWealth glow files.7z
DocClox Posted April 8, 2020 Posted April 8, 2020 OK, thanks. I looked at the CumNWealth glowmaps, but I hadn't looked at that end of the properties list. Can you see why this might not be working? It's basically what you posted on Monday: Spoiler Scriptname rrs:tattoo extends ObjectReference import Bodygen string property tat_id auto Event OnEquipped(Actor akActor) Debug.Notification("applying " + tat_id) BodyGen.SetSkinOverride(akActor, tat_id) EndEvent I attached it to the "Just Another Sex Slave" top I made and tested it out. The Notification line is printed correctly. And the name matches the overlays file: { "id" : "rrs_breeder", "name": "$RRS Breeder", "slots" : [ { "slot" : 3, "material" : "overlays\\docclox\\breeder.BGEM" } ], "playable" : true, "transformable" : false, "sort": 0, "gender": 1 }, ... but there is no tat in evidence. I don't think it's a JSON problem because if I apply it from the LooksMenu UI ... It works just fine. I can't think what else it could be.
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 6 minutes ago, DocClox said: OK, thanks. I looked at the CumNWealth glowmaps, but I hadn't looked at that end of the properties list. Can you see why this might not be working? It's basically what you posted on Monday: Hide contents Scriptname rrs:tattoo extends ObjectReference import Bodygen string property tat_id auto Event OnEquipped(Actor akActor) Debug.Notification("applying " + tat_id) BodyGen.SetSkinOverride(akActor, tat_id) EndEvent I attached it to the "Just Another Sex Slave" top I made and tested it out. The Notification line is printed correctly. And the name matches the overlays file: { "id" : "rrs_breeder", "name": "$RRS Breeder", "slots" : [ { "slot" : 3, "material" : "overlays\\docclox\\breeder.BGEM" } ], "playable" : true, "transformable" : false, "sort": 0, "gender": 1 }, ... but there is no tat in evidence. I don't think it's a JSON problem because if I apply it from the LooksMenu UI ... It works just fine. I can't think what else it could be. because you are activating the wrong thing the script wants a skin but you want an overlay edit the code to look like this (btw the number 7 is priority so it might/ will important in the future with backgrounds, but not yet) Scriptname rrs:tattoo extends ObjectReference import Bodygen (I don't know if this is important, I don't have them) string property tat_id auto Event OnEquipped(Actor akActor) Debug.Notification("applying " + tat_id) Overlays.AddEntry(akActor, true, 7, tat_id) EndEvent
DocClox Posted April 8, 2020 Posted April 8, 2020 You're right about not needing the import. That's the Python way of doing it, and I've been writing a lot of Python lately. That said it should be harmless. Still doesn't do anything though. But now I have a much better idea of where to look. 31 minutes ago, Invictusblade said: the script wants a skin but you want an overlay Roght. So if I'd been using full skin textures, or materials based on them I guess, that would have been the right approach? I was wondering what the difference was.
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 3 minutes ago, DocClox said: You're right about not needing the import. That's the Python way of doing it, and I've been writing a lot of Python lately. That said it should be harmless. Still doesn't do anything though. But now I have a much better idea of where to look. Roght. So if I'd been using full skin textures, or materials based on them I guess, that would have been the right approach? I was wondering what the difference was. unless I am mistaken Skin Override is replacer of the skin and requires an (armor, armor addon and texture set) to use (no Material) with code in F4SE folder overlay is a image project onto a skin and only requires a material file with code in F4SE folder also have a look at the code, I posted about yours for the "Overlays.AddEntry(akActor, true, 7, tat_id)
DocClox Posted April 8, 2020 Posted April 8, 2020 39 minutes ago, Invictusblade said: also have a look at the code, I posted about yours for the "Overlays.AddEntry(akActor, true, 7, tat_id) I did. This is what I have at the moment: Scriptname rrs:tattoo extends ObjectReference string property tat_id auto Event OnEquipped(Actor akActor) string s = "rrs_breeder" Debug.Notification("Applying Overlay: '" + s + "'") Overlays.AddEntry(akActor, true, 7, s) EndEvent I got rid of the import and moved the id string to a local value, just to eliminate one possible source of errors. Otherwise it's the same.
DocClox Posted April 8, 2020 Posted April 8, 2020 Update! I wasn't calling Overlays.Update(akActor). I wouldn't have realised, but I noticed that my test girl was getting the brand, but only after a reload. So I added in the update call, and now it works perfectly. Not bad, considering I'm doing it with a command prompt to compile, and zEdit to link in the scripts
Invictusblade Posted April 8, 2020 Author Posted April 8, 2020 7 hours ago, DocClox said: Update! I wasn't calling Overlays.Update(akActor). I wouldn't have realised, but I noticed that my test girl was getting the brand, but only after a reload. So I added in the update call, and now it works perfectly. Not bad, considering I'm doing it with a command prompt to compile, and zEdit to link in the scripts damn, I forgot that too btw why are you not using creation kit?
DocClox Posted April 8, 2020 Posted April 8, 2020 14 hours ago, Invictusblade said: btw why are you not using creation kit? If I'm honest, it's largely because I'm ticked off at Bethesda for various reasons, plus I'm a stubborn bastard. But also, zEdit loads a hell of a lot faster than the CK, and I've always enjoyed working low-level. You learn a lot that way. [edit] All tats made and scripts working! Many, many thanks for your help in figuring it all out.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.