Jump to content

Detecting crafting and workbench type.


Recommended Posts

I dont think those keywords (WI) are linked to animations. But IsBlacksmithForge, for instance, is a keyword used in animations. As is IsEnchanting etc.

 

Looking at the uses for this keyword brings up it is used in the idle blacksmith forge root. Which is Character/idle anim/ActivateRootChar/chair/blacksmithForgeRoot.

 

Clicking on the root shows the condition of the keyword. IsBlackSmithForge.

 

Not sure if that was what you were after, but thought I would put it down anyway.

Link to comment
Share on other sites

Hello, thought I'd give my take. As an alternative, you can use a perk with a perk fragment script. Add it to the player With PlayerRef.AddPerk(MyPerk).

 

In your perk, make a new perk entry. Set it to Entry Point, Activate, Add Activate Choice and check the Run Immedately box.

 

Add a keyword to Target, HasKeyword CraftingSmithingForge == 1

 

Then, in your perk fragment you can do:

 

Debug.Notification(akTargetRef.GetDisplayName() + " Was Activated")

 

The perk entry will run whenever the player activates an object reference with the CraftingSmithingForge keyword.

Link to comment
Share on other sites

It has been a while, is there any conflict between multiple mods using perk entry points for activation? When I was working on my inventory management mod, I was told that it was an option but that another mod also used it and mine would conflict. Thus when I rebuilt it, I did not continue with that route. It might have been that I wanted my stuff to take place at every activation rather that at a specific choice in a menu. Its one thing to loot and then feed on a corpse. It is a totally different thing to activate a workstation choice for one mod when multiple mods might need to know when the workstation is activated. Not sure if perk entry point is the best solution for this scenario.

Link to comment
Share on other sites

It has been a while, is there any conflict between multiple mods using perk entry points for activation? When I was working on my inventory management mod, I was told that it was an option but that another mod also used it and mine would conflict. Thus when I rebuilt it, I did not continue with that route. It might have been that I wanted my stuff to take place at every activation rather that at a specific choice in a menu. Its one thing to loot and then feed on a corpse. It is a totally different thing to activate a workstation choice for one mod when multiple mods might need to know when the workstation is activated. Not sure if perk entry point is the best solution for this scenario.

 

I tested this out actually, and it doesn't conflict. I used this method in a recent mod of mine to detect when the player opens a container. I made another esp with another perk that had basically the same entry and put debug notifications in both fragments. With both esps active, I got notifications from both perk entries when activating a container.

Link to comment
Share on other sites

Well, the best and less process expensive way would be to create a DLL that runs a reverse 'Activation Event' to detect the furniture activation by the player and runs on the player, for example:

Instead of

Event OnActivate()

To

Event WhenPlayerActivates()


But, our fellow modders have already gave you some soutions that you can work on.

Link to comment
Share on other sites

Potentially helpful calls

 

HasKeywordString("CraftingTanningRack") etc

 

Keyword ABC123 = Keyword.GetKeyword("CraftingSmelter") etc

 

GetFurnitureReference()

 

OnMenuOpen() though this one needs registration

 

If sit counts like in other capacities it can overlap with other furniture use, not sure on crafting... Event OnSit(ObjectReference akFurniture)

 

IsFurnitureMarkerInUse()

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...