Questbird Posted September 7, 2016 Share Posted September 7, 2016 (edited) A question for the maths brains and statisticians here. ColinBrett and I are working together to produce a BRP/Magic World/Mythras/whatever random character generator. That work in progress has had me looking in detail at the Mythras Imperative Damage Modifier table. Here it is. Mythras Imperative Damage Modifier (total STR + SIZ) : Damage Modifier ----------------------------------- 5 or Less: –1D8 6–10: –1D6 11–15: –1D4 16–20: –1D2 21–25: +0 26–30: +1D2 31–35: +1D4 36–40: +1D6 41–45: +1D8 46–50: +1D10 51–60: +1D12 61–70: +2D6 71–80: +1d8+1d6 81–90: +2d8 91–100: +1d10+1d8 101-110: +2d10 111-120: +2d10+1d2 Each 10 points: Continue Progression I am trying to formulate a mathematical or programmatic approach to this (which I managed for BRP's same-same-but-different Damage Bonus table). However I'm having trouble formulating the sequence. I'm fine with different regions of the table having slightly different rules. For example the step-size until 50 STR+SIZ is 5, and more than that is 10. In fact I already have those regions below 50 covered -- which will cover all basic character generation. But for niggly pedantic reasons I'd like to put in a general rule for the higher zones of the table. I can see the max increases (mostly -- 61-70 is an exception, where the average increases but not the max) by 2 per step. After 60 STR+SIZ the sequence seems to go: 2D(n), 1D(n+2) + 1D(n)... where n is one of 2,4,6,8,10,12 (I've probably lost some of you already, but bear with me.) Except that, following that logic, 111-120 should be +1D12+1D10 (2-22); but instead it's +2d10+1d2 (3-22). And it doesn't work once n is already a d12. And the next line says: Continue Progression, but what is the progression? Is it +2D12 (2-24)? +2d10+1d4 (3-24)? +3D8 (3-24)? And what happens after that? It is not clear to me. I can see some pattern, but can't express it mathematically. Any help please? Edited September 7, 2016 by Questbird 1 Quote Link to comment Share on other sites More sharing options...
skoll Posted September 7, 2016 Share Posted September 7, 2016 Hi, I had the same challenge when working on the Mythras encounter generator (http://skoll.xyz/mythras_eg/). I'm afraid there is no (simple) algorithm to it - at least I couldn't find one. I ended up having a list of damage modifiers, and simply calculating an index. Here's my code: DICE_STEPS = ( '-1d8', '-1d6', '-1d4', '-1d2', '+0', '+1d2', '+1d4', '+1d6', '+1d8', '+1d10', '+1d12', '+2d6', '+1d8+1d6', '+2d8', '+1d10+1d8', '+2d10', '+2d10+1d2', '+2d10+1d4', '+2d10+1d6', '+2d10+1d8', '+3d10', '+3d10+1d2', '+3d10+1d4', '+3d10+1d6', '+3d10+1d8', '+4d10', '+4d10+1d2', '+4d10+1d4', '+4d10+1d6', '+4d10+1d8', '+5d10', '+5d10+1d2', '+5d10+1d4', '+5d10+1d6', '+5d10+1d8') def _calculate_damage_modifier(self, strength, siz): if strength == 0 or siz == 0: self.attributes['damage_modifier'] = '+0' return str_siz = strength + siz if str_siz <= 50: index = (str_siz-1) / 5 else: index = ((str_siz - 1 - 50) / 10) + 10 try: self.attributes['damage_modifier'] = DICE_STEPS[index] except IndexError: self.attributes['damage_modifier'] = '+6d10' BTW, I'm very interested in learning about what kind of tool you are developing, and how does it differ from Mythras EG. Are you planning to do it as a generic d100 NPC generator? Quote Mythras Encounter Generator Link to comment Share on other sites More sharing options...
Questbird Posted September 7, 2016 Author Share Posted September 7, 2016 (edited) Thanks skoll. Your encounter generator looks great and does some of the same things (and probably plenty more) as our tool. I currently have the damage modifier function as a table similar to yours but I was and am still hoping to have some algorithmic breakthrough (the table has a limit -- 6d10 in your case). I see you stuck with the 2d10+1d2 as published for STR + SIZ 111-120, and then continued from there. It's ultimately a factorial problem I think: how to increase the maximum result by 2 with a minimum of dice. If I come up with anything else I'll post it here. The tool is at its early stages but it is shaping up to be a generic d100 character generator which will run on mobile devices (written like yours in Python). So far it does BRP and Magic World characters as per their character creation rules, and I'm adding Mythras Imperative. Other d100 systems won't be too hard to add either as long as they have attributes, derived abilities/stats and skills allocated in some way. It works with different genres, races and professions. Edited September 7, 2016 by Questbird 1 Quote Link to comment Share on other sites More sharing options...
skoll Posted September 7, 2016 Share Posted September 7, 2016 (edited) If you are only interested in the progression from 91 onward, and can accept the progression I'm using, this should do it: if str_siz >= 91: # 91-100: +1d10+1d8; 101-110: +2d10; 111-120: +2d10+1d2 step = str_siz/10 d10s = step/5 # Amount of d10's reminder = step%5 # Anything else in addition to d10's? if reminder: modifier = '{d10s}d10+d{reminder}'.format(d10s=d10s, reminder=reminder*2) else: modifier = '{d10s}d10'.format(d10s=d10s) This is easy to do, because there are exactly 5 variations in each "set". (One set is from xd10 to xd10+d8. The next set is x+1). If you want to use d12's, I think you need to use base 12 math. Also, I'm very interested in hearing how you tackle the rule differences between the systems. I spent quite a bit of time trying to figure out how to support other d100 systems also in addition to Mythras, but couldn't think of anything. In the beginning it seemed simple, but the deeper I dove, the more subtle differences I found, that turned out to be not so trivial to implement. For example same skills with same name is easy, but what to do if one system lacks a skill another system has? Or when magic systems are completely different? EDIT: What was I thinking. Using D12's it exactly exactly the same as D10's. if str_siz >= 91: step = str_siz/10 d12s = step/6 # Amount of d12's reminder = step%6 # Anything else in addition to d12's? if reminder: modifier = '{d12s}d12+d{reminder}'.format(d12s=d12s, reminder=reminder*2) else: modifier = '{d12s}d12'.format(d12s=d12s) This will give an output of 105 - 1d12+d8 115 - 1d12+d10 125 - 2d12 135 - 2d12+d2 145 - 2d12+d4 155 - 2d12+d6 165 - 2d12+d8 175 - 2d12+d10 185 - 3d12 Edited September 7, 2016 by skoll Quote Mythras Encounter Generator Link to comment Share on other sites More sharing options...
Questbird Posted September 8, 2016 Author Share Posted September 8, 2016 (edited) 12 hours ago, skoll said: If you are only interested in the progression from 91 onward, and can accept the progression I'm using, this should do it: if str_siz >= 91: # 91-100: +1d10+1d8; 101-110: +2d10; 111-120: +2d10+1d2 step = str_siz/10 d10s = step/5 # Amount of d10's reminder = step%5 # Anything else in addition to d10's? if reminder: modifier = '{d10s}d10+d{reminder}'.format(d10s=d10s, reminder=reminder*2) else: modifier = '{d10s}d10'.format(d10s=d10s) This is easy to do, because there are exactly 5 variations in each "set". (One set is from xd10 to xd10+d8. The next set is x+1). If you want to use d12's, I think you need to use base 12 math. Also, I'm very interested in hearing how you tackle the rule differences between the systems. I spent quite a bit of time trying to figure out how to support other d100 systems also in addition to Mythras, but couldn't think of anything. In the beginning it seemed simple, but the deeper I dove, the more subtle differences I found, that turned out to be not so trivial to implement. For example same skills with same name is easy, but what to do if one system lacks a skill another system has? Or when magic systems are completely different? EDIT: What was I thinking. Using D12's it exactly exactly the same as D10's. Thanks skoll, you saved me a bit of work. I've used your function for values higher than 91, though I made sure the numbers get rounded down to the nearest integer, otherwise I found some funny dice results if you put odd numbers in your STR or SIZ. The rest of the function is basically a big elif sequence. I stuck with d10s to stay close to the published table, which seems to shun d12s after the first one. # my combined = your str_siz step = int(combined/10) d10s = int(step/5) # Amount of d10's There are a lot of small differences between the systems, and so far I've only implemented two (BRP and Magic World). Maybe I haven't delved as far as you yet into the differences so I haven't yet found a big problem. The way I've done it is to create a generic Game System class with the things common to all the systems: attributes, skills, derived attributes. Then I've made a subclass for each game where the functions to allocate those things may vary. For example the base skills and sometimes even stats for each game are different and are encoded into the class. I'm not an object purist but this seems to be a reasonable approach so far. You can feed stat blocks, genre, race and profession information into the Game System object to progressively define it. Note it is reasonably easy to create characters in the different systems; not necessarily so easy to translate between them. I've also got a class called an Improvement which is basically, a collection of skills which increase during character creation. This is also a concept common across the game systems. These Improvements can represent skill improvements from culture, race, profession, etc. They can be fixed, eg "increase Swim and Athletics by 20 percentiles" or they can allocate (randomly) a number of points between the skills, eg. "allocate 200 points between Craft, Stealth, Weapon (Any), Perform (Ritual) or Ride". The number of points to allocate depends on the game system. They also do the Magic World thing, eg. "allocate 2 skills with 60 points, 3 skills with 40 points to the available skills". Each Game System takes a number of Improvements, depending on the game. I haven't done anything about magic yet. I know that those systems vary wildly by game, but I'm fairly confident they can be accommodated, at least from the perspective of basic character creation. At the moment our system is only generating characters as per the character creation rules in each book. It doesn't have to make an experienced sorcerer with dozens of spells. Although it does take into account the campaign 'Power level' from BRP and Magic World, so you can make Heroic or Legendary characters. I'm not sure if Mythras has a similar concept (I didn't see it in Mythras Imperative). Edited September 8, 2016 by Questbird 2 Quote Link to comment Share on other sites More sharing options...
xalabin Posted May 27, 2018 Share Posted May 27, 2018 There is no d12 over STR+SIZ>61 because the step for STR+SIZ 111-120 is 2d10+1d2 and not 1d12+1d10 This is my own, dirty script: from math import ceil from math import fabs def calcbd(num): dices=2 results=[] while not results: if dices<3: for i in [6,8,10]: for j in [6,8,10]: if i*(dices-1)+j+2==num: results.append((dices,i,j)) else: for i in [2,4,6,8,10]: for j in [2,4,6,8,10]: if i*(dices-1)+j+2==num: results.append((dices,i,j)) dices+=1 choice=() for i in results: if i>choice: choice=i if i[1]==i[2] and i[0] <3: return i return choice def print_and_method(STR,SIZ): if STR+SIZ<51: bd="" dice=(ceil((STR+SIZ)/5)-5)*2 if dice<0: bd="-1d" else: bd="+1d" if dice ==0: print 0 else: print bd+str(int(fabs(dice))) elif STR+SIZ > 50 and STR+SIZ <61: print "+1d12" elif STR+SIZ>60: maxdmg=ceil((STR+SIZ)/10)*2 bd=calcbd(maxdmg) if bd[1]==bd[2]: print "+"+str(bd[0])+"d"+str(bd[1]) else: print "+"+str(bd[0]-1)+"d"+str(bd[1])+"+1d"+str(bd[2]) Quote Link to comment Share on other sites More sharing options...
Matt_E Posted May 28, 2018 Share Posted May 28, 2018 On the TDM forum we had a thread or two about the oddities in the Mythras die progression in various tables, including the one for damage mods. I came down in favor of using the d12 whenever possible. 🙂 I had a specific concern when calculating the damage mod of a titanic critter in Savage Swords Against the Necromancer... Let's just say I doubt you'll have to take the table out as far as I did. 😱 Quote Our latest Horror Fantasy adventure has arrived. Check out Old Bones Publishing on DriveThruRPG.com! Link to comment Share on other sites More sharing options...
xalabin Posted May 28, 2018 Share Posted May 28, 2018 On the first version of my script i used d12 whenever possible until i realized that i got 1d12+1d2 instead of 2d10+1d2. The second one is the value showed on the table and has a better minimun damage so i modified for no use d12. I cheched my algorythm until STR+SIZ=1111 just for fun, on table i play on human levels, the bigger thing i used was a uro and a giant spider not titans 😋 PD: if you want a bigger table is easy for my print it until the values you need or you can use it on https://repl.it/@NestorC/Mythras-Damage-Modifier Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.