Jump to content

How to make a weapon rack like in UH?


psrfreddyz06

Recommended Posts

I guess that many of you have the wonderful Underground Hideout mod, And inside the "hidden door" there is a weapon rack like this:

4b02464118a6929ad950657d907d4c11.jpg


What i would like to do, is to replace the weapons on that wall with my own, but i have no idea on how to do that. I know how to do basic mods like weapons/armors/houses etc. I want to make/modify a weapon wall where i can just press the activate button to pick up/place the weapon on the wall with a single buttonpress. Can anyone show me how this is done and how it works? Thanks!!

Link to comment
Share on other sites

All the weapons on those walls are static objects , and they have been previously placed in their own specific locations , with custom hook placement specific to the weapon. And are just disabled , until the scripting tells it to enable a particular one.

 

If you look under "Static > weapons" in the object tree ... you will find a static object of every vanilla weapon.

Looks like underground hideout , has it's own folder under "Static > EHStuff > Weapons"

 

And my guess , is the actual weapon that gets taken from the player inventory , gets placed into a hidden container. Until the player selects it from the scripting to put it back in player inventory. The static weapons on the wall are always there never moving , just become invis & visible.

 

Having the weapon placement dynamic , and a single button press unique to each weapon is possible , ... but would be a lot more work behind the scenes to make it work.

Link to comment
Share on other sites

All the weapons on those walls are static objects , and they have been previously placed in their own specific locations , with custom hook placement specific to the weapon. And are just disabled , until the scripting tells it to enable a particular one.

 

If you look under "Static > weapons" in the object tree ... you will find a static object of every vanilla weapon.

Looks like underground hideout , has it's own folder under "Static > EHStuff > Weapons"

 

And my guess , is the actual weapon that gets taken from the player inventory , gets placed into a hidden container. Until the player selects it from the scripting to put it back in player inventory. The static weapons on the wall are always there never moving , just become invis & visible.

 

Having the weapon placement dynamic , and a single button press unique to each weapon is possible , ... but would be a lot more work behind the scenes to make it work.

Thanks for your answer. hm that makes sense. didnt think about it like that.. do you know in which file/path the scripting is at? that piece of code that tells the game to remove the weapon fron the rack and which weapon etc. cheers!

Link to comment
Share on other sites

The cell is "EvelandHouseArmory" to get an idea of how all the peices interact while you look at the various objects and scripts.

 

And looks like all the scripts start with "EHWeaponsWall" 5 different ones I can see just for the main file setup.

 

Not sure if they add more per DLC or just overwrites those scripts.

 

Now I'm not saying not to go ahead and try adjusting their set up. But you will probably do better initially setting up your own interactive weapons wall.

Link to comment
Share on other sites

The cell is "EvelandHouseArmory" to get an idea of how all the peices interact while you look at the various objects and scripts.

 

And looks like all the scripts start with "EHWeaponsWall" 5 different ones I can see just for the main file setup.

 

Not sure if they add more per DLC or just overwrites those scripts.

 

Now I'm not saying not to go ahead and try adjusting their set up. But you will probably do better initially setting up your own interactive weapons wall.

Do you happen to know any tutorial that does this or something similar? Still a bit confused about what actually adds the weapon on the wall. for example the sniper is called pinpoint, there should be something that says for example "IF activate is pressed THEN XXX94858 (example ID of the pinpoint) is placed. Or have i got this all wrong? never done anything like this before. Been looking at youtube for haven't found a good tut about it.

 

Thank you once again!

Link to comment
Share on other sites

Well I'll try and write you up something ... but would you like it to function with each wall space dynamic (atleast for more than one specific weapon) ?

 

And or ... would you like each weapon hanging on the wall to be it's own button (activate mouse over) ?

 

Would be easier to explain towards a specifc direction than a general one.

 

And honestly I don't really know the inner working details of that mod ... not without some in depth study ... which of course is more efficient if you do the studying.

Link to comment
Share on other sites

Well I'll try and write you up something ... but would you like it to function with each wall space dynamic (atleast for more than one specific weapon) ?

 

And or ... would you like each weapon hanging on the wall to be it's own button (activate mouse over) ?

 

Would be easier to explain towards a specifc direction than a general one.

 

And honestly I don't really know the inner working details of that mod ... not without some in depth study ... which of course is more efficient if you do the studying.

It doesn't matter really. Just so that i have something to start with. I managed to find the script for the UH mod,

ScriptName EHHiddenWeaponScript

INT DoOnce 

REF ContainerREF
REF FormListName
REF WeaponREF
REF WeaponType

begin onactivate player

	Set ContainerREF to GetLinkedREF
	Set WeaponREF to ContainerREF.GetLinkedREF

	;Snubby
	If GetISID EHHiddenWeaponsSnubby
		Set WeaponType to EHWeapNV44RevolverSnub
		Set FormListName to EHWeaponsSnubby

	;Roscoe
	elseIf GetISID EHHiddenWeapons9mm
		Set WeaponType to EHWeapNV9mmPistol
		Set FormListName to EHWeaponsRoscoe

	;Carbine
	elseIf GetISID EHHiddenWeaponsAR
		Set WeaponType to EHWeapNVAssaultCarbineCamo
		Set FormListName to EHWeaponsCarbine

	;Pinpoint
	elseIf GetISID EHHiddenWeaponsRifle
		Set WeaponType to EHHuntingRifle
		Set FormListName to EHWeaponsPinpoint
	else
		showmessage EHFail
		Return
	endif

	;========IF the Weapon is in the Container
	if ContainerREF.GetItemCount WeaponType >= 1
			;Disable Static
			WeaponREF.Disable
			ContainerREF.RemoveAllItems Player 1
			Return

	;========If the weapon is in the player inventory and staic is disabled
	elseIf Player.GetItemCount WeaponType >= 1 && WeaponREF.GetDisabled

		;Adds it to Container
		player.RemoveAllTypedItems EHMiscWeaponsCrateREF 1 0 40 EHWeaponsWallBlank
		player.RemoveAllTypedItems ContainerREF 1 0 40 FormListName
		EHMiscWeaponsCrateREF.RemoveAllItems Player 1 1

		;EnableStatic
		WeaponREF.Enable
		Return

	;========If the weapon is not in the player inventory and staic is disabled/enabled
	else

		;Adds one weapon to its container to start
		If DoOnce == 0
			Player.Additem WeaponType 1
			WeaponREF.Disable
			Set DoOnce to 1
		;If its already added but "lost"
		else
			showmessage EHNoSuchWeapon
		endif
		Return

	endif
End

If that will help you. I'm currently trying to modify that!

Link to comment
Share on other sites

Isn't that script for setting up a hidden armory container ... where you use that head as the clickable item?

 

There may be some other scripts than those 5 I mention for the wall to work ... but that is not one of them.

 

Honestly I have never played this mod ... so I don't know. But it is not part of the weapon walls in plain view.

 

Is there a secret weapon wall that has a door covering it?

 

But if you are going to use that script ... look at the Lists ... they all start with "EHWeapons" and are named right there in the script ... for each head I guess ?

And what would you be wanting to change about it ?

Edited by Mktavish
Link to comment
Share on other sites

Isn't that script for setting up a hidden armory container ... where you use that head as the clickable item?

 

There may be some other scripts than those 5 I mention for the wall to work ... but that is not one of them.

 

Honestly I have never played this mod ... so I don't know. But it is not part of the weapon walls in plain view.

 

Is there a secret weapon wall that has a door covering it?

 

But if you are going to use that script ... look at the Lists ... they all start with "EHWeapons" and are named right there in the script ... for each head I guess ?

And what would you be wanting to change about it ?

Hm you might be right. That script as the only one i found which has something in it about the pinpoint rifle/the other weapons on that wall. Gonna keep looking, Will also create a simple .GIF later today so that i can show you what i would like to create. Cheers!

Link to comment
Share on other sites

So i made two GIFS:

 

d395d64aafb5ffdc5602153a152fe7bc.gif

 

First one is the door to the hidden vault (which i don't care about)

 

0fbcf559e5d227a8e8c0e2b9a1f9d71e.gif

 

This second one is what i wanna make/modify, when i press E i Take the pinpoint, When i press E again it places it back again. What i wanna do is change the Pinpoint to another weapon. Cheers.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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