Jump to content

[LE] renaming weapon rack actvators


Recommended Posts

I am building a mod that has spaces for all vanilla weapons.

 

I want to have weapon racks that show the name of the weapon that goes there. ie: "Iron Sword Weapon Rack" instead of just "Weapon Rack"

 

To do this i duplicate WeaponrackmidActivatorplayerhouse, rename the editor id and name, and link it to a weaponrackmid object and vice versa.

 

however in-game, it shows the new name and everything, but it can't seem to activate.

 

as far as i can tell the new weaponrackmidActivatorplayerhouse is identical to the vanilla version in every way but name.

 

so how come it wont activate and take my weapon?

Link to comment
Share on other sites

Yes, I was able to create a normal weapon rack by following the "Creating a weapon Mount" guide on creationkit.com

 

The issue seems to be with the editor id. I'm thinking that a script somewhere is looking for a vanilla Id but finding the new one and not knowing what to do with it.

Link to comment
Share on other sites

I think we need someone better with papyrus than I am. I did what you're doing yesterday with the same result. I even added a weapon directly to the rack in CK. COCing into my test cell made the weapon fall to

the floor from the rack.

 

I read through the scripts on the activator and rack but can see no reason why renaming the items would cause a problem, unless it's to do with the part that checks WTrigger.

 

The weapon racks, plaques etc have always been buggy, though. You activate the activator and that in turn activates the rack, if there's no weapon on it. then when the weapon is dropped from the player's inventory and is 'attached' to the rack, the activator is disabled. At this stage it disables havoc on the weapon. It looks like this part of the script is where the problem is. The renamed activator is not recognizing the renamed rack and vice-versa.

 

As an alternative, you could set up a rack with a hidden chest that uses formlists to check if the player is trying to put the right type of weapon onto the rack. If they are, it removes the object from the player inventory and stores it in the hidden chest and enables the appropriate weapon from the formlist, which is a static version of the sword that you position on the rack in CK. Using the activator to remove the weapon takes it back from the chest and disables the static display weapon. It looks the same as the original racks but it's not using the dodgy weapon rack script. Darkfox127 did a tutorial on custom displays that may be useful here.

 

https://www.youtube.com/watch?v=oM3pBqQ1Ai0

 

This approach uses formlists to make it impossible for the player to add an ebony sword or glass mace to your steel sword rack. Even if you get the original idea to work, you'd have to make a copy of the vanilla script and radically alter it to ensure that such a thing could not happen. If you open the vanilla script, you'll see that it's set up to accept all the weapons with the 'correct' keyword. You'd have to make it that it displayed the 'wrong weapon type' message for each of the types other than steel swords.

 

I'll take a look at the alternative approach now because I want to add a display that works like this for the Bloodskal sword... it always falls off vanilla weapon displays! If I crack it I'll let you know what I did and you can see if it's appropriate for what you're trying to do. Once we have the principle right, it shouldn't take much to make individual racks for all other weapons because we'll just be altering properties on scripts that we add to each rack locally.

Link to comment
Share on other sites

I've got this to work with the bloodskal blade.

 

The way I did it was to rename an empty chest and attach a script to the chest that allowed the player to open the chest and only store or remove the bloodskal blade. This may not be quite what you want but it's as close as I've got. I changed the mesh for the chest so that it looked like a weapon plaque. I then made a new static item and gave it the nif of the bloodskal blade.

 

The script uses two properties. One is a weapon property for the bloodskal blade in the player inventory. The other is an object property for the static version of the weapon that gets displayed on the plaque. This is the script

 

Scriptname MBSFUniqueWrackScript extends ObjectReference

{Checks if the player has a specific item and stores it in a chest. The chest is actually an empty chest with the nif of whichever display you want to use}

 

ObjectReference Property MyStaticDisplayItem auto

Weapon Property PlayerInventoryItem auto

 

Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)

 

If akBaseItem == PlayerInventoryItem

MyStaticDisplayItem.Enable()

Else

RemoveItem(akBaseItem, aiItemcount, True, akSourceContainer)

Debug.Notification("That item can't be used here")

EndIf

 

EndEvent

 

Event OnItemRemoved(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)

 

If akBaseItem == PlayerInventoryItem

MyStaticDisplayItem.Disable()

Else

EndIf

 

EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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