Announcement

Collapse
No announcement yet.

Utility for level information?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Utility for level information?

    Hi, is there a program that will output level statistics to a text file?

    The statistics I'm interested in are things like number of monsters/items by type, secrets, size, power-ups etc...

    Cheers,
    Daniel.

  • #2
    Not that I know of.

    You can open the .bsp in a text editor and there is the "entities block" that starts with worldspawn and continues until the end of text. Monsters are entities that are text like "monster_shambler" and such.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      that wouldnt be a bad thing to have!
      Gnounc's Project Graveyard Gnounc's git repo

      Comment


      • #4
        Oh, *some day* I will write that for Quaddicted. I swear...!
        Quake 1 Singleplayer Maps and Mods

        Comment


        • #5
          Hmmm - seems easy enough in concept, I might just integrate that idea into my engine (via a levelstats command).

          Edit: Coupla problems. The reported info will vary depending on game mode and skill. Integrating it into the engine gives a logical solution - just provide the info for the current map in the current mode and skill.

          Other problem: it's possible to spawn new entities while the map is running; this means that the info may very well vary at different times during play. Again, doing it from the engine suggests the solution of just providing the current state based on the contents of sv.edicts.
          Last edited by MH; 03-03-2010, 01:17 PM.
          IT LIVES! http://directq.blogspot.com/

          Comment


          • #6
            Originally posted by mhquake View Post
            ...Other problem: it's possible to spawn new entities while the map is running; this means that the info may very well vary at different times during play. Again, doing it from the engine suggests the solution of just providing the current state based on the contents of sv.edicts.
            This is true. Some Quake mods such as Deathmatch Plus will actually allow Admins to place new entities within a map to help even up the map in the event of someone camping out the RL for example.

            Like the idea of the utility though, particularly if you could intergrate it in to a server browser. I wonder if some easier (non Qstat) means of browsing servers could be on the wish list for those "server" engine coders amongst us

            Kind regards

            Monty
            Mr.Burns
            "Helping to keep this community friendly, helpful, and clean of spammers since 2006"
            WWW: Quake Terminus , QuakeVoid You Tube: QuakeVoid
            Servers: Quake.shmack.net, damage.servequake.com

            News: JCR's excellent ctsj_jcr map is being ported to OOT

            Comment


            • #7
              It would be pretty easy to do everything but the size in perl, including the different number of items/monsters for each skill level or deathmatch mode. To get the size, I could whip something up in quakec that chooses tons of random points in the map to get a percent of space compared to the max size (of non-enhanced quake requiring levels), and thus a value that can be compared between levels.

              How do you want the output to be arranged?

              Comment


              • #8
                You are the man. I mocked up an example text output below:

                Code:
                -------------------- INFO -------------------
                
                Map name:	Introduction
                Filename: 	intro.bsp
                Exits: 		e1m1.bsp, secret1.bsp
                Switches: 	5
                Teleporters:	2
                Secrets:	3
                Size:		Large
                Spawn points:	4
                Single player:	Yes
                Skill modes:	Yes
                Cooperative:	Yes
                Deathmatch:	Yes
                New graphics:	Yes
                New sounds:	Yes
                CD track:	5
                Brushes:	100
                Entities:	100
                Models:		100
                
                ------------------ MONSTERS -----------------
                
                		|------|------|------|------|
                		| EASY | NORM | HARD |  DM  |
                	    	|------|------|------|------|	
                Rotfish     	|  5   |  7   |  9   |      |
                Rottwieler  	|      |      |      |      |
                Zombie		|      |      |      |      |
                Grunt		|      |      |      |      |
                Ogre		|      |      |      |      |
                Enforcer	|      |      |      |      |
                Knight		|      |      |      |      |
                Death Knight	|      |      |      |      |
                Fiend		|      |      |      |      |
                Scrag		|  10  |  12  |  16  |      |
                Spawn		|      |      |      |      |
                Vore		|      |      |      |      |
                Shambler	|      |      |      |      |
                Other*		|      |      |      |      |
                		|------|------|------|------|
                TOTAL		|  15  |  19  |  25  |      |
                		|------|------|------|------|
                
                ------------------- ITEMS -------------------
                
                		|------|------|------|------|
                		| EASY | NORM | HARD |  DM  |
                	    	|------|------|------|------|	
                Small Shells   	|  5   |  7   |  9   |      |
                Big Shells  	|      |      |      |      |
                Small Nails	|      |      |      |      |
                Big Nails	|      |      |      |      |
                Small Rockets	|      |      |      |  1   |
                Big Rockets	|      |      |      |      |
                Small Cells	|      |      |      |      |
                Big Cells	|      |      |      |      |
                Small Health	|      |      |      |      |
                Big Health	|  10  |  12  |  16  |      |
                Shotgun		|      |      |      |      |
                Super Shotgun	|      |      |      |      |
                Nailgun		|      |      |      |      |
                Super Nailgun	|      |      |      |      |
                Grenade Launcher|      |      |      |      |
                Rocket Launcher	|      |      |      |  1   |
                Lightning Gun	|      |      |      |      |
                Green Armour	|      |      |      |      |
                Yellow Armour	|      |      |      |      |
                Red Armour	|      |      |      |      |
                Silver Key	|      |      |      |      |
                Gold Key	|      |      |      |      |
                Rune		|      |      |      |      |
                Quad Damage	|      |      |      |      |
                Pentagram	|      |      |      |      |
                Ring of Shadows	|      |      |      |      |
                Biosuit		|      |      |      |      |
                Megahealth	|      |      |      |      |
                Other*		|      |      |      |      |
                		|------|------|------|------|
                TOTAL		|  15  |  19  |  25  |  2   |
                		|------|------|------|------|
                
                ---------------------------------------------
                
                * Not sure if you can name the custom monsters/items (i.e. wizard)
                This is all just guesswork as I don't know what's in a BSP file.

                Cheers,
                Daniel.

                Comment


                • #9
                  Hmmm - it may not be 100% possible in that format as a lot of it is tied down to the ID entity set, and nothing in Q1 mandates naming conventions for (the majority of) entities. No reason why a monster entity can't be called "badguy_woofwoof" for example, and there's nothing to connect that to the friendly name "Rottwieler". Likewise a secret might be called "hiddenstuff" and a map exit might be called "mapexit" (instead of "trigger_changelevel"). I was thinking possibly along the lines of giving counts of entities based on their classnames.
                  IT LIVES! http://directq.blogspot.com/

                  Comment


                  • #10
                    Whatever can be done with the limited information I suppose.

                    Comment


                    • #11
                      Here's what I've currently got for the start map - I haven't bothered sorting them yet, and there's none of the additional info or column headers (yet).
                      Code:
                      info_null                           1   1   1   1
                      info_intermission                   4   4   4   4
                      ambient_drone                       4   4   4   4
                      info_player_start2                  1   1   1   1
                      item_artifact_super_damage          0   0   0   1
                      item_cells                          0   0   0   3
                      weapon_lightning                    0   0   0   1
                      func_episodegate                    4   4   4   0
                      info_player_coop                    4   4   4   4
                      ambient_drip                        1   1   1   1
                      func_bossgate                       1   1   1   1
                      info_player_deathmatch              2   2   2   6
                      item_health                         0   0   0   4
                      weapon_nailgun                      0   0   0   1
                      item_shells                         0   0   0   2
                      weapon_supershotgun                 0   0   0   1
                      item_armor2                         0   0   0   1
                      weapon_grenadelauncher              0   0   0   1
                      item_rockets                        0   0   0   4
                      weapon_rocketlauncher               0   0   0   1
                      item_spikes                         0   0   0   3
                      weapon_supernailgun                 0   0   0   1
                      item_armorInv                       0   0   0   1
                      func_wall                           2   2   2   7
                      trigger_multiple                   12  12  12   2
                      monster_zombie                      9   9   9   8
                      trigger_changelevel                 5   5   5   5
                      trigger_setskill                    4   4   4   3
                      trigger_onlyregistered              5   5   5   5
                      func_door                           5   5   5   5
                      info_teleport_destination           2   2   2   4
                      light_fluoro                        1   1   1   1
                      light_fluorospark                   1   1   1   1
                      trigger_teleport                    7   7   7   8
                      misc_fireball                       3   3   3   3
                      light_torch_small_walltorch        31  31  31  31
                      light_flame_large_yellow           10  10  10  10
                      light                             224 224 224 224
                      info_player_start                   1   1   1   1
                      worldspawn                          1   1   1   1
                      The 4 number columns are easy/normal/hard/deathmatch counts (nightmare is the same as hard). Right now it just draws to the console but it would be quite easy to dump to file instead (just switch the Con_Printf to an fprintf if a filename is supplied as an arg to the command).

                      Is "levelstats" a good name for the command, by the way?
                      IT LIVES! http://directq.blogspot.com/

                      Comment


                      • #12
                        Mh is already on the case! I'm curious if you know of a trick to get a "size" of a level?

                        Comment


                        • #13
                          I guess measuring the bounds of the BSP (i.e. from the vertex data) would be a start. Factor in number of surfaces and number of leafs and then run a few maps to get ballpark figures and we'll have something workable. I'd see it maybe using tiny/small/medium/large/huge or something like that, with the ID maps hovering around the small/medium end of the scale.
                          IT LIVES! http://directq.blogspot.com/

                          Comment


                          • #14
                            Size is a tricky one, for the outer limits or ground area are often not really representative of how large a level "feels". A map can be kinda smallish, yet spacious enough to feel quite large, or the other way around. What I'm getting at, I guess, is the overall "volume" that players can freely move around in. And then there is the amount of tactical items as well as their lay-out within that volume, and the number of different routes from one to another..

                            For example, take a map like q3dm6qw.. At first glance it may seem rather large, but it does allow players to move quickly, due to its openness (lots of space to rocket-jump and bunny at high speed). In fact, one can get from the yellow armor to the red armor and back to yellow, within 15 seconds pretty easily (which takes you all around the map) making the map feel a lot smaller.

                            I'm using multi-player-maps as a reference here, because I think that's where automatically calculated map-sizes would be most beneficial. Some mods already pick an appropriately sized map based on the number of (active) players, however, those map-sizes still need to be determined before-hand ("manually" so to speak), and with 350+ maps on server, some way to automate that would be great

                            Of course, in general, single-player-maps (at least the custom ones) are usually a lot larger then any multi-player-map, so maybe there should be two different scales for both varieties..

                            Comment


                            • #15
                              The more I think about it, the more I think that number of leafs is the way to go. =peg= is quite correct about map extents not being a good indicator, and number of surfaces is useless as it's possible to use many surfaces for tiny detail. A leaf can be really tiny of course, but in general they tend to average a radius of about 2000 so they do represent a fairly well-defined volume in which a player can do stuff.
                              IT LIVES! http://directq.blogspot.com/

                              Comment

                              Working...
                              X