NPC skills and skill bonus items

Discussion in 'Fallout General Modding' started by burn, Jul 2, 2016.

  1. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    Per Jorner's guide states "Keeping a Motion Sensor in your own inventory will automatically apply its bonus to the party member with the highest skill (it does nothing if it's in the inventory of an NPC)."

    Where does that info come from?

    Is it limited to Motion Sensor/Outdoorsman specifically, or it works with any skill? Say, Vic gaining Repair boost when Chosen has a Tool in his inventory?
     
  2. Daemonjax

    Daemonjax First time out of the vault

    Jul 5, 2016
    If it doesn't work that way, and you want it to, I think it can be made to using an sfall hookscript: hs_inventorymove

    I believe stat bonuses to companions persist between saves, so that makes things a little easier (depends). I'm not sure what happens exactly when a companion levels up, though... if their proto is outright replaced and inventory gets added, or they just get the mod bonus from the new proto, so that would require testing (unless you already know, that is). I think their base stats change too, between proto levels, but that's easy enough to check (just checked -- yes, they do). So, yeah, I think their proto might get replaced so that would be something you might have to watch out for if you ended up having to mod this in. Just thinking out loud.

    I think it would be better if the item needed to be in the NPC's inventory because that just makes sense. But if that feature were implemented by someone who thought differently, I'd still imagine that it applied to all tools and skills, not just outdoorsman and motion sensors.
     
    Last edited: Jul 17, 2016
  3. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    No, for now I just want to know.
     
  4. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    Re-visiting this, no new info?
     
  5. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    information from engine.
    Code:
    004C09B6 loc_4C09B6:                                  ; wmRndEncounterOccurred_+370j
    004C09B6            mov     eax, SKILL_OUTDOORSMAN    ; Outdoorsman|Натуралист
    004C09BB            mov     edx, PID_MOTION_SENSOR
    004C09C0            call    partyMemberHighestSkillLevel_
    004C09C5            mov     ebx, eax
    004C09C7            mov     ecx, eax
    004C09C9            mov     eax, ds:_obj_dude
    004C09CE            call    inven_pid_is_carried_ptr_
    004C09D3            test    eax, eax
    004C09D5            jz      short loc_4C09E5
    004C09D7            mov     esi, ds:_obj_dude
    004C09DD            cmp     esi, [eax+pobj.owner]     ; владелец
    004C09E0            jnz     short loc_4C09E5
    004C09E2            lea     ecx, [ebx+14h]
    Возвращается самый высокий уровень скилла Outdoorsman который есть у команды игрока.
    Причем тут вообще скилл Repair?!
     
  6. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    Я и спрашиваю причем или нипричем.
    И у кого в кармане должен быть сенсор, или это неважно?
     
  7. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Ты же вроде программист(если я не ошибаюсь), посмотри код движка, там сразу видно у кого должен быть сенсор - у игрока естественно.
     
  8. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012
    Да я так, постоял рядом с программистом.
    Меня интересует, например, чтобы Вик лучше чинил, ему поможет супер набор в инвентаре у чозена или это только сурвивалист так работает.
     
  9. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    Oct 29, 2015
    Думаешь я программист)
    Нет не поможет.
    Инструменты/отмычки - эти все предметы скриптовые.
    Докторские сумки тоже не помгут в излечении ели просто будут лежать (хотя они являются движковыми). В общем не заложенно в коде двига такого.
     
  10. burn

    burn Look, Ma! Two Heads!
    Modder

    Apr 22, 2012