Jump to content

MaxYari

Supporter
  • Posts

    21
  • Joined

  • Last visited

Nexus Mods Profile

About MaxYari

Profile Fields

  • Country
    Russia

MaxYari's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Thanks for the detailed explanation! I previously was using NifSkope only as a preview tool, had no idea that you can actually copy and merge meshes in it, if i'll ever get to doing those knuckles - I'll def try it.
  2. ref item . Right?) - right.let item := GetLastEnchantedItem - that piece of code "sits" in the quest and awaits for when the Enchanting menu provides the item. Now item is that enchanted item. Next, let's check it: if ( item.GetBaseObject == BaseOfYourFist ) item.CopyIR Player item.RemoveMeIR (or it might be that after this, there could be a two of items in the one reference, and after RemoveMeIR they both will be removed - in that case CopyIR to some container instead of as to the Player, RemoveMeIR, select the item in that container you copied previously to and CopyIR back to the Player) endif For the case of sigil stone enchanting, in the same quest's script you can place a check nearby after the above:let item := GetLastSigilStoneCreatedItem if ( item.GetBaseObject == BaseOfYourFist ) same actions (the) endif I haven't checked but i'm 95% sure that GetBaseObject will return a base that will not match any of my fists, from what i understand stuff created with enchantment is a cloned form, i.e it was cloned from my item but now it's completely different thing in it's own. But approach seems to be solid nevertheless, i got an idea that i can check for the attached script as well, I hope it's actually present on an item although not activated. Thanks :smile:
  3. I downloaded your mod and had a try. Yes, I have the same situation as well as you described it - the enchanted item some way 'forgets' about the script which was attached to it's base item. I can assume next if you'd ask my opinion: In your AAEHquest's script - GetLastEnchantedItem-> if that item's base is your fist -> item.CopyIR Player ; item.RemoveMeIR I tried to add "OnAdd" block to the AAFFistWeapon script and see what will happen in the moment right after the item was enchanted - same situation, the item's script was not initialized. But i think GetLastEnchantedItem returns only enchantedItem and there's no way to get base from it? But i think i know the way to get both base and enchanted item, seems that it's possible to get base from the enchantment menu upon triggering onEnchant event, but i'm not sure if that'll work with sigil stones, would be better if there's some kind of more universal solution. And thanks a lot for taking time and checking it, appreciate.
  4. Hello everyone, title pretty much says it all. For the mod of mine i need to have a weapon with an attached script that will be enchantable. But as soon as you enchant it - script behaviour breaks and onEquip block apparently stops being called. It fixes itself if you drop the item and pick it up. Is there anyway to "activate" that inventory item through code? I haven't tried anything yet but was thinking of maybe dropping and picking it up through script if there's no proper way to do it, I'll update this topic if i'll have time to try and have some interesting results. P.S.: I've brought this issue up here but since it wasn't closely related to main topic - I created a new one. Have a good day everyone!
  5. But then weapon will not be enchantable, having it enchantable and having the script attached to it is like the whole point of the mod. Seems my option is either to activate that item somehow or to track onequip from OBSE event instead while saving those enchanted references into array for further lookup or something. Upd: Since this discussion is not related to the topic anymore, i've created a new one https://forums.nexusmods.com/index.php?/topic/10067718-enchanting-item-with-script-disables-script-execution-until-item-is-dropped-and-picked-up/
  6. Hm, is it possible to create an equipment item that only visually occupy ring slot but will not occupy it (or any other) logically, i.e so you still can have 2 rings AND that item?
  7. Hey, interesting that you mentioned it, my mod suppose to allow people to enchant mod weapons but enchanting one seem to remove the script attached to a weapon, which is pretty crucial... any idea what to do about it? Maybe it's possible to reattach script after enchantment? I mostly use onEquip block in the item script which i can replace with OBSE event, but it will still have no idea how to determine that this enchanted item is the modded item on which that block should run. I just did this: let baseItem := GetEnchMenuBaseItem Print "Created enchanted item: " + $enchantedItem + " from " + $baseItem let baseScript := GetScript baseItem; Print "Moving script " + $baseScript + GetEditorID baseScript + " to " + $enchantedItem SetScript baseScript enchantedItem And it seems to kinda work but only after i drop and pickup said enchanted item, so now I'm trying to figure out how to "activate" that inventory item through script (so onEquip block works) :\ Upd: Oh, actually it seems that it works even without doing setscript, only issue is that script on enchanted item gets deactivated until you drop and pick it up.
  8. Yes Oh well, this is for the weapon that is NOT equipped so i had to do that inventory lookup, but doing let inventoryRefs := containerRef.GetInvRefsForItem item let itemRef := inventoryRefs[0] ;edit item charge itemRef.RemoveMeIR playerRef Did the trick. I've written this from memory so i migh have butchered someting, but the idea is to get ref, edit it and then remove original from inventory while inserting edited ref (that what RemoveMeIR suppose to do).
  9. Sry not quite sure what do you mean, like I can after making custom mesh somehow properly align it in the nifscope instead of first exporting glove, making mesh and aligning? Or you meant something completely different?
  10. Thanks, you know what, actually this solution might not be as bad as i thought at first, I can actually use `SetHidesRings` dynamically whenever knuckle ring is equipped, gotta try it, not sure how glitchy will it look
  11. Essentially I was thinking of making a knuckles mesh that will be used in hand to hand combat just for visuals. But Ideally i want this to be overlayed over gloves so using gloves or ring (since gloves hide rings) equipment will not fly I guess. Any way to achieve that, or that's the limit modding capabilities here? Thanks in advance and have a good day!
  12. Thanks a lot for additional input, yes for now it's player only, maybe I'll want to port it later so it can work on any actor, but definitely not now. Good to know where I'll have to start though, thanks.
  13. Hm, are you sure that this will work? Looks really interesting but i think I tried adding script onto object and it was only running when it was on the ground and not in the inventory!
  14. I'm quite confused with what the difference between base object and inventory object? I understand that inventory object is kinda base object and it's not a reference, but it also includes some additional info, for example it current enchantment charge and maybe inventory slot number (I assume if you have multiple objects with different enchantment charges, so they are not displayed as a stack - then providing RemoveItem with inventory reference of that object - will only remove that object, but I might be wrong) So can someone please explain? And to be specific I'm trying to edit enchantment charge of the item in the inventory, I can do that by setting charge to specific value on temporal reference and then inserting it back into container, but I want to decrement value so I need to have access to specific inventory item and not just base full enchantment, or at least a way to get a hold of that current enchantment value of the specific item and not just it's base, which will always return max enchantment. What i'm currently doing: begin OnEquip set item to GetBaseObject ... let AAEHquest.activeFistWeapon := item ; this is used as "item" in a function below ... end ;===Edit weapon charge through temporal reference=== Print "Attempting to edit temp ref charge" containerRef.RemoveItem item 1 Print "Getting temp ref" let itemRef := CreateTempRef item Print "Editing charge of " + $itemRef.GetName let enchantment := GetEnchantment item let chargeCost := GetEnchantmentCost enchantment let currentCharge := itemRef.GetCurrentCharge if currentCharge >= chargeCost let chargeCost := chargeCost * -1 itemRef.ModCurrentCharge chargeCost Print "Subtracted " + $chargeCost + " from " + $currentCharge else Print "Not enough charge!" Message "Not enough charge!" endif Print "Putting edited weapon into " + $containerRef + " container" itemRef.CopyIR containerRef let itemRef := 0 Print "Done editing temp ref" ;========================================== As a result I get an item with a charge decremented from it's max and not it's current since ModCurrentCharge, as i assume was run on a temporal reference created from the base and not from my specific item... which makes sense since item is from GetBaseObject from onEquip, but I haven't found any way to get more of a proper inventory item reference and not just base object, so, what do? Update: I've used this now to get proper inventory reference now: let inventoryRefs := containerRef.GetInvRefsForItem item Print "Array " + $inventoryRefs + " " + $ar_Size inventoryRefs ForEach ir <- inventoryRefs Print $itemRef let itemRef := ir["value"] Loop but itemRef.GetCurrentCharge still returns max charge and not current :sad: Thank you in advance! Update 2: Ok i poked around and i think i solved it in some strange quirky way by using RemoveMeIR with a destination being player inventory which somehow actually properly replaces reference of the item in inventory with this temporary in a way that even the initial itemRef gets updated! I'll post my code changes tomorrow, too tired rn, have a good night/day everyone!
×
×
  • Create New...