Raised This Month: $12 Target: $400
 3% 

[EXTENSION|ALL] RPGTools


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 07-08-2011 , 06:48   [EXTENSION|ALL] RPGTools
Reply With Quote #1

THIS IS ALPHA (AND/OR SPARTA)


ConVars
sm_rpgtools_version
- version
sm_rpgtools_please_spam_my_logs
- Enables debugging printing on setting of variables and on the modifications to damage (useful for debugging if something's wrong)


Licence

This extension, and the include, are licenced under AGPLv3. Anything attached to it must also be AGPLv3. This means that if anyone asks for your source code, you must provide it free of charge.

Why am I doing this? To help the community that helps you.

What is this?
A simple extension that provides two trivial natives controlling bonuses on damage, not taking damage (dubbed "shield"), speed, and health.

Yes, this can be done using various other mods (for certain games), the idea behind this is to use simple things to replace the need for a handful of extensions.

Natives:
  • native bool:RPG_SetPlayerStat(iClient, RPG_STAT, Float:fValue);
  • native bool:RPG_SetPlayerStats(iClient, Float:fDamageStat=0.0, Float:fShieldStat=0.0, iHealthStat=0, Float:fSpeedStat=0.0);
Pretty obvious what they do.

There's also a forward:
  • forward Action:RPG_GetPlayerData(iClient);
The forward is called when a player is registerd with zeroed stats (i.e. 0,0,0,0).

What you need to know:
  • Damage and shield are both floats, speed is a float, and health is an integer (though you input them all as floats when you are setting a single statistic).
  • Any statistic set to 0 will result in the default value being used.
  • Using negative numbers won't work, because I'm a bad person -- anything lower than 1 will trigger the default status.
Damage and Shield
  • Damage adds a percentage of damage (where 100.0 is 100%, and 1.0 is 1%);
  • Shield subtracts a percentage of incoming damage (where 100.0 is 100%, and 1.0 is 1%);
  • They are applied in the way that makes the most sense (damage increase from attacker, shielding on defender).
Health
  • Setting health sets the maximum health;
  • Setting health to 0 will yield the default health for the player.
Speed
  • This taps into the player speed, which is what I believe is called first in everything.
What if gamedata breaks?
Is my game supported?
  • Not a clue, check the post below, otherwise add gamedata and find out. Chances are it is.
Testing
  • Squat, I'm pushing this now because people wanted it from me.
Why do you even have this if you weren't going to use it?
  • I was working on a rewrite of a popular mod that was on my CS:S server (~2004-2005), which was similar to "The Hidden", but used stock CS:S weapons and beefed up a player. I didn't write the mod alone, but I helped work on various aspects (mostly planning , but now I can code!).
What's in the zip?
  • The include (pawn/include/rpgtools.inc)
  • gamedata for hl2mp, tf, dod, and cstrike (all source versions)..
Where's the source?
https://bitbucket.org/aws/rpgtools
Attached Files
File Type: zip RPGTools.zip (3.7 KB, 195 views)
File Type: dll rpgtools.ext.dll (93.5 KB, 236 views)
__________________
Quote:
Originally Posted by asherkin View Post
Configure your servers properly and stop blaming random things.

Last edited by Swixel; 07-17-2011 at 17:36. Reason: Changed over binaries to a new (test) version which shouldn't crash ...
Swixel is offline
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 07-08-2011 , 09:26   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #2

Game Compatibility Listing

(Reversed for a lot more junk as time goes by)


Counter-Strike Source
  • Statistics:
    • Speed -> Works
    • Health -> Does not work (the game spawns you with a set 100)
    • Damage -> Unknown (untested).
    • Shield -> Unknown (untested).
  • Testing Credits:
    • GoD-Tony
__________________
Quote:
Originally Posted by asherkin View Post
Configure your servers properly and stop blaming random things.

Last edited by Swixel; 07-08-2011 at 09:41.
Swixel is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 07-12-2011 , 09:12   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #3

How is this coming along?

I still haven't had a chance to test the Damage/Shield features, but it was great to see the per-client MaxSpeed changes working.
GoD-Tony is offline
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 07-12-2011 , 16:38   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #4

Quote:
Originally Posted by GoD-Tony View Post
How is this coming along?
Not too badly. I have a few more things I should test, but the content mirrors down under are overwhelmed, so it'll probably be several days before I can even test them on TF2.

Quote:
Originally Posted by GoD-Tony View Post
I still haven't had a chance to test the Damage/Shield features, but it was great to see the per-client MaxSpeed changes working.
I think the main thing for CS:S is the speed (for general modding), so that's not a problem
__________________
Quote:
Originally Posted by asherkin View Post
Configure your servers properly and stop blaming random things.
Swixel is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 07-13-2011 , 12:31   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #5

Quote:
Originally Posted by Swixel View Post
I think the main thing for CS:S is the speed (for general modding), so that's not a problem
And I will start using it in my servers when the mystery map change issue is fixed.
GoD-Tony is offline
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 07-13-2011 , 17:01   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #6

Yeah, I need to do some more testing to work out what's happening there. I'm unhooking and it shouldn't be messing with anything bad ... I guess I could pull it to pieces a few more times to track it down...

If anyone has any ideas, I'd like to hear them... at the moment I assume it's something to do with hooking but not cleanly unhooking on map change...
__________________
Quote:
Originally Posted by asherkin View Post
Configure your servers properly and stop blaming random things.
Swixel is offline
Swixel
Senior Member
Join Date: Jul 2010
Location: Sydney, Australia
Old 07-17-2011 , 17:39   Re: [EXTENSION|ALL] RPGTools
Reply With Quote #7

There are some more untested natives, which I won't update the first post to reflect yet. Trying an update to see if this resolves the mapchange issue.
__________________
Quote:
Originally Posted by asherkin View Post
Configure your servers properly and stop blaming random things.
Swixel is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode