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_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.
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Thu Jul 16, 2009 2:42 pm

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 :)
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

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

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.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jul 17, 2009 8:13 am

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

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...
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

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.
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

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

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
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Sat Jul 18, 2009 1:52 pm

  • I loaded your pk3 and a bunch of assets are missing.
    Image
    User avatar
    ihsan
    Alien trapper
     
    Posts: 305
    Joined: Fri Mar 03, 2006 3:33 pm
    Location: Trinidad (Where Obama met Chavez)

Sat Jul 18, 2009 4:10 pm

  • do you use svn? use it ;)
    or use the option: use alternative hud layout
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Sat Jul 18, 2009 6:31 pm

  • Sven wrote:
    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


    Well, you're using a local string to contain a float that should be assigned for each entity...
    If you want to set a variable for one entity, you must use entity variables, and not local variables.

    I suggest you read the source a bit before trying to code something :)
    Meh.
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

Sun Jul 19, 2009 9:55 am

  • hmm ok :)
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Sat Sep 19, 2009 7:26 pm

  • HERE is a link to a .patch file of the classbased mod

    Edit: now u can use ;)
    German Nexuiz Clan:
    Image
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Mon Sep 21, 2009 8:08 am

  • I'd like to test it but I don't know how to use this patch file, where should I put? And should I use the .pk3 file with it?
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Fri Sep 25, 2009 3:14 pm

Sun Sep 27, 2009 10:05 am

  • well, I've downloaded the pk3, I've unpacked in the data folder, and I ran Nexuiz with eggandbacon map, but it appears only the team-select screen, but nothing happens. Or better, I don't what it should happen! :D
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest