Nexuiz Classbased Mod Test Release

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

Thu Jun 18, 2009 8:54 pm

  • Admax88 and I have finally gotten the Classbased mod working with the current SVN code. In order to try it out, you need to be running an SVN build of Nexuiz, along with a recent darkplaces build.

    You can grab it here: http://omploader.org/vMXVwMw/nexuiz-classbased-test.pk3

    Source code is included in the pk3, but you can also browse through it here:
    http://github.com/psychcf/nexuiz-classbased/

    So far, just the class system have been implemented, so we can force different classes to spawn with different health levels, ammunition levels, models, and weapons. We still have to get the special weapons in there, as well as the other things (like deployables, etc).

    Since this isn't a 100% finished mod yet, I haven't put up a test server. For now, you can try it out by creating a local game.

    To do this, go to the server list, hit 'create', and then click on the mutators button. Then, check 'Classbased Gameplay', and close that dialog. Then, choose any team-based gamemode, and then hit start. We still need to get it so that bots choose different classes, but it'll come in time.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jun 19, 2009 12:02 am

  • I added this package to data, ran the game and started a game with this mutator on; whenever I try to spawn in I can't and I get this error message in the top left of the screen:

    Code: Select all
    s30394: gamecommand.qc:57: IFNOT    GLOBAL4567, s30402
    s30395: gamecommand.qc:60: CALL0    isdemo (=isdemo())
    gamecommand.qc : GameCommand : statement 35
    Falling back to normal menu


    When I hit escape to get back to the main menu interface I then get the following:

    Code: Select all
    You may consider adding
    -basedir /path/to/game
    to your launch commandline


    It then gives me the choice between opening the console and quitting; I can't get back to the main menu screens.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Fri Jun 19, 2009 1:18 am

  • Flying Steel wrote:I added this package to data, ran the game and started a game with this mutator on; whenever I try to spawn in I can't and I get this error message in the top left of the screen:

    Code: Select all
    s30394: gamecommand.qc:57: IFNOT    GLOBAL4567, s30402
    s30395: gamecommand.qc:60: CALL0    isdemo (=isdemo())
    gamecommand.qc : GameCommand : statement 35
    Falling back to normal menu


    When I hit escape to get back to the main menu interface I then get the following:

    Code: Select all
    You may consider adding
    -basedir /path/to/game
    to your launch commandline


    It then gives me the choice between opening the console and quitting; I can't get back to the main menu screens.


    How recent is your engine build?
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jun 19, 2009 2:01 am

  • Can you use this in non-team based game modes? Or does it stop you (it should allow you to do so, for completeness.)
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Jun 19, 2009 2:04 am

  • Psychcf wrote:How recent is your engine build?


    :oops:

    My bad, using 2.5.1

    tundramagi wrote:Can you use this in non-team based game modes? Or does it stop you (it should allow you to do so, for completeness.)


    I agree, it would be cool to have the option to make character classes for general purpose use (standard deathmatches and all the rest).
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Fri Jun 19, 2009 3:10 am

  • tundramagi wrote:Can you use this in non-team based game modes? Or does it stop you (it should allow you to do so, for completeness.)


    Well, the limbo menu won't hide the team selection parts in non-team based games, but it should work in any gamemode.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jun 19, 2009 6:35 am

  • how to install? (i put it into nexuiz/data)
    i've svn and no plan how to install
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Fri Jun 19, 2009 7:03 am

  • ok i installed it like the spiderbot:
    created a folder "classbased" (C:/Dokumente und Einstellungen/Eigene Datein/My Games/nexuiz/classbased)
    andfd created a batch file:

    run-wgl -classbased.bat:

    @echo off

    cd nexuiz
    set PATH=misc\buildfiles\w32;%PATH%
    ..\darkplaces\darkplaces -nexuiz -game classbased -mygames -condebug +cvar_check_default bypass
    cd ..



    but it only gives other weapons for each class its not
    and there is a bug sometimes doors dont work: i open a door (the activator is a trigger field (trigger_multiple) the door work and then the door is close and nobody can open...
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Fri Jun 19, 2009 9:49 am

  • but it only gives other weapons for each class its not
    and there is a bug sometimes doors dont work: i open a door (the activator is a trigger field (trigger_multiple) the door work and then the door is close and nobody can open...[/quote]

    That bug is not due to the mutator.
    I've hit that bug too.

    Here's a test case:
    https://cat2.optus.nu/nexuizserv/otherm ... gmulti.bsp
    https://cat2.optus.nu/nexuizserv/otherm ... gmulti.map

    Trigger multi triggering a func_door on shooting.
    Only works once.
    Same for func_door_rotating, probably everything.
    Svn bug :P.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Jun 19, 2009 11:23 am

  • hmm svn bug...

    @ Psychcf: give the soldiers infinite incinctble , the electroballs from the medic can heal when a teammate touch and the normal electro shot should look like the phaser and slows enemies down too, the grenades from the engineer...the secondary shot shouls just sink to ground with lifetime of 5min could be the mines ...the primary just can disarm the enemy's mines,
    ...
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Fri Jun 19, 2009 12:15 pm

  • Sven wrote:hmm svn bug...

    @ Psychcf: give the soldiers infinite incinctble , the electroballs from the medic can heal when a teammate touch and the normal electro shot should look like the phaser and slows enemies down too, the grenades from the engineer...the secondary shot shouls just sink to ground with lifetime of 5min could be the mines ...the primary just can disarm the enemy's mines,
    ...


    Well, I plan on making separate guns for all of those, just to keep everything maintainable.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jun 19, 2009 5:52 pm

  • Psychcf wrote:
    Sven wrote:hmm svn bug...

    @ Psychcf: give the soldiers infinite incinctble , the electroballs from the medic can heal when a teammate touch and the normal electro shot should look like the phaser and slows enemies down too, the grenades from the engineer...the secondary shot shouls just sink to ground with lifetime of 5min could be the mines ...the primary just can disarm the enemy's mines,
    ...


    Well, I plan on making separate guns for all of those, just to keep everything maintainable.


    Would guns work better for those roles than deployables?
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Mon Jun 22, 2009 6:10 pm

  • today i played around in the engine and modded your mod
    (made a new class, the god class xD unlimited ammo and good weapons:laser,shotgun, rl, nex, crifle and mortar and should get unlimited invincible and strength but the life should decrease every time and only if he make frags he get hp to stay alive and the class is chooseable in the limbo-menu)

    ...its only for myself to learn qc :P but i can give you the code if you want xD

    but cant compile anymore:

    Source file: progs.src
    outputfile: ../../progs.dat
    compiling ../common/util-pre.qh
    compiling sys.qh
    compiling pre-builtins.qh
    compiling builtins.qh
    compiling extensions.qh
    [...]
    compiling w_tuba.qc
    compiling t_items.qc
    compiling cl_weapons.qc
    compiling cl_impulse.qc
    compiling ent_cs.qc
    compiling classbased.qc
    in function cb_getmaxh (line 4),
    classbased.qc:95: error: "" - not a name

    ************ ERROR ************
    Errors have occured

    Error in classbased.qc on line 95


    there is nothing, what i can delete
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Mon Jun 22, 2009 6:31 pm

  • found the problem:
    false:
    Code: Select all
    {
       local string maxh = strcat("g_balance_classbased_", e.gamerole, "_health_stable");

       return cvar(maxh);


    right:
    Code: Select all
    {
       local string maxh = strcat("g_balance_classbased_", e.gamerole, "_health_stable");

       return cvar(maxh);
    }


    i forgot the "}" at the end xD
    User avatar
    Sven
    Alien trapper
     
    Posts: 315
    Joined: Sun Jun 01, 2008 8:38 am
    Location: Berlin; Germany

Mon Jun 22, 2009 7:37 pm

  • Err wow, defining a variable this way defines a constant.

    Why not simply use
    Code: Select all
    cvar(strcat("g_balance_classbased_", e.gamerole, "_health_stable")) ??


    Else, what you want is to first declare the variable, then set it.

    Code: Select all
    local string maxh;
    maxh = strcat("g_balance_classbased_", e.gamerole, "_health_stable");


    (I have no idea what happens if you define a variable the way you did inside a function... Maybe it works, maybe it doesn't. Who knows :P)
    Meh.
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

Mon Jun 22, 2009 8:34 pm

  • Mr. Bougo wrote:Err wow, defining a variable this way defines a constant.

    Why not simply use
    Code: Select all
    cvar(strcat("g_balance_classbased_", e.gamerole, "_health_stable")) ??


    Else, what you want is to first declare the variable, then set it.

    Code: Select all
    local string maxh;
    maxh = strcat("g_balance_classbased_", e.gamerole, "_health_stable");


    (I have no idea what happens if you define a variable the way you did inside a function... Maybe it works, maybe it doesn't. Who knows :P)


    I just felt like that would make it hard to read, so I made a local variable to put the name of the maxh cvar in, so I can break it up into several lines. Local variables don't spill into the global namespace, so it should be fine, since the GC will just clean it up once the function is done executing.

    I'm not the best at quakeC, so correct me if I'm wrong.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Mon Jun 22, 2009 9:46 pm

  • Psychcf wrote:
    Mr. Bougo wrote:Err wow, defining a variable this way defines a constant.

    Why not simply use
    Code: Select all
    cvar(strcat("g_balance_classbased_", e.gamerole, "_health_stable")) ??


    Else, what you want is to first declare the variable, then set it.

    Code: Select all
    local string maxh;
    maxh = strcat("g_balance_classbased_", e.gamerole, "_health_stable");


    (I have no idea what happens if you define a variable the way you did inside a function... Maybe it works, maybe it doesn't. Who knows :P)


    I just felt like that would make it hard to read, so I made a local variable to put the name of the maxh cvar in, so I can break it up into several lines. Local variables don't spill into the global namespace, so it should be fine, since the GC will just clean it up once the function is done executing.

    I'm not the best at quakeC, so correct me if I'm wrong.


    That might have been my line of code there. I'm rather new to quakec so I could be totally off base, but how can that be a constant if it depends on the value of variable (e.gamerole)?

    My impression of quakec was that a line of code like that only defines a constant outside of a function. But I don't know that for certain, just a feeling.
    admax88
    Newbie
     
    Posts: 5
    Joined: Sun May 24, 2009 12:34 am

Tue Jun 23, 2009 12:41 pm

  • The 1st rule of thumb for QuakeC is: Remember: this language sucks

    That "local" thing is a synonym for "". Yeah, it means nothing. Its only point is to be able to use an IDE in C mode for QuakeC :P
    Also, as I said, I have no clue how it behaves with this definition syntax inside of functions, but I'd expect either nothing special, or unpredictable behaviour :P
    Meh.
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

Tue Jun 23, 2009 1:39 pm

  • Mr. Bougo wrote:The 1st rule of thumb for QuakeC is: Remember: this language sucks

    That "local" thing is a synonym for "". Yeah, it means nothing. Its only point is to be able to use an IDE in C mode for QuakeC :P
    Also, as I said, I have no clue how it behaves with this definition syntax inside of functions, but I'd expect either nothing special, or unpredictable behaviour :P


    WHAT?! THAT'S SO IDIOTIC!

    wow, quakeC does suck.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Tue Jun 23, 2009 2:15 pm

  • You think that's bad? You got one serious headache coming your way when you find the really dumb shit abt QuakeC. :twisted:
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Tue Jun 23, 2009 2:35 pm

  • tZork wrote:You think that's bad? You got one serious headache coming your way when you find the really dumb shit abt QuakeC. :twisted:
    How come no one fixed it for.. umm. 15 years :?:
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Tue Jun 23, 2009 2:54 pm

  • alpha wrote:
    tZork wrote:You think that's bad? You got one serious headache coming your way when you find the really dumb shit abt QuakeC. :twisted:
    How come no one fixed it for.. umm. 15 years :?:
    they havent had your brilliant insights yet on the matter ?
    [Want to develop? Look HERE]. Image Image Gif sauce.
    paperclips
    Alien trapper
     
    Posts: 346
    Joined: Mon Jan 12, 2009 10:27 am
    Location: internets

Tue Jun 23, 2009 3:00 pm

  • paperclips wrote:your brilliant insights
    Thanks, but I actually haven't said anything public about qc. Thus, question stands..
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Tue Jun 23, 2009 4:30 pm

  • Because one can't fix quakec still leaving it compatible to gazillion of quake mods.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Tue Jun 23, 2009 5:11 pm

  • Mr. Bougo wrote:The 1st rule of thumb for QuakeC is: Remember: this language sucks

    That "local" thing is a synonym for "". Yeah, it means nothing. Its only point is to be able to use an IDE in C mode for QuakeC :P
    Also, as I said, I have no clue how it behaves with this definition syntax inside of functions, but I'd expect either nothing special, or unpredictable behaviour :P


    Wow this language just keeps getting better and better :lol:

    Next you'll tell me that "if" means "maybe" and "maybe" means "buttsecks".
    admax88
    Newbie
     
    Posts: 5
    Joined: Sun May 24, 2009 12:34 am

Tue Jun 23, 2009 6:44 pm

  • alpha wrote:
    tZork wrote:You think that's bad? You got one serious headache coming your way when you find the really dumb shit abt QuakeC. :twisted:
    How come no one fixed it for.. umm. 15 years :?:


    Why don't you fix it, alpha.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm



Return to Nexuiz - Editing




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