Jump to content

View New Content
Forums
Photo
- - - - -

GMR Mapping Entities Handbook


  • Please log in to reply
61 replies to this topic

#1 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 25 November 2011 - 00:54

GMR Mapping Entities Handbook

Certain parts of this guide apply to the LDT GMR server only as they are custom entities.
When custom entities are added tot the server, it will be reported in this thread, and this post will be updated.
This information is much more accurate than the GMR mapping page on the wiki.


Required knowledge:
-How to make and compile a map with Hammer in general.
-How to add keyvalues (properties with values) to entities.
-The difference between brush and point entities.


How to read this information:

Entityname type
Required:
Do you always need this entity? When do you need it?
Description:
A destription of the entity.
Keyvalues:
Property possible_values


GMR mapping entities:

info_gamemode point
Required:
Always.
Description:
Makes garrysmod know that this is gmodracer map.
Keyvalues:
GamemodeName gmodracer

info_gametype_force point
Required:
Recommended is to always have one.
Description:
Configure this map to be a race or demolition map. Only use one.
Keyvalues:
forcegame 1 for race, 2 for demolition

trigger_checkpoint brush
Required:
For race maps: Always at least 3 (much more is better). Not for demolition.
Description:
For race maps only. Players are required to drive through all checkpoints to finish the race.
Make sure it is NOT possible to jump/spazz over the checkpoints! If a player misses a checkpoint, you failed.
Keyvalues:
number Each track's checkpoints should start at one and count up.

info_vehicle_spawn point
Required:
Always. Recommended is to put 24 of em.
Description:
Cars spawn on these points. Place a little above the ground, like 32 units. (I am working on a "drop certain amount to ground" system)
You can set the angles of the car spawning at a point by adding a angles attribute. To find the angles you need one can use a prop_physics entity with car model to determine the angles. If no angles attribute is found, it works like this:
The angles of the cars when spawned work like this:
In race maps, the cars spawn in the direction of the vector from the 1st to the 2nd checkpoint center.
In arena maps, the cars spawn with a random yaw.
Keyvalues:
number This is the order in which the cars spawn. On race maps start with 1 on the front row on the best position (donators usually spawn here).
angles # # # Anlges are defined as three nummeric values with spaces between them. # ranges from 0 to 360 (-180 to 180 is also possible) pitch jaw roll

func_garage brush
Required:
No, unless you want a testing area.
Description:
If a player presses F3 within this volume, he will spawn his testing vehicle.
Keyvalues:
None

ent_scoreboard brush
Required:
Recommended to have in the waiting area.
Description:
This is where the map records are drawn. Make sure it is large enough. Needs to have a matching info_scoreboard_face. It is recommended to make sure the entity center is in the middle of the brush.
Keyvalues:
scoreboard_id number Needs to match number of scoreboard face entity.

info_scoreboard_face point
Required:
If you have a ent_scoreboard, this entity is required.
Description:
A scoreboard needs to know which side is front. Place this in front the scoreboard, exactly in the middle. If you have multiple scoreboards, make sure each of them have their own unique scoreboard_id on the ent_scoreboard and info_scoreboard_face pair.
Keyvalues:
scoreboard_id number Needs to match id of ent_scoreboard this entity belongs to.

trigger_kill brush
Required:
No.
Description:
A player will instantly die upon touching this volume.
Keyvalues:
None

trigger_multiple brush
Required:
No.
Description:
Use this to create "buttons" or make cars work with the I/O system.
Keyvalues:
See for yourself, this is a normal source entity.

trigger_damage brush
Required:
No.
Description:
A player gets damage over time if his car is in this volume, or gets damage upon touching it.
Keyvalues:
damage # A number, amount of damage it deals.
interval # Time between getting that amount of damage.


Relay triggers

logic_relay point
Required:
No.
Description:
All logic relays with the Name keyvalue like a name listed below will fire their outputs on the given moments. Make sure the relay is enabled or else it wont work (Though if you want to you can toggle them on and off with other IO, this will cause them to work when enabled and not when disabled.)
Basically, the gamemode fires the "Trigger" input.
It should be obvious which names get called when :P
Possible names:
race_start
race_end
countdown_start

Edited by psycix, 18 October 2012 - 17:36.

LDT is LDT.


#2 FRAG

FRAG

  • 6,265 posts

    Not your normal S'H'A'R'K

Posted 25 November 2011 - 00:57

Can I just point one thing out? The GMR mapping page on the wiki is marked for deletion anyway so this will be the only resource for GMR mapping it seems (sorry was just looking through the wiki's deletion pages before reading this thread xD)

[FRAGleveldesign.com] "The home of FRAG"

76561197980033738.png

 


#3 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 25 November 2011 - 01:03

That as well.
And I thought people could use some proper documentation :)

LDT is LDT.


#4 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 25 November 2011 - 01:37

Wow, this documentation will be really useful for gmr mappers, and, it's very well structured!
The new entities (in development) are very good additions to gmr!

#5 Hardcore Bob

Hardcore Bob

  • 19,525 posts

    I am the one who knocks.

Posted 25 November 2011 - 01:37

I was actually thinking about a GMR mapping guide, but I refrained from it, because I knew people were gonna post:
"Lol you didn't even make a map yourself."

PS: Does trigger_kill affect players too?

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#6 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 25 November 2011 - 01:45

@bob
imo it doesn't matter if you've made a map or not, as long as you know everything needed to make a documentation ^^.


Oh, and... sticky this thread? I think it will be very valuable to every mapper out there :3!

#7 Hardcore Bob

Hardcore Bob

  • 19,525 posts

    I am the one who knocks.

Posted 25 November 2011 - 02:13

Stickied.

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#8 my_hat_stinks

my_hat_stinks

  • 4,340 posts

    Not a people person

Posted 25 November 2011 - 11:48

trigger_damage


Wouldn't it be simpler to make a trigger_hurt work with the cars, instead?
That way mappers can still use what they're used to

You could even try and make it read the flags "Only clients in vehicles" and "Only clients not in vehicles" or something :3

#9 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 25 November 2011 - 14:22

Well thats the thing, a trigger_damage is custom and deals the damage through the gamemode's damage system, which has its benefits.

LDT is LDT.


#10 Pandaboy

Pandaboy

  • 940 posts

    Maps - Models - Textures

Posted 29 November 2011 - 00:49

I found a really quick way to place spawn points with angles and numbers, that saves you a lot of work and time.


  • Place (24) prop_dynamics with "models/buggy.mdl" model where you want all spawns to be, and change pitch/yaw/roll to whatever you want. place them so the wheels are about 4 units above the ground.
  • Select all of them, turn off smartedit, and change the entity to "info_vehicle_spawn". If they kept all their keyvalues, you did it correctly. for the angles, it should say "angles (different)".
  • Remove all keyvalues, except angles
  • With all of them still selected, add new keyvalue "number" with a value of "0".
  • Select each info_vehicle_spawn one-by-one and change "number" to a unique value for each entity, between 1-24 (24 being the amount of spawns placed).


By doing it this way, the only thing you manually have to change for each spawn point is "number". Besides being very time saving, it also eliminates any typos you would make because you're sick of placing all spawns xD


#11 Bamboy

Bamboy

  • 150 posts

    User

Posted 08 February 2012 - 03:46

Is there an addon version of this for testing purposes somewhere? Would be very nice to have for mappers, even if it wasn't the most updated or complete version.

#12 Hardcore Bob

Hardcore Bob

  • 19,525 posts

    I am the one who knocks.

Posted 08 February 2012 - 16:27

I'm afraid not.
GMR requires a .dll module, which is the essence of the gamemode. Without it, all the Lua in it is useless.
This module is very valuable and not to be given out to others. Any working GMR version we would give you would at least contain the module.

That's why it's impossible for us to give you a working gamemode.

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#13 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 08 February 2012 - 16:58

Hmmm that plus the fact that GMR isn't easy to strip down.
The guy who made GMR is a messy coder, GMR's code is a pile of shit, where a careful adjustment can already bring everything down to twitching limbs. I considered making a stripped down version for you to test, but sadly enough, this would be near impossible, I would probably remake the gamemode from scratch, it'd be easier.

LDT is LDT.


#14 Attacus

Attacus

  • 2,952 posts

    aka Keith.

Posted 09 February 2012 - 18:18

since func_garage is a brush, how can I set the direction the player faces when he spawned a car?
How many ranked players did it take to deal with a simple RDM? 3-4 Trusteds and a Moderator

[SIGPIC][/SIGPIC]

#15 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 09 February 2012 - 18:49

You cant. It spawns 180* rotated from where the player is looking.

LDT is LDT.


#16 Bamboy

Bamboy

  • 150 posts

    User

Posted 10 February 2012 - 18:34

You cant. It spawns 180* rotated from where the player is looking.


I have noticed this. Could we consider adding a direction variable to func_garage? It causes issues on a lot of maps where spawning your car when facing the wrong way glitches the car partway into the wall.

To make older maps compatible, we could stick with the current spawn conditions if there is no direction variable given.

#17 Psycix

Psycix

  • 11,430 posts

    Owner

Posted 10 February 2012 - 18:45

Hmmm every GMR player who has gotten stuck a few times knows how NOT to spawn his car. xD

LDT is LDT.


#18 Hardcore Bob

Hardcore Bob

  • 19,525 posts

    I am the one who knocks.

Posted 10 February 2012 - 21:42

Gotta go with psycix here.
It's like knowing not to dig straight down in Minecraft. :P

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix


#19 Max

Max

  • 3,257 posts

    I like rusty stuff

Posted 26 February 2012 - 15:54

I just made a fgd file for gmr, so the entities dont show up as obsolete and get ignored in the error report.
Download here

Put the file into C:\Program Files\Steam\SteamApps\%Username%\sourcesdk\bin\orangebox\bin
Then, in hammer, go to Tools>Options
a Window like that should pop up:
Posted Image
Press the "Add" button and select the fgd file, click "open" and you are done

to psycix: feel free to delete this and put it into main post

Edited by Max, 26 September 2012 - 23:26.


#20 Hardcore Bob

Hardcore Bob

  • 19,525 posts

    I am the one who knocks.

Posted 26 February 2012 - 15:56

Nice, I like the effort, but I'm fine without. :P

Twitter.png _____ steam-icon-32.png _____ lgfDCxv.png

         Game Reviews | Gathers | Send me a PM [/size]


"If you cry because someone on the internet calls you a retard, you are a retard and should not be on the internet." - Psycix





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users