User talk:^Ben: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Reverted edit of last, changed back to last version by cur)
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Prelude ==
http://www.student.kun.nl/rvanhoorn/Optimization.htm


As mentioned in the previous article, email is an insufficent way too manage bugs. That's why it's recommended to use specialised bug tracking software.
[[Valve Developer TidBits]]


I will show you how to setup and use mantis bug tracker.
modevents.res


== Gather needed materials ==
Here be good stuff


Download mantis from [http://www.mantisbt.org/ Mantis] and upload the package to your website.
Game Event System


== Create the database ==
Creating Events
IGameEvent *event = gameeventmanager->CreateEvent( "player_death" );
if( event )
{
event->SetInt("userid", pVictim->GetUserID() );
event->SetInt("attacker", killer_ID );
event->SetString("weapon", killer_weapon_name );
gameeventmanager->FireEvent( event );
}


Create a database ahead of time. I prefer to use phpmyadmin for this task. There are many tutorials on this subject.
Listening for Events
gameeventmanager->AddListener( this, "player_death", false );


== Preparing the databse for use ==
Capturing Events
void CMapOverview::FireGameEvent( IGameEvent *event )
{
const char * type = event->GetName();
if ( Q_strcmp(type, "player_death") == 0 )
{
}
}


You need to populate the database, this is very easy if you have access to phpmyadmin, first select the mantis database from the database list, then navigate to the sql execution page, then either find the populate_sql.sql file in the /sql folder or just copy and paste all of what's contained in that file into the execute sql queries field.
== My Notes ==


This should setup the database for mantis.
r_cleardecals - by the way Ben, there are no engine hooks for this so it cannot be called by code...but if <code>r_cleardecals 1</code> is called, it will also remove permanent decals projected by infodecal.&mdash;'''[[User:Ts2do|ts2do]]'''
:Hrmmm - this was going to be for my round reset code, what I was thinking of doing was this -


== Configuration of the database ==
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
{
CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );
        EHANDLE pPlayerHandle = pPlayer;
        engine->ClientCommand(gEntList.GetEdict(pPlayerHandle), "r_cleardecals");
        }


Find the config_defaults_inc.php file and edit theese sections
Here's my source:&mdash;'''[[User:Ts2do|ts2do]]''' 23:00, 19 Jun 2006 (PDT)
 
:game_shared: [http://www.plastic-warfare.com/files/pwround_gamerules.cpp] [http://www.plastic-warfare.com/files/pwround_gamerules.h] [http://www.plastic-warfare.com/files/gameeventdefs.h]<br>dlls: [http://www.plastic-warfare.com/files/mapentityfilter.cpp] [http://www.plastic-warfare.com/files/mapentityfilter.h]
  # --- database variables --------- 
   
  # set these values to match your setup   
   
    # hostname should be either a hostname or connection string to supply to adodb.   
  # For example, if you would like to connect to a mysql server on the local machine, 
  # set hostname to 'localhost', and db_type to 'mysql'. 
  # If you need to supply a port to connect to, set hostname as 'localhost:3306'. 
  $g_hostname = 'localhost'; 
  $g_db_username = 'username';
  $g_db_password = 'password'
  $g_database_name = 'databasename'
  $g_db_type = 'mysql'
 
Make sure the settings presented here match your chosen databases settings.
 
== Finished product ==
 
Navigate your web browser to the mantis directory and login with the default provided username and password that is supplied with the installation.
 
  Username: administrator 
  Password: root 
 
== Familiarizing yourself  ==
 
Learn how to use the bug tracking software, it's a fairly straight forward package. You need to create a project first before you can do anything with it.
 
There are many tutorials on the mantis site which contain usage hints and tips.
 
[[Bug Tracking]]
 
[[Nuking Mod Configs]]
 
== Maintaining a shipping master in detail ==
 
"You should designate a single member of your MOD team as the Shipping Leader (SL). This person will drive progress on the MOD for the next five weeks. All changes made to the MOD from now on should occur only at the request of the SL, and all requests for changes should be funneled through this person. No team member should make any changes, no matter how minor, to the MOD unless the SL has requested that they make a particular change. This doesn't mean the rest of the team are losing control of the MOD... the SL is still a part of the team, and will be listening to all feedback. The point of the SL is to ensure that all changes to the MOD are going through a single person. This avoids problems such as a mapmaker breaking the game by making a last minute change because he didn't realize something else had changed in the game code. The SL will know the state of every component in the game (code, maps, models, textures, etc) at all times throughout the next 5 weeks to ensure this never happens. Choosing the SL isn't easy. Here are a few tips: - Don't immediately assume the person who's currently running the MOD is the best choice for SL, especially if the MOD has been worked on for months and hasn't got any closer to being released. - Game Coders are probably the best choice. As the shipping process comes to an end, most fixes will be made in the game code. - The SL should be highly motivated, disciplined, organized, and as ego-less as possible. The SL will need to be able to commit five weeks of his or her life to this process. - The SL should be able to make global decisions for the MOD. The SL should understand that this often requires cutting features and content in order to ship"
 
From [[Making_a_MOD]]
 
I highly recommend making the shipping leader the lead coder. This person usually is the most dedicated to the MOD and has easy access to the code for compilation, something which can be hard for an artist to-do if they don't have access to the compilation tools.
 
== Starting ==
 
So first it's usefull to create the base MOD from the Source SDK menu, create any kind of MOD you want, I suggest NOT using the source code only option if you are trying to create the shipping leaders copy of the MOD.

Latest revision as of 06:01, 5 January 2009

http://www.student.kun.nl/rvanhoorn/Optimization.htm

Valve Developer TidBits

modevents.res

Here be good stuff

Game Event System

Creating Events

IGameEvent *event = gameeventmanager->CreateEvent( "player_death" );
if( event )
{
	event->SetInt("userid", pVictim->GetUserID() );
	event->SetInt("attacker", killer_ID );
	event->SetString("weapon", killer_weapon_name );
	gameeventmanager->FireEvent( event );
}

Listening for Events

gameeventmanager->AddListener( this, "player_death", false );

Capturing Events

void CMapOverview::FireGameEvent( IGameEvent *event )
{
	const char * type = event->GetName();
	if ( Q_strcmp(type, "player_death") == 0 )
	{
	}
}

My Notes

r_cleardecals - by the way Ben, there are no engine hooks for this so it cannot be called by code...but if r_cleardecals 1 is called, it will also remove permanent decals projected by infodecal.—ts2do

Hrmmm - this was going to be for my round reset code, what I was thinking of doing was this -


	for ( int i = 1; i <= gpGlobals->maxClients; i++ )
	{
		CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );

	        EHANDLE pPlayerHandle = pPlayer;
	        engine->ClientCommand(gEntList.GetEdict(pPlayerHandle), "r_cleardecals");
        }

Here's my source:—ts2do 23:00, 19 Jun 2006 (PDT)

game_shared: [1] [2] [3]
dlls: [4] [5]