-
Posts
46 -
Joined
-
Last visited
Everything posted by tsdobbi
-
SSE Duplicating cells and modifying them.
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
So yeah, for my purposes I am just duplicating existing cells. I have no intention of actually modifying their appearance, save for disabling the functionality of the doors etc. The only intention of this is so they player and NPC have a private location to do battle. (basically player and NPC agree to fight to the death, the premise is the go to a private location to fight I teleport them there when combat is agreed, then teleport the player back to the starting location when the fight is over.) I more or less just wanted to make sure deleting any quest related stuff etc. in the duplicate wasn't impacting the quest since it was shooting out warnings at me when deleting the stuff in the CK. In at least one case I confirmed it isn't (I use a duplicate the Markarth Warrens as one of the locations) and did the quest and didn't see any unwanted side effects. -
SSE OnSingleUpdate firing constantly (when it shouldn't)
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
I agree with you I (hope) that the change to the script in a save where it was already introduced was the cause. (Mainly because as far as I understand it, I use register for single update correctly in this case). Quick Q, if you have this level of understanding of it, just trying to understand how the updates work. 1. As far as I understand it, you should ALWAYS use register for single update where possible. 2. As far as running the first update from "OnInit". I assume this runs every time the game loads. So my question is, I load the game and save a few minutes later. There was an update registered (and it was in the process of waiting for the count to tick down). When I load the save again, onInit registering an update when you load into the game as I understand. So the update that was registered before the save, is that still there and running in parallel to the new registered update from onInit when I loaded the game? In summary, would constantly loading and making new saves be propagating registered updates running in parallel or can there only every be one running for a specific script with registerForSingleUpdate. (i.e. should "checking" if an update is already registered be something we do here? I want to know if what I am doing is considered bad practice. -
SSE OnSingleUpdate firing constantly (when it shouldn't)
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
I didn't change the properties at all (I just double checked them in the CK to make sure they were correct). All I did was change the registerForSingleUpdate from 1200 to 30 and added a debugMessageBox so I knew when it triggered. So I did a few tests: 1. New Game - Script is executing as expected. 2. reloaded a save (a couple of saves after I added this script) again functioning as intended (even with the change to 30 second updates and adding the debug box) its triggering an update every 30 seconds. 3. any more recent save. It's totally screwed and constantly firing updates and not reporting the correct value for the player having the perk. I get that the "orginal script" may be baked into the save, but the behavior of the script at this point is making zero sense even in that regard. i.e. I don't think the change to the update seconds and adding the debug box caused this problem. I think it revealed a problem. (because I loaded an earlier save, that already had the script loaded, with those same changes and it didn't cause the same behavior, only recent saves display this behavior). I think one further test I am going to do is to load a new game and just let it run for like 3-4 hours with debug notifications and see if at any point it just starts spamming notifications indicating its in the broken state I was seeing. -
Basically this on update should fire every 1200 seconds. i.e. it should be onInit update will fire in 1200 seconds. update fires (performs logic) registers for another single update in another 1200 seconds. I put a debug message box at the beginning of the update and its literally firing non stop. (I have to literally close the game from task manager because I cant get out of the dialogue box to get to the menu it happens so fast). For reference, the script is attached to an Xmarker I placed. (FYI this script worked fine and wasn't doing that when I initially made the script, the update was firing when it should, confirmed by a debug mbox) I wanted to test a change to the NPC that gets spawned, so I lowered the update time to 30 seconds and thats when I noticed this happening. I'm assuming maybe there is something I don't understand about updates and if "over time" something is breaking. What is also disconcerting is the logic isn't firing correctly either. (i.e. its reporting the player having the perk as false...when it is true). Like I said, literally all I changed since it had been working was the seconds for the registerForSingleUpdate. The whole thing just seems to have imploded for no apparent reason. I have other scripts (attached to NPC's and the Player alias) that use similar functionality and are not breaking like this, and have been running far longer (i.e. OnInit register for single update > do stuff > register for another single update) including using the if(Game.GetPlayer().HasPerk(Perk)) to check if the player has a perk and it's reporting correctly. For some reason this script just stopped working (isn't reporting correct values, executing updates way too fast etc.). Reconfirmed the properties for the script were set up correctly (i.e. the perk is pointing to the right perk). I'm curious if attaching it to the Xmarker is the cause of the issue. Scriptname InitSpawn extends ObjectReference import game import debug import utility import sound event OnInit() RegisterForSingleUpdate(1200) gotoState("waiting") endEvent STATE waiting Event OnUpdate() if(active == false) if(Game.GetPlayer().HasPerk(Perk)) SpawnNPC(NPC) endif endif deadCountUpdate = currentActiveNPC.GetDeadCount() if(deadCountUpdate > deadCount) active = false EndIf RegisterForSingleUpdate(1200) EndEvent endSTATE STATE done endSTATE function SpawnNPC(ActorBase target) currentActiveNPC = target startMarker.PlaceActorAtMe(target,3) active = true deadCount = currentActiveNPC.GetDeadCount() EndFunction
-
SSE Duplicating cells and modifying them.
tsdobbi posted a topic in Skyrim's Creation Kit and Modders
So I am duplicating existing cells and modifying them to save work. Question, some things I try to delete from the duplicated cell freak out about being "used". i.e. if I attempt to delete a patrol path it will give me a warning about it being used. My question is, is it safe to delete things in a duplicated cell. (i.e. can I ignore the fact the CK is telling me something is in use). I'm basically using the cells as essentially, stages almost like in a fighting game. The player and NPC will be transported there for battle. Then the player will be teleported back to their original location. So I am wanting to delete (spawn points, patrol paths etc. Anything that is un-needed). -
SSE Maybe an easy question "renaming a cell"
tsdobbi posted a topic in Skyrim's Creation Kit and Modders
I duplicated a cell to modify. However, there doesn't seem to be a way to rename it? i.e. right now it is "CellNameDUPLICATE001", there doesn't seem to be anywhere to change this name. NM, I swear I tried this already, but if you click and hold on the name in the cell view list, it lets you refill it. -
I got it working, the key was actually to just set the actor to not be able to recover period, and never set it to false and just handle the recovery myself in the script.
-
Unfortunately, that didn't work. In fact it had the opposite affect. It was causing the player to instantly recover every time. I wonder if it has something to do with the fact I am manually restoring the players health and not letting the bleedOut run its course.
-
Thanks. I saw that before, but wasn't clear on what exactly it did.
-
SSE Can't add NPC's to a leveled List that have a script?
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
What I ended up doing was just writing a script to spawn them using a random number generator to make then vary. -
I basically have a script, for a start (i intend to do other things with it). I am just seeing some weird behavior. So setting the PC to essential. When the PC gets their health knocked to 0 and triggers the OnEnterBleedOut() I fade the screen to black, wait 20 seconds then fade back in and heal the player character to 100 to bring them out of bleed out. Event OnEnterBleedout() Game.DisablePlayerControls() FadeToBlackAndHold() Utility.Wait(20) FadeFromBlack() Game.GetPlayer().RestoreActorValue("health", 100) Game.EnablePlayerControls() endEvent if I load up a game, get myself knocked down, everything works as expected. Player on their knees, fades to black, 20 seconds pass, screen fades back in, players health is restored and they get up and move. The issue is, any subsequent times the player gets knocked down. So if I get knocked out a second time. The Player only falls to their knees for a split second then instantly recovers. (The code in enter bleed out still executes, its just that the player is standing up and at full health the whole time). (I commented out the fade in/fade out to properly observe this ) and sure enough the first time I get knocked out, on my knees till the code finishes. Any subsequent knockouts, my chatacter drops to his knees for a split second then his health is restored and hes up. So i am trying to figure out why after getting knocked down the first time, any subsequent times the player instantly recovers from bleed out.
-
SSE respawn check box in NPCs.
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
Ok from what I can see exterior cells reset every 30 days. So a NPC placed in an exterior cell with respawn checked, should respawn 30 days after death. I just wanted to make sure it didn't need to be tied to a respawn zone or something. -
SSE Can't add NPC's to a leveled List that have a script?
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
To clarify 'LVLVigilantOfStendarr' does have a script attached, but if I look at the use info it is not in any leveled character lists. -
If I create an NPC, tick the respawn check box. If I just place it in the world, and it's killed, will it eventually respawn or is there anything else you have to do?
-
I created a script and attached it to the NPC . With the onInit its basically checking if the player (when the player has a specific perk) is in X range of the npc roughly every second. If the conditions are met the sound plays on the player. (and once the sound plays it wont repeat while the player is still in range, if the player leaves the range and comes back it will play again). Scriptname ImmortalBuzz extends Actor import game import debug import utility import sound event OnInit() RegisterForUpdate(1) gotoState("waiting") endEvent STATE waiting Event OnUpdate() if (Game.GetPlayer().GetDistance(Self) < TriggerDistance) if(Game.GetPlayer().HasPerk(HDRImmortal)) if(playSound == true) PlaySoundEffect(Game.GetPlayer()) playSound = false endif endif Else playSound = true endif if(Self.IsDead()) UnregisterForUpdate() GotoState("done") ; Switch to a state that doesn't use OnUpdate() EndIf EndEvent endSTATE STATE done endSTATE function PlaySoundEffect(Actor target) HDRImmortalBuzz.play(target) EndFunction float Property TriggerDistance = 900.0 Auto Sound property HDRImmortalBuzz auto Perk Property HDRImmortal Auto bool Property playSound = true Auto
-
SSE Can't add NPC's to a leveled List that have a script?
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
Im inclined to think it doesn't, because if I remove the script I can add it to a lvled list. If I add the script back I cant. The only difference is the script being there or not. -
SSE creation kit wont open with reshade installed
tsdobbi replied to bloodritual1974's topic in Skyrim's Creation Kit and Modders
It depends on what you are using from my understanding. I had this issue once, it was linked to a specific file (dxgi.dll) or something of the sort. I would just move it to a different folder when using the CK and move it back when playing. -
I am creating a new leveled list of custom NPC's. Basically just following how the bandits are done. My NPC's have a script attached to them. When I first created the leveled list and tried to add them via the object list, they didn't show up. So I did some playing around and found, it I removed the script, they could be added to the leveled list. I'm guessing it's impossible to have NPC's with a script added to a leveled list? Which would suck, because the script is kind of needed for what I am trying to achieve. Basically, kind of like a bounty hunter, a leveled NPC will hunt down the player. However I have a scripted event for the onDeath of the NPC.
-
Overview: when the player is in range (lets say 400) of an NPC with X perk I want to trigger a sound. I created a castable detect life essentially that does this. (valid targets are only npcs with the perk) (i.e. when I cast it, it plays the sound when the specific NPC's are within the radius by putting the sound in the "on hit" of the magic effect). I tried essentially making the magic effect a "constant effect" instead of fire and forget and attached it to a constant effect ability that is added to the player. But it doesn't do anything, I assume because nothing is actually "casted". I am guessing maybe I can attach a script to the constant magic effect to achieve this.
-
SSE Decap with 2h axe not working in script.
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
Thanks for your help. So you definitely solved one problem I was working on, on the side. i.e. There is definitely some hard coded conditions for animations (positioning, distance etc), that you can't just remove in the CK. So the way I had it before it worked like 95% of the time, but sometimes the animation (for any of the approved weapons) just wouldn't trigger and the NPC would get set as not essential and just die without the animation loading. However, putting the play idle animation in the if statement ensures the NPC won't die until the animation actually plays, essentially making sure the NPC wont die unless they are decapped which was the goal, so it may take a couple extra hacks to get it to trigger, but it gets the job done. I put a debug message box in an else on the playwithidle if statement and below for battle axe it is always failing (if the animation passed in is ANY of the 2h decap animations) , if I go into the CK and point the 2hAxe idle properties to 1h decap kill moves it works fine. So it isn't a matter of the script itself executing the code for the battle axe, the PlayIdleWithTarget just doesn't work when you have a battleAxe equipped and the animation is any 2h decap animation. I assume there is some underlying condition I cant see in the CK for the animation to proc. For clarity I made duplicates of all the Decap kill moves in the CK and removed the conditions from them (i.e. perk requirements etc). I've tried all the 2h decap animations with a battle axe and the play with idle just never procs, but if I give it a 1h decap animation it works every time. (I've had no such issues with the Greatsword, the 2h animations seem to work just fine with them). Function DecapAnim(Actor pRef, Idle akIdle) if pRef.PlayIdleWithTarget(akIdle, Self) gotoState("Done") wait(3) Self.GetActorBase().SetEssential(false) Self.KillEssential(pRef) else Debug.MessageBox("Animation Failed") endIf endFunction -
SSE Decap with 2h axe not working in script.
tsdobbi replied to tsdobbi's topic in Skyrim's Creation Kit and Modders
Apologies. This block of ifs never gets hit if it doesn't aleady verify that the NPC was hit with one of these weapons. i.e. Im not messing with the killmove system at all, this is basically an independent kill move system. Heres the if blocks before this code is executed. Actor PlayerRef = Game.GetPlayer() bool IsImmortal = false if(PlayerRef.HasPerk(Immortality)) IsImmortal = true endif if (akAggressor == PlayerRef && IsImmortal == true) float immortalHealth = Self.GetActorValuePercentage("health") If (immortalHealth < 0.2) if (akSource.haskeyword(WeapTypeSword) || akSource.haskeyword(WeapTypeGreatSword) || akSource.haskeyword(WeapTypeWarAxe) || akSource.haskeyword(WeapTypeBattleAxe)) When playIdleWith is played it forces the killmove 100% (or should). The problem is the in game animation for 2h weapon decaps, doesn't work on the battle axe weapon (although the 1h animation does work for 2h axes). you wrote: "if statements catch all. In case the player does hit with the right weapon, but for some reason it does not enter any of the killmove it should" This if statement "shouldn't" ever be executed. It will only execute if (activated == false) which would mean none of the animations were triggered, but they were hit with a sword or axe when health was below .2 Which should essentially be impossible since to get to this code it would have had to properly identify the weapon type as a sword or axe, meaning it should have entered one of the previous if statements and executed (and if it did activated would be true, so it wouldn't enter this if statement). i.e. it basically doesn't even need to be there because it shouldn't ever do anything. -
SSE Decap with 2h axe not working in script.
tsdobbi posted a topic in Skyrim's Creation Kit and Modders
So I have a script that "forces" decapitation of specific enemies that are using the script. I made duplicates of the "decap" idle animations for the purpose of removing the restrictions (I handle the restrictions in the actor script). for some reason the 2h Axe animation never triggers. (If I give the 2h axe kill move property a reference to the 1h animation it works fine (but is obviously using the 1h animation, which looks out of place all of a sudden swinging this lumbering weapon with speed and precision for the decap) So I know the logic for the 2h axe is getting triggered since if I assign the property like above it works (and when it is assigned to the 2h axe animation) the NPC just dies as their essential flag gets turned off). I've also tried pointing the 2h axe property to the animation for 2h swords (which works for 2h swords). I originally had the greatsword and battle axe in an or statement in the if so they would use the same animation. But it wasn't working for 2h axes. So I sought out the 2h animation that I assume is used for battle axes, it didn't work either. The only thing that works for battle axes so far is the 1h decap. So I am not sure if I am not finding the right animation or what or why the 1h decap works when you would think that one shouldn't. bool activated = false {play kill move decap for specific weapon types} if(akSource.haskeyword(WeapTypeGreatSword)) PlayerRef.PlayIdleWithTarget(KillMove2HS, Self) activated = true endif if(akSource.haskeyword(WeapTypeSword) || akSource.haskeyword(WeapTypeWarAxe)) PlayerRef.PlayIdleWithTarget(KillMove1HS, Self) activated = true endif if(akSource.haskeyword(WeapTypeBattleAxe)) PlayerRef.PlayIdleWithTarget(KillMove2HA, Self) activated = true endif {This if statement is a catch all. In case the player does hit with the right weapon, but for some reason doesn't enter any of the kill move ifs it will trigger the 1h kill move} if (activated == false) PlayerRef.PlayIdleWithTarget(KillMove1HS, Self) activated = true endif {when a decap animation is triggered activated should be true thus we wait for the animation to finish then remove the essential flag from the npc.} if(activated == true) wait(4) Self.GetActorBase().SetEssential(false) Self.KillEssential(PlayerRef) endif