Author Topic: Guide: Creating .ent files  (Read 7928 times)

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Guide: Creating .ent files
« on: December 03, 2005, 02:27:26 PM »
Since there hasn't been much documentation concerning this topic, I have created a tutorial regarding the process necessary to create an .ent file for a map.

In this example I will add spawning with weapons to the existing map crates.bsp.

Once we've obtained the map we can navigate to it in the maps directory (typically c:\games\paintball\pball\maps\).  We'll need to open this map in a text editor, I suggest opening it in Wordpad by performing a right click on the file and selecting Open With (or simple Open if Open With is not currently available) and choosing Wordpad.

Don't be alarmed if all you see is illegible characters and/or a bunch of outlined boxes instead of characters.  This is normal.

Now scroll towards the very bottom of the file.  Towards the bottom some text will begin to be legible.  In crates.bsp this begins with:
Code: [Select]
"message" "Insanely Crate\nBy Fryth"
"team2" "blue"
"team1" "red"
"gamemode" "4"

Fortunately for us, all the information we need to create an .ent file is left in plain text so we can copy it all into a separate text editor.  For this you can open another text editor window such as Wordpad or Notepad.

*** It is very important to copy the first { (curly-brace) from the previous line.  Without this your .ent file will cause all sorts of problems.

You should have copied the following:
Code: [Select]
{
"message" "Insanely Crate\nBy Fryth"
"team2" "blue"
"team1" "red"
"gamemode" "4"
"maxteams" "2"
"classname" "worldspawn"
}
{
"classname" "item_pballammo"
"origin" "-15 294 33"
"type" "50"
}
{
"classname" "item_pballammo"
"origin" "216 246 33"
"type" "50"
}
{
"classname" "item_pballammo"
"origin" "312 -121 33"
"type" "50"
}
{
"classname" "item_pballammo"
"origin" "160 70 33"
"type" "50"
}
{
"classname" "item_pballammo"
"origin" "-63 -73 33"
"type" "50"
}
{
"classname" "item_pballammo"
"origin" "-199 182 33"
"type" "50"
}
{
"classname" "weapon_pballgun"
"origin" "536 -9 161"
"type" "autococker"
}
{
"classname" "weapon_pballgun"
"origin" "-479 222 161"
"type" "autococker"
}
{
"classname" "flag"
"origin" "-482 -576 157"
"teamnumber" "1"
}
{
"model" "*1"
"classname" "base"
"teamnumber" "1"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -798 117"
"teamnumber" "1"
"angle" "0"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -722 117"
"teamnumber" "1"
"angle" "0"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -610 117"
"teamnumber" "1"
"angle" "0"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -498 117"
"teamnumber" "1"
"angle" "0"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -382 117"
"teamnumber" "1"
"angle" "0"
}
{
"classname" "item_pballbarrel"
"origin" "-105 -800 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "-105 -800 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "-105 -800 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "-105 -800 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "-105 -800 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "-105 -720 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "-105 -720 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "-105 -720 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "-105 -720 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "-105 -720 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "-105 -608 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "-105 -608 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "-105 -608 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "-105 -608 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "-105 -608 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "-105 -496 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "-105 -496 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "-105 -496 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "-105 -496 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "-105 -496 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "-105 -384 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "-105 -384 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "-105 -384 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "-105 -384 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "-105 -384 27"
"type" "spyder"
}
{
"classname" "flag"
"origin" "546 768 157"
"teamnumber" "2"
}
{
"model" "*2"
"classname" "base"
"teamnumber" "2"
}
{
"classname" "info_player_deathmatch"
"origin" "200 554 117"
"teamnumber" "2"
"angle" "180"
}
{
"classname" "info_player_deathmatch"
"origin" "200 630 117"
"teamnumber" "2"
"angle" "180"
}
{
"classname" "info_player_deathmatch"
"origin" "200 742 117"
"teamnumber" "2"
"angle" "180"
}
{
"classname" "info_player_deathmatch"
"origin" "200 854 117"
"teamnumber" "2"
"angle" "180"
}
{
"classname" "info_player_deathmatch"
"origin" "200 970 117"
"teamnumber" "2"
"angle" "180"
}
{
"classname" "item_pballbarrel"
"origin" "153 552 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "153 552 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "153 552 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "153 552 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "153 552 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "153 632 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "153 632 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "153 632 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "153 632 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "153 632 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "153 744 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "153 744 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "153 744 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "153 744 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "153 744 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "153 856 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "153 856 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "153 856 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "153 856 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "153 856 27"
"type" "spyder"
}
{
"classname" "item_pballbarrel"
"origin" "153 968 155"
"type" "chrome"
}
{
"classname" "item_pballhopper"
"origin" "153 968 123"
"type" "300"
}
{
"classname" "item_pballammo"
"origin" "153 968 91"
"type" "200"
}
{
"classname" "item_pballco2"
"origin" "153 968 59"
"type" "20oz"
}
{
"classname" "weapon_pballgun"
"origin" "153 968 27"
"type" "spyder"
}

Now if you have previous experiencing mapping you may notice that each set of { } represents each entity, starting with the worldspawn entity.

We are now ready to start making modifications to the entities of this map.  What I will do is remove any sets which have a classnames that is item_pballammo, weapon_pballgun, item_pballbarrel or item_pballhopper since I plan on giving each player all of that equipment when they spawn.

Once we've done that we can go ahead and add the following information to each set with the info_player_deathmatch classname.
Code: [Select]
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"

As the fields suggest, that will start everyone with a Carbine, 200 paintballs in their 200 paintball hopper and a pre-loaded 20oz canister of CO2.

The final result should look something like:
Code: [Select]
{
"message" "Insanely Crate\nBy Fryth"
"team2" "blue"
"team1" "red"
"gamemode" "4"
"maxteams" "2"
"classname" "worldspawn"
}
{
"classname" "flag"
"origin" "-482 -576 157"
"teamnumber" "1"
}
{
"model" "*1"
"classname" "base"
"teamnumber" "1"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -798 117"
"teamnumber" "1"
"angle" "0"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -722 117"
"teamnumber" "1"
"angle" "0"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -610 117"
"teamnumber" "1"
"angle" "0"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -498 117"
"teamnumber" "1"
"angle" "0"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "-152 -382 117"
"teamnumber" "1"
"angle" "0"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"model" "*2"
"classname" "base"
"teamnumber" "2"
}
{
"classname" "info_player_deathmatch"
"origin" "200 554 117"
"teamnumber" "2"
"angle" "180"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "200 630 117"
"teamnumber" "2"
"angle" "180"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "200 742 117"
"teamnumber" "2"
"angle" "180"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "200 854 117"
"teamnumber" "2"
"angle" "180"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}
{
"classname" "info_player_deathmatch"
"origin" "200 970 117"
"teamnumber" "2"
"angle" "180"
"givegun" "carbine"
"givehopper" "200"
"givebarrel" "chrome"
"giveammo" "200"
"loadedco2" "20oz"
}

Once everything looks in order and you've ensured that you have a { to open and a } to close each entity set you can save your modifications as crates.ent in the maps\ directory.  Next time you load this map on your local server the entities loaded by the server should reflect those that are contained within your .ent file.

If this is for a dedicated server make sure you upload the .ent file to the server or save it to the path of the dedicated server's pball maps for the changes to take effect.

Feel free to reply with any questions or comments and I'll try my best to address them.
« Last Edit: October 09, 2012, 10:00:46 AM by Chef-Killer »

davew1

  • PGP
  • Posts: 24
Re: Creating .ent files
« Reply #1 on: December 12, 2005, 05:25:56 PM »
time for me to get back to work   and get my crazy servers up again :)

Burt_Gummer

  • Stingray
  • Posts: 63
Re: Creating .ent files
« Reply #2 on: December 12, 2005, 06:19:22 PM »
Sweetness, now I can make some modifications to get more interest in the maps that are getting old at the place where I go to school . . .

Fullmetal_Steeb

  • 68 Carbine
  • Posts: 353
Re: Creating .ent files
« Reply #3 on: June 21, 2007, 03:04:59 PM »
so, could you use this to mod map files you were going to use in pubs to get an advantage by spawning with 'mags while others had pgps? if so, that would DEFINITELY be a bannable offense, correct?

KiLo

  • Autococker
  • Posts: 2086
Re: Creating .ent files
« Reply #4 on: June 21, 2007, 03:06:42 PM »
First there was no need to revive this topic.

Second the server .ent is used not yours.

Fullmetal_Steeb

  • 68 Carbine
  • Posts: 353
Re: Creating .ent files
« Reply #5 on: June 21, 2007, 03:07:43 PM »
well im sorry for posting in a forum.

Eiii

  • Autococker
  • Posts: 4595
Re: Creating .ent files
« Reply #6 on: June 22, 2007, 12:16:39 AM »
well im sorry for posting in a forum.
You're sorry for posting in an old thread in a forum.

so, could you use this to mod map files you were going to use in pubs to get an advantage by spawning with 'mags while others had pgps? if so, that would DEFINITELY be a bannable offense, correct?
No. It's server-side only, so if a server admin WERE to do that, then people could just choose not to play there.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Creating .ent files
« Reply #7 on: June 22, 2007, 03:45:01 PM »
Wow, what a great tutorial :P

Although, for PBCup I started using QuArK to modify the existing entities (to make them even on both sides).  What's great is that you can navigate the .bsp and modify/delete/insert entities wherever is necessary and then copy/paste the information out of the entitiy screen into a new .ent.