Random character generator for BG 1 using Easy Tutu or BG 2
#1
Posté 22 février 2012 - 07:03
I'm not expecting any major hurdles in coding it, as I will be using the BG 2 program to guide the coding of it.
The intent of the generator is to generate randomly the race, class/kit, stats, racial enemy (rangers), and alignment. If I do run across any coding hurdles will post them here as well.
Also, if there's a feature that you think it would be either important or helpful for this generator to have, post those ideas here as well.
And if anyone else already has something of this nature, they can post the details of theirs here as well.
#2
Posté 22 février 2012 - 07:44
Just responding to this observation in the no-reload thread.corey_russell wrote...
Grond0 - maybe the computer just keeps rolling until it does get 75 total. After all, that takes no time at all when the processor calculation is measured in gigahertz.
The computer might well do what you suggest. The reason I thought it might be an adjustment to the lowest scores is that my observations suggest that when you have a low overall score you are less likely than I would expect to have low individual scores (as you know I tend to spend quite a bit of time rolling for new characters).
#3
Posté 22 février 2012 - 08:06
#4
Posté 22 février 2012 - 08:27
So far I have randomised sex, race and class (there are 54 class combinations for single & multi-class). I assume dual-class could be selected later if the initial race, class and stats are suitable.
Spreadsheet is currently 10.6k, racial enemy and alignment can be added relatively easily (I think).
Stats may be another matter as race/class limitations complicate matters. e.g. for a halfling thief vs halfling fighter str is 6-17 vs 9-17 and dex is 9-19 vs 8-19. Grond0, I'd be interested in your observations here based on your work so far.
#5
Posté 22 février 2012 - 08:38
#6
Posté 22 février 2012 - 09:02
@gunman78 -- Base alignments -- the generator should just be seen as a "guide" -- you by no means have to use the suggested random alignments -- if you want to make your entire party chaotic good, but still use the other random assignments, go for it. Same for the stats -- if you would rather BG 2/EasyTutu generate your random stats, by all means do so. This proposed generator will be extremely helpful to reduce the hassle of random races/classes.
Modifié par corey_russell, 22 février 2012 - 09:03 .
#7
Posté 22 février 2012 - 09:37
I've added alignment (more complicated than I thought but once I mapped out the valid class combinations it was a single lookup). Also added racial alignments for the the ranger, 3 kits and one multi-class. I'm now up to 11.6kb spreadsheet size.
Might stop for the night while I think about the stats. Tabling the max/min of each value for every race/class combination might be the only way. This will take hours to map out.
gunman78, I'm tempted to allow alignment clashes. e.g. Frodo, Sam, Smeagol/Gollum.
Final consideration for me is where to stop. For example;
- Randomise the party size from 1-6 and generate that number of characters. Easy.
- Random name generator. Would think this is harder to do although I suspect a spreadsheet lookup to a web based generator might work.
EDIT
Mapped out half orc classes. All maximums are the same but minimums vary;
Str is 4, or 9 if fighter single/multi. (3+1 racial).
Dex is 3, or 9 if thief single/multi.
Con is 4. (3+1 racial).
Int is 1. (3-2 racial).
Wis is 3, or 9 if cleric single/multi.
Cha is 3.
So looks like minimums are 3 + racial modifier, or 9 for class modifier.
I then tried a dwarf.
Str is 8, or 9 if fighter single/multi.
Dex is 3, or 9 if thief single/multi.
Con is 12 regardless of class.
Int is 3.
Wis is 3, or 9 if cleric single/multi.
Cha is 2 (3-1 racial modifier).
So I think a full set of values by race/class are required. Avengers may complicate matters further.
Modifié par Gate70, 22 février 2012 - 10:12 .
#8
Posté 22 février 2012 - 10:08
The "gotcha" with this whole process is you don't want to assign a female name to a male character, and vice versa, so a list of names that isn't differentiated by gender would be pretty useless.
#9
Posté 22 février 2012 - 10:25
In any case, it's good you did that, I knew about the class minimums but wasn't sure about racial minimums, apparently there are some.
#10
Posté 22 février 2012 - 10:37
Halflings are easy. 6, 8, 10, 6, 3, 3. Change to 9 for fighter strength, cleric wisdom and thief dexterity.
Gnomes are easy too. 6, 3, 8, 7, 2, 3. Change to 9 for fighter strength, cleric wisdom and thief dexterity. Change intelligence to 9 and dexterity to 16 for illusionist.
Elf is harder. 3, 7, 6, 8, 3, 8. Changes to 9 for fighter, cleric, thief and mage as above. Ranger minimums are 13, 13, 14, 8, 14, 8. Diviner requires 16 wis, enchanter 16 charisma.
Half-elf and human are left. I expect they are more complicated as a wider set of specialist mages come into play as well as the druid, paladin, monk and bard classes.
EDIT
Human is easy too. All 3's. Bump to 9 for fighter, thief, cleric, mage. Bard 12 str, 13 int, 15 cha. Monk has 9 for dex, con, wis. Druid is 12 wis & 15 cha (same for avenger). Paladin is 12 STR, 9 con, 13 wis, 17 cha. Abjurer 15 wis, illusionist dex 16, invoker 16 con, necromancer 16 wis,
Half elf is 3, 6, 6, 4, 3, 3. Bard 12 str, 13 int, 15 cha. Ranger 13 str, 13 dex, 13 con, 14 wis. Sorcerer 9 int and cha. Usual 9's for fighter/thief/cleric/mage single or multi. Conjurer 15 con. Transmuter 15 dex. Druid/avenger 12 wis and 15 cha.
Think that's it, have I missed any? Looks like the best solution is to start with the race traits then add class/kit modifiers.
Modifié par Gate70, 22 février 2012 - 11:03 .
#11
Posté 22 février 2012 - 10:53
This research you are doing Gate70 will definitely speed up my development, as gathering the data is like 1/2 the battle.
#12
Posté 22 février 2012 - 11:12
#13
Posté 22 février 2012 - 11:30
In relation to stat rolls I'm also not sure how the game determines a roll when a higher minimum stat applies. If the minimum is 15 I might expect a random roll between 15 and 18, but I don't think there is actually an even distribution - results seem to be skewed towards the low end.
#14
Posté 22 février 2012 - 11:45
#15
Guest_Ivandra Ceruden_*
Posté 23 février 2012 - 12:00
Guest_Ivandra Ceruden_*
#16
Posté 23 février 2012 - 12:11
I agree that would seem reasonable, but I don't think it works like that. Just rolling 3d6 would give you an 18 only 1 in 216 rolls and they're considerably more common than that (just not 1 in 4 if rolling between 15 and 18).corey_russell wrote...
Grond0 -- I think the computer actually rolls 3 6 sided die then add/subtracts race bonuses/penalities, which is why Gate70 got 4 for a racial minimum in some cases and 2 in others. I suspect the computer does what I said about bumping it up to minimum if the roll wasn't high enough, not rolling 15-18 -- and yes doing that, will result in lots of 15s being rolled, but I don't see anything wrong with that. Btw, I am going to see if the roll is 75 BEFORE applying the class minimums...might help the player a little.
#17
Posté 23 février 2012 - 12:18
Interestingly enough, a halfling can be a barbarian, never knew that.
#18
Posté 23 février 2012 - 12:20
Grond0 wrote...
I agree that would seem reasonable, but I don't think it works like that. Just rolling 3d6 would give you an 18 only 1 in 216 rolls and they're considerably more common than that (just not 1 in 4 if rolling between 15 and 18).corey_russell wrote...
Grond0 -- I think the computer actually rolls 3 6 sided die then add/subtracts race bonuses/penalities, which is why Gate70 got 4 for a racial minimum in some cases and 2 in others. I suspect the computer does what I said about bumping it up to minimum if the roll wasn't high enough, not rolling 15-18 -- and yes doing that, will result in lots of 15s being rolled, but I don't see anything wrong with that. Btw, I am going to see if the roll is 75 BEFORE applying the class minimums...might help the player a little.
Except Grond0, that if the computer really is re-rolling if you don't get 75, maybe the computer really did 300 rolls before you see your first numbers on the screen, so my conjecture still might be right, and wouldn't break those odds you quoted.
#19
Posté 23 février 2012 - 01:47
I'm all done (apart from testing it in detail, tidying the tables up and forcing a 75 as I haven't decided what to do about that yet).
The spreadsheet is 13.8k in OpenOffice ODS/ODF format, 13k in Excel 2010 XLSX format if anybody wants a copy.
Edit, corey sent you a copy. Just bin it if you don't want it.
Modifié par Gate70, 23 février 2012 - 01:54 .
#20
Posté 23 février 2012 - 02:33

It should be noted that the labels at the top "Gender" and such will likely be removed when I'm done. But it's helpful at the moment so I know what "Undetermined" is referencing.
So far, the program will randomly generate a race, gender and in my tests so far, seems to correclty include the race min/max. As you can see, I've also made it keep rolling until the roll is at least 75 (this happens without user's intervention). One of the rolls was 100! I've never got that roll in BG 2 (best I think I've had is 96)...of course most rolls were much worse.
Totals doesn't need to be there, but seems everyone adds it up anyways so might as well have the computer tell us. : )
#21
Posté 23 février 2012 - 04:08
Gate70 wrote...
Will do once I write them up. Findings so far;
Halflings are easy. 6, 8, 10, 6, 3, 3. Change to 9 for fighter strength, cleric wisdom and thief dexterity.
Gnomes are easy too. 6, 3, 8, 7, 2, 3. Change to 9 for fighter strength, cleric wisdom and thief dexterity. Change intelligence to 9 and dexterity to 16 for illusionist.
Elf is harder. 3, 7, 6, 8, 3, 8. Changes to 9 for fighter, cleric, thief and mage as above. Ranger minimums are 13, 13, 14, 8, 14, 8. Diviner requires 16 wis, enchanter 16 charisma.
Half-elf and human are left. I expect they are more complicated as a wider set of specialist mages come into play as well as the druid, paladin, monk and bard classes.
EDIT
Human is easy too. All 3's. Bump to 9 for fighter, thief, cleric, mage. Bard 12 str, 13 int, 15 cha. Monk has 9 for dex, con, wis. Druid is 12 wis & 15 cha (same for avenger). Paladin is 12 STR, 9 con, 13 wis, 17 cha. Abjurer 15 wis, illusionist dex 16, invoker 16 con, necromancer 16 wis,
Half elf is 3, 6, 6, 4, 3, 3. Bard 12 str, 13 int, 15 cha. Ranger 13 str, 13 dex, 13 con, 14 wis. Sorcerer 9 int and cha. Usual 9's for fighter/thief/cleric/mage single or multi. Conjurer 15 con. Transmuter 15 dex. Druid/avenger 12 wis and 15 cha.
Think that's it, have I missed any? Looks like the best solution is to start with the race traits then add class/kit modifiers.
Ran into something strange. It's either a bug, or maybe some rule we don't know about. To interpret the class minimums I was initially just going to look for a keyword -- such as "illusionist" then apply the class minimum. But I found out I can't do that, e.g., if I create a cleric/illusionist, the dexterity minimum is 3, even though for a standard illusionist the minimum DEX is 16. So then I thought ok, perhaps the rule is you take the lowest minimum for multis. But that isn't the case either, as I then created a fighter/thief (gnome) and it enforced the STR 9 DEX 9 rules for fighters and thieves. Did I find a bug? Or is this 2nd ed. rule I haven't a clue about?
Anyone know anything about this?
#22
Posté 23 février 2012 - 06:13
Question: Do people think random proficiencies is important, or at least will they ever do it? If so I should probably add that to the program. It's a bit tricky as various kits get both bonuses and penalties to pips, archer being a good example of that.
Barring any unforseen difficulties, I might be done with this little project by late tomorrow evening. Here's a screenshot of what I have now:

As for my previous post, I'm going to operate on the assumption that what I found is a bug, and finish putting in the class minimums.
Modifié par corey_russell, 23 février 2012 - 06:15 .
#23
Posté 23 février 2012 - 06:19
The frequencies I was referring to are the numbers you actually see. If it was just a simple 3d6 and a minimum stat of 3 you would expect to see an 18 once in 216 times. They are far more common than that - try just rolling a few stats to check. However, low stats are far less common than high ones, which is why I thought that there is some form of bumping up going on (there is an alternative explanation - see below).corey_russell wrote...
Grond0 wrote...
I agree that would seem reasonable, but I don't think it works like that. Just rolling 3d6 would give you an 18 only 1 in 216 rolls and they're considerably more common than that (just not 1 in 4 if rolling between 15 and 18).corey_russell wrote...
Grond0 -- I think the computer actually rolls 3 6 sided die then add/subtracts race bonuses/penalities, which is why Gate70 got 4 for a racial minimum in some cases and 2 in others. I suspect the computer does what I said about bumping it up to minimum if the roll wasn't high enough, not rolling 15-18 -- and yes doing that, will result in lots of 15s being rolled, but I don't see anything wrong with that. Btw, I am going to see if the roll is 75 BEFORE applying the class minimums...might help the player a little.
Except Grond0, that if the computer really is re-rolling if you don't get 75, maybe the computer really did 300 rolls before you see your first numbers on the screen, so my conjecture still might be right, and wouldn't break those odds you quoted.
Sounds like a bug to me. Thinking about it as a result of these discussions I suspect that the game may be doing something like this:corey_russell wrote...
Ran into something strange. It's either a bug, or maybe some rule we don't know about. To interpret the class minimums I was initially just going to look for a keyword -- such as "illusionist" then apply the class minimum. But I found out I can't do that, e.g., if I create a cleric/illusionist, the dexterity minimum is 3, even though for a standard illusionist the minimum DEX is 16. So then I thought ok, perhaps the rule is you take the lowest minimum for multis. But that isn't the case either, as I then created a fighter/thief (gnome) and it enforced the STR 9 DEX 9 rules for fighters and thieves. Did I find a bug? Or is this 2nd ed. rule I haven't a clue about?
Anyone know anything about this?
1) Checking to look-up tables for race and class to determine the maximum and minimum for each statistic.
2) Referring to another set of look-up tables showing possible values within each possible maximum and minimum.
3) Setting a % chance for each possible roll, e.g. a 3 might be set to 0.5%, 10 to 5%, 15 to 15% and 18 to 3%.
4) Generating a random number between 0 and 1 to see which number is triggered.
5) Bumping up the lowest stat in order to ensure the total is never less than 75 (this will happen fairly rarely anyway as the % chances for low stats to trigger are themselves set as small).
I would guess that the illusionist multi-classes have just been missed off the first set of look-up tables, so that the game uses the standard mage multi-class instead. Possibly the decision to make gnomes multi-class to illusionist was made late in development and they never got round to implementing this properly.
#24
Posté 23 février 2012 - 07:17
#25
Posté 23 février 2012 - 05:55
I suppose we ought to check each combination out.corey_russell wrote...
Ran into something strange. It's either a bug, or maybe some rule we don't know about. To interpret the class minimums I was initially just going to look for a keyword -- such as "illusionist" then apply the class minimum. But I found out I can't do that, e.g., if I create a cleric/illusionist, the dexterity minimum is 3, even though for a standard illusionist the minimum DEX is 16. So then I thought ok, perhaps the rule is you take the lowest minimum for multis. But that isn't the case either, as I then created a fighter/thief (gnome) and it enforced the STR 9 DEX 9 rules for fighters and thieves. Did I find a bug? Or is this 2nd ed. rule I haven't a clue about?
Anyone know anything about this?
Gnome illusionist/thief and illusionist/fighter also reduce dexterity to 9 and 3 respectively. They also allow a wisdom of 2 (illusionist/cleric forces 9 wisdom so it looks like the rules are inconsistently applied).
Attempt
class/kit minimums and alignments (note "x" is an invalid selection flag).

Race minimum and maximum rolls.
Modifié par Gate70, 23 février 2012 - 06:57 .





Retour en haut







