Do play testing scripts exist? (posted a utility)

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Do play testing scripts exist? (posted a utility)

Postby fiendohell » Sun Jan 29, 2012 4:30 pm

So is there suite of scripts that exist out there that could assist one in play testing maps? For instance, it tells the player which sector they are in and what line they are looking at. I ask this because I actually started one, and before I put to much time and effort into it, I'd like to know if someone before me has already posted something similar. :D
Last edited by fiendohell on Sun Jan 29, 2012 9:15 pm, edited 1 time in total.
fiendohell
 
Joined: 07 Aug 2008

Re: Do play testing scripts exist?

Postby jpalomo » Sun Jan 29, 2012 7:50 pm

I know that TheMisterCat was working on a map helper of sorts that let you change the offsets/scaling of textures and flats in game and log them. it was for skulltag though.
User avatar
jpalomo
 
Joined: 17 May 2010

Re: Do play testing scripts exist?

Postby fiendohell » Sun Jan 29, 2012 8:42 pm

Never mind. After some experimenting, its just not possible to return what sector the player is in OR the line they are looking at unless the map was constructed in a very peculiar way in which every line and sector had its own tag and ID. It just isn't worth the effort. The most I was able to accomplish was returning map coordinates (blughhh) which wouldn't be to bad if their wasn't so many darn numbers to write down.

@jpalomo: woah, that is awesome. In-game editing is above and beyond what I was thinking. I meant more along the lines of a simple stats feedback via hud overlay text so that play tester's don't have to open up a map editor to jot down problematic areas. This would save a lot of time.
fiendohell
 
Joined: 07 Aug 2008

Re: Do play testing scripts exist?

Postby chopkinsca » Sun Jan 29, 2012 9:00 pm

I'm not sure if this helps, but it's something I do to help keep track of changes I want to make. When I'm in an area I want to change, I'll send a message via chat then take a screenshot. All you have to do is go through your screenshots to see the things you wanted to change.
User avatar
chopkinsca
"." is too short
 
Joined: 11 Dec 2003

Re: Do play testing scripts exist?

Postby fiendohell » Sun Jan 29, 2012 9:11 pm

That's a great tip chopkinsca and one I'll be bound to use in the near future.

I'll go ahead and post up the utility I was working on:

DOWNLOAD PLAY TESTER UTILITY HERE

Its a self-contained ACS library wad meant to be paired with any wad that can run under zdoom. Just press T or configure your controls under utility section to activate the script. Like I mentioned before, its only current function is to output x and y coordinates to the user. Not very useful, BUT, the codes structure lends itself well for troubleshooting situations and what not. I'm hoping somebody somewhere could use it. Functions at the bottom could have some use to someone also.

...and here's some code...
Code: Select allExpand view
#library "show_coordinates"
#include "zcommon.acs"

#define PLAYER_START_TID 1000

bool COORD_ACTIVE = false;

int x,y; //map coordinates
int sector; //current sector player is in
int line = 0; //line that player is looking at


script 900 ENTER
{      
   SetFont("SMALLFONT");
   While (COORD_ACTIVE)
    {
         x = GetActorX(0); y = GetActorY (0);
         sector = GetPlayerSectorNumber();
         
         //print map coordinates
         HudMessage(s:"x:",f:x, s:" ", s:"y:", f:y;
            HUDMSG_PLAIN, 1, CR_GREEN,
            0.0, 0.0, 5.0 );
         //print current sector
         if( sector == -1 ) //if player outside of map (clipping)
         HudMessage(s:"Sector: Out of Map";
            HUDMSG_PLAIN, 2, CR_GREEN,
            0.0, 0.1, 5.0 );
         else HudMessage(s:"Sector:",d:sector;
            HUDMSG_PLAIN, 2, CR_GREEN,
            0.0, 0.1, 5.0 );            
         //print line you are staring at
         HudMessage(s:"Line:",d:line;
            HUDMSG_PLAIN, 3, CR_GREEN,
            0.0, 0.2, 5.0 );
      
         Delay (1);
   }
   
   //clear screen of all stats
   HudMessage(s:""; HUDMSG_PLAIN, 1, CR_GREEN, 0.0, 0.0, 5.0 );
   HudMessage(s:""; HUDMSG_PLAIN, 2, CR_GREEN, 0.0, 0.0, 5.0 );
   HudMessage(s:""; HUDMSG_PLAIN, 3, CR_GREEN, 0.0, 0.0, 5.0 );
   
   suspend;
   
   restart;
}

script 901 (void)
{
   if( !COORD_ACTIVE )
   {
      COORD_ACTIVE = true;
      ACS_Execute(900,0,0,0,0);
   }
   else COORD_ACTIVE = false;
   
}

script 5 ENTER
{
   Thing_ChangeTID(0, 1000 + PlayerNumber());
}

//modified from Cjk10000
#define MAX_SECTOR_NUM 1000 //The maximum number of sector ids to check. Bigger numbers may cause runaway terminations in some conditions.
function int GetActorSectorNumber(int tid)
{
   for (int s = 0; s <= MAX_SECTOR_NUM; s++)
      if (ThingCountSector(T_NONE,PLAYER_START_TID, s) > 0) return s;
   
   return -1; //Returns -1 if no sector tid found.
}

function int GetPlayerSectorNumber(void)
{
   for (int s = 0; s <= MAX_SECTOR_NUM; s++)
      if (ThingCountSector(T_NONE, PLAYER_START_TID, s) > 0) return s;
   
   return -1; //Returns -1 if no sector tid found.
}
fiendohell
 
Joined: 07 Aug 2008


Return to Editing

Who is online

Users browsing this forum: GooberMan, Google Feedfetcher, scalliano and 2 guests