maxarturo Posted October 24, 2019 Posted October 24, 2019 Greenston please verify that you have a copy of the script before i start erasing all my posts, i wouldn't want to leave you hanging. I've decided to stop providing assistance anymore, share knowledge and know how, and keep spending my limited and precious free time. This is the last post i'll ever make again... at least with this account.
NexusComa Posted October 24, 2019 Posted October 24, 2019 I don't know why you would do that. Your viewpoint is always fresh and that script for the masks was great. Hell I even copied that one. Really like how you broke that down.
Greenston Posted October 25, 2019 Posted October 25, 2019 I've copied all the scripts, both yours and NexusComa's. It's really a shame to see you go, I'd reckon you would have answered a lot questions of mine regarding my Creation Kit journey in the future. :) Thanks again for the help, I really appreciate it. KR
Greenston Posted October 26, 2019 Posted October 26, 2019 So I've got another question. In the script that Maxarturo provided I get a message in the top left corner whenever Miraak's mask is removed or added back into the inventory.With the original script provided on the first page of this topic, I don't get that kind of message. For the sake of consistency I'd love to add that functionality to the ones without it too. Can Anyone help me with that? Thanks
IsharaMeradin Posted October 26, 2019 Posted October 26, 2019 On 10/26/2019 at 8:31 PM, Greenston said: So I've got another question. In the script that Maxarturo provided I get a message in the top left corner whenever Miraak's mask is removed or added back into the inventory.With the original script provided on the first page of this topic, I don't get that kind of message. For the sake of consistency I'd love to add that functionality to the ones without it too. Can Anyone help me with that? ThanksThe abSilent parameter of the RemoveItem function has a default value of false and as a result displays a notification message of the item being moved. If this parameter is given a value of true, the message is supressed. The same is true for the AddItem function. Example from the code on the first page:akActivator.RemoveItem(myObject,1,true,myHiddenContainer) ;put in containerakActivator is the container / inventory to remove the item frommyObject is the object being moved (akItemToRemove parameter)1 is the quantity (aiCount parameter)true is the message suppression status (abSilent parameter)myHiddenContainer is the destination container / inventory (akOtherContainer parameter) FYIIf the default value of a parameter will be used that parameter can be skipped. But when skipping parameters the following parameters need to be explicitly defined. See the following:SomeContainer.RemoveItem(SomeObject, abSilent = true)
wilwhitt56 Posted January 16, 2021 Posted January 16, 2021 (edited) Hi there, so for the script for placing an object (the first one from Ishara) do i need to place the ID's in between the parenthesis for it to work? ive never really scripted before. Perhaps an example, like for Ysgramor's axe? Edited January 16, 2021 by wilwhitt56
maxarturo Posted January 16, 2021 Posted January 16, 2021 (edited) @ wilwhitt56 - You need to press the 'Property' button and select / find from the 'drop down' menu the corresponding item that it will be removed from the player. - The static version of it, you click "Select Reference From Render Window" and select with your mouse the "Initialy Disabled" static. IsharaMeradin script will not work for what you want because it's for "MISC" items, you need the corresponding script for a weapon. For Armors: Reveal hidden contents ObjectReference Property ItemsContainer Auto {Assign the HIDDEN Container intended to hold the playable version - can use a shared container for multiple displays} ObjectReference Property StaticArmor Auto {Link REF the static ARMOR display object to enable} Armor Property ArmorToPlace Auto {The ARMOR to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(ArmorToPlace) >= 1 blockActivation() isPlaced = TRUE StaticArmor.enable() akActivator.RemoveItem(ArmorToPlace, 1, true, ItemsContainer) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticArmor.disable() ItemsContainer.RemoveItem(ArmorToPlace, 1, true, akActivator) blockActivation(FALSE) endif EndIf EndEvent For Books: Reveal hidden contents ObjectReference Property StaticBook Auto {Link REF the static BOOK display object to enable} Book Property BookToPlace Auto {The Book Item to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the Item in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(BookToPlace) >= 1 blockActivation() isPlaced = TRUE StaticBook.enable() akActivator.RemoveItem(BookToPlace, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticBook.disable() akActivator.AddItem(BookToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For Misc: Reveal hidden contents ObjectReference Property StaticMisc Auto {Link REF the static display object to enable/disable} MiscObject Property MiscToPlace Auto {The Misc Item to remove from inventory and place in the display} MiscObject Property MiscToPlace02 Auto {The Misc 02 Item to remove, made for the second Golden Claw} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if (akActivator.getItemCount(MiscToPlace) >= 1) || (akActivator.getItemCount(MiscToPlace02) >= 1) blockActivation() isPlaced = TRUE StaticMisc.enable() akActivator.RemoveItem(MiscToPlace, 1) akActivator.RemoveItem(MiscToPlace02, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticMisc.disable() akActivator.AddItem(MiscToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For SoulGems / Azura Star: Reveal hidden contents ObjectReference Property StaticSoulGem Auto {Link REF the static Soul Gem display object to enable} SoulGem Property SoulGemToPlace Auto {The Soul Gem Item to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) ; is the item placed? if akActivator.getItemCount(SoulGemToPlace) >= 1 blockActivation() isPlaced = TRUE StaticSoulGem.enable() akActivator.RemoveItem(SoulGemToPlace, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticSoulGem.disable() akActivator.AddItem(SoulGemToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For Weapons: Reveal hidden contents ObjectReference Property ItemsContainer Auto {Assign the HIDDEN Container intended to hold the playable version - can use a shared container for multiple displays} ObjectReference Property StaticWeapon Auto {Link REF the STATIC WEAPON display object to enable/disable} Weapon Property WeaponToPlace Auto {The WEAPON to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the Item in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(WeaponToPlace) >= 1 blockActivation() isPlaced = TRUE StaticWeapon.enable() akActivator.RemoveItem(WeaponToPlace, 1, true, ItemsContainer) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticWeapon.disable() ItemsContainer.RemoveItem(WeaponToPlace, 1, true, akActivator) blockActivation(FALSE) endif EndIf EndEvent Have a happy modding. Edited January 17, 2021 by maxarturo
wilwhitt56 Posted January 16, 2021 Posted January 16, 2021 (edited) On 1/16/2021 at 8:26 PM, maxarturo said: @ wilwhitt56 - You need to press the 'Property' button and select / find from the 'drop down' menu the corresponding item that it will be removed from the player.- The static version of it, you click "Select Reference From Render Window" and select with your mouse the "Initialy Disabled" static. IsharaMeradin script will not work for what you want because it's for "MISC" items, you need the corresponding script for a weapon. For Armors: Reveal hidden contents ObjectReference Property ItemsContainer Auto {Assign the HIDDEN Container intended to hold the playable version - can use a shared container for multiple displays} ObjectReference Property StaticArmor Auto {Link REF the static ARMOR display object to enable} Armor Property ArmorToPlace Auto {The ARMOR to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(ArmorToPlace) >= 1 blockActivation() count = count + 1 isPlaced = TRUE StaticArmor.enable() akActivator.RemoveItem(ArmorToPlace, 1, true, ItemsContainer) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticArmor.disable() ItemsContainer.RemoveItem(ArmorToPlace, 1, true, akActivator) blockActivation(FALSE) endif EndIf EndEvent For Books: Reveal hidden contents ObjectReference Property StaticBook Auto {Link REF the static BOOK display object to enable} Book Property BookToPlace Auto {The Book Item to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the Item in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(BookToPlace) >= 1 blockActivation() count = count + 1 isPlaced = TRUE StaticBook.enable() akActivator.RemoveItem(BookToPlace, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticBook.disable() akActivator.AddItem(BookToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For Misc: Reveal hidden contents ObjectReference Property StaticMisc Auto {Link REF the static display object to enable/disable} MiscObject Property MiscToPlace Auto {The Misc Item to remove from inventory and place in the display} MiscObject Property MiscToPlace02 Auto {The Misc 02 Item to remove, made for the second Golden Claw} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if (akActivator.getItemCount(MiscToPlace) >= 1) || (akActivator.getItemCount(MiscToPlace02) >= 1) blockActivation() count = count + 1 isPlaced = TRUE StaticMisc.enable() akActivator.RemoveItem(MiscToPlace, 1) akActivator.RemoveItem(MiscToPlace02, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticMisc.disable() akActivator.AddItem(MiscToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For SoulGems / Azura Star: Reveal hidden contents ObjectReference Property StaticSoulGem Auto {Link REF the static Soul Gem display object to enable} SoulGem Property SoulGemToPlace Auto {The Soul Gem Item to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the ITEM in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) ; is the item placed? if akActivator.getItemCount(SoulGemToPlace) >= 1 blockActivation() count = count + 1 isPlaced = TRUE StaticSoulGem.enable() akActivator.RemoveItem(SoulGemToPlace, 1) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticSoulGem.disable() akActivator.AddItem(SoulGemToPlace, 1) blockActivation(FALSE) endif EndIf EndEvent For Weapons: Reveal hidden contents ObjectReference Property ItemsContainer Auto {Assign the HIDDEN Container intended to hold the playable version - can use a shared container for multiple displays} ObjectReference Property StaticWeapon Auto {Link REF the STATIC WEAPON display object to enable/disable} Weapon Property WeaponToPlace Auto {The WEAPON to place in the display and remove from inventory} Message Property NoItemMSG auto {The message to show if the player doesn't have the Item in their inventory} Bool Property isPlaced = false Auto Hidden Event OnActivate(ObjectReference akActivator) If akActivator == Game.GetPlayer() if (isPlaced == FALSE) if akActivator.getItemCount(WeaponToPlace) >= 1 blockActivation() count = count + 1 isPlaced = TRUE StaticWeapon.enable() akActivator.RemoveItem(WeaponToPlace, 1, true, ItemsContainer) blockActivation(FALSE) else NoItemMSG.show() endif else isPlaced = FALSE blockActivation() StaticWeapon.disable() ItemsContainer.RemoveItem(WeaponToPlace, 1, true, akActivator) blockActivation(FALSE) endif EndIf EndEvent Have a happy modding. Thank you for answering, but it didn't answer my question about the parenthesis, do i put the name between them and if so, is it the ID? Edited January 16, 2021 by wilwhitt56
maxarturo Posted January 17, 2021 Posted January 17, 2021 "Thank you for answering, but it didn't answer my question about the parentheses, do i put the name between them and if so, is it the ID?" I've already answered you: * After you've created your "NEW" script. - You need to press the 'Property' button and select / find from the 'drop down' menu the corresponding item that it will be removed from the player. YOU DO NOT EDIT / ADD ANYTHING TO THE SCRIPT. - The static version of it, you click "Select Reference From Render Window" and select with your mouse the "Initialy Disabled" static.
greyday01 Posted January 17, 2021 Posted January 17, 2021 A problem I just discovered in my mod. Because I needed the cell to reset for certain items to work I found that the displays that had items displayed after the cell reset, though the static item was still displayed I could no longer remove it. It said "you don't have tjhis item". If I used player.additem to get the item I could add it to the display again and it would be removeable again. The fix needed is to set your activator to be non-resetable like the chests you don't want to respawn. No one had mentioned this when I was trying to make custom displays and I was usually in and out of my cell often enough that it didn't reset itself so I didn't see the problem until I needed to use the masks to get the last mask since it LOOKED like it was supposed to.
Recommended Posts