Author Topic: Programming Character sheets  (Read 2684 times)

Offline theDwarf

  • Conversationalist
  • **
  • Posts: 100
    • View Profile
Programming Character sheets
« on: July 29, 2010, 02:52:06 AM »
Given the "writable character sheet" thread is up to 5 pages I figured I start a whole new thread on programming character sheets.

Why?  Because a number of us may have some programming tips to pass on :)

Here is one:

Wingdings "m" creates a blank circle, Wingdings lower case "L" a filled in circle.
If you want check boxes you can look through the other Wingdings characters and select.



If you are making a character sheet in Excel or Open Office and you want to create a selectable list that can be automatically transferred into a character sheet you can use Wingdings m's & l's to indicate selection then use a numerical incrementation to pinpoint what values you want in, then the vlookup function to put things in the right spot.  Example:  You want to allow the players to be able to select three of the following 8 powers, but you don't know which they will select.  Below the player has selected powers 2, 5, and 7

A B C

.. 1  Power List
m 1 <power 1>
l 1 <power 2>
m 2 <power 3>
m 2 <power 4>
l 2 <power 5>
m 3 <power 6>
l 3 <power 7>
m 4 <power 8>
.. 4  <blank>

The cell for the powers (PowerLst) calls a table that includes the number list and powers (not the m's or L's).

So, the formula =vlookup(1;PowerLst;2) will yield <power 2> since that is the last call with a 1 and  =vlookup(2;PowerLst;2) will yield <power 5> and  =vlookup(3;PowerLst;2) will yield <power 7> in the example above.  Therefore a non-printable "Creation Worksheet" can be created without using any macros and yet you can still drop all the proper powers into the "Character Sheet" even if you don't know what the player may select.  Only requires the powers list and refresh costs to be coded.

Additional coding can be created to handle specialties (using a numeric), etc.

I hope this also serves to explain why it can take a while to do ... lots of typing.

Furthermore, since it would copy longer selections from the book it may be considered to be a type of infringement on EvilHat's copyright and thus why I would rather mention here HOW it can be done rather than distribute such a sheet.


Well, good luck, happy programming, and I hop others use this thread for other helpful character sheet programming suggestions as well as additional questions/comments of character sheets as well as other sheets (city, etc)  :)

-D.M.Zwerg
Mathematician

Offline Jeckel

  • Conversationalist
  • **
  • Posts: 131
    • View Profile
Re: Programming Character sheets
« Reply #1 on: July 29, 2010, 08:25:53 AM »
Very nice, nothing helps programers like explanations, after all information is what the web is about. :)

I don't have any advice on the Excel stuff, but I'm happy to help with desktop languages like C++ and Python, web coding with HTML/CSS/PHP/JS/etc, or any general programming questions, as along as they pertain to DFRPG.

Currently my favorite trick is keeping data, like stunts and characters, stored in XML files so I can parse them from any language and do whatever I need to with said data. As an example, if you have say 50+ mundane animal character sheets and want to change 'High Concept' to 'High Concept', it is tons easier to modify a few lines in one parsing script then changing anything in dozens of files. Anyway, just my two cents.
For evil to conquer, good men need only do nothing.
War is God's way of teaching Americans geography.
When Scientists ask questions, Engineers build answers.

Offline pfloyd

  • Participant
  • *
  • Posts: 60
  • Team Dresden
    • View Profile
Re: Programming Character sheets
« Reply #2 on: July 29, 2010, 08:29:33 PM »
Okay... I was thinking on handling this a little differently, rather than looking for Wingding characters... perhaps actual checkboxes, or at the very least an "X" or "x" in the selection column...
What would happen when that skill, stunt or power is selected is:
1. Selection will go bold to denote that the item has been selected.
2. In a hidden column, there is a hidden counter that numerically increases with the selected item, and the skill name is copied into the next cell on that same row. Mind you, these are all in hidden/grouped cells, so it's all in the background. Then the summary/character sheet just does a vlookup function (based on cell row number in the final sheet) on that range, and boom, it prints.
Where did I get this idea? A character sheet for HARP done in OpenOffice. I'll be drawing on a fair amount of influence from that sheet for this.
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." -- Douglas Adams

Offline theDwarf

  • Conversationalist
  • **
  • Posts: 100
    • View Profile
Re: Programming Character sheets
« Reply #3 on: July 30, 2010, 05:52:35 AM »
Okay... I was thinking on handling this a little differently, rather than looking for Wingding characters... perhaps actual checkboxes, or at the very least an "X" or "x" in the selection column...

Wingdings "x" is a box with an "x" in it.  T"n" is a filled box and "o" is an open box, so x & o work instead of l & m if you rather.
-D.M.Zwerg
Mathematician

Offline pfloyd

  • Participant
  • *
  • Posts: 60
  • Team Dresden
    • View Profile
Re: Programming Character sheets
« Reply #4 on: July 30, 2010, 12:15:07 PM »
I'd rather not work with Wingdings... guess I like to muck about with the toys Excel puts in.
A learning experience is one of those things that say, "You know that thing you just did? Don't do that." -- Douglas Adams