0 of 0

File information

Last updated

Original upload

Created by

bp42s

Uploaded by

bp42s

Virus scan

Safe to use

2 comments

  1. bp42s
    bp42s
    • premium
    • 814 kudos
    Sticky
    NOTE: I’ve experienced a weird bug on occasion where after compacting FormID’s or editing the mod in xEdit, the tab doesn’t appear in-game. Sometimes the plugin needs to be re-opened in CK and saved from there. You don’t need to make any changes, just re-open it and press save. If you’re 100% sure that you followed the documentation properly and it’s still not working for you, try that out. It should fix that issue.

    I’ll update the documentation with this later, not at my computer ATM.
  2. bp42s
    bp42s
    • premium
    • 814 kudos
    Locked
    Sticky
    I've figured out how to add click support for specific elements in the tab! here's a code example. Just create a quest, make sure it's start game enabled, and then add a script with this code. Make sure to autofill properties after compiling it.

    Group Actors
    Actor Property PlayerRef Auto
    EndGroup
    Group FormLists
    ; This should be your "FirstList" FormList that's in the PBT .ini
    FormList Property MYPIPBOYTABFIRSTLIST Auto
    EndGroup
    Group Idles
    ; This is the animation that plays when you equip or consume something in the pipboy
    Idle Property pipboySelect Auto
    EndGroup
    Group Sounds
    ; This is the sound that plays when you equip or consume something in the pipboy
    Sound Property UIPipBoyOKPress Auto
    EndGroup



    Function PBT_ItemPressed(String id, int formid)
    if(id == "MY PIPYBOYTAB ID HERE")
    ; Do stuff to make it feel normal
    PlayerRef.PlayIdle(pipboySelect)
    UIPipBoyOKPress.Play(PlayerRef)
    PBT:PBT.UpdateMenu()
    
    ; Grab the index
    ActorValue kPBTAV = Game.GetForm(formid) as ActorValue
    int iIndex = MYPIPBOYTABFIRSTLIST.Find(kPBTAV)
    if(iIndex == -1)
    return
    endif
    
    ; Then do whatever you want to do here. iIndex is the index that your element is at.
    endif
    
    PBT:PBT.UpdateMenu()
    return
    EndFunction



    ;; #### EVENTS ####
    ;;
    Event OnQuestInit()
    OnGameLoad()
    EndEvent
    ;;
    Event OnQuestShutdown()
    UnRegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame")
    UnRegisterForExternalEvent("PBT_ItemPressed")
    EndEvent
    ;;
    Event Actor.OnPlayerLoadGame(Actor akSender)
    OnGameLoad()
    EndEvent
    ;;
    Function OnGameLoad()
    RegisterForRemoteEvent(PlayerRef, "OnPlayerLoadGame")
    RegisterForExternalEvent("PBT_ItemPressed", "PBT_ItemPressed")
    EndFunction
  3. UMP45GFL
    UMP45GFL
    • supporter
    • 4 kudos
    is it possible to add an inventory tab with pbt

    edit: yes you can, but it doesnt seem to really work as pbt doesnt seem to support inventory interfaces
    1. bp42s
      bp42s
      • premium
      • 814 kudos
      not really, pbt tabs aren’t designed for something like that