Asterra Posted December 30, 2014 Share Posted December 30, 2014 SKSE must have some sort of way to return a formlist or array like GetInventory. I'd like to think so, yes. But it's well-hidden, and/or completely unused by anyone. Realistically my only resource for pinning this down is Google, and I get the vibe that it's literally impossible to know what's in the player's inventory, beyond specific checks for specific items. (And in my case, I would have to check for over 800 different items, not counting any added by mods.) Link to comment Share on other sites More sharing options...
Kerberus14 Posted December 30, 2014 Share Posted December 30, 2014 (edited) Where can I edit the attributes of the player? Things like HP Regen, Combat Regen and so on. http://static-2.nexusmods.com/15/mods/110/images/33395-1-1366419824.png Edited December 30, 2014 by Kerberus14 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 30, 2014 Share Posted December 30, 2014 SKSE must have some sort of way to return a formlist or array like GetInventory. I'd like to think so, yes. But it's well-hidden, and/or completely unused by anyone. Realistically my only resource for pinning this down is Google, and I get the vibe that it's literally impossible to know what's in the player's inventory, beyond specific checks for specific items. (And in my case, I would have to check for over 800 different items, not counting any added by mods.) The following function will scan the player inventory checking each item for the passed in keyword. Nothing is done with it once one is found. You'd need to add that depending upon your application. Function ScanPlayerInventoryForKeywordItems(Keyword TheKYWD) Int index = 0 Int ItemQTY = PlayerRef.GetNumItems() While index < ItemQTY Form Entry = PlayerRef.GetNthForm(index) If Entry.HasKeyword(TheKYWD) ;do something here EndIf index += 1 EndWhile EndFunction I should note, if you plan on removing these items from the player inventory... don't do it in the middle of the inventory scan. Instead use an empty formlist and add the items to that formlist. Then remove the formlist when the inventory scan is complete. If you remove an item in the middle of the scan it throws off the total index count and causes it to have a fit. Also you don't have to keep it as a function. I merely set it up like that cause I had no clue about events and such you are using. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 30, 2014 Share Posted December 30, 2014 Where can I edit the attributes of the player? Things like HP Regen, Combat Regen and so on.Those are actor values.You can use SetActorValue, ModActorValue, DamageActorValue, etc... Link to comment Share on other sites More sharing options...
Kerberus14 Posted December 30, 2014 Share Posted December 30, 2014 How do these things work? HealrateStaminaRateMagickaRate When I input a value to them(lets say 5) and their respective Multipliers are set to 1(NORMAL, supposedly), you would regen 500% or 50% of a BaseActorValue? What is the formula? Link to comment Share on other sites More sharing options...
Asterra Posted December 30, 2014 Share Posted December 30, 2014 The following function will scan the player inventory checking each item for the passed in keyword. Thanks as always. As usual it's a simple matter of knowing which functions to use. It was just amazingly hard to find anyone using them in scripts. ;p Link to comment Share on other sites More sharing options...
Asterra Posted December 30, 2014 Share Posted December 30, 2014 You know the bug you get when you use Debug.SendAnimationEvent? The one that can mess with the actor's animation state and cause wonkiness? Yeah, I seem to be having that problem. I play a certain animation and by the end of it, my character can no longer attack nor sheathe the weapon they're holding, either through scripts or in-game with the keyboard. Other movements / ducking / jumping still work. I already checked on bMotionDriven and bAnimationDriven and, yes, at the end of the animation event, bMotionDriven was stuck at "false", but correcting this did not fix the problem. Something else is causing this stuck state. Maybe another variable I don't know about. Experts, this one's for you! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 30, 2014 Share Posted December 30, 2014 How do these things work? HealrateStaminaRateMagickaRate When I input a value to them(lets say 5) and their respective Multipliers are set to 1(NORMAL, supposedly), you would regen 500% or 50% of a BaseActorValue? What is the formula? I don't know. You could break down the SkyTweak mod and see what that author did. Link to comment Share on other sites More sharing options...
lofgren Posted December 30, 2014 Share Posted December 30, 2014 If your cloak parameter spell has a concentration delivery type it should be reapplied every second. Is that not fast enough for you? Using cloak spells is pretty much the primary method for dealing with the situation you describe, but the effect will still be removed from followers if they leave the player's aura. It will just get reapplied instantly when they reenter it. Well here is the particular trouble I have. I've got a RegisterForSingleUpdate loop going in the effect's script. When the effect ends, the script is dead, and of course the single update doesn't do anything at that point. My dubious solution is to force the spell to re-apply itself in the OnEffectFinish function, and then watch for the case where the single update loop may have gotten interrupted and adjust accordingly. Yes I could start shunting NPCs into reference aliases but ultimately I would be limited by the number of slots and confounded by the extra maintenance required. All that just to prevent the script from turning itself off, which in my opinion a spell should not do just because of a location change. How are you applying the spell in the first place? I would recommend switching to a cloak spell on the player. That's the standard way of doing this. Link to comment Share on other sites More sharing options...
lofgren Posted December 30, 2014 Share Posted December 30, 2014 How do these things work? HealrateStaminaRateMagickaRate When I input a value to them(lets say 5) and their respective Multipliers are set to 1(NORMAL, supposedly), you would regen 500% or 50% of a BaseActorValue? What is the formula? 5% Link to comment Share on other sites More sharing options...
Recommended Posts