User:Alvin/Sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
FGD Modification
FGD Modification


'''Half-Life/Mods Map Construction Tool'''
"Garry's Mod" (Tools > Options > Edit > Add)


Making Models Appear
Game Data Files:
(orangebox/bin)
HalfLife2.fgd = Ep2 (HL2 as well)
base.fgd
cstrike.fgd = CS:S
dod.fgd = DoD:S
hl2mp.fgd = HL2:DM (could be needed)
portal.fgd = Portal
tf.fgd = TF2 (garrysmod/garrysmod)
Garrysmod.fgd (OPTIONAL)


To make a model appear in the 3D view, three things must be done. First, the "Game Directory" (and/or "Mod Directory") property in Tools / Options / Game Configurations must be set. Second, the models must be unpacked into the proper folder. Third, the entity definition in the FGD must include the studio() helper. This is done one of two ways.


case 1:
Default Point Entity class: info_player_start
@PointClass studio() = entity_name
[
model(studio) : "Model"
]


In this case, the entity initially appears as the flatshaded box we've come to know and love, until a model is specified for its "model" property, at which time the model is then displayed in the 3D view.
Default SolidEntity class: func_detail


case 2:
Cordon Texture: tools/toolsskybox
@PointClass studio("models/some_model.mdl") = entity_name []


In this case, the model is explicitly defined in the entity properties, and will always appear as this model in Hammer's 3D view.
Game Executable Directory: $SteamUserDir\garrysmod


Note that in either case, the model must be present in the specified folder or it will simply appear as the flatshaded box.
Game Directory: $SteamUserDir\garrysmod\garrysmod


Setting Model Animation Sequences
Hammer VMF Directory: (Where you want to save and load VMF saves for Garrysmod) i use.. $SteamUserDir\garrysmod\garrysmod\maps\vmf


To enable the ability to set the animation sequence of a model in the 3D view, a "sequence" property must be added to an entity. The value of "sequence" is an integer corresponding to the animation in the model. For example, the monster_hgrunt_dead entity in the FGD has the following property added to it:
Now go to the last Tab, Build programs..


sequence(Choices) : "Animation Sequence (editor)" : 44 =
Game Executable: $SteamUserDir\garrysmod\hl2.exe
[
44 : "deadstomach"
45 : "deadside"
46 : "deadsitting"
]


This could just have easily been setup as an integer, as the Choices variable type just lets you give a list of integers with descriptive names to choose from.
BSP $SteamUserDir\sourcesdk\bin\orangebox\bin\vbsp.exe


Note that the animation sequence setting only affects the display of the model in the editor, not in the game. This is mainly useful for differentiating between things like monster_scientist, monster_sitting_scientist, and monster_scientist_dead, which would otherwise all show the same model, plus it will greatly aid in the placement of scripted sequences.
VIS $SteamUserDir\sourcesdk\bin\orangebox\bin\vvis.exe
 
RAD $SteamUserDir\sourcesdk\bin\orangebox\bin\vrad.exe
 
Place compiled maps... $SteamUserDir\garrysmod\garrysmod\maps
 
It will say that the changes will show when you open hammer another time but you need to restart Source SDK if you made a new config in order to see your new config in the selection menu.  






Tagalog, pwede ba? :(
Tagalog, pwede ba? :(

Revision as of 19:45, 19 July 2011

FGD Modification

"Garry's Mod" (Tools > Options > Edit > Add)

Game Data Files: (orangebox/bin) HalfLife2.fgd = Ep2 (HL2 as well) base.fgd cstrike.fgd = CS:S dod.fgd = DoD:S hl2mp.fgd = HL2:DM (could be needed) portal.fgd = Portal tf.fgd = TF2 (garrysmod/garrysmod) Garrysmod.fgd (OPTIONAL)


Default Point Entity class: info_player_start

Default SolidEntity class: func_detail

Cordon Texture: tools/toolsskybox

Game Executable Directory: $SteamUserDir\garrysmod

Game Directory: $SteamUserDir\garrysmod\garrysmod

Hammer VMF Directory: (Where you want to save and load VMF saves for Garrysmod) i use.. $SteamUserDir\garrysmod\garrysmod\maps\vmf

Now go to the last Tab, Build programs..

Game Executable: $SteamUserDir\garrysmod\hl2.exe

BSP $SteamUserDir\sourcesdk\bin\orangebox\bin\vbsp.exe

VIS $SteamUserDir\sourcesdk\bin\orangebox\bin\vvis.exe

RAD $SteamUserDir\sourcesdk\bin\orangebox\bin\vrad.exe

Place compiled maps... $SteamUserDir\garrysmod\garrysmod\maps

It will say that the changes will show when you open hammer another time but you need to restart Source SDK if you made a new config in order to see your new config in the selection menu.


Tagalog, pwede ba? :(