Help - Search - Members - Calendar
Full Version: npc/companion armor
The Nexus Forums > Specific Games > Oblivion > Oblivion Modifications > File Requests/Suggestions
JSwenson82
Is there a mod that lets you get companions and other npcs to repair their broken armor and weapons? I've searched but I can't find anything.
chingun
QUOTE(SlappyMeats @ May 18 2007, 01:14 AM) *
Maybe it's just me, but I'm kinda getting a little sick of requests for mods that have already been done, done again, and done some more every other day. If I see one more "can u make teh emperorz armor plz!" I'm gonna lose my mind.

With that said, keep this in mind: if you have an idea for a mod that
1) makes armor, clothing, or accessories playable
2) makes an NPC or your horse essential or non-essential
3) increases the value or strength of a weapon or set of armor
4) puts a player-owned house somewhere
5) makes Dremoras a playable race
6) alters vampires' faces or protects them from the sun, or
7) gives you an instant-kill spell,
search for it in the file index before you set upon the mod request forum with your question. It will be there, trust me. In fact, if you are tempted to type "it's probably easy to make, so could somebody make it?" then chances are, somebody already has.

If it's not already made, then go nuts, somebody will be happy you had the idea. Otherwise, let's not clutter up the forum with redundant posts.


This is not the first time someone is asking ''Is there a ....?''
This is request/suggestions.

If you can't find the mod, go to the Oblivion Mod Detectives ™

PS: It would probably be best to download one of the CM Companions (Divine Avenger's Beauties ™). They allow you to take their armour and repair it for them
Jumonji
I've actually just created a spell for Rhianna to do that by using the latest OBSE Version 14.

I don't have it set up in a way to use it with arbitrary pc's - but if anyone wants it I can just post the script here when I get home tonight. Let me know.

-Jumonji
Jumonji
In case anyone wants this - it will repair and recharge and repair all equipment and weapons that are currently equipped on the NPC who is a "victim" of this spell. ("a1jDebug" is a global variable I added.) You need OBSE v14 to run this.

CODE
ScriptName a1jRechargeMagicScript

long lBaseAmount
float fCurrentAmount
float fRepairAmount
short sItemIndex
ref rItem

Begin ScriptEffectStart
    set sItemIndex to 0
saveIP 10
    set rItem to GetEquippedObject sItemIndex
    if (rItem)
        set lBaseAmount to GetObjectCharge rItem
        set fCurrentAmount to GetEquippedCurrentCharge sItemIndex
        if (fCurrentAmount  < lBaseAmount )
            set fRepairAmount to lBaseAmount - fCurrentAmount
            ModEquippedCurrentCharge fRepairAmount sItemIndex
            if a1jDebug
                message "Recharged slot %f by %f" sItemIndex fRepairAmount
            endif
        endif
        set lBaseAmount to GetObjectHealth rItem
        set fCurrentAmount to GetEquippedCurrentHealth sItemIndex
        if (fCurrentAmount  < lBaseAmount )
            set fRepairAmount to lBaseAmount - fCurrentAmount
            ModEquippedCurrentHealth fRepairAmount sItemIndex
            if a1jDebug
                message "Repaired slot %f by %f" sItemIndex fRepairAmount
            endif
        endif
    endif
    if sItemIndex < 18
        set sItemIndex to sItemIndex + 1
        restoreIP 10
    endif
    set rItem to 0

End


Since an NPC will remove any broken equipment, you need to make sure you use this spell before the item is totally broken. This next script uses 50% as the threshold.

CODE
long lItemIndex
ref rItem
ref rNPC

Begin

set rNPC to GetSelf

saveIP 2
        set rItem to GetEquippedObject lItemIndex
        if (rItem)    
            if ((2 * GetEquippedCurrentHealth lItemIndex) < GetObjectHealth rItem) || ((2  * GetEquippedCurrentCharge lItemIndex) < GetObjectCharge rItem)
                cast a1jRechargeSelfSpell rNPC
                return
            endif
            set lItemIndex to lItemIndex+ 1
            RestoreIP 2
        endif


-Jumonji
Jumonji
That second script is a bit off - I typed it in by hand from a much longer script. You can figure it out... I would update it, but it screws up the code formatting if I edit it.

-Jumonji
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.