Garry's Mod

Garry's Mod

评价数不足
How to use VJ Base NPCs in Hammer [ENG]
由 сухоребрик 制作
In this guide you will learn how to use NPCs on VJ Base for your valve hammer maps
This method does not require you to know coding, because the author does not know how to code, so I found another way to implement the spawn of these nps in hammer
To read further, you need at least basic knowledge of mapping in hammer editor
   
奖励
收藏
已收藏
取消收藏
preparation
First we need to find and download the addon whose NPCs we want to use and VJ Base addon. In my case addon for NPC is [VJ] Cry of Fear Resurgence.

Then we need to extract the content of the NPC addon and VJ Base addon. You used to be able to use the Steam Workshop Downloader for this, but unfortunately that site is down now, so I recommend using
gmpublisher for this
[Download gmpublisher] [github.com]


Then run this program and go to the Installed Addons category and enter the name of the addon you need


extract the addon in a convenient way for you


embedding files into a game folders
After you have prepared, you can start embedding addon files into game folders.
!Dont forget also embedding VJ Base addon files into garrysmod folders!

What is it for?
This is necessary so that with the run game after compiling function, NPCs are already on the map and for this you would not need to go to Gmod separately and enable the addon you need to check NPCs on your map
So, NPCs will not appear on your map if the NPC addon you need is not enabled in the gmod, which is logical. Therefore, we are embedding addon files into game for convenience.


We need to move all the folders that are from extracted addon to all the folders in the garrysmod folder


for example, here is the lua folder of the addon. we need to move all files of this folder to the lua folder located in the garrysmod folder
We do the same thing with other folders from extracted addon




Using VJ Base NPCs in Hammer
Finally we got to the most interesting part - spawning VJ NPCs in Hammer

For spawning NPCs, we need to find out the entity name of the NPC we need

there are two ways to do this

1. Entering the entities folder of the addon
You can find this folder in the lua folder of the addon you need


Here you will see the entire list of entities folders that are in the addon and the names of these folders that we need to use in Hammer


copy the folder name of the NPC we need and go to Hammer

Open your map and place any entity




press rmb on this entity and go to Properties


delete the entity name and paste the entity folder name of the NPC you want and press Enter


after you pressed Enter press apply and this entity became obsolete. if this happened then you did everything right


Done!


2. Copying the NPC to the clipboard
You need to press the right mouse button on the icon of the NPC and click this.


conclusion and some tips
This method also works using point_template. So, dont forget about this.
Tip to making boss fight area
You will not be able to add NPCs to filter_name or similar entities using this method. Therefore, if you want to do some kind of boss fight in a closed area, then you can do it using trigger_multiply with an NPC flag. Stretch the trigger over the entire boss area for this to work.
If you want something to happen after the death of the conditional boss on your map, then do the following. In trigger outputs OnEndTouch > text > Display. This is an example where if the boss dies then the game_text entity will run

conclusion

I hope this guide helped you and you learned something new.
Happy Mapping!
3 条留言
MGE Опарыш 2024 年 7 月 16 日 上午 6:29 
you just can use npc_maker:spycon:
ItsYuri 2023 年 3 月 14 日 上午 10:11 
Mmmm, since you're just pasting the NPC ID on the entity, I don't think it even needs any kind of embedding. Like, I'm doing the same thing without any kind of manual embedding, you just need to be subscribed to the addon in order to make thoose entities spawn.
jose guilherme 2023 年 1 月 4 日 上午 7:19 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa