I'm trying to design a random character generator for GURPS. All melee weapons in GURPS do damage based on strength.
I need to come up with a way that, after strength is generated by a table, I can compare the strength that was generated and call the correct amount of damage from another table. I was futilely trying to do this with nested conditionals until I saw in the help file that conditionals couldn't be nested.
Any ideas??
By the way, this program ROCKS! 8-)
Gilb°ne
Comments
WOOHOO!
Gilb°ne
Can you post your solution? Sounds like what you did would have a lot of applications in other tables.
Cheers,
Sorry it took so long!
It is not perfect yet (or completed), but it works nicely
Here is how I did the weapon tables based on Strenght. I would like to know how you did yours.
I used this format: [@[@encounter]] in every game system specific table to avoid 1000s of when-do's for each game system encounter table. The result is if [@encounter] part of that statement call resulted in "orcs" then that statement would actually be seen as [@orcs] by IPP and run the game system specific orcs table. Thus I only have one statement rather than many when-do's.
I just made a file that sets the thrust and swing damage for each level of strength from level 1 to level 22 and I call that info from a very slightly tweaked version of Highland Piper's Bandit Generator. Most of the functionality of HPs code is disabled right now and it only makes archers. If he gives me the ok I'll post that part too.
But note that I leave the actual weapon damage up to the user to determine, all my code does is give the TH/SW damage based on ST. It also determines whether the NPC has 0, 1 or 2 levels of Striking ST.
This file alone won't generate anything useable.
I'd like to confirm the nested table approach - it's waaaaay more efficient than using conditionals. I have a table that generates wilderness terrain based on the climate the user selects. This thread saved me a bunch of extra coding.
Here's a quick and dirty example:
I'm sure this is obvious to the old salts on the list, but hopefully it'll save time for newbies.
Cheers,