FileFront Forums

FileFront Forums (http://forums.filefront.com/)
-   SW:JK3 Modding, Mapping and Editing (http://forums.filefront.com/sw-jk3-modding-mapping-editing-528/)
-   -   [Alpha Mod] Gunslinger's Academy (http://forums.filefront.com/sw-jk3-modding-mapping-editing/413004-gunslingers-academy.html)

Raz0r December 12th, 2009 01:18 PM

Re: Gunslinger's Academy
 
I've updated the blood shader. Currently just making use of a basejka shader, so no need for the new ones. It also pulses, and is stronger if you're lower on health.
Going to go through the .pk3 soon. I'm having some .efx issues with missing shaders, and I don't have any mods installed that it could conflict with.

Distortedcoder December 12th, 2009 02:18 PM

Re: Gunslinger's Academy
 
Let me know when you guys need something tested. Just throw me the file and ill Test anything you need me to.

Raz0r December 12th, 2009 04:14 PM

Re: Gunslinger's Academy
 
Playing around with the IP file stuff now...I might get Didz to lend you his account system (Coder for ArbModding and CoreMod)
Changed the window title to 'Gunslingers Academy' and set up a few client-side engine hooks to give you an idea on how it's done.

Edit:
Here's a whole bunch of code that might help you :)
Code:

static void CSF_ParseFile( void )
{
        char                        *buf;
        char                        loadPath[MAX_QPATH];
        long                        len;
        const char                *token;
        fileHandle_t        f;

        csf_loaded = false;

        Com_Printf( "^5Loading Class Specifics\n" );
        Com_sprintf( loadPath, sizeof(loadPath), "maps/%s.csf", level.rawmapname );
        len = trap_FS_FOpenFile( loadPath, &f, FS_READ );

        if ( !f )
        {//no file
                Com_Printf( "^1CSF loading failed! (Can't find %s)\n", loadPath );
                Com_sprintf( loadPath, sizeof(loadPath), "maps/default.csf" );
                Com_Printf( "^1Defaulting to...%s!\n", loadPath );
                len = trap_FS_FOpenFile( loadPath, &f, FS_READ );
                if ( !f )
                {
                        Com_Printf( "^1CSF loading failed! (Can't find %s)\n", loadPath );
                        return;
                }
                //FIXME: Not sure if I have to close the file - may be leaking memory!!!
        }

        if ( !len )
        {//empty file
                Com_Printf( "^1CSF loading failed! (%s is empty)\n", loadPath );
                trap_FS_FCloseFile( f );
                return;
        }

        if ( (buf = (char*)malloc(len+1)) == 0 )
        {//alloc memory for buffer
                Com_Printf( "^1CSF loading failed! (Failed to allocate buffer)\n" );
                EndLogging();
                return;
        }

        trap_FS_Read( buf, len, f );
        trap_FS_FCloseFile( f );
        buf[len] = 0;//Add null terminator o_o'
        TP_NewParseSession( buf );

        while ( 1 )
        {//the file is there, and it's not empty - don't give up until we find what we want!
                int k=0, i=0;

                token = TP_ParseToken();
                if ( !token[0] )
                        break;
               
                if ( !Q_stricmp( token, "settings" ) )
                        if ( am_CSF_ProcessGeneralInfo() == false )
                                continue;
        }

        // If we get here, it all went just fine
        free( buf );//free our memory! (it has rights ^_^)
        csf_loaded = true;

        return;
}

Quote:

Originally Posted by maps/am_testing.csf
settings
{
classone_maxUnits 16
classtwo_maxUnits 16
classthree_maxUnits 16
classfour_maxUnits 16
classfive_maxUnits 16

classone_expNeeded 0
classtwo_expNeeded 0
classthree_expNeeded 0
classfour_expNeeded 0
classfive_expNeeded 0
}
red_one
{
model "reborn"
skin "red"
health 80
armor 0
stamina 100
force 100
classflags 35
weapons 4
primaryWeap 2
ammo
{
AMMO_PISTOL 0
AMMO_BLASTER 0
AMMO_SNIPER 0
AMMO_SHOTGUN 0
AMMO_ROCKETS 0
AMMO_THERMAL 0
AMMO_SMOKE 0
}
}

So you can store anything, really.

eezstreet December 12th, 2009 08:43 PM

Re: Gunslinger's Academy
 
If you're missing shaders, I can hand you some of my personal files (which may have the referenced shaders, I don't know what is missing exactly)
Take a look at this pk3, it may solve some shader issues:
http://www.filefront.com/15122369/assets4LOLWUT.pk3


Explain to me a few things from this:
Quote:

settings
{
classone_maxUnits 16
classtwo_maxUnits 16
classthree_maxUnits 16
classfour_maxUnits 16
classfive_maxUnits 16

classone_expNeeded 0
classtwo_expNeeded 0
classthree_expNeeded 0
classfour_expNeeded 0
classfive_expNeeded 0
}
red_one
{
model "reborn"
skin "red"
health 80
armor 0
stamina 100
force 100
classflags 35
weapons 4
primaryWeap 2
ammo
{
AMMO_PISTOL 0
AMMO_BLASTER 0
AMMO_SNIPER 0
AMMO_SHOTGUN 0
AMMO_ROCKETS 0
AMMO_THERMAL 0
AMMO_SMOKE 0
}
}
First thing, this "class" system, what is this exactly? Is it saved profiles or what?
Second, if you lack this file, does it write one based on your IP address? Does it load it properly, based on IP address?
Third, What is maxunits used for?
Fourth, those new ammo types, are those implemented?
Fifth, can you set up a sort of "saved password recovery" so if you change IPs, you can type in a password and save a secondary file? (which tells the game to load stuff, I'll explain in a moment)

This recovery system, this is how it works.
You type something like this in the console:
Quote:

/recoveryset blahblah
Which then creates a new file -> servdat/recovery/blahblah.qcov
QCOV files look like this:
Code:

qcov_t
{
 blahblah
 192.168.1.2
}

The first is the .qcov file name, the second is the IP to reference.
Note that ALL of this is handled serverside, so your settings will vary per server
Now, let's say our IP changes. we can then do /recover blahblah which:
1. Checks for blahblah.qcov
2. If blahblah.qcov exists, open it and read it
3. Open the IP listed in second param, and store it as a char
4. Read your current IP
5. Append your new IP into the second param of the qcov
6. Delete the IP file that is stored as a char

Of course, there needs to be a default (for localhost and bots)
What I plan to use these IP files for is for a EXP/levelling system, maybe include other things as well

Raz0r December 12th, 2009 11:49 PM

Re: Gunslinger's Academy
 
The file I used as an example is for ArbModding, which uses a class system. The .CSF (Class Specifics File) defines all of the properties for each class based on the map being played. If the file doesn't exist I set it up to load from the default CSF, and if that's not there (Which it should be!) then their game won't load properly :p
I also use a 'token parser' which is heavily based off JA's own token parser (For reading .sab files etc)

IMO you should use a username/password login system.
The file(s) could look like this..

All stored in one file
Quote:

Originally Posted by sv_data/users.gauser
user
{
USR Raz0r
IP 192.168.0.69
PW pancakes
LVL 5
SKILLS1 8192 //bit-value here, all skills they have level 1 experience in
SKILLS2 2064 //bit-value here, all skills they have level 2 experience in
SKILLS3 224 //bit-value here, all skills they have level 3 experience in
}

user
{
USR eezstreet
IP 192.168.8.7
PW fishsticks
SKILLS1 8192 //bit-value here, all skills they have level 1 experience in
SKILLS2 2064 //bit-value here, all skills they have level 2 experience in
SKILLS3 224 //bit-value here, all skills they have level 3 experience in
}

Quote:

Originally Posted by sv_data/Raz0r.gauser
user
{
IP 192.168.0.69
PW pancakes
LVL 5
SKILLS1 8192 //bit-value here, all skills they have level 1 experience in
SKILLS2 2064 //bit-value here, all skills they have level 2 experience in
SKILLS3 224 //bit-value here, all skills they have level 3 experience in
}

Problem is, without a login system, someone might be given someone else's IP and therefore their data. Dynamic IP's have the ability to do that..

Personally, I'd log their data in ent->client, and only touch the file once they disconnect/time-out.
May as-well make a struct inside of ent->client to record their username etc.

Distortedcoder December 13th, 2009 08:16 AM

Re: Gunslinger's Academy
 
Poped a DL at thoes shaders and looking at them now. Hope they solve that shader issue. :)

Raz0r December 13th, 2009 08:58 AM

Re: Gunslinger's Academy
 
So uh, my theory is, if we change the networking of playerState_t::weapon to 16 bits, and declare it as byte weapon[2] then we can effectively have dual-wielding through that.
Then you'd remove altFire, and make that behave as firing your second weapon..
Then you gotta override networking for playerState_t::weaponTime to 16bits, and declare it as short weaponTime[2] (I think...short is 16bit, right?) so we can effectively keep track of both weapons.

Then, it'd only be a few other tweaks and we'd have it working...then clientside rendering of the second weapon, and animations. That's the trickier part.

eezstreet December 13th, 2009 09:58 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by -Raz0r- (Post 5167583)
So uh, my theory is, if we change the networking of playerState_t::weapon to 16 bits, and declare it as byte weapon[2] then we can effectively have dual-wielding through that.
Then you'd remove altFire, and make that behave as firing your second weapon..
Then you gotta override networking for playerState_t::weaponTime to 16bits, and declare it as short weaponTime[2] (I think...short is 16bit, right?) so we can effectively keep track of both weapons.

Then, it'd only be a few other tweaks and we'd have it working...then clientside rendering of the second weapon, and animations. That's the trickier part.

Short is indeed 16 bit.
For killstreaks, we need to move these to clientside (they are serverside now -> g_combat.c). I suppose we could use the EV system, but we also need to make obits clientside as well (so we can change where the position is, to the bottom of the screen)

You also need to take into account weapon switching, on your theory.
So, my question for you, Raz0r is this: what have you done thus far to the code?

Distortedcoder December 13th, 2009 10:00 AM

Re: Gunslinger's Academy
 
Something i dont kow if you are aware of or not, but the ammo needs to be look at again... I bring this up because im running through a map with the rockets and i run across the Flechette weapon, and blammo, 25 brand new rockets for me to unleash onto the unsuspecting bots before my game comes to an inevitable crash. Just thought id let you know that. I think going from 3 rockets to 25 from 1 pickup is a bit drastic.....

eezstreet December 13th, 2009 10:02 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by Distortedcoder (Post 5167616)
Something i dont kow if you are aware of or not, but the ammo needs to be look at again... I bring this up because im running through a map with the rockets and i run across the Flechette weapon, and blammo, 25 brand new rockets for me to unleash onto the unsuspecting bots before my game comes to an inevitable crash. Just thought id let you know that. I think going from 3 rockets to 25 from 1 pickup is a bit drastic.....

Known issue, and it can be fixed easily (just make a new ammo type for flechette)


All times are GMT -7.

Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.