STEAM 组
Soure Mult-Tool SourceMT
STEAM 组
Soure Mult-Tool SourceMT
37
游戏中
207
在线
成立于
2013 年 11 月 23 日
所有讨论 > Help > 主题详情
Fauxtrot 2016 年 6 月 22 日 下午 5:25
halflife2.fgd causes Hammer errors
I am new to Source mapping, so it's been hard finding solid post-Steampipe help for making Garry's Mod maps. This tool has been a big help! That being said, I am a little curious about this Hammer error that occurs when I load the garrysmod.fgd (and by proxy, halflife2.fgd) included with the Source Multi-Tool:

"File *sourcemultitool-path*\fgd\halflife2.fgd, line 37: 'boolean' is not a valid variable type"
This error occurs on several lines before Hammer decides "nah, too many errors, you dun f'd this up".

As far as I can tell, I don't need halflife2.fgd for GMOD 13 mapping - all I want at the moment are assets from CS:S and EP2 and those fgd files were fine, and compiling and running worked great. What's up with halflife2.fgd? Should I be concerned about this?

EDIT: I copied the halflife2.fgd packaged with Garry's Mod into Source Multi-Tool, and the errors went away. After opening the two halflife2.fgd's in Notepad to spot any differences, I saw that multiple lines were removed and method parameters were altered. What's the reasoning behind this, if you don't mind me asking?
最后由 Fauxtrot 编辑于; 2016 年 6 月 22 日 下午 5:39
< >
正在显示第 1 - 3 条,共 3 条留言
Wazanator 2016 年 6 月 22 日 下午 5:58 
halflife2.fgd will throw errors in Hammers error reporter but you can ignore them. Are you sure it is causing hammer to crash?

An FGD file is basically a recipe book for entities, it tells hammer "this is entity is called this, has these keyvalues that can be set, and these are the inputs and outputs it has".

FGD doesn't determine assets, that's all taken care of by the gameinfo.txt for the game/mod.

You can open up an fgd file in a text editor like notepad++ and take a look at it if you want to see what entities it adds. The halflife2.fgd for example includes all the information for hl2 entities like npc_combine_s and npc_citizen. If you're not going to be using any HL2 entities then you don't need to use it and just using the CSS one should be fine.

The only reason I can think of that would crash hammer from an fgd is if there was for some reason an entity conflict between two fgds and even then it should just revert to mount order.
最后由 Wazanator 编辑于; 2016 年 6 月 22 日 下午 5:59
Fauxtrot 2016 年 6 月 22 日 下午 6:17 
引用自 Wazanator
halflife2.fgd will throw errors in Hammers error reporter but you can ignore them. Are you sure it is causing hammer to crash?
I wasn't exactly a hard crash or anything like that; it was that one error I described but multiple times, followed by "-too many errors; aborting."

Setup image[i.gyazo.com] (I renamed the old halflife2.fgd as DONTUSE)
Hammer message[i.gyazo.com]

Also, thank you for explaining fgd files for me, they make a lot more sense now.
Wazanator 2016 年 6 月 22 日 下午 8:49 
Yeah that error is common and isn't one you should have to be worried about.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50

所有讨论 > Help > 主题详情