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

War3:Source
January 24, 2013, 07:06:40 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Setting an XP cap for an individual race.  (Read 60 times)
Remy Lebeau
Full Member
***
Posts: 172


View Profile
« on: January 08, 2013, 01:55:50 AM »

So I've created a race for some hardcore player on my server (who have maxed every single other one of our 100+ races) that has 1200+ levels.  The problem with such a race is that the bonus xp multiplier means that as they start to get higher levels on this race, players are basically going to be able to max a race in one kill!

I've set a cap on the maximum amount of XP that any kill can give, but would ideally like to modify that so that this race specifically has a low cap.

I know how to do it by modifying the engine to check for this particular race, but am wondering if anyone knows of any other method I could use?

Even as i type this - I noticed:

OnPreGiveXPGold, //client, arg1,2,3=W3XPAwardedBy , xp, gold

Is there any way I could use that to modify how much XP is awarded?  Unfortunately it doesn't seem to me that there's any way of checking WHO the player killed to get the XP with this event :S

Anyone have ideas?
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #1 on: January 08, 2013, 09:19:49 AM »

thats why there shouldnt be races with 100 levels (not saying you do) and thats why it should be based on "total" levels because the other levels do not affect gameplay

you will have to create a new war3var global variable, have the xp engine save who got killed which causes the xp awarding, so you can retrieve that value later in your event calls

if you do add another variable to the global constants list, make sure you add it to the end

constants.inc
enum W3Var
{
...
Logged

DarkEnergy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!