Rune Central

The Official Rune Quake Message Board
It is currently Thu Mar 28, 2024 3:54 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Setting up a runequake Server
PostPosted: Thu May 14, 2009 2:54 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1255
Location: New Jersey, USA
You are correct. The main source for both distributions generates this file automatically so I often forget to mention that you need to declare functions. :( It's only necessary if the new function is called earlier than it is appears in progs.src (or on the actual .qc file) though.

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Fri May 15, 2009 11:47 am 
Offline

Joined: Thu Sep 23, 2004 5:49 pm
Posts: 49
Thanks slot-zero, for all your help, but most importantly, thank you for this very robust and adaptable mod that allows so much variation in its setup.

One last thing I wanted to go over with you is with regards to the LG_DISCHARGE mechanics. My question is twofold:

1.What happens when the LG_DISCHARGE is disabled, does it just discharge on the player who discharges and no one else?

2. When LG_DISCHARGE is enabled, does it act like the original quake discharge mechanics, or has it been modified? That is, when a discharge occurs, can you still damage players out of the water if they are in line of sight, and will players in the water not be damaged if they are not in line of sight (hiding behind a pillar, for example)?

Also, is there a way to automatically toggle LG_DISCHARGE based on what mode the server is in? For example, if the mode gets set to Normal, I want it to be set to lgdischargeoff, but when the mode is set to Match, I want it to be set to lgdischargeon.

I did find a very very minor bug with regards to the voting of LG_DISCHARGE, the vote command is vote-lg-discharge, but in the in-game help-vote display it shows up as vote-lg_discharge.

From bindings.qc:
Code:
   self_sprint (self, "\b                vote-lg_discharge\n");

should be:
Code:
   self_sprint (self, "\b                vote-lg-discharge\n");


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Fri May 15, 2009 11:53 am 
Offline

Joined: Thu Sep 23, 2004 5:49 pm
Posts: 49
desh wrote:
Also, is there a way to automatically toggle LG_DISCHARGE based on what mode the server is in? For example, if the mode gets set to Normal, I want it to be set to lgdischargeoff, but when the mode is set to Match, I want it to be set to lgdischargeon.


To answer my own question here, can I modify one of the src files to the effect of this:
Code:
      if (gamemode == MODE_MATCH)
      {
         lgdischargeon;
      }
      else if (gamemode == MODE_NORMAL)
      {
         lgdischargeoff;
      }


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Fri May 15, 2009 3:11 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1255
Location: New Jersey, USA
desh wrote:
1.What happens when the LG_DISCHARGE is disabled, does it just discharge on the player who discharges and no one else?


Yep.

desh wrote:
2. When LG_DISCHARGE is enabled, does it act like the original quake discharge mechanics, or has it been modified?


It works like the original except that all of the victims must be in the water.

desh wrote:
Also, is there a way to automatically toggle LG_DISCHARGE based on what mode the server is in? For example, if the mode gets set to Normal, I want it to be set to lgdischargeoff, but when the mode is set to Match, I want it to be set to lgdischargeon.


Open team.qc and at the very bottom there are defaults for each mode. There are some modes that use the same settings. For example heads uses normal defaults and midair uses arena defaults, but it's easy to make seperate defaults for those modes, so if you want to know how just ask. I should mention that if you're using the startlevel.cfg to turn on/off options, you should turn off the mode defaults (See scratch1 no default mode). Otherwise, the server might struggle between your startlevel.cfg options and the servers default options.

desh wrote:
I did find a very very minor bug with regards to the voting of LG_DISCHARGE, the vote command is vote-lg-discharge, but in the in-game help-vote display it shows up as vote-lg_discharge.


Thanks!

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Fri May 15, 2009 6:32 pm 
Offline

Joined: Thu Sep 23, 2004 5:49 pm
Posts: 49
Slot Zero wrote:

desh wrote:
2. When LG_DISCHARGE is enabled, does it act like the original quake discharge mechanics, or has it been modified?


It works like the original except that all of the victims must be in the water.


If I make the following change (change is in bold):

// explode if under water
if (self.runetype != RN_THOR && self.waterlevel > SAFE_DISCHARGE_WATERLEVEL)
{
cells = self.ammo_cells;
self.ammo_cells = 0;
set_current_ammo ();
monk_radius_hack = 1;
discharge_hack = 0;
[code]T_RadiusDamage (RADIUS_NORMAL, self, self, 35*cells, world, "discharge");
discharge_hack = 0;
monk_radius_hack = 0;
return;
}


would that cause players out of the water to be victims of the discharge?


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Fri May 15, 2009 9:55 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1255
Location: New Jersey, USA
In combat.qc, in the function T_RadiusDamage replace
Code:
               points = 0;
            else if (discharge_hack
               && ((options & NO_DISCHARGE
                     && head != attacker)
                  || head.waterlevel == 0))
               points = 0;
with
Code:
               points = 0;
            else if (discharge_hack
               && ((options & NO_DISCHARGE
                     && head != attacker)
                  ))
               points = 0;

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Mon May 18, 2009 2:07 pm 
Offline

Joined: Thu Sep 23, 2004 5:49 pm
Posts: 49
I'm curious as to what setting discharge_hack 0, do then?

So, I was playing around with the random map selection, and I the results I was getting didn't seem to be uniformly random. Here are the following conditions being met:

1) Total of 30 custom maps are being used; 12 custom maps are levsize 1; 10 custom maps are levsize 2; 8 custom maps are levsize 3.
2) Of the original id maps, all levsize 1 maps are set to FALSE in user_allowed_maps, 6 levsize 2 maps are set to TRUE in user_allowed_maps, and 3 levsize 3 maps are set to TRUE in user_allowed_maps.
3) I was the only client on the server, so the server will see only 1 client.
4) The pick_map_size function was untouched, so there's a 85% chance of picking a small (levsize 1) map, and a 15% chance of picking a medium (levsize 2) map.
5) After the levsize is determined, there is a 50% chance of picking an original id map or picking a custom map from the select_map function (use_lp >0).

Now, with that being said, here is a sample of the random map selection process with the aforementioned conditions explained:

Code:
skull - custom (small)
skull - custom (small)
skull - custom (small)
north - custom (small)
north - custom (small)
ztndm4 - custom (small)
e1m2 - original id (medium)
rf2 - custom (small)
lacrima - custom (small)
agggressr - custom (small)
e2m3 - original id (medium)
e2m3 - original id (medium)
ultrav - custom (small)
ztndm3 - custom (medium)
e2m2 - original id (medium)
e2m2 - original id (medium)
e2m2 - original id (medium)
lilith - custom (small)
aggressr - custom (small)
ztndm4 - custom (small)
ztndm4 - custom (small)
xntrick - custom (small)
xntrick - custom (small)
xdm4 - custom (small)
xdm4 - custom (small)
dranzdm8 - custom (medium)
ultav - custom (small)
e2m1 - original id (medium)
e1m5 - original id (medium)
skull - custom (small)
auhdm2 - custom (small)
auhdm2 - custom (small)
auhdm2 - custom (small)



As you can see, a number of the maps get selected consecutively twice or three times before switching to a different map. Is this due to the number of selected maps being relatively small, or maybe the random function requires a seed? Thinking about this some more, however, is that I was testing the random map selection process by having a very small time between level changes, ie, I either had a 1 minute time limit running, or I was using vote-exit to go to the next map. So, if there is a seed for the random function, it might be based on a time, and if the time constant for the seed is slower than than the time constant I was using to change levels (1 minute), then that could be the source of the problem as well.

Edit: added select_map function condition to condition list.


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Tue May 19, 2009 1:44 am 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1255
Location: New Jersey, USA
You can't select level by number of players if you remove all of the levels for a particular levelsize. Remove this option from the noexit value and just leave randomize selected.

The discharge_hack global is used to prevent other players from getting damage when someone is discharges in the water or lands in the water with lightning rune. (This can be turned off as you know already.)

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Tue May 19, 2009 2:26 am 
Offline

Joined: Thu Sep 23, 2004 5:49 pm
Posts: 49
Slot Zero wrote:
You can't select level by number of players if you remove all of the levels for a particular levelsize. Remove this option from the noexit value and just leave randomize selected.


I wasn't trying to remove all levels for a particular levelsize. What does the function pick_map_size in map.qc do, if it doesn't try and pick a map based on number of players in the server? This is beside the point, anyway, I want to know why particular levels being chosen "randomly" twice or three times in a row.


Top
 Profile  
Reply with quote  
 Post subject: Re: Setting up a runequake Server
PostPosted: Tue May 19, 2009 2:37 am 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1255
Location: New Jersey, USA
desh wrote:
I wasn't trying to remove all levels for a particular levelsize.


One of your conditions above was that you removed all levsize 1 maps for the standard maps.

desh wrote:
What does the function pick_map_size in map.qc do, if it doesn't try and pick a map based on number of players in the server?


It's used only when that option is set with the noexit setting. See example.cfg for a description of noexit settings, or type help-noexit from the server.

desh wrote:
This is beside the point, anyway, I want to know why particular levels being chosen "randomly" twice or three times in a row.


Because the server was setup to select level by number of players and all of the small standard levels are being rejected so the server can't find a small standard level so it gives up and just plays the current level.

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group