How do I get certain entities from gmod to hammer.
10 replies, posted
I plan on making my first hammer map a zombie map. However, in the list of entities available, my npc's from gmod dont show up. It has the default npcs but i have a special zombie type i plan on using. Does anyone know how i could get these other npc's to appear?
Which type of zombie do you require? You're being a big vague.
Sorry I have a zombie type i downloaded from garrysmod.org and thats the one I want. Its more of a generic question to see how to get downloaded content onto hammer.
You're going to have to code it if you want an entirely new entity, but if it's a zombie model replacement I'm sure you can replace the model somehow.
Well its not new its somethign i downloaded so i should be able to get that one to hammer shouldnt I.
[QUOTE=bloody fox;27904619]Well its not new its somethign i downloaded so i should be able to get that one to hammer shouldnt I.[/QUOTE]
No. You will need to custom code it. Or make do with the zombies you have...poor misunderstood things though they may be.
And it is new. It isn't standard zombieage. I do hope this isn't for a zombie abuse map. That would be wrong and hurtful to the innocent zombiekind.
you have to create a custom .fgd file for your entitys to make them show up in hammer editor.
The best way to learn how to create an fgd file is to read this article:
[url]http://developer.valvesoftware.com/wiki/FGD[/url]
This is an example how the npc_citizen is added to the hammer editor via the fgd file:
[code]
@NPCClass base(BaseNPC,Parentname, TalkNPC, PlayerCompanion ) studio() = npc_citizen : "Citizen"
[
spawnflags(Flags) =
[
65536 : "Follow player on spawn" : 0
131072 : "Medic" : 0
262144 : "Random Head" : 1
524288 : "Ammo Resupplier" : 0
1048576 : "Not Commandable" : 0
2097152 : "Don't use Speech Semaphore - OBSOLETE" : 0
4194304 : "Random male head" : 0
8388608 : "Random female head" : 0
16777216 : "Use RenderBox in ActBusies" : 0
]
additionalequipment(choices) : "Weapons" : "0" =
[
"weapon_smg1" : "SMG1"
"weapon_ar2" : "AR2"
"weapon_stunstick" : "Stun Stick"
"weapon_crowbar" : "Crow Bar"
"weapon_shotgun" : "Shotgun"
"weapon_beerbottle" : "Beer Bottle"
"weapon_beerbottle2" : "Beer Bottle2"
"weapon_rpg" : "RPG"
"0" : "Nothing"
]
ammosupply(choices) : "Ammo to Resupply (if spawnflag set)" : "SMG1" =
[
"Pistol" : "Pistol"
"SMG1" : "SMG1"
"SMG1_Grenade" : "SMG1 Grenade"
"AR2" : "AR2"
"Buckshot" : "Shotgun"
"RPG_Round" : "RPG"
"Grenade" : "Grenade"
"XBowBolt" : "Crossbow Bolt"
]
ammoamount(integer) : "Amount of ammo to give" : 1
citizentype(choices) : "Type" : "Default" =
[
0 : "Default"
1 : "Downtrodden"
2 : "Refugee"
3 : "Rebel"
4 : "Unique"
]
expressiontype(choices) : "Expression Type" : "Random" =
[
0 : "Random"
1 : "Scared"
2 : "Normal"
3 : "Angry"
]
//!!!BUGBUG - don't ship with these names
//!!!FIXME - don't ship with these names
model(choices) : "Model" : "models/humans/group01/male_01.mdl" =
[
"models/humans/group01/male_01.mdl" : "Male 1"
"models/humans/group01/male_02.mdl" : "Male 2"
"models/humans/group01/male_03.mdl" : "Male 3"
"models/humans/group01/male_04.mdl" : "Male 4"
"models/humans/group01/male_05.mdl" : "Male 5"
"models/humans/group01/male_06.mdl" : "Male 6"
"models/humans/group01/male_07.mdl" : "Male 7"
"models/humans/group01/male_08.mdl" : "Male 8"
"models/humans/group01/male_09.mdl" : "Male 9"
"models/humans/group01/female_01.mdl" : "Female 1"
"models/humans/group01/female_02.mdl" : "Female 2"
"models/humans/group01/female_03.mdl" : "Female 3"
"models/humans/group01/female_04.mdl" : "Female 4"
"models/humans/group01/female_06.mdl" : "Female 5"
"models/humans/group01/female_07.mdl" : "Female 6"
"models/humans/male_cheaple.mdl" : "Cheaple Male 1"
"models/odessa.mdl" : "Odessa. DO NOT USE."
]
ExpressionOverride(string) : "Facial expression override"
notifynavfailblocked(choices) : "Fire output when Nav is blocked?" : 0 =
[
0 : "No"
1 : "Yes"
]
neverleaveplayersquad(choices) : "Permanent squad member?" : 0 : "A permanent squad member cannot leave the player's squad unless killed or explicity removed by entity I/O. Only use this if you're sure you want to override the default AI." =
[
0 : "No. This is default behavior."
1 : "Yes, stay in squad until death."
]
denycommandconcept(string) : "Deny command speech concept" : "" : "If you want your citizens to squad with the player but not obey commands the player gives to move the squad, put a concept here and this citizen will speak the concept instead of obeying the order."
//Inputs
input RemoveFromPlayerSquad(void) : "Remove from player squad, instantly."
input SetExpressionOverride(string) : "Set facial expression override"
input StartPatrolling(void) : "Patrol whenever I'm idle or alert."
input StopPatrolling(void) : "Stop patrolling when I'm idle or alert."
input SetCommandable(void) : "Make a previously uncommandable citizen commandable"
input SetMedicOn(void) : "Set the medic flag on. Will not change the model or skin of the citizen."
input SetMedicOff(void) : "Set the medic flag off. Will not change the model or skin of the citizen."
input SetAmmoResupplierOn(void) : "Set the ammo-resupplier flag on. Will not change the model or skin of the citizen."
input SetAmmoResupplierOff(void) : "Set the ammo-resupplier flag off. Will not change the model or skin of the citizen."
// Outputs
output OnJoinedPlayerSquad(void) : "Fires when joins player squad"
output OnLeftPlayerSquad(void) : "Fires when leaves player squad"
output OnFollowOrder(void) : "Fires when ordered to follow player"
output OnStationOrder(void) : "Fires when ordered to a location by player"
output OnPlayerUse(void) : "Fires when a player +USEs the citizen"
output OnNavFailBlocked(void) : "Fires when this Citizen's movement fails because he/she is blocked."
]
[/code]
[QUOTE=kaukassus;27912564]you have to create a custom .fgd file for your entitys to make them show up in hammer editor.
The best way to learn how to create an fgd file is to read this article:
[url]http://developer.valvesoftware.com/wiki/FGD[/url]
This is an example how the npc_citizen is added to the hammer editor via the fgd file:
[code]
@NPCClass base(BaseNPC,Parentname, TalkNPC, PlayerCompanion ) studio() = npc_citizen : "Citizen"
[
spawnflags(Flags) =
[
65536 : "Follow player on spawn" : 0
131072 : "Medic" : 0
262144 : "Random Head" : 1
524288 : "Ammo Resupplier" : 0
1048576 : "Not Commandable" : 0
2097152 : "Don't use Speech Semaphore - OBSOLETE" : 0
4194304 : "Random male head" : 0
8388608 : "Random female head" : 0
16777216 : "Use RenderBox in ActBusies" : 0
]
additionalequipment(choices) : "Weapons" : "0" =
[
"weapon_smg1" : "SMG1"
"weapon_ar2" : "AR2"
"weapon_stunstick" : "Stun Stick"
"weapon_crowbar" : "Crow Bar"
"weapon_shotgun" : "Shotgun"
"weapon_beerbottle" : "Beer Bottle"
"weapon_beerbottle2" : "Beer Bottle2"
"weapon_rpg" : "RPG"
"0" : "Nothing"
]
ammosupply(choices) : "Ammo to Resupply (if spawnflag set)" : "SMG1" =
[
"Pistol" : "Pistol"
"SMG1" : "SMG1"
"SMG1_Grenade" : "SMG1 Grenade"
"AR2" : "AR2"
"Buckshot" : "Shotgun"
"RPG_Round" : "RPG"
"Grenade" : "Grenade"
"XBowBolt" : "Crossbow Bolt"
]
ammoamount(integer) : "Amount of ammo to give" : 1
citizentype(choices) : "Type" : "Default" =
[
0 : "Default"
1 : "Downtrodden"
2 : "Refugee"
3 : "Rebel"
4 : "Unique"
]
expressiontype(choices) : "Expression Type" : "Random" =
[
0 : "Random"
1 : "Scared"
2 : "Normal"
3 : "Angry"
]
//!!!BUGBUG - don't ship with these names
//!!!FIXME - don't ship with these names
model(choices) : "Model" : "models/humans/group01/male_01.mdl" =
[
"models/humans/group01/male_01.mdl" : "Male 1"
"models/humans/group01/male_02.mdl" : "Male 2"
"models/humans/group01/male_03.mdl" : "Male 3"
"models/humans/group01/male_04.mdl" : "Male 4"
"models/humans/group01/male_05.mdl" : "Male 5"
"models/humans/group01/male_06.mdl" : "Male 6"
"models/humans/group01/male_07.mdl" : "Male 7"
"models/humans/group01/male_08.mdl" : "Male 8"
"models/humans/group01/male_09.mdl" : "Male 9"
"models/humans/group01/female_01.mdl" : "Female 1"
"models/humans/group01/female_02.mdl" : "Female 2"
"models/humans/group01/female_03.mdl" : "Female 3"
"models/humans/group01/female_04.mdl" : "Female 4"
"models/humans/group01/female_06.mdl" : "Female 5"
"models/humans/group01/female_07.mdl" : "Female 6"
"models/humans/male_cheaple.mdl" : "Cheaple Male 1"
"models/odessa.mdl" : "Odessa. DO NOT USE."
]
ExpressionOverride(string) : "Facial expression override"
notifynavfailblocked(choices) : "Fire output when Nav is blocked?" : 0 =
[
0 : "No"
1 : "Yes"
]
neverleaveplayersquad(choices) : "Permanent squad member?" : 0 : "A permanent squad member cannot leave the player's squad unless killed or explicity removed by entity I/O. Only use this if you're sure you want to override the default AI." =
[
0 : "No. This is default behavior."
1 : "Yes, stay in squad until death."
]
denycommandconcept(string) : "Deny command speech concept" : "" : "If you want your citizens to squad with the player but not obey commands the player gives to move the squad, put a concept here and this citizen will speak the concept instead of obeying the order."
//Inputs
input RemoveFromPlayerSquad(void) : "Remove from player squad, instantly."
input SetExpressionOverride(string) : "Set facial expression override"
input StartPatrolling(void) : "Patrol whenever I'm idle or alert."
input StopPatrolling(void) : "Stop patrolling when I'm idle or alert."
input SetCommandable(void) : "Make a previously uncommandable citizen commandable"
input SetMedicOn(void) : "Set the medic flag on. Will not change the model or skin of the citizen."
input SetMedicOff(void) : "Set the medic flag off. Will not change the model or skin of the citizen."
input SetAmmoResupplierOn(void) : "Set the ammo-resupplier flag on. Will not change the model or skin of the citizen."
input SetAmmoResupplierOff(void) : "Set the ammo-resupplier flag off. Will not change the model or skin of the citizen."
// Outputs
output OnJoinedPlayerSquad(void) : "Fires when joins player squad"
output OnLeftPlayerSquad(void) : "Fires when leaves player squad"
output OnFollowOrder(void) : "Fires when ordered to follow player"
output OnStationOrder(void) : "Fires when ordered to a location by player"
output OnPlayerUse(void) : "Fires when a player +USEs the citizen"
output OnNavFailBlocked(void) : "Fires when this Citizen's movement fails because he/she is blocked."
]
[/code][/QUOTE]
Thanks man, this will be really useful for me as well.
If you place an entity and rename it to match the name of an LUA-based entity, it will show up as an [obsolete] but it will still work. You don't need to add it to the *.FGD at all.
[QUOTE=BabyFawnLegs;27917498]If you place an entity and rename it to match the name of an LUA-based entity, it will show up as an [obsolete] but it will still work. You don't need to add it to the *.FGD at all.[/QUOTE]
he doesent have to, but its better because then you can add triggers/keyvalues to the entity in hammer.
thanks guys. Also this isnt a zombie abuse map. Just a simple survival map, indoors not overkill on the zombies. Indoors because i cant figure out how to do a skybox.
Sorry, you need to Log In to post a reply to this thread.