Classbased revisited + New Weapon by Sven [R3]

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Classbased revisited + New Weapon by Sven [R3]

Postby Sven » Thu Jul 16, 2009 1:22 pm

Classbased_Sven_r3.pk3
Original was made by Psychcf

~LINK UPDATED~

I hope it works when you just put it into the nexuiz/data folder...
-Has now the 3 classes : Ninja, Soldier and Hunter
--Ninja is the fastest but has the lowest HP and it is only 50% visible
If you kill 10 in a row the ninja gets more invisible (0.3 or 0.2) (but buggy at this time :( )
Weapons: Laser, Rifle, Devastator(my creation NEED A SMALL MODEL (has porto because small))
--Soldier normal fast double HP (200) if you frag 5(g_balance_classbased_soldier_supermode_killcount "5") you become 30 sec invincible and strenght
Weapons:Grenade Launcher, Rocket Launcher and Uzi (Machinegun)
--Hunter bit faster than Soldier (no special, but i will make faster refire after 10 chainfrags)
Weapons:Hook, Rifle and Nex
and all classes have the Port-o-Launcher

New Cvars (and some of the original classbased):
defaultNexuiz.cfg:
Code: Select all
set g_balance_classbased_soldier_supermode 1 "1: Soldiers can get 30 seconds of strenght and invincible"
set g_balance_classbased_soldier_supermode_killcount 5 "frags a Soldier have to chain to become super"
set g_balance_classbased_soldier_start_ammo_shells 100
set g_balance_classbased_soldier_start_ammo_cells 50
set g_balance_classbased_soldier_start_ammo_nails 100
set g_balance_classbased_soldier_start_ammo_rockets 350
set g_balance_classbased_soldier_maxhealth_stable 200
set g_balance_classbased_soldier_speed_moverate 1 "speedmultiplier for Soldiers (0.5: half / 2: double)"
set g_balance_classbased_soldier_speed_jumpheight 1 "jumpheightmultiplier for Soldiers (0.5: half / 2: double)"

set g_balance_classbased_ninja_start_ammo_shells 0
set g_balance_classbased_ninja_start_ammo_cells 250
set g_balance_classbased_ninja_start_ammo_nails 100
set g_balance_classbased_ninja_start_ammo_rockets 0
set g_balance_classbased_ninja_alpha 0.5 "visibility of Ninjas"
set g_balance_classbased_ninja_maxhealth_stable 80
set g_balance_classbased_ninja_invincible 0 "1: Ninjas starts with a lifelong invincible powerup"
set g_balance_classbased_ninja_speed_moverate 1.4 "speedmultiplier for Ninjas (0.5: half / 2: double)"
set g_balance_classbased_ninja_speed_jumpheight 1.4 "jumpheightmultiplier for Ninjas (0.5: half / 2: double)"

set g_balance_classbased_hunter_start_ammo_shells 0
set g_balance_classbased_hunter_start_ammo_cells 250
set g_balance_classbased_hunter_start_ammo_nails 100
set g_balance_classbased_hunter_start_ammo_rockets 0
set g_balance_classbased_hunter_maxhealth_stable 100
set g_balance_classbased_hunter_speed_moverate 1.1 "speedmultiplier for Hunters (0.5: half / 2: double)"
set g_balance_classbased_hunter_speed_jumpheight 1.1 "jumpheightmultiplier for Hunters (0.5: half / 2: double)"

weapons.cfg(my weapon):
Code: Select all
set g_weaponreplace_devastator ""

set g_start_weapon_devastator -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"

set g_balance_devastator_primary_ammo 7
set g_balance_devastator_primary_damage 100
set g_balance_devastator_primary_edgedamage 0
set g_balance_devastator_primary_force 1000
set g_balance_devastator_primary_force_beam 100
set g_balance_devastator_primary_radius 150
set g_balance_devastator_primary_speed 3300
set g_balance_devastator_primary_refire 1.5
set g_balance_devastator_primary_animtime 0.75
set g_balance_devastator_primary_lifetime 10
set g_balance_devastator_secondary_ammo 1
set g_balance_devastator_secondary_damage 0.1
set g_balance_devastator_secondary_edgedamage 0
set g_balance_devastator_secondary_force 500
set g_balance_devastator_secondary_radius 60
set g_balance_devastator_secondary_speed 33000
set g_balance_devastator_secondary_refire 0.7
set g_balance_devastator_secondary_animtime 0.3
set g_balance_devastator_secondary_lifetime 30



DEVASTATOR:
by the devastator primary attack:
when you shoot first a beam(LIKE nexbeam) cames and later (longer if the distance is higher 0.01sec-10sec)
the beamend explodes the beam makes 0 damage only push a little bit

secondary:
for escape, an explosion makes smoke and pushes you away (speed is very fast)


and the last change:
hookbomb is now a smoke bomb (only effect, with cyan-blue fire effect)
and make the porto red glowing and added pants and shirt textures
...programming quakeC for 5 days xD[/b]
~LINK UPDATED~

-made "//" in front of all lines which made the supermods
Last edited by Sven on Fri Jul 17, 2009 2:30 pm, edited 4 times in total.
Sven
Alien trapper
 
Posts: 315
Joined: Sun Jun 01, 2008 8:38 am
Location: Berlin; Germany

Postby Psychcf » Thu Jul 16, 2009 2:42 pm

Looks like a neat twist on things. It's also cool to have something I wrote built on top of :D
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby Sven » Thu Jul 16, 2009 3:47 pm

yes i have to say: without your work is wasnt possible because im a really noob in c :)
Sven
Alien trapper
 
Posts: 315
Joined: Sun Jun 01, 2008 8:38 am
Location: Berlin; Germany

Re: Classbased revisited by Sven

Postby Flying Steel » Fri Jul 17, 2009 2:17 am

Sven wrote:Classbased_Sven.pk3
-Has now the 3 classes : Ninja, Soldier and Hunter
--Ninja is the fastest but has the lowest HP and it is only 50% visible


Wow, so you can create classes with different speeds and transparency levels with Pychcf's mod already?

What all can you make specific to a class then in this version? Friction? Gravity? Starting Armor? Jetpack?
Flying Steel
Keyboard killer
 
Posts: 623
Joined: Fri May 08, 2009 9:13 pm

Re: Classbased revisited by Sven

Postby Psychcf » Fri Jul 17, 2009 3:29 am

Flying Steel wrote:
Sven wrote:Classbased_Sven.pk3
-Has now the 3 classes : Ninja, Soldier and Hunter
--Ninja is the fastest but has the lowest HP and it is only 50% visible


Wow, so you can create classes with different speeds and transparency levels with Pychcf's mod already?

What all can you make specific to a class then in this version? Friction? Gravity? Starting Armor? Jetpack?


You can basically make any modification you want from the code, the classbased mod just provides the basic skeleton.
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby Sven » Fri Jul 17, 2009 8:13 am

and this with the jetpack i already made :P
Sven
Alien trapper
 
Posts: 315
Joined: Sun Jun 01, 2008 8:38 am
Location: Berlin; Germany

Postby Sven » Fri Jul 17, 2009 12:05 pm

NEED HELP

g_damage.qc
Code: Select all
void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
{
[...]
   local string supermode;
   if (g_classbased){
      if (cvar("g_balance_classbased_soldier_supermode") == 1){
         supermode = "0";
         if(attacker.gamerole == "soldier"){
            if(attacker.killcount > cvar("g_balance_classbased_soldier_supermode_killcount")){
               if (supermode == "0"){
                  supermode = "1";
                  bprint ("^1The ^5Soldier^1 ,",attacker.netname," ^1had ",ftos(attacker.killcount)," frags in a row and is in the Supermode for 30 seconds!\n");
                  attacker.strength_finished = time + 30;
                  attacker.invincible_finished = time + 30;
                  if(attacker.killcount > (cvar("g_balance_classbased_soldier_supermode_killcount")+5)){
                     if (supermode == "1"){
                        bprint ("^1The ^5Soldier^1, ",attacker.netname," ^1had ",ftos(attacker.killcount)," frags in a row and upgraded his/her Supermode!\n");
                        attacker.strength_finished = time + 45;
                        attacker.invincible_finished = time + 45;
                     }
                  if(attacker.strength_finished == 0){
                     bprint ("^2The ^5Soldier^1, ",attacker.netname," ^2is no longer in the Supermode.\n");
                     supermode = "0";
                     }
                  }   
               }
            }
         }
      }
   }
   local string supermode2;
   if (g_classbased){
      if (cvar("g_balance_classbased_ninja_supermode") == 1){
         supermode2 = "0";
         if(attacker.gamerole == "ninja"){
            if(attacker.killcount == cvar("g_balance_classbased_ninja_supermode_killcount")){
               if (supermode2 == "0"){
                  supermode2 = "1";
                  bprint ("^1The ^5Ninaja^1 ,",attacker.netname," ^1had ",ftos(attacker.killcount)," frags in a row and is more invisible!\n");
                  attacker.alpha = attacker.alpha - 0.3;
               }
            if(attacker.killcount < 10){
               if (supermode2 == "1"){
                  supermode2 = "0";
                  bprint ("^2The ^5Ninaja^2 ,",attacker.netname," ^2is no longer in the Supermode !\n");   
                  }
               }
            }            
         }
      }
   }
}


it doesnt work...eg: i get with a sodlier in the supermode and have my 30 sec and for each following frag another 30 sec

1.:
if(attacker.killcount > (cvar("g_balance_classbased_soldier_supermode_killcount")+5)){
must be:
if(attacker.killcount == (cvar("g_balance_classbased_soldier_supermode_killcount")+5)){

but why does the "local string supermode;" not work?
ill try "local float supermode;" until your answers come...
Sven
Alien trapper
 
Posts: 315
Joined: Sun Jun 01, 2008 8:38 am
Location: Berlin; Germany

Postby Mr. Bougo » Fri Jul 17, 2009 9:24 pm

Wtf, why do you use a string for this???

Using a float is the standard way to go.

Also, you're setting it to "0", then checking if it's "0" ?? The check will always pass! Why is there a check, then?


EDIT 2: Err, I'm not sure I understand that variable's purpose.
Meh.
Mr. Bougo
Keyboard killer
 
Posts: 760
Joined: Mon Sep 10, 2007 3:29 pm

Re: Classbased revisited by Sven

Postby Flying Steel » Sat Jul 18, 2009 2:26 am

Psychcf wrote:You can basically make any modification you want from the code, the classbased mod just provides the basic skeleton.


:twisted:
Flying Steel
Keyboard killer
 
Posts: 623
Joined: Fri May 08, 2009 9:13 pm

Postby Sven » Sat Jul 18, 2009 12:25 pm

Mr. Bougo wrote:Wtf, why do you use a string for this???

Using a float is the standard way to go.

Also, you're setting it to "0", then checking if it's "0" ?? The check will always pass! Why is there a check, then?


EDIT 2: Err, I'm not sure I understand that variable's purpose.


...i said im a noob :P
0 it pass ?! should i use better 1 and 2 or what...?
chaecking because the soldier should only upgrade his supermode if he is in supermode
Sven
Alien trapper
 
Posts: 315
Joined: Sun Jun 01, 2008 8:38 am
Location: Berlin; Germany

Next

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest