Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Tutorial Basic EntSpy tutorial.

Discussion in Resources & Tutorials started by enviolinador, Nov 2, 2013

  1. May 31, 2012
    For quite a long time, I've been fixing old maps that stopped working or needed tweaking. To do this without intrusive decompile methods (that, at times, damage the maps), and if only entity related, I used EntSpy. EntSpy is a little handy java program that lets you edit any entity from a map and save the changes.

    I will explain the program and will give a few hints on how to use it, but I will not go in any kind of depth. I assume that you have some mapping knowledge. I will be giving a sample map (ze_entspy_demo_v1) to practice on (I placed 2-3 'issues' in it, which the map itself explains when you're playing it). With this sample map you should be able to get ze_colors_v1, a map I've done today just after doing ze_entspy_demo_v1. On a side note ze_colors_v1 is fully playable, so if you were to do your tests name your result with a different name in case some server decided to use ze_colors_v1 (as a 1 day map it's kinda eh, but I don't like clashing clashes so I added this thissy thing...)

    You can get EntSpy from this link: http://www.bagthorpe.org/bob/cofrdrbob/entspy.html or, alternatively, http://css.gamebanana.com/tools/4730

    When you run it and load up a map you'll get something like this:

    As you can see, the entities are displayed as in a tree, with worldspawn being the root node (DON'T EVER DELETE WORLDSPAWN - HELL AWAITS IF YOU DO IT).

    The buttons are fairly straightforward. We will, first, delete all lightglows, selecting one by one and pressing 'Del'. This deletes the entity forever and ever, removing the edict if it is a networked entity (the edict will never be - the entity is FULLY removed and will never appear in the map).


    Now that we've deleted that lightglow we will put it back. Although we could use 'Add', we would need to fill all the KeyValues and that is pretty boring. I usually copy an existing entity and modify the KVs until I get the entity I wanted. In this case I will just copy another lightglow and change the origin. Of course, if we want to add an entity (say a color_correction) you will need to add each KeyValue.

    We know how to delete, create (and copy) entities, and how to modify them now. We will take a look at adding inputs, looking for the 'Console' entity which is a point_servercommand. I want to change the first console message that is displayed on the map, because it's lame. For that we will type Console in the little box on the left, at the bottom, and we will hit find.


    Now we will open the 'Linked from' tab and we will go to the logic_auto, to change the first output fired. We will, afterwards, click the button with the arrow thing and we will be on the logic_auto.


    The format for outputs is the following:

    Key = Event (OnMapSpawn in this case, but it might be OnStartTouch, OnHurt, OnHitmax, etc)
    Value = Output to fire.

    Outputs follow this syntax:


    For example,


    would once ignite the activator (that is, the entity to start the I/O chain) for 10 seconds (of lifetime) after two seconds of the event.

    Going along with the tutorial, we will change the 'Hey there!' line, which is:

    OnMapSpawn Console,Command,say ** Hey there! This is a tutorial disguised as a map! **,3,-1

    I will change it with

    OnMapSpawn Console,Command,say ** Hey there! This is a tutorial now - not a map! **,3,-1


    And this should be enough.


    How do you fix classic maps that became laggy? Most maps that became laggy did so because they had a godawful amount of prop_dynamics which, after the OB update, happened to create phys_bone_followers. To fix this you have to go through all the prop_ entities adding the key 'DisableBoneFollowers' with Value '1'.

    How do you add spawnpoints or fix broken ones? Delete the broken ones by going one by one of the info_player_counterterrorist/terrorist entities comparing with the list of origins that the ingame console outputs and copy the working ones into new, working origins. You can always copy them on top of existing spawnpoints, making them 'stack' if the map in question doesn't really have enough room.

    How do I get the field names and valid values for them? I use both Valve's dev wiki and Hammer. If you disable SmartEdit in Hammer, you will see the KeyValues in 'raw mode', being able to read them directly.

    Does this work for ZM so I can stop being a jerk that decompiles maps, splatters a name, changes 4 props and calls it a new version? Yes. You can change the classname from here, as well as move or remove props.

    Can I keep the same name on the map after using EntSpy? If it was your map and you didn't release it yet (so you use it to correct little mistakes found after testing) then yes, otherwise people will get the 'map difers' error. If you rename, remember to rebuild cubemaps (you should have done it for starters...).

    Where are the links to the maps you mentioned? I'd like to follow the tutorial step by step...

    ze_entspy_demo_v1: http://www.sendspace.com/file/5yne0q - http://www.mediafire.com/?keta1b99z9391mb
    ze_colors_v1: http://www.sendspace.com/file/d6700t - http://www.mediafire.com/?26p1v91a4scrcgc
    • Mapping King Mapping King x 6
    • Useful Useful x 2
      enviolinador, Nov 2, 2013 Last edited by enviolinador, Dec 15, 2013
    • Jul 20, 2012
      all hail
    • May 31, 2012
      Since I posted this and I feel somewhat obligated to do it, I took the time today to decompile EntSpy using http://www.javadecompilers.com/ and change it around so that it doesn't exit when reading CS:GO's version 21 BSPs.

      Basically, I made the thing just pop a message (only shows if you run it through cmd via java -jar entspy.jar, so it won't be a hassle) if it gets a version it wasn't intended for (20, 19 or 17). I haven't tested it thoroughly, but I opened a map, deleted two edict entities, loaded it in GO and they were gone. No idea if preserve checksum works, you tell me if it does.

      I'll probably be upping this to gamebanana soon. Also, I'm a cheap bastard, so I took the .jar entspy already had and replaced the bytecode. It works. Thug life. I've included the source code, so that anyone having issues in the future doesn't have to google 'java decompiler' and click the second link. Have fun.

      EDIT: http://csgo.gamebanana.com/tools/5876

      Attached Files:

      • Like Like x 4
      • Winner Winner x 1
        enviolinador, Aug 18, 2015 Last edited by enviolinador, Aug 19, 2015
      • Mar 30, 2013
        VIDE can be used to do that on csgo maps. But checksum cant be preserved, and its not as handy as entspy

        Maybe this can, gg
        Moltard, Aug 24, 2015 Last edited by Moltard, Aug 24, 2015
      • May 31, 2012
        Yeah, I've had to use VIDE a few times but I dislike the UI, too much stuff crammed into it. I haven't tried myself, but after upping it to GB I was told it preserves checksum just fine. The links from entity outputs are not there, though, probably because outputs in GO use a weird control character instead of comas.