Jump to content

Thorham

Members
  • Posts

    57
  • Joined

  • Last visited

Posts posted by Thorham

  1. Hi,

    Does anyone know why the following code crashes the game if I run it in an OnPlayerLoadGame event? If I add Utility.Wait(10) it works, but unreliably. When I have this code run by, for example, equipping an item (OnObjectEquipped event) it works fine.

    Anyone any ideas?

    Game.UpdateHairColor()
    Game.UpdateTintMaskColors()
    NiOverride.ApplyOverrides(thPlayer)
    NiOverride.ApplyNodeOverrides(thPlayer)
    
  2. Hi,

     

    I'm having a problem with a script I wrote that replaces the players armor models during the game. To do this I use ArmorAddon.SetModelPath (the script un-equips an armor, changes the model and then re-equips it). Works fine except when changing armor models that are made of multiple parts (as in multiple selectable parts in NIFSkope, such as the stalhrim gauntlets).

     

    Anyone know how to solve this, or is it an SKSE problem?

  3. After finding out about the amazing Vegetable Soup item, I was wondering if anyone knows of any other seemingly useless items that turn out the be awesome.

     

     

    Vegetable Soup:
     
    Restore Health, 1 point for 720 secs.
    Restore Stamina, 1 point for 720 secs.
     
    Ingredients:
     
    Potato
    Cabbage
    Leek
    Tomato
    

     

    With this you can do power attacks and shield bashes continuously, because you can't run out of stamina while the soup's effect is active. Does not work for sprinting, though.

  4. I have three characters: First one was played briefly to get a feel for the game. Second one was serious, but I've remade that one into the character I play now:

     

    Syra, female Imperial warrior. Uses sword, shield and heavy armor. All items are legendary dragon bone items with two enchantments each, and some enchanted jewelry (no glitches and exploits used). Uses healing spells. Has crafted thief gear for sneaking and pickpocketing. Has lock picking/carry weight jewelry. Has Augmented Flames for increasing damage of enchanted swords. Uses the Steed standing stone for the carry weight and weightless armor. Follower used is Serana who has a full Dragon Scale armor set with a Dragon Sword, all enchanted, except the sword.

     

    The game has become very easy with this character, so, for my next game I'm going to use Requiem for vastly increased difficulty.

  5. no clue but off the wall guess... maybe it's catching some player alias references tied to various quests or whatever that are active on the player character.

    Yeah, that's certainly possible, and because the content of a cell isn't static, that reference can change when the script takes to long.

     

    However, it doesn't matter anymore! I've come up with a way to change what the player character looks like without having to update other characters. Simply change the nifs of the equipped armor pieces, update the player character, and then change the armors back to the way they were.

     

    NPCs are updated when a cell is loaded, but because the armors are restored after the player character is updated, they'll look the way they're supposed to, while the player character doesn't seem to be updated when a cell is loaded, and will therefore still look like what you want them to look like.

     

    I have it running right now, and it seems to work like a charm :) No more messing around with cloning armors :)

  6. Hi,

     

    The script below is supposed to loop through a cell's list of NPCs. For each NPC that isn't the player, a second loop is executed. The problem is that the loop is also executed when the NPC is the player.

     

    Anyone have any ideas as to why this is happening?

     

    event OnLocationChange(Location akOldLoc, Location akNewLoc)
       area=Game.GetPlayer().GetParentCell()
       player=Game.GetPlayer() as Actor
    
       bla=area.GetNumRefs(43)
       
       loopy=0
       while loopy < bla
           npc = area.GetNthRef(loopy, 43) as Actor
    
           if (npc!=Game.GetPlayer())
               loopx=0
               while loopx < 3
    
                       Utility.Wait(1)
                   
                       if (npc==Game.GetPlayer())
                           Debug.Notification("1234567890")
                       endif
    
    
                   loopx+=1
               endwhile
           endif
           loopy+=1
       endwhile
    endevent
    

  7. Finally got the NPCs to update by unequipping, updating and reequipping the item. Someone on another forum suggested it. All I had to add to that were some waits :)

     

    if (npc!=Game.GetPlayer())
       item = npc.GetWornForm(4) as Armor
       Utility.Wait(0.01)
       npc.UnequipItem(item, false, false)
       npc.QueueNiNodeUpdate()
       Utility.Wait(0.01)
       npc.EquipItem(item, false, false)
    endif
    

  8. If it's possible to get the 1st camera to behave like the 3rd person camera, then it might be simple, but there's of course the fact that there's only on 1st person skeleton...

     

    Another thing, I tried Actor.QueueNiNodeUpdate() on NPCs, but it doesn't work, only the players nifs are updated (this works fine). If it did, this would most likely be a done deal :(

  9. Thanks IsharaMeradin for giving this serious thought, but I've found a way to change 3rd and 1st person view models while in game! There's an ArmorAddon script, and it's not in the CS documentation. Check out ArmorAddon.psc in scripts\source. Combined with actor.QueueNiNodeUpdate(), you can change the look of an armor on the fly (tested, armor changes looks immediately).

     

    If it's possible to make the 1st person view behave like the 3rd person view, all this can be done simply by changing the 1st person nifs.

     

    What I'm doing now is something else: Change 3rd person nif, update player. When player changes locations, restore original nifs, update all actors, change nif again, update player.

     

    If this works, it'll work for any item.

  10. that will affect what is worn by all the other NPCs too.

    That's what I'm trying to avoid.

     

    Otherwise you'd have to duplicate all the armors and use your script to swap them.

    Yeah, thought of that, except the CS only allows duplicating one item at a time :wallbash: Also has the disadvantage of conflicting or not working with armor and clothing mods.

     

    However, you could adapt your idea to say swap body style on armor removal. I.e. leave the NPCs at whatever installed base, but swap the body on the player to say UNP or CBBE based on mod worn armors? Or depending upon player weight swap into different style underwear... just randomly thinking...

    Interesting. So if I understood this right, you're basically saying that the way the player character looks can be changed from within a script? If that's the case, then all that's needed is for certain equipped items to be invisible on the player character.

     

    I think it wouldn't be odd that "clone armor" would not have all the properties and tempering of the original. A photocopy is never as good as the original.

    Except that I'm trying to copy something digitally. It would be very odd if a digital copy would be different.

     

    That said, there is all kinds of keywords tomfoolery you can get up to with SKSE, perhaps you should take a look.http://www.creationkit.com/Category:SKSE

    Yep, seen it, but I sadly couldn't find anything to actually set keywords.

     

    Thanks for the replies, guys :thumbsup:

     

    I think it's time for a different approach. As long as it's impossible to duplicate an item in the way it's duplicated in the CS, and then change the nif files, I don't think this is ever going to work very well, because there's just too many possible loose ends.

     

    Time to look at writing an SKSE plugin :) Perhaps that will allow me to simply change player character apparel more directly.

  11. So have templates for each of the armor types. Then have some additional ones for specific quest related stuff. Not sure how many specific quest armors there are. Might be able to get by with one template for each armor type that has all the quest keywords on it and only use it when specific quest armors of that type are equipped.

    Not a bad idea, however I just discovered that armors have other properties that can't be copied, such as the improvements from tempering. Probably uses a keyword for this, so who knows how many templates are ultimately needed.

     

    Well, that's probably the end of my mod :(

  12. In TES5Edit you can "Copy as new entry" from any plugin to any plugin. Probably the simplest way of accomplishing this.

    Of course, but then it won't be a mod anymore ;) The whole point is to be able to do everything from within the game.

  13. Maybe make use of three different "templates", one for each weight class, and then have your armor automatically switch itself depending on the armor it clones. Same functionality, while keeping the UI and user experience clean.

    Templates aren't a bad idea, thanks :thumbsup: The only problem that remains is with armors and clothing that have quest related keywords, but that probably doesn't affect a whole lot of items, so that might not be a big issue.

     

    Isn't there a way to copy a whole item in one go, similar to what happens when you duplicate an item in the Creation Kit? I tried changing an armor in game, but all the instances of the item are changed as well. It's never easy, is it :rolleyes: You'd almost try remaking the whole game in Unity3D simply to be able to do everything you want :biggrin:

  14. I understand the idea of what you want to do: visually hide armor with something else. I just don't see how you are achieving it.

    The armor I've added has a script assigned to it with an OnUnEquipped event. When that armor is unequipped it checks if anything is equipped in the armor slot, if so, it copies the properties from that newly equipped armor:

     

    Scriptname ThorhamsCloneArmor extends ObjectReference
    
    Armor Property clone Auto
    int Property slotmask Auto
    
    Armor item
    
    Event OnUnEquipped(Actor akActor)
       If (akActor == Game.GetPlayer())
           item = akActor.GetWornForm(slotmask) as Armor
    
           if (item)
               akActor.ModActorValue("CarryWeight", -clone.GetWeight())
    
               clone.SetArmorRating(item.GetArmorRating())
               clone.SetWeightClass(item.GetWeightClass())
               clone.SetWeight(item.GetWeight())
               clone.SetEnchantment(item.GetEnchantment())
               clone.SetName("clone "+item.GetName())
               clone.SetSlotMask(item.GetSlotMask())
               
               akActor.ModActorValue("CarryWeight", item.GetWeight())
           endif
    
       endif
    EndEvent
    

     

    If keywords are your hold up, can you not put ALL armor keywords on your base clone armor and then use scripting to deny certain stats/actions etc depending upon whatever other armor was cloned?

    That complicates things. For example, how is an NPC going to react when the cloned armor is a cuirass and clothing at the same time? Or the perks for heavy and light armor. This sure ain't pretty :( Maybe having three versions of the armor pieces (one for each wight class) is a good solution.

  15. At this time, you cannot change any keyword assignments via papyrus scripting.

    That doesn't sound good :(

     

    What are you trying to accomplish?

    I've made a mod that adds armor pieces to the game that can clone other armors. Example: When you have Clone Armor equipped and then equip Steel Armor, Clone Armor is normally unequipped and now has the properties of Steel Armor. This can be repeated at will. The idea is to get something similar to RPGs where equipped armor doesn't show on the player character.

     

    One problem is that if a cloned armor doesn't have, for example, the ArmorHeavy keyword, it won't get the effect from the Juggernaut perk (makes no sense, seeing how there's a weight class property :rolleyes:).

     

    I sure hope this can be soved somehow :(

  16. Hi,

     

    Does anyone know how to set armor keywords such as ArmorClothing, ClothingRich, etc, from inside a script? I can't find anything in the documentation, except about how to read those keywords. Very frustrating.

     

    Is there a way, or is it simply impossible?

  17. That's the only thing I didn't try :wallbash: Tried it, and it seems to work, same for armor ratings being screwed up when cloned because of missing HeavyArmor keyword :wallbash: Now all I need do is clone the keywords in my cloning script :)

     

    Thanks :thumbsup:

  18. Hi,

     

    I've made a mod that adds clone armor pieces to the game (the clone armor pieces have a fixed appearance). With these armors you can clone existing armor properties, without cloning the appearance of those armors. The problem is that when my character is wearing a cloned cuirass, the NPCs will make 'You're naked' comments.

     

    Anyone any ideas as to why this is happening?

  19. Hi,

     

    When I compile this script, the compiler complains that 'GetWornForm is not a function or does not exist':

     

    Scriptname armortestscript extends ObjectReference
    
    Spell Property Blizzard auto
    Armor chest
    
    Event OnEquipped(Actor akActor)
       If (akActor == Game.GetPlayer())
           Game.GetPlayer().AddSpell(Blizzard)
    Debug.Notification("armor equipped 1234")
    
    chest = akActor.GetWornForm(4) as armor
    
       EndIf
    EndEvent
    
    Event OnUnequipped(Actor akActor)
       If (akActor == Game.GetPlayer())
           Game.GetPlayer().RemoveSpell(Blizzard)
    Debug.Notification("armor unequipped 1234")
       EndIf
    EndEvent
    

     

    This script is just a test I'm using to learn Papyrus+SKSE. What I ultimately want to do is make a dummy armor that can clone an equipped armor, except for it's appearance. For this it's obviously necessary to get a reference to the equipped chest armor. The script works fine, except for GetWornForm.

     

    Any ideas as to why GetWornForm doesn't seem to exist, or is there an alternative to this function?

  20. Hi,

     

    1. Is there any way to have a fixed outfit? I want to be able to equip anything I want without the appearance of my character changing. Oblivion has Fashion Anvil for this, anything similar for Skyrim?

     

    2. Is there a mod that allows you to view an NPC's inventory and equipped items? Oblivion has RefScope, anything for Skyrim?

     

    Any pointers are appreciated :thumbsup:

×
×
  • Create New...