Need Excel help,

shortylickens

No Lifer
Jul 15, 2003
80,287
17,082
136
I am a DM in a local group and I try to simplify my work with computers. In the D&D 3rd edition system players have a lot of freedom in making their own magic items. Normally these items are based off a spell. You can calculate how much the spell component cost will be by using a table in the back of the DM's guide. Wands, potions and scrolls have a negligible cost, putting magic effects on rings and armor and weapons adds to their base price. Armor and weapons have to be of masterwork quality to be enchanted.
I already made a spreadsheet with the spell component costs calculated for me and uploaded it here:
http://www.savefile.com/files/1177126

As you can see, the only two factors in a spell component cost are Spell Level and Caster Level. For example, fireball is a level 3 spell which has be cast by a wizard of at least 5th level. A wand made with 50 fireball charges costs 11,250 gold (without any other considerations). If that same level 3 fireball is made by a level 10 wizard it gets more powerful but also costs more: 22,500 gold. A potion of cure light wounds normally costs 25 gold. (In the game they set it to 50 but the calculated result is 25.)
As a general rule, potions can be of a spell level no higher than 3, but I put the numbers in the sheet anyway for completeness.
If you click on the cells you can see I had them auto calculate the values based on the only 2 factors: Spell and Caster Level, which are located in the left colums.
I also made another small sheet for easy reference with just the minimum levels.

This sheet is helpful for players making items but now I need something else to help speed up game play.

When a DM generates random treasure he usually has some magic armor and weapons with 1 or more standard powers. They can be a +1 through +5 enhancement bonus and can also have special abilities which act as bonuses for the purpose of figuring their cost. A flaming effect on a sword changes the price as if it had another +1 bonus.
A flaming burst acts as a +2 enhancement.

The costs are as follows:
Total Enhancement | Base Price in Gold
+1 | 2,000
+2 | 8,000
+3 | 18,000
+4 | 32,000
+5 | 50,000
+6 | 72,000
+7 | 98,000
+8 | 128,000
+9 | 162,000
+10 | 200,000

You also have to factor in the additonal cost of the weapon or armor itself, which has to be Masterwork quality and more expensive.
As an example, a dagger capable of being enchanted adds +302 gold to the base price.

In addition to abilities that bump up the total enhancement bonus there are some which just add a flat fee to the total price. I cant find them in the basic DM's guide but I seem to recall a few that add +2,500 gold or some other amount and dont add to the effective bonus.

When I generate random treasure in a dungeon I roll percentile and then see how many abilities get added and what they are. In order to help me quickly figure out the final cost of random items I'd like a table where I can easily plug in all the factors and get an auto calculated result on the spot. Players usually sell equipment they cant use for easy gold. I can do the market factors of the various towns they visit on my own, but getting a quick and easy base price would help me out a lot.
Its also helpful to players when they decide to make their own magic weapons and armor.

The problem is there are too many factors and some of them may be present or not. In the Spell Component cost sheet I already made I only had to worry about 2 values and they are always present. Its easy to add the cost of a ring or staff or other item to them if needed.
For Equipment I need something that can calculate based on having a base bonus of +1 to +5, intelligently decide how much of a bonus each type of special ability adds AND add set gold piece costs and then add all them up for a total. Items can have any number of special powers so long as the total bonus is limited to +10. (I think the EPIC rules allow for more but I'm not there yet.)

I believe somthing with pull down menus may be what I need. The first column would have the base item (short sword, shield, plate mail) the second would have the base enchantment bonus (+2 to strike and damage, +1 to armor class) and after that I would need a bunch of similar columns with pull down menus and all the available special abilities. Since the abilities are different I'd probably need one sheet for weapons and one for armor, but both would be very similar.

I dont have a problem with the pull down menus BUT, I dont know how to make Excel understand that a certain word value (+1 or +4, flaming, jumping, flying) has another abstract value attached to it, which must be assigned and totaled for me in the final column, in addition to just a plain extra gold cost for some powers.

I am NOT asking for anyone to do all the work for me, I'd just like to know how its done. An example would really help too.

EXAMPLE:
I know that a flaming, throwing, long sword +2 has a total bonus of +4, making its base cost 32,000 gold. If that sword were also able to spit a level 5 fireball once a day that would add a Spell Component cost of 6,000 gold. Add in the cost of a masterwork long sword (315 gold) and the total value is 38,315 gold.
Thats fine for one item at a time, but in a dungeon full of treasure it would get tiresome.
 

Noobsa44

Member
Jun 7, 2005
65
0
0
I know that Excel provides some abilities you are looking for, I'm not an expert enough to tell you how to do it all in excel, but I will suggest a possible alternative. If you know any programming languages (such as C#, Java, etc), you could always export the file to a CSV file and then read it in via whatever programming language you choose.

Using said language, you could create a dictionary of words to values. For example, you could associate "flaming-sword" to an integer of 2 (bonus points). You might have a second dictionary that associates "flaming-sword" to an integer of 300 (bonus cash value). While this is perhaps a little simplified, it should give you some idea of how to do it.
 

imported_Dhaval00

Senior member
Jul 23, 2004
573
0
0
It sounds like you need a hierarchical structure. To start off, working with Excel's JET Engine will be a huge nightmare (primary reason why MS decided to replace it with a completely managed API starting with Office 2007). Ultimately, if you're thinking of a hierarchical menu (grandpa > father > son > son's kid, etc.), it may make more sense (and will speed up things drastically, too) to do it in a relational database. Hell, even something based on XML (assuming you're using C#/Java) will be way faster than making this work in Excel.

To me, it seems logical to host such a dynamic structure in the database - if you're using MS tools, you have the option of doing this in SQL Server Express. Additionally, for your spooky and gruesome calculations, you can always host a SQLCLR-based stored procedure, or a table-valued function, etc.
 

akenbennu

Senior member
Jul 24, 2005
781
356
136
You might want to check out the E-Tools utility that WotC had out a while back. It had the full menu system for generating random treasure/NPCs, etc. Not sure if it's still out there, but it could do a lot of the 'by the book' stuff.
 

shortylickens

No Lifer
Jul 15, 2003
80,287
17,082
136
Originally posted by: akenbennu
You might want to check out the E-Tools utility that WotC had out a while back. It had the full menu system for generating random treasure/NPCs, etc. Not sure if it's still out there, but it could do a lot of the 'by the book' stuff.
I have found a few for AD&D that include GP values, but the treasure generation and magic item abilites for 3rd edition is slightly different. The only ones I have seen for 3rd edition dont give an items value in GP. I can randomly generate stuff on my own with dice. I just want to be able to come up with their value quicky. Same for PC's looking to build magic items. It was easy for the spell component value spreadsheet I made, but I'm not super talented with Excel so I couldnt figure out how to do magic weapons and armor.

I THINK I MAY HAVE IT.
Instead of a buttload of pull down columns I would just lay out every ability with a blank box next to it. When I generate an item I put an X or a 1 in the blank box and then the TOTAL box at the bottom knows to count it. Or count the + value in another box right next to the name. That would be good since those values never change. A vorpal effect is always +5 regardless of when and where its used. You can only have one of each effect on an item at a time anyway. I could even make a flag alerting me when I have too many bonuses. In the bottom half of the list I could also input all the effects that have a set gold value, and then add them in seperately.

Let me get a sample to you guys later and tell me if I did things in the most efficient manner.

Also, was anyone impressed with my other spreadsheet or did it just scream "OFFICE NEWB!!" ?