Jump to content

How do i make companions draw weapons when i do?


AngelsDefiance

Recommended Posts

So basically i dont know why but i find it a nice quality of life function that when i draw my weapons, all my other companions do to and get ready to fire.

 

but that doesnt appear to be a thing in fallout 3. or at least not that i know of seeing how i started the game fresh with mods installed so i wouldnt know if they just do it by default.

 

but thats beside the point. i was wondering if there is any possible way to make this happen?

Link to comment
Share on other sites

The NPC needs a script with some code. Many modded companions have it in some form, This is an example:

; check for player's weapon being drawn
	If ( HasBeenHired == 1 && Relaxing == 0 && Waiting == 0 && WaitingHome == 0 )
		If ( Player.IsWeaponOut == 1 )
			CANCandyREF.SetAlert 1
		elseif ( Player.IsWeaponOut == 0 && IsInCombat == 0 )
			CANCandyREF.SetAlert 0
		endif
	endif

Basically, with this example if the companion is with the player (not waiting or sandboxing somewhere), they will draw their weapon when you do and put it away when you do.

Link to comment
Share on other sites

The NPC needs a script with some code. Many modded companions have it in some form, This is an example:

; check for player's weapon being drawn
	If ( HasBeenHired == 1 && Relaxing == 0 && Waiting == 0 && WaitingHome == 0 )
		If ( Player.IsWeaponOut == 1 )
			CANCandyREF.SetAlert 1
		elseif ( Player.IsWeaponOut == 0 && IsInCombat == 0 )
			CANCandyREF.SetAlert 0
		endif
	endif

Basically, with this example if the companion is with the player (not waiting or sandboxing somewhere), they will draw their weapon when you do and put it away when you do.

 

okay, how would I manage to do that? input the code for the companion I mean.

 

im not that good with changing around code and digging through files

Link to comment
Share on other sites

Many NPCs already have a script attached to them. Open the GECK and load FO3 and the companion mod (if that's what you're changing) and set it as the active file. Then find the NPC in the NPC section of the Object window, right-click -> Edit, then see if they have a script. If they do, then you can insert that code somewhere in the GameMode block. You'll need to change the NPC ref and change/delete the variable names (Relaxing, Waiting etc., depending on exactly what functions the companion has).

 

If there is no script you can create one and attach it to the NPC.

 

If you want to modify a vanilla companion you will first need to ceate your own esp file. Open the GECK, File -> Data -> double-click Fallout3.esm then click OK. When it finishes loading click File -> Save and give it a name. That's your esp file which you can then edit.

 

To give you an example, Clover has a script but no GameMode block. She also has no Relaxing or WaitingHome ability. So for her you can just insert this in her script, before the OnCombatEND block:

Begin GameMode

If ( HasBeenHired == 1 && Waiting == 0 )
	If ( Player.IsWeaponOut == 1 )
		CloverREF.SetAlert 1
	elseif ( Player.IsWeaponOut == 0 && IsInCombat == 0 )
		CloverREF.SetAlert 0
	endif
endif

End

Does any of this make sense? (how do you get rid of empty code blocks on this forum?)


Edited by blackrat99
Link to comment
Share on other sites

 

Many NPCs already have a script attached to them. Open the GECK and load FO3 and the companion mod (if that's what you're changing) and set it as the active file. Then find the NPC in the NPC section of the Object window, right-click -> Edit, then see if they have a script. If they do, then you can insert that code somewhere in the GameMode block. You'll need to change the NPC ref and change/delete the variable names (Relaxing, Waiting etc., depending on exactly what functions the companion has).

 

If there is no script you can create one and attach it to the NPC.

 

If you want to modify a vanilla companion you will first need to ceate your own esp file. Open the GECK, File -> Data -> double-click Fallout3.esm then click OK. When it finishes loading click File -> Save and give it a name. That's your esp file which you can then edit.

 

To give you an example, Clover has a script but no GameMode block. She also has no Relaxing or WaitingHome ability. So for her you can just insert this in her script, before the OnCombatEND block:

Begin GameMode

If ( HasBeenHired == 1 && Waiting == 0 )
	If ( Player.IsWeaponOut == 1 )
		CloverREF.SetAlert 1
	elseif ( Player.IsWeaponOut == 0 && IsInCombat == 0 )
		CloverREF.SetAlert 0
	endif
endif

End

Does any of this make sense? (how do you get rid of empty code blocks on this forum?)


 

im trying to edit the vanilla companions to draw weapons when I do.

 

and Ive searched my entire computer for the Geck but I don't seem to have it. do I have to download it from somewhere or...?

Link to comment
Share on other sites

http://geck.bethsoft.com/index.php?title=Garden_of_Eden_Creation_Kit

 

Install it in your main FO3 directory.

 

You can't use the mouse to copy from or paste into scripts in the GECK, so you need to use ctrl+c and ctrl+v.

 

okay, so I downloaded it, opened it with 7zip and extracted the files. so now I just drop all said files into my fallout 3 goty folder?

Link to comment
Share on other sites

It doesn't really matter where the setup files go, but I put them there just to keep everything together. Run the files, first Fallout3_GECK.exe then the update. Those are the setup files. Make sure you install into the game directory.

 

Two essential links if you're going to start modding with the GECK:

 

http://geck.bethsoft.com/index.php?title=Main_Page

 

https://geckwiki.com/index.php/Main_Page

Link to comment
Share on other sites

Right so.... right now i have all the files saved to my desktop

 

IKernel.dll

 

ISProBENT.tlb

 

ctor.dll

 

IUser.dll

 

DotNetInstaller

 

Objectps.dll

 

iKernel.rgs

 

IScript.dll

 

ISBEW64

 

ISProBE9x.tlb

 

ISBEW64.rgs

 

IsBEW64.tlb

 

and ISBEW64A

 

which one of those would be the fallout3_GECK.exe?

Link to comment
Share on other sites

I don't know what those files are. Some of them seem to be related to InstallShield. Did they show up recently? After you tried to unpack something? Possibly they are temporary files. Anyway...

 

Did you download the two files on this page http://geck.bethsoft...en_Creation_Kit?

 

If you did you should have Fallout3_GECK.exe and Fallout3_GECK_1.5_Update.exe wherever you downloaded them. If you haven't downloaded them (or can't find them) simply click the links and save the files. Then right-click the first file and Run As Administrator and follow the instructions, remembering to install to your game directory. Then do the same for the update. You should then have a file called GECK.exe in your FO3 main directory.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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