Karna5 Posted July 14, 2022 Posted July 14, 2022 8 hours ago, DocClox said: Fired up the CK for the first time in ages, looking ot make some NPCs. Problem is, the faces are solid black in the preview pane. I tried toggling ambient lighting, but for the cell render window incase the preview used the same params, but no joy. Anyone any ideas? Wouldn't it be easier to use FO4FaceRipper.exe to import any looksmenu presets onto the NPCs in your plugin? I've done that with hundreds of NPCs in my game without problem. The receiving plugin must have the extension of .esp but can be ESL-flagged.
DocClox Posted July 14, 2022 Posted July 14, 2022 4 hours ago, Karna5 said: Wouldn't it be easier to use FO4FaceRipper.exe to import any looksmenu presets onto the NPCs in your plugin? I've done that with hundreds of NPCs in my game without problem. Might b e a way forward, at least 1
vaultbait Posted July 14, 2022 Posted July 14, 2022 11 hours ago, Karna5 said: Wouldn't it be easier to use FO4FaceRipper.exe to import any looksmenu presets onto the NPCs in your plugin? I've done that with hundreds of NPCs in my game without problem. The receiving plugin must have the extension of .esp but can be ESL-flagged. That's a great idea! I've mainly used FR to clone faces from vanilla NPCs to new NPCs (because I'm extremely lazy). I did use it once to embed my personal LM preset into a mod NPC, I just hadn't thought about using that feature more broadly for developing additional NPC faces. 1
DocClox Posted July 17, 2022 Posted July 17, 2022 Does anyone know what mod does this to the female raiders? A bit of scar tissue on one of them is a nice touch. On all of them, it's getting a bit old
Indarello Posted July 17, 2022 Posted July 17, 2022 10 hours ago, DocClox said: Does anyone know what mod does this to the female raiders? A bit of scar tissue on one of them is a nice touch. On all of them, it's getting a bit old Normal or specular textures are from vanila body
vaultbait Posted July 17, 2022 Posted July 17, 2022 @DocClox: Yeah, to be clear, make sure whatever body texture replacer you're using has all three (diffuse, specular and normal) files for the female "dirty" (raider) skin and isn't being overwritten by something else.
lee3310 Posted July 17, 2022 Posted July 17, 2022 I have a problem with one of CC interior cell (Noir Penthouse) where all the changes made in CK didn't appear in game no matter what. I wanted to make the shower and kitchen scrapable then i deleted them completely in CK but they still appear in game. I don't know what this line mean ([REFR:01000992] (places ccTOSFO4001_NeoSky_PlayerHouse_Shower01 [STAT:0100087E] in GRUP Cell Temporary Children of ccTOSFO4001 "Noir Penthouse" [CELL:0024A197] in Precombined\0024A197_033303B4_OC.nif)) but it's like they are part of a precombined nif that load separately and doesn't show in creation kit render window or something. Any idea how to apply the changes ? when i load the plugin in CK, all the changes are there.
vaultbait Posted July 18, 2022 Posted July 18, 2022 I'm struggling with applying the "Slow Time" effect via Papyrus... First, I've tried using the Actor.AddSpell(Spell) and Spell.Cast(Actor) methods to call a spell which applies the effect to the player, not sure which is more appropriate but neither seems to actually cause time to slow for me even with a lengthy duration and fiddling with the magnitude value. Second, it's not clear to me what the magnitude represents. I assume it's "how much" to slow time, but since I can't get the effect to apply I'm unsure whether a higher or lower value is slower (I've tried anywhere between 0.1 and 1.0). Does anyone have working examples they can share of slowing time briefly from a script? Thanks in advance!
Guest Posted July 23, 2022 Posted July 23, 2022 On 7/18/2022 at 10:19 AM, vaultbait said: Second, it's not clear to me what the magnitude represents. I assume it's "how much" to slow time, but since I can't get the effect to apply I'm unsure whether a higher or lower value is slower (I've tried anywhere between 0.1 and 1.0). Value is a direct application of the same effect that the console command 'sgtm' uses. 0.5 is half speed.
vaultbait Posted July 23, 2022 Posted July 23, 2022 (edited) 2 hours ago, Etrius vanRandr said: How do I make a button spawn an NPC once? If what you mean by "spawn" is create a new Actor ref from an ActorBase form, I would probably attach a script like this to an activator with a button-like mesh: Scriptname SummonButton extends ObjectReference Form Property SummonedActor Auto Const Bool AlreadyDone = false Event OnActivate(ObjectReference akActionRef) if AlreadyDone Return EndIf If (akActionRef == Game.GetPlayer() as ObjectReference) Self.PlaceActorAtMe(SummonedActor) AlreadyDone = true EndIf EndEvent If you have an existing unique actor already present somewhere in the world, then you probably want to have your script call its MoveTo() method instead. Also if you want to have the NPC appear at a specific spot instead of just "near" where the button is located, add a marker object in the required position and use it instead of Self. Edit: Also, note this isn't "once" globally, but rather once per each instance of the button that script is attached to. I'd probably put the done bool in a quest stage or a global variable instead if it needs to be once ever. Edited July 23, 2022 by vaultbait
Guest Posted July 23, 2022 Posted July 23, 2022 5 hours ago, vaultbait said: - What I want to do is set it up to enable the actor. I only want one spawned once. The intent is a boss fight with a vertibird air drop, so I can just place the actor up high in power armor so they do the Superhero Landing (TM) and set the "Initially Disabled" flag. I also have a quest in progress following a tutorial to start after level 50 but I have no fucking idea what I'm doing so I can use a little help with that.
vaultbait Posted July 24, 2022 Posted July 24, 2022 2 hours ago, Etrius vanRandr said: What I want to do is set it up to enable the actor. I only want one spawned once. The intent is a boss fight with a vertibird air drop, so I can just place the actor up high in power armor so they do the Superhero Landing (TM) and set the "Initially Disabled" flag. I also have a quest in progress following a tutorial to start after level 50 but I have no fucking idea what I'm doing so I can use a little help with that. You could place the actor with the CK and set the ref as initially disabled, then your activator script can just do something like: Scriptname SummonButton extends ObjectReference Actor Property BossWave Auto Const Furniture Property BossFrame Auto Const Bool AlreadyDone = false Event OnActivate(ObjectReference akActionRef) if AlreadyDone Return EndIf If (akActionRef == Game.GetPlayer() as ObjectReference) BossWave.SwitchToPowerArmor(BossFrame) BossWave.Enable() ; docs say do this after switching AlreadyDone = true EndIf EndEvent To be fair, I've only just started delving into Papyrus over the past couple of weeks, so this is probably a very hacky approach. I've not done anything with power armor frames in script other than forcing NPCs out of them, so the above is a bit of a guess based on the CK docs. Presumably you also want the PA frame initially disabled too? You can probably enable it in the script but I don't know if you need to do that before switching the actor into it or not. You'll probably need to experiment.
Guest Posted July 24, 2022 Posted July 24, 2022 3 hours ago, vaultbait said: I've not done anything with power armor frames in script other than forcing NPCs out of them, so the above is a bit of a guess based on the CK docs. Presumably you also want the PA frame initially disabled too? Actors have PA furniture assigned to them and will automatically be inside them if placed in the editor. Download my Wastelanders mod and check out the Black Knight; he's placed in the editor without it but if you coc to him ingame he will already be wearing it; Danse is the same way - placed in the editor without. I'll experiment and report back.
vaultbait Posted July 26, 2022 Posted July 26, 2022 On 3/20/2022 at 9:28 PM, vaultbait said: Apologies if this is a totally n00b Q, I've finally just fired up the CK for the first time recently... I'm trying to set up an idle marker to make a human female NPC stand around with hands bound behind the back. There seems to be some vanilla pose for it because applying the DefaultCaptiveActor script will put her into it, but I don't want the captive freeing activator which goes along with it. Is there a way to just make an NPC idle with bound hands in a standing position without adding a custom script? I see I can set the FlavorAnim on a custom idle marker to AnimFlavorHandsBound but that doesn't seem to actually do anything, she stands at the marker if assigned to it, but not bound, and I've run out of good web search keywords at this point. After pulling my hair out over this for, well, 4 months and change, I think I know what's happening. AnimFlavorHandsBound is only used by kneeling prisoner idles and was a red herring. I'm pretty sure what's actually been happening when applying the DefaultCaptiveActor script is that I've been playtesting with the Real Handcuffs mod installed, and did not realize it patches the vanilla DefaultCaptiveActor script to add its handcuffs on the NPC to which it's applied. Kudos to Kharos for making something so seamless I mistook it for part of the original game! Anyway, at this point it's quite trivial for me to add a soft integration for RH in the mod I'm making and just put the handcuffs on the NPC if it's installed, so at least I have a path forward now and can finally start to regrow some lost hair. ?
Guest Posted August 1, 2022 Posted August 1, 2022 Can anyone help me out with playing animations through papyrus? I would assume I'm trying to do something fairly simple, but I'm kind of lost as to why it won't work. What I'm trying to do is: Actor plays animation where they are knocked down/sit down on the ground/lie down on the ground -> Things happen for a bit (this bit works just fine) -> Actor gets back up and can continue doing whatever it is they were doing. Code boils down to: ActorRef.PlayIdle(Knockdown) ; Stuff happens in between. This works fine... then after a while: ActorRef.PlayIdle(GetBackUp) ;I've also tried playing the idleStop or SharedCoreIdleStop idle before or after the getbackup idle, but it doesn't seem to stop anything. ;ActorRef.PlayIdle(IdleStop) I've tried this with the EssentialDownStart and EssentialDownEnd_NonCombat idles, but the actor keeps playing the downed anim and never gets up. If it's the player you can click to get out of it, but NPCs won't do that, of course. I also tried the SharedKnockDown and SharedGetUp idles, which does play the get up animation, but it roots the actor in place after they get back up. They can look around and jump, but not move. Anyone have any ideas?
vaultbait Posted August 9, 2022 Posted August 9, 2022 On 7/7/2022 at 9:08 PM, vaultbait said: The mod I'm working on has accumulated a number of perks which activate abilities or scale effects based on whether the player is wearing things on the underarmor and body armor slots (36-45). My initial implementation uses sets of vanilla condition checks for WornCoversBipedSlot, but as I'm adding more effects and weapons which will be based on similar data From some of the warnings in the CK wiki I'm getting the sinking feeling that I'm going to contribute adversely to load on the game engine when lots of these are being done simultaneously, but I'm also wary of falling into the trap of premature optimization. Should I be looking at creating my own Papyrus functions which perform those groups of checks and then call one of those functions in a single condition instead, or is the resulting load going to be roughly the same either way? Does the script engine cache call results at all? Would it be a good idea to have some sort of maintenance script implement a call cache into some globals and then check those from conditions instead? Or are there already other standard ways mod developers handle these situations? I've gotten to the point where I'm starting to dig deeper on this task, and it's become readily apparent that there's no direct analog of the WornCoversBipedSlot condition available in Papyrus. Because the only slot which a worn item will show up in when calling Actor.GetWornItem() is it's "highest" slot, it looks like my best option is to loop through every slot (even ones I don't care about), and for each item returned call the undocumented GetSlotMask() method, then do filter math to compare to a mask of slots I actually care about. Is that correct? Is there a simpler solution I'm missing?
EgoBallistic Posted August 9, 2022 Posted August 9, 2022 1 hour ago, vaultbait said: I've gotten to the point where I'm starting to dig deeper on this task, and it's become readily apparent that there's no direct analog of the WornCoversBipedSlot condition available in Papyrus. Because the only slot which a worn item will show up in when calling Actor.GetWornItem() is it's "highest" slot, it looks like my best option is to loop through every slot (even ones I don't care about), and for each item returned call the undocumented GetSlotMask() method, then do filter math to compare to a mask of slots I actually care about. Is that correct? Is there a simpler solution I'm missing? That’s how I am doing it. Kind of a pain but it’s the best way I’ve found to detect item slot conflicts between arbitrary items.
vaultbait Posted August 9, 2022 Posted August 9, 2022 9 hours ago, EgoBallistic said: That’s how I am doing it. Kind of a pain but it’s the best way I’ve found to detect item slot conflicts between arbitrary items. Thanks for confirming. The next question then is with regards to efficiency... is calling whatever function I build to do this from multiple perk conditions and item enchantments likely to cause heavy script load, what with the repeated looping? This is all because I'm already worried that long lists of WornCoversBipedSlot conditions for these sorts of things may be too heavy (the CK docs even warn against long condition lists), but I wonder if this approach will necessarily be any better in that regard. Should I be considering running it asynchronously and updating a global I can compare in conditions instead, or are there other tricks seasoned modders use to avoid these sorts of problems?
EgoBallistic Posted August 9, 2022 Posted August 9, 2022 49 minutes ago, vaultbait said: Thanks for confirming. The next question then is with regards to efficiency... is calling whatever function I build to do this from multiple perk conditions and item enchantments likely to cause heavy script load, what with the repeated looping? This is all because I'm already worried that long lists of WornCoversBipedSlot conditions for these sorts of things may be too heavy (the CK docs even warn against long condition lists), but I wonder if this approach will necessarily be any better in that regard. Should I be considering running it asynchronously and updating a global I can compare in conditions instead, or are there other tricks seasoned modders use to avoid these sorts of problems? I can't say too much knowing more about what you are doing, but in general CK conditions are much faster than the equivalent script code. Conditions run in the game engine, while scripts run in the Papyrus VM and have to reach into the game to access data so there is a lot more overhead. It is possible to make optimizations in scripts that can cut down on a lot of that overhead, though, so again it depends on what exactly is happening.
vaultbait Posted August 9, 2022 Posted August 9, 2022 54 minutes ago, EgoBallistic said: I can't say too much knowing more about what you are doing, but in general CK conditions are much faster than the equivalent script code. Conditions run in the game engine, while scripts run in the Papyrus VM and have to reach into the game to access data so there is a lot more overhead. It is possible to make optimizations in scripts that can cut down on a lot of that overhead, though, so again it depends on what exactly is happening. Currently I have three perks, one of which activates some bonuses/penalties via entry point and ability (spell) perk entries if the character is not wearing power armor nor anything covering slots 36-40 (checking each of those slots is a separate condition rule), another perk for no power armor nor slots 41-45, and a third perk for no power armor nor slots 36-45 (these three perks are cumulative). The entry point perk entries can have condition lists applied directly, while the ability entries need condition lists for each separate effect for their spells. With all three perks applied, that's on the order of 150 conditions in aggregate being checked continuously to determine which of various abilities and spell effects should be active. I want to apply the same sorts of checks to enchantments and attacks with some weapons, as part of a new legendary effect, so am becoming concerned that these condition checks are piling up quickly. As I said earlier I'm also wary of prematurely optimizing for this, as the game engine is a bit of a black box so I really don't know if what I've added so far has had any real performance impact. I also playtest on a fairly beefy machine, therefore may not observe regressions others could see on older hardware once I publish the mod.
EgoBallistic Posted August 9, 2022 Posted August 9, 2022 29 minutes ago, vaultbait said: Currently I have three perks, one of which activates some bonuses/penalties via entry point and ability (spell) perk entries if the character is not wearing power armor nor anything covering slots 36-40 (checking each of those slots is a separate condition rule), another perk for no power armor nor slots 41-45, and a third perk for no power armor nor slots 36-45 (these three perks are cumulative). The entry point perk entries can have condition lists applied directly, while the ability entries need condition lists for each separate effect for their spells. With all three perks applied, that's on the order of 150 conditions in aggregate being checked continuously to determine which of various abilities and spell effects should be active. I want to apply the same sorts of checks to enchantments and attacks with some weapons, as part of a new legendary effect, so am becoming concerned that these condition checks are piling up quickly. As I said earlier I'm also wary of prematurely optimizing for this, as the game engine is a bit of a black box so I really don't know if what I've added so far has had any real performance impact. I also playtest on a fairly beefy machine, therefore may not observe regressions others could see on older hardware once I publish the mod. Oof, that does sound like a lot of checks running all the time. At that point it might be better not to put conditions on the perks / abilities and instead use Actor.OnItemEquipped / OnItemUnequipped (for weapons and normal armor) and OnSit / OnGetUp (for power armor) on an alias. You can then have a single function that checks the actor with nested Ifs, starting with IsInPowerArmor() and going from there. This way the checks only run on an event-driven basis, which is relatively rare in the scheme of things.
vaultbait Posted August 9, 2022 Posted August 9, 2022 3 hours ago, EgoBallistic said: Oof, that does sound like a lot of checks running all the time. At that point it might be better not to put conditions on the perks / abilities and instead use Actor.OnItemEquipped / OnItemUnequipped (for weapons and normal armor) and OnSit / OnGetUp (for power armor) on an alias. You can then have a single function that checks the actor with nested Ifs, starting with IsInPowerArmor() and going from there. This way the checks only run on an event-driven basis, which is relatively rare in the scheme of things. Thanks, those seem like excellent suggestions. Should I have the event-driven checks set global variable values, and then put the effects conditional on those? Just wondering if that's less likely to leave persistent side effects if the player uninstalls mid-game? Not that I intend to imply uninstalling something like this is safe, but just trying to keep the implementation as clean as I can anyway...
EgoBallistic Posted August 10, 2022 Posted August 10, 2022 18 hours ago, vaultbait said: Thanks, those seem like excellent suggestions. Should I have the event-driven checks set global variable values, and then put the effects conditional on those? Just wondering if that's less likely to leave persistent side effects if the player uninstalls mid-game? Not that I intend to imply uninstalling something like this is safe, but just trying to keep the implementation as clean as I can anyway... I think the globals are a neater solution than having the checking script apply the effects directly. Makes it easier to add or remove effects later since you wouldn't have to modify the scripts.
vaultbait Posted August 10, 2022 Posted August 10, 2022 13 minutes ago, EgoBallistic said: I think the globals are a neater solution than having the checking script apply the effects directly. Makes it easier to add or remove effects later since you wouldn't have to modify the scripts. Great, I'll definitely do it that way. Thanks again! 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now