Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

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

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

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

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

How do these things work?

 

Healrate

StaminaRate

MagickaRate

 

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

 

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...