DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • October 18, 2018, 08:48:09 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: Making initiative a buffable stat  (Read 2585 times)
0 Members and 1 Guest are viewing this topic.
SVN Users
Offline Offline

Posts: 259

Code ninja

View Profile
« on: April 14, 2006, 03:54:22 AM »

I've been considering for quite some time how to make initiative into a buffable stat - a number of my races, and other parts of my game, would work quite well if they could increase or decrease the chance of the player being surprised in battle. I wanted the scheme to fulfil these conditions:

  • Player should never be surprised every time, nor get the jump every time, no matter how much they are buffed/debuffed
  • The more you're buffed/debuffed, the less additional effect it has (helps with the last one, and stops players becoming too uber)
  • Transitive - doesn't matter which order different modules buff the stat in, the result is the same odds
  • Stacks with the base chances as they currently are (1 in 2 for normal fights, 2 in 3 for fights below your level, 1 in 3 for fights above your level)

I thought about various tricks with percentages and so on but couldn't initially think of a way to satisfy the above. But, an idea struck me today Wink

Start with an initiative score of 0. Allow modules to buff/debuff the player by adding or subtracting from the current initiative (by small but integer amounts: +/-1 would be a reasonable buff, +/-2 would be quite powerful). Once the final initiative score is tallied, use it to modify the base chances like this:

  • Start with a rational fraction as the chance of being surprised: it will initially be either 1/2, 2/3 or 1/3 depending on the level.
  • If the initiative score is positive, add it to both the top and the bottom of the fraction.
  • Else, if the initiative score is negative, add its absolute value to just the bottom of the fraction.

This works quite neatly: it never reaches 100% or 0% chance of being surprised; the more you've been buffed/debuffed, the less additional effect it has; and it's both transitive and symmetrical.

Here's an example of the odds you end up with:

Initiative scoreBelow levelAt levelAbove level

So, I'm looking for comments: what do you think of this scheme, do you think I've missed any requirements, would it be valuable to have this in core?

I've not coded it yet but will be doing so sometime this weekend (as a core patch).
Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
56 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search