Author Topic: [D&D CharOp Software] Making a character generator (that supports constraints)  (Read 37745 times)

Offline Dictum Mortuum

  • Sr. Member
  • ***
  • Posts: 467
    • View Profile
Also, I did mention that we could not get any income from this project, but we could try our best at kickstarter. Does anyone have video editing skills? Because I don't :p Maybe we can get some cash to pay for hosting!
Dictum Mortuum's Handbooks: My personal character optimization blog.

Offline brujon

  • Epic Member
  • ****
  • Posts: 2554
  • Insufferable Fool
    • View Profile
    • My Blog (in PT-BR)
With all the brainpower combined here at the boards couldn't we just come up with a working brain-computer interface? Then we could clone the minds of the whole board, and create a hivemind that would be the ultimate D&D player...
"All the pride and pleasure of the world, mirrored in the dull consciousness of a fool, are poor indeed compared with the imagination of Cervantes writing his Don Quixote in a miserable prison" - Schopenhauer, Aphorisms: The Wisdom of Life

Offline Rebel7284

  • Hero Member
  • ***
  • Posts: 706
    • View Profile
Outputting all matches is quite easy (but note, the way that permutations work, you may get a lot of redundant results.)  Creating a system to rank them is essentially creating an AI which is LOADS more difficult, but certainly possible.  We could also make it a learning AI, although that's even more complicated.

Note that traditionally AI programming often uses LISP, but of course any language will do.

Offline altpersona

  • Legendary Member
  • ****
  • Posts: 2000
  • #78
    • View Profile
    • You are here
how about a flow chart instead?

-----------------------------------
do you want to be a spell caster| -------------- Yes - see Wizard or Codzilla.
-----------------------------------             |
                                                         |
                                                        No
                                                         L --- Are you sure   -- No - See Wizard or Codzilla
The goal of power is power. - 1984
We are not descended from fearful men. - Murrow
The Final Countdown is now stuck in your head.

Anim-manga still sux.

Offline nijineko

  • DnD Handbook Writer
  • ****
  • Posts: 2413
  • two strange quarks short of a graviton....
    • View Profile
    • TwinSeraphim
about some of the logic for generating possible entries, if you allow cross class skills to be counted in, as long as the final total is equal to 'x', then your possible combos climb massively. especially if you allow able learner feat to be set as a possibility. same for other early entry tricks involving races and odd feats and so forth. the number crunching alone is going to be interesting.
Not really, should be a cakewalk. You're forgetting how easy it is for a computer to compare stuff in a list :p

not at all. but is everyone recalling the difficulty it took to compute all the possible combos in chess? and go has still not been cracked. now it seems that all possible combos of classes and prestige is a large if finite number. but we are trading out the computations required for all possible combos, for error checking a large number of variables per level per class.

while i do not think it too difficult to attempt, i do not think it a cakewalk. i am completely willing to be proven wrong, however. =D

Offline kitep

  • DnD Handbook Writer
  • ****
  • Posts: 1948
  • Lookout World!
    • View Profile
not at all. but is everyone recalling the difficulty it took to compute all the possible combos in chess? and go has still not been cracked. now it seems that all possible combos of classes and prestige is a large if finite number. but we are trading out the computations required for all possible combos, for error checking a large number of variables per level per class.

There's what, about 163 classes & PRCs?  163^20 = 1.75* 10^44 = 175,000,000,000,000,000,000,000,000,000,000,000,000,000,000
What's so hard about that?  :P

Don't worry, there's ways to cut it down dramatically (such as not all PRCs, if any, can be taken at level 1)


Offline JohnnyMayHymn

  • Hero Member
  • ***
  • Posts: 762
  • Former Lord of the Kitchen Sink
    • View Profile
Many PrC's require feats, class features or a specific race, so why not have the output be complete character sheets?

Plus b/c of the nature of character creation, a sort of flow chart could work with the program exploring decision paths, similar to a web crawler.  ..as if the flow chart were a site map
The Emperor
Can you find the Wumpus?

Offline SorO_Lost

  • Epic Member
  • ****
  • Posts: 7197
  • Banned
    • View Profile
not at all. but is everyone recalling the difficulty it took to compute all the possible combos in chess? and go has still not been cracked. now it seems that all possible combos of classes and prestige is a large if finite number. but we are trading out the computations required for all possible combos, for error checking a large number of variables per level per class.

while i do not think it too difficult to attempt, i do not think it a cakewalk. i am completely willing to be proven wrong, however. =D
Actually you don't have to do anything like that.

The thing is you're looking at it like Chess has 124 septillion possible combinations or so, but what you need to look at is you may only have 18 options at the start and really don't gain too much more than that as the game goes on.

Example
Query: +2d6 SA
Return: Rogue 3 / Barbarian 1, Rogue 3 / Bard 1, Rogue 3 / Cleric 1, ... Rogue 3 / Barbarian 2, Rogue 3 / Bard 2, .. etc.
That's fundamentally a waste of time and effort, and is of no concern.

Instead you would list the the classes that actually obtain it. Say Swordsage 5, Rogue 3, Factotum X, MadeUpPrC 2.
Say you clicked on the Rogue and commit that to your build, removing the +2d6 SA query. You're really back where you started but now you have some Rogue levels. An empty query would display pretty much the same as before as you really haven't limited your options and so at this point you click on MadeUpPrC that wants Arcane 5th. Well before you can commit it you need to run a query for what has Arcane 5 and you'll pick from the possible options, such as Sorcerer 5 which still gets displayed as you have room for six levels (sorcerer 5 and prc 1) and then you'll commit those to the build. Basically you're using Youtube's autofill which handles five hundred thousand more combinations in one one-thousandth of the time it would take to handle some gianormous math problem.
« Last Edit: April 19, 2012, 01:16:40 AM by SorO_Lost »

Offline Dictum Mortuum

  • Sr. Member
  • ***
  • Posts: 467
    • View Profile
Many PrC's require feats, class features or a specific race, so why not have the output be complete character sheets?

Plus b/c of the nature of character creation, a sort of flow chart could work with the program exploring decision paths, similar to a web crawler.  ..as if the flow chart were a site map

That's a very good idea!

@blade7284: LISP? That's why I thought of PROLOG, too. It's traditionally used in AI problems and we could easily build a "database" of class predicates. However, lets be serious :P It would take years to debug/develop :p I think that OOP languages will be fine.
Dictum Mortuum's Handbooks: My personal character optimization blog.

Offline nijineko

  • DnD Handbook Writer
  • ****
  • Posts: 2413
  • two strange quarks short of a graviton....
    • View Profile
    • TwinSeraphim
not at all. but is everyone recalling the difficulty it took to compute all the possible combos in chess? and go has still not been cracked. now it seems that all possible combos of classes and prestige is a large if finite number. but we are trading out the computations required for all possible combos, for error checking a large number of variables per level per class.

while i do not think it too difficult to attempt, i do not think it a cakewalk. i am completely willing to be proven wrong, however. =D
Actually you don't have to do anything like that.

The thing is you're looking at it like Chess has 124 septillion possible combinations or so, but what you need to look at is you may only have 18 options at the start and really don't gain too much more than that as the game goes on.

Example
Query: +2d6 SA
Return: Rogue 3 / Barbarian 1, Rogue 3 / Bard 1, Rogue 3 / Cleric 1, ... Rogue 3 / Barbarian 2, Rogue 3 / Bard 2, .. etc.
That's fundamentally a waste of time and effort, and is of no concern.

Instead you would list the the classes that actually obtain it. Say Swordsage 5, Rogue 3, Factotum X, MadeUpPrC 2.
Say you clicked on the Rogue and commit that to your build, removing the +2d6 SA query. You're really back where you started but now you have some Rogue levels. An empty query would display pretty much the same as before as you really haven't limited your options and so at this point you click on MadeUpPrC that wants Arcane 5th. Well before you can commit it you need to run a query for what has Arcane 5 and you'll pick from the possible options, such as Sorcerer 5 which still gets displayed as you have room for six levels (sorcerer 5 and prc 1) and then you'll commit those to the build. Basically you're using Youtube's autofill which handles five hundred thousand more combinations in one one-thousandth of the time it would take to handle some gianormous math problem.

and that is why i decided not to become a programmer. that makes much more sense than the brute force method i was envisioning. to restate to see if i understand: pick the goal. list the prereqs. pick a preqreq. list the classes, feats, other options, etc... which meet said prereq. pick your option. jump back to step two until all prereqs have been met.

something like that?

Offline SorO_Lost

  • Epic Member
  • ****
  • Posts: 7197
  • Banned
    • View Profile
and that is why i decided not to become a programmer. that makes much more sense than the brute force method i was envisioning. to restate to see if i understand: pick the goal. list the prereqs. pick a preqreq. list the classes, feats, other options, etc... which meet said prereq. pick your option. jump back to step two until all prereqs have been met.

something like that?
Sort of pretty much yeah.

Also programming is very logical which is a fancy way of saying Soduko easy and the the goal is to do as little as you can yet you can get paid alot. It's like a state job where they spend all day putting one sign up and charge tax payers three hundred bucks for using a big drill to make a hole and drop a board in.
« Last Edit: April 19, 2012, 02:54:32 AM by SorO_Lost »

Offline Rebel7284

  • Hero Member
  • ***
  • Posts: 706
    • View Profile
not at all. but is everyone recalling the difficulty it took to compute all the possible combos in chess? and go has still not been cracked. now it seems that all possible combos of classes and prestige is a large if finite number. but we are trading out the computations required for all possible combos, for error checking a large number of variables per level per class.

while i do not think it too difficult to attempt, i do not think it a cakewalk. i am completely willing to be proven wrong, however. =D
Actually you don't have to do anything like that.

The thing is you're looking at it like Chess has 124 septillion possible combinations or so, but what you need to look at is you may only have 18 options at the start and really don't gain too much more than that as the game goes on.

Example
Query: +2d6 SA
Return: Rogue 3 / Barbarian 1, Rogue 3 / Bard 1, Rogue 3 / Cleric 1, ... Rogue 3 / Barbarian 2, Rogue 3 / Bard 2, .. etc.
That's fundamentally a waste of time and effort, and is of no concern.

Instead you would list the the classes that actually obtain it. Say Swordsage 5, Rogue 3, Factotum X, MadeUpPrC 2.
Say you clicked on the Rogue and commit that to your build, removing the +2d6 SA query. You're really back where you started but now you have some Rogue levels. An empty query would display pretty much the same as before as you really haven't limited your options and so at this point you click on MadeUpPrC that wants Arcane 5th. Well before you can commit it you need to run a query for what has Arcane 5 and you'll pick from the possible options, such as Sorcerer 5 which still gets displayed as you have room for six levels (sorcerer 5 and prc 1) and then you'll commit those to the build. Basically you're using Youtube's autofill which handles five hundred thousand more combinations in one one-thousandth of the time it would take to handle some gianormous math problem.

What about the fact that Swordsage 2 instead of Swordsage 5 can obtain sneak attack 2d6 if taken later in the build? 

I think you need to look at all the requirements together if you want a decent chance of intelligent optimization.
« Last Edit: April 19, 2012, 08:56:56 AM by Rebel7284 »

Offline Xaktsaroth

  • Lurker
  • *
  • Posts: 7
    • View Profile
Weird. I've been thinking about doing something like this myself, but since my programming skills are about 7 years old, and half rememebered, I was waffling.

I can help on the front end, GUI concepts, ERD, design, that kinda static stuff(Back in my day, we cut our teeth on Basic, and C, you young'ns!)

If we're going to do all this work of building a PrC/Class/feat database, why not go one step further and add spells? Data entry will be a nightmare, but then we can do fun things like dynamic character sheet!

My character gets hit with Mind Fog? Hold on a sec(Clicks Spells Affecting Me List, Selects Mind Fog, Set CL, Set Metamagics) BOOM! Character sheet updated!(Will Save drops like a rock, in red to show negative effect).

We could even have combat option page too. Hit the Combat Tab, Attack(Select options), does all the math for you(Rolls d20 + modifiers for hit, damage + Fort 13 Vs. poison, etc......). Heck, even roll saves with a click of a button just below the number on the pape.

Could be quite a useful tool for the community.
« Last Edit: April 19, 2012, 11:09:19 AM by Xaktsaroth »

Offline Prime32

  • Over-Underling
  • Retired Admin
  • *****
  • Posts: 2914
    • View Profile
Because including non-SRD material gets you sued by WotC?

Offline nijineko

  • DnD Handbook Writer
  • ****
  • Posts: 2413
  • two strange quarks short of a graviton....
    • View Profile
    • TwinSeraphim
so don't include it in any official release. someone else in the community can share the fruits of their labor.

be sure to set it up to allow aggregation from modular data files. that way we can plug in the SRD only as default, and others in the community can make add on packs that can add other source materials. if we make it system agnostic enough, it could be used for any game system, not just d20 derivatives.

Offline SorO_Lost

  • Epic Member
  • ****
  • Posts: 7197
  • Banned
    • View Profile
What about the fact that Swordsage 2 instead of Swordsage 5 can obtain sneak attack 2d6 if taken later in the build? 

I think you need to look at all the requirements together if you want a decent chance of intelligent optimization.
First rule of programming: KISS. Keep It Simple Stupid. Of course, sometimes the last S is dropped as I'm sure you understand.

As you're searching out what you need, for instance you want Eternal Blade 10 and given a choice of the three Martial Classes or any + Martial Feats and 5 levels. If your build has 10 levels already it would omit the Martial Classes (already covered) but if your Feats were still open it would list the any+Feats. And obviously if you have 11 levels or 10 and no Feats it can't find anything without some epic enabled option. But you can pick whatever the hell you want. Nothing you threw out isn't already being handled by what I'm trying to explain.

Serious, if I'm doing a poor job painting a picture here, goto any Google ran site (google, youtube, gmail, etc) and type some letters into their search box until you figure out how it works. It's the same exact concept that I'm suggesting here, except it is a tad more complicated and the engine isn't readily provided in code snippets across a dozen web sites. Not that it's a big deal, the largest problem is indexing everything. And by indexing I'm meaning more than the Class's name here.

Offline Rebel7284

  • Hero Member
  • ***
  • Posts: 706
    • View Profile
What about the fact that Swordsage 2 instead of Swordsage 5 can obtain sneak attack 2d6 if taken later in the build? 

I think you need to look at all the requirements together if you want a decent chance of intelligent optimization.
First rule of programming: KISS. Keep It Simple Stupid. Of course, sometimes the last S is dropped as I'm sure you understand.

As you're searching out what you need, for instance you want Eternal Blade 10 and given a choice of the three Martial Classes or any + Martial Feats and 5 levels. If your build has 10 levels already it would omit the Martial Classes (already covered) but if your Feats were still open it would list the any+Feats. And obviously if you have 11 levels or 10 and no Feats it can't find anything without some epic enabled option. But you can pick whatever the hell you want. Nothing you threw out isn't already being handled by what I'm trying to explain.

Serious, if I'm doing a poor job painting a picture here, goto any Google ran site (google, youtube, gmail, etc) and type some letters into their search box until you figure out how it works. It's the same exact concept that I'm suggesting here, except it is a tad more complicated and the engine isn't readily provided in code snippets across a dozen web sites. Not that it's a big deal, the largest problem is indexing everything. And by indexing I'm meaning more than the Class's name here.

I have not studied the algorithms behind auto-suggest.  However, you are indeed doing a HORRIBLE job of painting a picture of what you're talking about.  I re-read it 5 times and am still confused.

Offline kitep

  • DnD Handbook Writer
  • ****
  • Posts: 1948
  • Lookout World!
    • View Profile
Maybe I can help explain what I think he means.

Suppose you need 2d6 sneak attack.

You could try to solve it by a brute force method.
Barbarian 1?  no
Bard 1?  no
Cleric 1? no
...
Barbarian 1, bard 1, cleric 1, druid 1, fighter 1, ranger 1, rogue 1, sorceror 1, wizard 1?  no
etc.
This way will not work.  The numbers become unmanagable.

So he proposes an indexed method.  Instead of looking at each possible combination, you simply have a list of all possible ways to get sneak attack.  So you might have a list like:

[Sneak Attack 1d6]
rogue 1
assassin 1 (requires ... )
invisible blade 1 (requires ... )
slayer of domiel 1 (requires ... )
spellthief 1
swordsage 5 (gives 2d6 SA)
any 2 + swordsage 4 (gives 2d6 SA)
any 4 + swordsage 3 (gives 2d6 SA)
any 6 + swordsage 2 (gives 2d6 SA)
any 10 + feat(martial study) + feat(martial stance) (gives 2d6 SA)

[Sneak Attack 2d6]
any 2 of 1d6 sneak attack
rogue 3
assassin 3 (requires ... )
invisible blade 3 (requires ... )
slayer of domiel 3 (requires ... )
spellthief 5
swordsage 5
any 2 + swordsage 4
any 4 + swordsage 3
any 6 + swordsage 2
any 10 + feat(martial study) + feat(martial stance)

Note: the lists are not meant to be complete.  I simply listed a few to help illustrate the point.

Hope that helps :)

Edit: you would have to have lots of indexed lists.  Including, but not limited to:
sneak attack
1-1 BAB
good save (fort)
good save (reflex)
good save (will)
class skill(x)
class skill(y)
class skill(z)
weapon proficiency(all martial)
weapon proficiency(x)
alignment(good)
alignment(evil)

basically, you'd have to find all the PRC requirements listed, and make at least 1 list for each requirement.

edit 2:  in truth, the answer probably lies with a combination of indexed lists and brute force.

« Last Edit: April 19, 2012, 07:23:15 PM by kitep »

Offline Dictum Mortuum

  • Sr. Member
  • ***
  • Posts: 467
    • View Profile
We were talking about developing an AI, anyway. That's not brute force. Brute force will never end in our lifetimes, probably.
Dictum Mortuum's Handbooks: My personal character optimization blog.

Offline kitep

  • DnD Handbook Writer
  • ****
  • Posts: 1948
  • Lookout World!
    • View Profile
I imagine there have been lots of people that have started computer programs for D&D over the years.  Some of these should have data files we can use.  Even basic info like class name, BAB progression, save progression, and class skills would save a lot of data input.  Anybody know where we can find some files like these?