Jump to content

How to make a weapon rack like in UH?


psrfreddyz06

Recommended Posts

Do you have a form-ID for that gun (pinpoint) I can't seem to find it at all.

And are you able to load all the DLC files at once in the geck ? Mine is crashing when attempting that , but am able to load 1 at a time. Also FNV edit is not letting me load any of those files for editing nor even to look at ... same for you ?

 

And to specify ... I am talking about the "UHNV- DLC .esp's

Edited by Mktavish
Link to comment
Share on other sites

Do you have a form-ID for that gun (pinpoint) I can't seem to find it at all.

And are you able to load all the DLC files at once in the geck ? Mine is crashing when attempting that , but am able to load 1 at a time. Also FNV edit is not letting me load any of those files for editing nor even to look at ... same for you ?

 

And to specify ... I am talking about the "UHNV- DLC .esp's

Hmm i can't seem to find it either. and yes i can load all of them. But do you use the NVSE with the geck? I have created a shortcut of the nvse_loader.exe and then i wrote

"-editor" at the end so that it loads the nvse with geck. Maybe that is why it crashes for you? i have also changed the bAllowMultipleMasterLoads=0 to 1 in the GECKCustom.ini Cheers.

 

Update: I found it. The Pinpoint is called EHHuntingRifle. If that's what you meant?

 

1ecdf3dda14ce9bac5564ddb7d95c16d.png

 

 

Another update. It looks like my GECK is also crashing when i load all of them but ONLY if i set a file as active. If i don't it loads fine..

Edited by psrfreddyz06
Link to comment
Share on other sites

So i just made a small and ugly house for testing, then i put a table on the wall to use as a weaponrack. Now comes the part where Iam completly lost, the scripting.. I don't even know where to start, i guess putting down a container for the weapon to store? (Going to start with a single weapon only).

 

cbe38ea81b21052786c0ea11af4f3686.jpg

 

This is what i thought it should look like when finished to start with: (i just picked a random shotgun) it doesn't really matter what weapon it is.

 

6728b65a2d2d8ee89260cd3b2df91026.jpg

Edited by psrfreddyz06
Link to comment
Share on other sites

EHHuntingRifle ... thanks ... that helps.

 

 

For scripting ... your looking for a ...

 

Begin OnActivate

 

GetEquipped ... then remove it

 

&

 

MystaticWeap.Enable

 

~~~~~~~~~~~~~~

 

Which I'm just trying to point you in the direction instead of do it for you.

 

But I'll go look at pin point and get back to ya.

Link to comment
Share on other sites

EHHuntingRifle ... thanks ... that helps.

 

 

For scripting ... your looking for a ...

 

Begin OnActivate

 

GetEquipped ... then remove it

 

&

 

MystaticWeap.Enable

 

~~~~~~~~~~~~~~

 

Which I'm just trying to point you in the direction instead of do it for you.

 

But I'll go look at pin point and get back to ya.

I don't need you to do it for me, First off i wanna learn about scripting and secondly you already have helped me very much with your tips and suggestions! So big thanks for that.

 

I just created a very simple small script:

scn weaponswitch

Begin OnActivate

player.additem WeapNVLeverActionShotgun 1 0

staticgun.disable

end

Which does work fine. But as you can see in the script this will only work one time for the "take weapon" part. Gonna look at the "Getequipped" thing on the wiki.

Edited by psrfreddyz06
Link to comment
Share on other sites

So I've been looking like crazy on different mods and how they script different activators/ammo stock/weapons walls, and it just seems so hard, The script are so long and i only understand like 20% of them.. I have also read the GECK scripting for beginners. But it's still hard.

Link to comment
Share on other sites

Ya ... I think the Underground hideout is particularly confusing . And maybe we are looking at different versions of it ?

 

This is the one I have been looking at "UHNV-V4-3-37884-4-3" which I can't seem to find what you are showing in the video of taking "pinpoint" But even still ... how they are accomplishing it is beyond me ... so maybe better just to start simple and from scratch.

 

So if you want to be able to mouse over and click a weapon off of the wall. I would suggest to use activators.

Make one for each weapon that will be placed on the wall. But prior to that ... unpack the archive and extract all the .nif files for those weapons. Place them in the appropriate loose folder , in the same directory structure they came out of the archive in.

 

Then when you are making the activator , you click the edit button on model , then the edit button on model file name ... and search for the nif file you want for it.

Now that activator when placed in the world should look like the weapon , but function as an activator , which has a script on it to remove what ever weapon from the storage container and add it to the players inventory ... also disabling itself.

 

Now the reverse of that ... is to walk up and click on one activator ... which has a script ... checking what the player has equiped in the weapon slot ... and removes it to the storage container ... the storage container then has a script checking what is put in it ... then it enables the correlating activator on the weapon wall.

 

But this could become tedious if the player wants to unload a bunch of weapons ... so then you make another script on a container that sorts stuff.

 

Sorry can't be more detailed ... gota go , but will check back tonight .... hope that helps.

 

Add edit .... and you only need to make one script for all the weapon activators ...

Look at the script "EHVRWeaponTake" for how to do that.

Edited by Mktavish
Link to comment
Share on other sites

Ya ... I think the Underground hideout is particularly confusing . And maybe we are looking at different versions of it ?

 

This is the one I have been looking at "UHNV-V4-3-37884-4-3" which I can't seem to find what you are showing in the video of taking "pinpoint" But even still ... how they are accomplishing it is beyond me ... so maybe better just to start simple and from scratch.

 

So if you want to be able to mouse over and click a weapon off of the wall. I would suggest to use activators.

Make one for each weapon that will be placed on the wall. But prior to that ... unpack the archive and extract all the .nif files for those weapons. Place them in the appropriate loose folder , in the same directory structure they came out of the archive in.

 

Then when you are making the activator , you click the edit button on model , then the edit button on model file name ... and search for the nif file you want for it.

Now that activator when placed in the world should look like the weapon , but function as an activator , which has a script on it to remove what ever weapon from the storage container and add it to the players inventory ... also disabling itself.

 

Now the reverse of that ... is to walk up and click on one activator ... which has a script ... checking what the player has equiped in the weapon slot ... and removes it to the storage container ... the storage container then has a script checking what is put in it ... then it enables the correlating activator on the weapon wall.

 

But this could become tedious if the player wants to unload a bunch of weapons ... so then you make another script on a container that sorts stuff.

 

Sorry can't be more detailed ... gota go , but will check back tonight .... hope that helps.

 

Add edit .... and you only need to make one script for all the weapon activators ...

Look at the script "EHVRWeaponTake" for how to do that.

Thanks for your answer! I'm using the V4-4. so yeah a bit different. Gonna try it again! Will post back my success here. Cheers :D

Link to comment
Share on other sites

So i got fallout 3 instead of new vegas and downloaded underground hideout, They have a "simple" katana stand in the bedroom which you press to pick up, and press again to place the katana on the wall:

 

77ad7ca0ae926f659b57dcf171a4eaa9.png

 

Behind that wall there is an "invisible" eletrical switch with the script, it looks like this:

ScriptName EHKatanaScript

begin onactivate player

Short inventory
Short onstand
Short weaphealth
Float weaphealthF

		If WeaphealthF == 0
			Set WeaphealthF to 1
		Endif

Set inventory to player.getitemcount EHWeapFullKatana
Set onstand to EHKatana1StaticREF.getdisabled

	If onstand == 1
		If inventory >= 1
			Player.equipitem EHWeapFullKatana 0 1
			Set weaphealth to player.getweaponhealthperc
			Set weaphealthF to (weaphealth*0.01)
			Player.removeitem EHWeapFullKatana 1 1
			EHKatana1StaticREF.enable 0
		Endif
	EndIf

	If onstand == 0
		EHKatana1StaticREF.disable
		Player.AddItemHealthPercent EHWeapFullKatana 1 weaphealthF
	EndIf

Set inventory to player.getitemcount EHWeapScrapKatana
Set onstand to EHKatana2StaticREF.getdisabled

	If onstand == 1
		If inventory >= 1
			Player.equipitem EHWeapScrapKatana 0 1
			Set weaphealth to player.getweaponhealthperc
			Set weaphealthF to (weaphealth*0.01)
			Player.removeitem EHWeapScrapKatana 1 1
			EHKatana2StaticREF.enable 0
		Endif
	EndIf

	If onstand == 0
		EHKatana2StaticREF.disable
		Player.AddItemHealthPercent EHWeapScrapKatana 1 weaphealthF
	EndIf


End

And i just can't believe the script is that long for a simple placement haha, And i was meaning to ask since i couldn't find anything on the geck wiki:

 

Short inventory
Short onstand
Short weaphealth
Do you know what Short does? Float i understand kind of since i know assembly, but not the short.. Thanks!
Link to comment
Share on other sites

I managed to get this work!!!!

 

Here is the script:

ScriptName EHRevScript

begin onactivate player

Short inventory
Short onstand


Set inventory to player.getitemcount Weap32CaliberPistol
Set onstand to EHmagREF1.getdisabled

	If onstand == 1
		If inventory >= 1

			Player.removeitem Weap32CaliberPistol 1 1
			EHmagREF1.enable 0
		Endif
Endif

	If onstand == 0
		EHmagREF1.disable
		Player.AddItem Weap32CaliberPistol 1
	EndIf
End

It works perfectly fine.. Can you see any errors/something that i can change?

 

P.S i do NOT take credit for this, 99% is copied from the UH mod. Next step is to understand everything haha

Edited by psrfreddyz06
Link to comment
Share on other sites

  • Recently Browsing   0 members

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