Jump to content

Need help to write a new script for unequip pipboy


nightwing100

Recommended Posts

Posted

Hi i'm trying to create a new script to allow player to unequip pipboy by pressing hotkey but i'm terrible at programing and check the tutorial still don't know what to do.

 

Basicly just press a hotkey to equip it, then press it again to unequip it.

 

i know it can be done by console command

player.unequipitem 15308 1

player.equipitem 15308 1

 

i trying to make this mod for people who don't like to use readius like myself,

 

ScriptName HotkeyReleased

Short sToggle

Begin GameMode
    if IsKeyPressed 53 != sToggle
        set sToggle to IsKeyPressed 53
        if sToggle ;Button pressed
            player.unequipitem 15038 1
        else ;Button released
            player.equipitem 15038 1
        endif
    endif
End
 

I know i probably write it all wrong...so anyone can help would be great because i'm really not good at this

Posted

Didn't test, but it should be something like this:

SCN somename

Int bPressed


Begin GameMode

If IsKeyPressed 53
   If bPressed
   else
      Set bPressed to 1
      If Player.GetEquipped 15038
          Player.UnequipItem 15038
      else
          Player.EquipItem 15038
      endif
   endif
else
   set bPressed to 0
endif

End

However if I remember well in NV you need some extra NVSE to prevent a CTD, let me know if it's the case and I'll tell you more.

Posted

Didn't test, but it should be something like this:

SCN somename

Int bPressed


Begin GameMode

If IsKeyPressed 53
   If bPressed
   else
      Set bPressed to 1
      If Player.GetEquipped 15038
          Player.UnequipItem 15038
      else
          Player.EquipItem 15038
      endif
   endif
else
   set bPressed to 0
endif

End

However if I remember well in NV you need some extra NVSE to prevent a CTD, let me know if it's the case and I'll tell you more.

 

Thanks for reply...

But now i'm having problem with Geck run with NVSE...i installed power up geck and nvse but i'm stuck at the last step.

 

What is nvse_loader.exe-editor? i don't have that file......

Posted

nvse_loader is the exe that allows to start nvse, it's located under NV folder (not \Data, the one above it) - at least, it's supposed to be there if you installed NVSE correctly. You make a link to it on your desktop, you modify the link and add the parameter -editor at the end, so it will start the GECK instead that the game, everything's explained here, or you can check one of the videos on youtube.

Posted

nvse_loader is the exe that allows to start nvse, it's located under NV folder (not \Data, the one above it) - at least, it's supposed to be there if you installed NVSE correctly. You make a link to it on your desktop, you modify the link and add the parameter -editor at the end, so it will start the GECK instead that the game, everything's explained here, or you can check one of the videos on youtube.

 

I did the same but it still launch the game instead of GECK...

Posted

You must press a dozen times because you probably attached it to a quest with a too high delay time, reduce it to 0.05-0.1

 

It CTDs because of what I wrote: in NV you can't do that kind of operations in GameMode, so you must use a workaround which calls a menumode and in the same frame closes it via NVSE function. If I recall well, you must use the repair gamemode menumode, but I could remember bad. I'll take a look when I'll have some time.

Posted

Yes it appear that it can't be done in Gamemode without crashing the game, i even try to make a ESP that make Pipboy playable so i can unequip it, and set it in inventory hotkey so i can restore it when i take it off,but when i press the hotkey to re-equip it, the game crash...

 

So i try to find another way to do it and i think Zumbs Equipable Pip Boy might work
http://www.nexusmods.com/fallout3/mods/9364/?

 

It make Pipboy re-equipable, and when take off it will auto exist pipboy menu, when open again pipboy will equip again.

But it is a FOSE mod and i don't know how to port it to NVSE, i did try but no result..

Posted

FO3 doesn't have this problem, is only for NV. The workaround is the one I wrote you: you must first call a menumode (ShowRepairMenu, if I remember well), then you equip the pipboy, last you close everything with NVSE function CAM (CloseAllMenus). This must be done in a single frame.

 

As reference, you can take a look at Readius' script, but you must look the one for NV.

Posted
 

 

Did you manage to make it work? or tonight I can finally take a look inside the GECK if you want

Posted

 

 

 

Did you manage to make it work? or tonight I can finally take a look inside the GECK if you want

 

 

Not really, and appearly i'm not the first one try to do this

http://forums.nexusmods.com/index.php?/topic/373619-pipboy-equip-via-script/

 

It seems like it is impossible to do this is gamemode, however if it's a menumode it can wrok just fine, i confirm it by make it work with the portable terminal (Thermo-Hygrograph) provide by Neveda Skies, just add two function via Geck,

 

player.equipitem pipboy 1

resetpipboymanager

 

and

 

player.unequipitem pipboy 1

 

I hotkey the terminal item in my inventory so i can use it anytime.

Posted

In case you'd like to stick with GameMode, well... I wrote you the workaround few posts ago, you don't necessarily need to be in menumode

 

 


The workaround is the one I wrote you: you must first call a menumode (ShowRepairMenu, if I remember well), then you equip the pipboy, last you close everything with NVSE function CAM (CloseAllMenus). This must be done in a single frame.

Posted

 

In case you'd like to stick with GameMode, well... I wrote you the workaround few posts ago, you don't necessarily need to be in menumode

 

 

The workaround is the one I wrote you: you must first call a menumode (ShowRepairMenu, if I remember well), then you equip the pipboy, last you close everything with NVSE function CAM (CloseAllMenus). This must be done in a single frame.

 

 

Well i think i get what you mean, but i just don't know how to write it...as i said i'm really not good at programing...

Posted

I attach you an ESP to try, the hotkey is P

 

Hey it work! Thanks~

 

The only issuse i have is the pipboy glove prevent me from wearing any other mod's custom left hand glove.

So i use Geck to edit the script and remove the pipboy glove part and i can wear glove again.

 

Maybe you should upload it to nexus?

Posted

Would you like to upload it?

But in that case, let me add at least a MCM to change the hotkey, what you think?

Posted

Would you like to upload it?

But in that case, let me add at least a MCM to change the hotkey, what you think?

 

Sounds good! Will upload it as soon as you finish it~

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...