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)

Distortedcoder December 13th, 2009 10:06 AM

Re: Gunslinger's Academy
 
Allright, Cool. Didnt know if you where aware or not, so guess that solves that issue. :) so far i havent encountered anything Major that needs adressing aside from the crahing which i know your looking into and trying to solve. :) Keep it up everything is comming along nicely.

Raz0r December 13th, 2009 10:06 AM

Re: Gunslinger's Academy
 
I suggest you wait until I rework the code into using a proper weapon table.
I haven't done any weapon modifications as of yet, just planning.

What I suggest for obituaries and whatnot, is to use the 'reliable command' system.
Check out cgame -> cg_servercmds.c -> CG_ServerCommand so you know what I'm talking about.
Server sends a command with a few extra args, client interprets and reacts accordingly.
Link this together with a custom chatbox thing (I believe chatbox uses reliable commands too, actually) and you have a working obituary in the cleanest way possible.
Using the event (EV_) system is bad, you can run into PVS issues where the event isn't broadcast to the client. Reliable commands never fail.


Also, this is from my console..
Quote:

WARNING: expecting '{', found 'blendFunc' instead in shader 'SFX_Sabers/saber_blade'
WARNING: expecting '{', found 'blendFunc' instead in shader 'SFX_Sabers/saber_end'
WARNING: expecting '{', found 'qer_editorimage' instead in shader 'gfx/2d/eezstreet/grenadeindicator'
WARNING: expecting '{', found 'blendFunc' instead in shader 'gfx/2d/eezstreet/pwnedindicator'
MP3ERR: Source file is not sampled @ 44100!(sound/weapons/blaster/alt_fire.mp3)
May want to remove notifications for trueview loading too.

eezstreet December 13th, 2009 10:14 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by -Raz0r- (Post 5167622)
I suggest you wait until I rework the code into using a proper weapon table.
I haven't done any weapon modifications as of yet, just planning.

That's what I was planning on doing (I need to make new maps anyhow)

Quote:

Originally Posted by -Raz0r- (Post 5167622)
What I suggest for obituaries and whatnot, is to use the 'reliable command' system.
Check out cgame -> cg_servercmds.c -> CG_ServerCommand so you know what I'm talking about.
Server sends a command with a few extra args, client interprets and reacts accordingly.
Link this together with a custom chatbox thing (I believe chatbox uses reliable commands too, actually) and you have a working obituary in the cleanest way possible.

I'll give it a look.
Quote:

Originally Posted by -Raz0r- (Post 5167622)
Using the event (EV_) system is bad, you can run into PVS issues where the event isn't broadcast to the client. Reliable commands never fail.

How else do I detect a kill in clientside? Killstreaks in clientside would be the best way to go (So instead of a message, could draw a shader when there's a killstreak, etc)

Quote:

Originally Posted by -Raz0r- (Post 5167622)
Also, this is from my console..
Quote:

WARNING: expecting '{', found 'blendFunc' instead in shader 'SFX_Sabers/saber_blade'
WARNING: expecting '{', found 'blendFunc' instead in shader 'SFX_Sabers/saber_end'
WARNING: expecting '{', found 'qer_editorimage' instead in shader 'gfx/2d/eezstreet/grenadeindicator'
WARNING: expecting '{', found 'blendFunc' instead in shader 'gfx/2d/eezstreet/pwnedindicator'
MP3ERR: Source file is not sampled @ 44100!(sound/weapons/blaster/alt_fire.mp3)

Those shader errors are truly weird, they are the ones I mentioned before. I think it could be fixed by placing the shaders in the base folder (instead of baseGA)

Quote:

Originally Posted by -Raz0r- (Post 5167622)
May want to remove notifications for trueview loading too.

I'll look into it, again I'll need you to optimize the code so I don't cause conflicts later on

Raz0r December 13th, 2009 10:20 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by eezstreet (Post 5167627)
How else do I detect a kill in clientside?

in game -> g_combat.c -> player_die you call trap_SendServerCommand and interpret it clientside. Reliable commands never fail =p
When it's interpretted, you take note of the time it was recieved (Store in something like cg.lastKillTime), and when you draw the shader, do a check to see if ( cg.killCmdReceivedTime > cg.time - 2000 ) which will make sure it only draws the image for 2 seconds, then once you get another kill it'll draw for 2 seconds after that.
You could also send the command only when you get a kill-streak bonus.
But I really do urge you to track it all serverside and interpret it client-side :)

Quote:

Originally Posted by eezstreet (Post 5167627)
I'll look into it, again I'll need you to optimize the code so I don't cause conflicts later on

Of-course, that's mostly what I'm here for =p

Distortedcoder December 14th, 2009 06:50 AM

Re: Gunslinger's Academy
 
Wow, looks like you guys are making some major progress... I cant wait to test the new package when its put together. Just let me know. :) I have hopes the crash situation has been worked out.

Oh some Ideas for the Fencing game type for holocron FFA, Have the swords reflect what stances you have, Like a 2 handed greatsword needs more power, so you have the strong stance as default, or the rapier is fast and nimble so you have the fast stance as a default. Just an idea. I still like the idea for thoes ppl who want to go dark ages on a stormtroopers ass and lop his head off with a bastard sword. :)

eezstreet December 14th, 2009 09:36 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by Distortedcoder (Post 5168343)
Oh some Ideas for the Fencing game type for holocron FFA, Have the swords reflect what stances you have, Like a 2 handed greatsword needs more power, so you have the strong stance as default, or the rapier is fast and nimble so you have the fast stance as a default. Just an idea. I still like the idea for thoes ppl who want to go dark ages on a stormtroopers ass and lop his head off with a bastard sword. :)

Can be done (like "select a sword", and lock the stances for a particular weapon, if you don't understand what I mean by "locked stances", I mean that through the .sab files you can set it to only have one stance). I've also been working on anims, I have a rapier stance done (and also, I will copy the Desann style's moves, because the Desann stance is the best for rapiers. Bastard swords will probably just use the red stance for now)

Check out the rapier stance:



Another little tidbit: if Raz0r's theory works, and we can Akimbo weapons, Akimbo might be a powerup (like the Ysalimari, it would last for 30 seconds or so). I was thinking of also making the Blaster Rifle use Bryar animations, seeing as how the blaster rifle is going to be a mini uzi)

Distortedcoder December 14th, 2009 11:02 AM

Re: Gunslinger's Academy
 
That sounds really cool. The fact you can lock stances with a weapon will allow for more strategy and player preference, so thats always a plus, one thing that will need to be looked into is the damage and weapon speed, we dont want ppl picking the strong broad swords for their almost one hit kills, there needs to be a balance, which could be hard, or easy to achive depending what you already have in mind.



And akimbo powerup would be sweet, but we need to moderate spawn rates, and a random spawn would be nice, Insted of everyone camping where it spawns because its set, have it spawn randomly, no rotate, but a totally random respawn system so players cant predict where the powerup is so they can rape all opponets. i figured this falls under coding which raz0r seems to be very skilled at, along with you.



Oh i dont remember if i mentioned this but for regular Gunslingers, Insted of a lightsaber customization have it so you customize what guns you spawn with, have it so not everyone spawns with the bowcaster. I think it sould be limmeted to the Bowcaster, E-11, the heavy repeater, the flechette, and the sniper. Im sure this would be a bit more complex, but if it can be achived, this would make it so much more interesting.

Okay so thats it for now... if i have anything else that could possibly make this any more interesting ill let you know.

katanamaru December 14th, 2009 11:22 AM

Re: Gunslinger's Academy
 
If you would like some help with stance animations I'll help out.

One piece of advice; If you change the legs position that will give you a glitch when standing on slopes or on ledges. This is because the game will switch between the cutom stances leg position with the Leg_up positions. So you can do one of three things:
1. Remove the need for Leg_up animations.
2. Make all the stances use the same leg position as their default stance.
3. Make new leg up positions.

The One and Only December 14th, 2009 11:25 AM

Re: Gunslinger's Academy
 
The rapier stance should be turned more side-on to the enemy, presenting a smaller target to him. Other than that, I like the look of what you've done so far.

Pande December 14th, 2009 07:15 PM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by Distortedcoder (Post 5168343)
Wow, looks like you guys are making some major progress... I cant wait to test the new package when its put together. Just let me know. :) I have hopes the crash situation has been worked out.

Oh some Ideas for the Fencing game type for holocron FFA, Have the swords reflect what stances you have, Like a 2 handed greatsword needs more power, so you have the strong stance as default, or the rapier is fast and nimble so you have the fast stance as a default. Just an idea. I still like the idea for thoes ppl who want to go dark ages on a stormtroopers ass and lop his head off with a bastard sword. :)

I just had an idea from this. It would be kinda like assassins creed.

You have a broadsword, a longsword, and a shortsword. When you change your style, you also switch weapons. So when you change to fast, you get shortsword, when you switch to red, you get broadsword, and yellow is longsword. It would be so much more interesting!

Raz0r December 14th, 2009 10:22 PM

Re: Gunslinger's Academy
 
eezstreet: May need to look into using 32 WP_ slots if we're going to be doing all this customisation. Having extra room to push boundaries is helpful.

EDIT: Okay, I just wrote an epic function to draw the weapons we have o.o
You can polish it off however you want - maybe draw the ammo for each weapon and implement reloading/clips too o.o

Code:

#define DRAW_PIC( x, y, w, h, shader, colour )        \
{                                                                                                \
        trap_R_SetColor( colour );                                        \
                CG_DrawPic( x, y, w, h, shader );                \
        trap_R_SetColor( NULL );                                        \
}

static void DrawWeapons( void )
{
        int                weaponsAllowed                = cg.predictedPlayerState.stats[STAT_WEAPONS];        //        Which weapons are we given?
        int                weaponsAvailable        = 0;                                                                                        //        Which of these do we have ammo for?
        int                currentWeapon                = cg.weaponSelect;                                                                //        Which weapon do we have currently selected
        int                i                                        = 0;                                                                                        //        iterate
        float        y                                        = 96.0f;                                                                                //        y co-ordinate of current weapon icon
        float        wpX[WP_NUM_WEAPONS];
        float        wpY[WP_NUM_WEAPONS];
        vec4_t        colour                                = { 1.0f, 1.0f, 1.0f, 1.0f };                                        //        Colour of the icons (Greyscaling and whatnot)

        //Set the coordinates
        for ( i=1; i<WP_NUM_WEAPONS; i++ )
        {
                if ( weaponsAllowed & ( 1 << i ) )
                {
                        wpY[i]        = y;
                        y                += ICON_SIZE-12.0f;
                        wpX[i]        = (i==currentWeapon) ? 32.0f : 24.0f ;
                }
        }

#if 0
        //TODO: Find out which weapons we have ammo for (So we can highlight them)
        for ( i=1; i<WP_NUM_WEAPONS; i++ )
        {
                if ( ( weaponsAllowed & ( 1 << i ) ) && cg.predictedPlayerState.ammo[i] )
                        weaponsAvailable |= ( 1 << i );
        }
#else
        //Every weapon we own
        for ( i=1; i<WP_NUM_WEAPONS; i++ )
        {
                if ( weaponsAllowed & ( 1 << i ) )
                        weaponsAvailable |= ( 1 << i );
        }
#endif
        //Every weapon we have ammo for (highlight them)
        for ( i=1; i<WP_NUM_WEAPONS; i++ )
        {
                if ( weaponsAvailable & ( 1 << i ) )
                {
                        if ( i == currentWeapon )
                                CG_DrawPic( wpX[i], wpY[i], ICON_SIZE, ICON_SIZE, cgs.media.weaponIcons[i] );
                        else
                        {
                                MAKERGB( colour, 0.75f, 0.75f, 0.75f );
                                DRAW_PIC( wpX[i], wpY[i], ICON_SIZE, ICON_SIZE, cgs.media.weaponIcons_NA[i], colour );
                        }
                }
        }
}


eezstreet December 15th, 2009 01:56 PM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by katanamaru (Post 5168754)
If you would like some help with stance animations I'll help out.

One piece of advice; If you change the legs position that will give you a glitch when standing on slopes or on ledges. This is because the game will switch between the cutom stances leg position with the Leg_up positions. So you can do one of three things:
1. Remove the need for Leg_up animations.
2. Make all the stances use the same leg position as their default stance.
3. Make new leg up positions.

I can just open the animation in Dragon and reset all the leg positions, then redo the glamerge, I keep all my files from previous work for this reason

Quote:

Originally Posted by Pande (Post 5169193)
You have a broadsword, a longsword, and a shortsword. When you change your style, you also switch weapons. So when you change to fast, you get shortsword, when you switch to red, you get broadsword, and yellow is longsword. It would be so much more interesting!

So let's weigh everything out, if our player is a stormtrooper:
Short Sword - 2 pounds
Bastard Sword - 5.5 pounds
Long Sword - 3 pounds
Armor: About 4 pounds (roughly)
MP5: ~1 pound
Total Weight: 15 pounds.
So you're running around with fifteen pounds of gear. Seems to me like carrying all these swords would be a heavy burden. Not to mention that you need to copy all lightsaber code twice (Which isn't that bad I suppose)

Quote:

Originally Posted by -Raz0r- (Post 5169351)
eezstreet: May need to look into using 32 WP_ slots if we're going to be doing all this customisation. Having extra room to push boundaries is helpful.

Edit:
Okay, I just wrote an epic function to draw the weapons we have o.o
You can polish it off however you want - maybe draw the ammo for each weapon and implement reloading/clips too o.o

Spoiler:
Code:

#define DRAW_PIC( x, y, w, h, shader, colour )    \
{                                                \
    trap_R_SetColor( colour );                    \
        CG_DrawPic( x, y, w, h, shader );        \
    trap_R_SetColor( NULL );                    \
}

static void DrawWeapons( void )
{
    int        weaponsAllowed        = cg.predictedPlayerState.stats[STAT_WEAPONS];    //    Which weapons are we given?
    int        weaponsAvailable    = 0;                                            //    Which of these do we have ammo for?
    int        currentWeapon        = cg.weaponSelect;                                //    Which weapon do we have currently selected
    int        i                    = 0;                                            //    iterate
    float    y                    = 96.0f;                                        //    y co-ordinate of current weapon icon
    float    wpX[WP_NUM_WEAPONS];
    float    wpY[WP_NUM_WEAPONS];
    vec4_t    colour                = { 1.0f, 1.0f, 1.0f, 1.0f };                    //    Colour of the icons (Greyscaling and whatnot)

    //Set the coordinates
    for ( i=1; i<WP_NUM_WEAPONS; i++ )
    {
        if ( weaponsAllowed & ( 1 << i ) )
        {
            wpY[i]    = y;
            y        += ICON_SIZE-12.0f;
            wpX[i]    = (i==currentWeapon) ? 32.0f : 24.0f ;
        }
    }

#if 0
    //TODO: Find out which weapons we have ammo for (So we can highlight them)
    for ( i=1; i<WP_NUM_WEAPONS; i++ )
    {
        if ( ( weaponsAllowed & ( 1 << i ) ) && cg.predictedPlayerState.ammo[i] )
            weaponsAvailable |= ( 1 << i );
    }
#else
    //Every weapon we own
    for ( i=1; i<WP_NUM_WEAPONS; i++ )
    {
        if ( weaponsAllowed & ( 1 << i ) )
            weaponsAvailable |= ( 1 << i );
    }
#endif
    //Every weapon we have ammo for (highlight them)
    for ( i=1; i<WP_NUM_WEAPONS; i++ )
    {
        if ( weaponsAvailable & ( 1 << i ) )
        {
            if ( i == currentWeapon )
                CG_DrawPic( wpX[i], wpY[i], ICON_SIZE, ICON_SIZE, cgs.media.weaponIcons[i] );
            else
            {
                MAKERGB( colour, 0.75f, 0.75f, 0.75f );
                DRAW_PIC( wpX[i], wpY[i], ICON_SIZE, ICON_SIZE, cgs.media.weaponIcons_NA[i], colour );
            }
        }
    }
}




Your spoiler tags are a little funky there (they won't go ... =_=)
From what I can tell, basically what you're doing is placing all the weapons on the screen (which is Q3-like). I assume this is a pic from ArbModding?

Raz0r December 15th, 2009 02:53 PM

Re: Gunslinger's Academy
 
Yeah, loop through the weapons, if we have it, add it to a list and prepare the x and y coordinates.
TODO: Semi-highlight the ones we have ammo for (Or dim the ones we don't have ammo for)
Nudge our selected weapon to the right and make it fully highlighted.
This would look great with ammo indication, also a reloading/clip system.

And yeah, that pic is from ArbModding as it stands.

eezstreet December 15th, 2009 03:22 PM

Re: Gunslinger's Academy
 
Hm.
I was just thinking of leaving the weapon system as it is.

Distortedcoder December 16th, 2009 06:54 AM

Re: Gunslinger's Academy
 
well to be honest i like the idea of reloading. While ppl see it as a burden it actually is very very very stratigic, you need to manage ammo and everything. Not to mention having a clip of 300 rounds to spray randomly allows you to have horrid aim, but as long as keep the bullet hail near your target, its gaurenteed kill... take the bots for example. with perfect aim on jedi master they are quite hard to kill. you will find yourself Spraying an uncontrolled, and almost uninterrupted spray of 30-50 (even more rounds depending on range) bullets non-stop to try and kill your target. Having a few seconds in between a specified ammount of bullets allows for the target to eather get away with their life (barely) or for you to get the kill insted due to better ammo management. And not to mention, some guns are really OP currently. Take the E-11 for example, with 300 rounds and an absoulutely CRAZY rate of fire i can run through a map and not stop shooting, my target has no chance. the reloading gives them not only a chance but makes the player pay attention and do this amazing thing called aim insted of relying on an unrealisticly large magizine and RoF to kill a target.


Not to mention it brings a totally new playstyle that suits the gameplay and style that Gunslingers is supposed to bring. :) I totally think reloading would be cool. It brings controll and strategy to the gun system. :)

Pande December 16th, 2009 07:19 AM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by eezstreet (Post 5170065)
I can just open the animation in Dragon and reset all the leg positions, then redo the glamerge, I keep all my files from previous work for this reason


So let's weigh everything out, if our player is a stormtrooper:
Short Sword - 2 pounds
Bastard Sword - 5.5 pounds
Long Sword - 3 pounds
Armor: About 4 pounds (roughly)
MP5: ~1 pound
Total Weight: 15 pounds.
So you're running around with fifteen pounds of gear. Seems to me like carrying all these swords would be a heavy burden. Not to mention that you need to copy all lightsaber code twice (Which isn't that bad I suppose)


Your spoiler tags are a little funky there (they won't go ... =_=)
From what I can tell, basically what you're doing is placing all the weapons on the screen (which is Q3-like). I assume this is a pic from ArbModding?

15 pounds is a heavy burden? xD I think your averaging is flawed.. a broad sword would be like 13 pounds, mp5 like 3, armor it depends on how much. Already your at 16. xD

Distortedcoder December 16th, 2009 07:50 AM

Re: Gunslinger's Academy
 
About the weight... we dont know what kind of swords, specific length (Just because its called a short sword dont mean its short. its just not a dagger and not a longsword...) along with what material they are made of. If we are talking about futureistic swords, we might be getting into materials like titanium,and Aluminum alloys... stuff thats light, and very strong. but if we are going into dark ages swords with heavyer metals, like bronze and iron. hell we could be talking about mithril swords. so i dont think the weight estimation is too outrageous. i do think weapon management and hotkeying will be a pain if we have 3 meele weapons and 32 other guns, not to mention explosives. Gun weight, i do agree, a regular 9mm pistol weighs on average 2 pounds. so heavyer weapons will need to be heavyer. Armor is another sunbject to material and time peroid discussion...


when it comes time to make the swords and weapons i can help you with model ideas and everything seeing as ive played alot of the balders gate games, Both nwn, and Nwn2, i used to play Wow (4 and a half years, then i got bored...) Elder scrolls: Oblivion i currently have dragon age: origins, alng with Many many other games that have alot of unique and interesting swords. let me know and ill make a pic library for a reference. reason i offer is i kinda want variation so its still a sunject to personal taste in blades, as well as having the same simple, generic blade models is well... Boring IMHO.

katanamaru December 16th, 2009 06:10 PM

Re: Gunslinger's Academy
 
I don't think the real issue for weapons is the weight, but the mass they cover on the body. Sure all three of those swords are not so heavy they can't be carried, but think of all the movement they incumber. A sword and sub machine gun on the back, a long sword on one hip and a pistol on the other, a short sword across the lower back, and ammo clips on the chest would greatly impede movement.

If you are worried about realistic(ish) movement, I'd say one melee weapon, one large gun, one small gun, and grenades.

Distortedcoder December 17th, 2009 06:36 AM

Re: Gunslinger's Academy
 
Very good point, i agree, movement would be akward with all that equipment on you... also i dont want it to look like its Slo-mo...

RevanShytu April 26th, 2010 05:39 AM

Re: Gunslinger's Academy
 
Is this project still being worked on? I'd like to see it eventually get finished and be released ^^

eezstreet April 26th, 2010 02:53 PM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by RevanShytu (Post 5304580)
Is this project still being worked on? I'd like to see it eventually get finished and be released ^^

Perhaps.
Though I think Raz0r's mod pretty much tops my mod in all aspects. You should go check it out. While my mod is more for casual gunners, his is more focused towards a Left4Dead 2 type of experience. If I get time. I'm also working on two othwer mods at the moment (but this one is rather low priority, given that A) Raz0r's mod > mine, B) Not many people actually want this mod)

But hey, it needs to get done.

Superfluous Curmudgeon April 26th, 2010 04:53 PM

Re: Gunslinger's Academy
 
Personally, I think that if you put your whole effort into Raz0r's mod, it would cover almost all aspects this mod would cover, simply adding zombie warfare. Perhaps later, you could work to add a non-zombie version of the mod, possibly adding/removing some weapons to balance it for sane human-only gameplay.

eezstreet April 26th, 2010 05:11 PM

Re: Gunslinger's Academy
 
Quote:

Originally Posted by The Soleutator (Post 5305203)
Personally, I think that if you put your whole effort into Raz0r's mod, it would cover almost all aspects this mod would cover, simply adding zombie warfare. Perhaps later, you could work to add a non-zombie version of the mod, possibly adding/removing some weapons to balance it for sane human-only gameplay.

This seems like a plausible solution for me. I'll go with it.

Raz0r April 26th, 2010 08:48 PM

Re: Gunslinger's Academy
 
..Meep. Sorry for stealing the show and whatnot.
PM/IRC me if you're after the SVN details. :o


All times are GMT -7.

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