Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2016-08-04 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog

Author Topic: Excluding a race from total level count?  (Read 1024 times)

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Excluding a race from total level count?
« on: September 21, 2014, 06:42:05 PM »
On our server we have a race (timewaster) for people who have unlocked all the other hundreds of races we have.  Timewaster currently has 1201 levels.

I'm going to be adding more races soon, and would prefer for people to not have immediate access to them simply because they already have a few hundred levels in timewaster.

To this end I'm wondering if there's an easy way (preferably using events / deniables) to exclude timewaster from being counted when a player's "total levels" are being calculated.

I know I could hard code it into the core, however that would mean keeping track of the modification whenever I update w3s...  Anyone got any suggestions?
STEAM PROFILE

NEW CS:GO SERVER:

Revan

  • Hero Member
  • *****
  • Posts: 503
    • View Profile
Re: Excluding a race from total level count?
« Reply #1 on: September 22, 2014, 07:47:04 AM »
That's actually a good idea I think.
We can add a deniable to exclude races from changerace/raceinfo and total level stat and change the W3Cvar _hide to work with this new system.
#war3source on gamesurge

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Excluding a race from total level count?
« Reply #2 on: September 22, 2014, 04:24:43 PM »
That's actually a good idea I think.
We can add a deniable to exclude races from changerace/raceinfo and total level stat and change the W3Cvar _hide to work with this new system.

It could provide the option of giving races that sit outside the usual system, designed as VIP races, or whatever that can be hidden or not counted depending on the situation...
STEAM PROFILE

NEW CS:GO SERVER:

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2428
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Excluding a race from total level count?
« Reply #3 on: September 24, 2014, 09:10:42 PM »
or just add a flag to that race
and have the total level counter check that flag on each race

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Excluding a race from total level count?
« Reply #4 on: September 25, 2014, 05:51:00 PM »
or just add a flag to that race
and have the total level counter check that flag on each race

Now that sounds promising.  How do I add flags?

Edit: don't mind me - is it as simple as adding to my war3source.cfg something like war3 timewaster_flags "donotcount"

And then modifying the count total levels function to check for donotcount flag?
« Last Edit: September 25, 2014, 05:56:55 PM by Remy Lebeau »
STEAM PROFILE

NEW CS:GO SERVER:

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2428
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Excluding a race from total level count?
« Reply #5 on: September 26, 2014, 08:00:14 AM »
yes, flags are arbitrary strings. Please change your pull request to make the flag more obvious

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Seven Sins Gaming
Re: Excluding a race from total level count?
« Reply #6 on: September 26, 2014, 04:33:14 PM »
yes, flags are arbitrary strings. Please change your pull request to make the flag more obvious

I'll change the pull request completely - as it turns out there are a few other places that use their own functions for calculating total race (instead of the native), so I'll tighten it all up to work properly and re-submit.
STEAM PROFILE

NEW CS:GO SERVER: