Thursday, April 30, 2015

Musings on the Weight of a Gelatinous Cube

If a gelatinous cube is 10 cubic feet in volume, then it's 283,168 cubic centimetres in volume.

Assuming a density of 1.3g/cm^3 (density of scientific gelatin), that's 368,118 grams, which is 811 pounds.

For a gelatinous cube to weigh more than 15,000 pounds as Paizo and Forgotten Realms seem to suggest, it would be 6,810,000 grams in weight, which, given the 283,168 cubic centimetres of the cube, would make it have a density of 240g/cm^3 or 240,000kg/m^3.

For reference, that's about thrice as dense as bronze, twice as dense as silver and a good 5000 more kilograms per cubic metre on gold. Tell me, did your silverware ever slip out of your hand like jello?

I mean, I suppose it works if your world has a nice low gravity (that would explain all the giant bugs not being crushed by their own weight)... but seriously, why the hell do you need a 15,000 pound cube? That might as well just be a rock. 811 pounds and density that can actually allow solids to pass is good enough for me.

HUMBLING MATHEMATICAL UPDATE: Maximillian remarked in the comments that the typically understood volume of a gelatinous cube is 1000 cubic feet, given that the cube is 10 feet by 10 feet by 10 feet (you'll notice that the cube root of 10 - the length, width and depth of a 10 cubic foot cube - makes for a somewhat difficult to measure cube). I agree with the logic of his comment (although I'll need more help to see how he got 7,774 lbs). Hence, some adjustments should be made:

The cube is 28,316,847 cubic centimetres in volume (converting 1000 cubic feet to cubic centimetres). With the same density as before, that's 36,811,901 grams or 81,156 pounds. Talk about a big change.

With a volume that large, the 15,000-pound cube also ends up having a density of 0.240g/cm^3 or 240kg/m^3. That's actually a quarter as dense as water. Seems a bit weird still, but a lot less weird than before.

Humorously, if you use Alexis' hit points per die mass system like me, your cube just went from having up to 40 hit points to having up to 120. Scary!

Friday, April 24, 2015

Programming Power Brainstorming

Some good discussion over at Tao of D&D about the use of computers and technology in D&D, especially in our post-videogame era. It's gotten me thinking some more about my own attempts to use my computer to speed up play and make things simpler. This post won't actually put anything concrete forward, just some ideas.

So far, I've mostly kept to using Excel. With the Item Durability app, I have begun my first official foray into Android development, with the intention of eventually having a series of inventory sheets for groups of characters which players can adjust and modify at their leisure. Of course, because it's an Android app it's not as available as Excel, which leads me to start considering my other programming options more seriously.

Right now, I am starting a summer job where I will be using XML and Python for some scripting on the web. It's mostly basic backend stuff but it makes me realize the value of these tools as they are fairly universal and beautifully simple to use (Python is so magical straightforward compared to, say, C - albeit because it hides a lot of C's ugliness).

Some ideas:

Movement
Get a GUI of hexes going, create a bunch of labels to represent characters and then move people around on a hex-map. Can be done over the internet to allow real-time updating by players.
- would require some more investigation of GUIs
- I can already make a hex map background (it's really just a fancy 2D array)
- Internet stuff I'd have to just steal what I know from C (which at this point restricts me to console I/O, but hopefully I could snag a domain for this at some point)

Climate
Obviously a major point for any "realistic" adventure in the outdoors. It would be great to have something I can just print the current climate from with a quick shell command, specifying the location and the date.
- seems doable, although I'd either need a big database or a kickass way to download stuff from the web
- if I follow the second option, I can "mask" locations by assigning real-life locations to fantasy ones (what I already do for my world's weather)
- alternatively, I could try to set up a full-on system (dun dun DUN)

Economy
Definitely another big project involving getting access to items controlled by trade routes and such. Would probably pillage the basic concept from my old economic system (itself pillaged from Tao of D&D) and essentially just do all the math for me (yay automating repetitive tasks!)
- would definitely require some databasing, which I kinda suck at (better learn SQL)

Crawler
It would be lovely to have a way to just gather information for my game off the internet for analysis later. I spend so much damn time opening up Wikipedia articles and scanning through less-than-scholarly articles to get a good sense of what I can use for developing my world. This would be a project to speed that up in a simplistic way. I could probably throw together a BATCH file to do it, honestly. All the same, not much of a priority.

Right now, I am hoping to get durability off the ground, but I think I may start on everything else in various stages. Part of what pisses me off with premade stuff is, with all the licensing that goes on, it's only ever made for one or two particular products, when virtually every single DM is going to use slightly different rules. Anything I end up putting online will definitely need to respect the variety of styles and techniques out there, which is why I would want a comprehensive list of settings that can be turned on or off.

Away we go!

Sunday, April 19, 2015

Back to Durability!

So I have a new and promising durability solution, and of course it was an age-old solution.

The fumble.

As I said in the last post, part of the problem with the system as it stood was that it needed to happen every day and that equipment was breaking as soon as the 1% showed up (in cases where the equipment actually lasted longer than a week).

Though I had remarked on potentially using successive rolls before, I didn't really give it much thought until I was looking over the Tao of D&D's use of break rolls on equipment: on a 1 on your d20 attack roll, the weapon has a chance to break based on its quality: 1d4 for crappy weapons versus 1d20 for "mastercrafted" weapons.

I had been using it for a while, but forgot about it during all the time I hadn't actually sat down and played D&D. My DM brain was getting rusty.

So I decided to incorporate the fumble into some simulations - on a 1 in 20, roll a d100 and compare to the break chance - and boy-howdy did it work. I added one special caveat: if you don't break your weapon when you roll a d100, add the d100 roll to your total stress. I suppose this should maybe be changed logically, as you would expect to want the biggest roll possible, so maybe I'll change it to be add 100 minus the roll if the players can manage it (although I might be able to digitize it out of their way).

The results were very positive: I tested 1000 total resistance, 10000 total resistance, and 20000 total resistance.

Resistance: 1,000
Average # of Days Lasted: 76.76
Standard Deviation # of Days Lasted: 44.66 (min was 2, max was 285!)
Average Break Chance when Item Broke: 37%
Standard Deviation of Break Chance when Item Broke: 0.16%

Resistance: 10,000
Average # of Days Lasted: 240.73
Standard Deviation # of Days Lasted: 121.79 (min was 8, max was 782)
Average Break Chance when Item Broke: 14%
Standard Deviation of Break Chance when Item Broke: 0.07%

Resistance: 20,000
Average # of Days Lasted: 336.57
Standard Deviation # of Days Lasted: 170.57 (min was 30, max was 1123)
Average Break Chance when Item Broke: 10%
Standard Deviation of Break Chance when Item Broke: 0.05%

The standard deviations of days are admittedly a little insane: the data seems really spread out. On the other hand, of the items in the 20,000 bracket, over 60% were within one standard deviation of the average (i.e. between 166 and 507). I can live with that, RNG gods.

The one extra caveat I'll need to add is that 1 on a d20 would work plenty well for weapons, but what about other things, like armour, backpacks, books or bananas?

At this stage, I am considering using a 20 on an ability score roll with an associated item as incurring a break roll (e.g. swinging from a rope), but there's no ability score to eat a banana or wear armour. What does one do?

Well considering what causes wear and tear on equipment - stress from fighting, falling or stretching too far - I could call for a d20 roll in those situations, but that starts feeling like DM fiat when I need to personally adjudicate every kind of scenario, and DM fiat leaves a bad taste in my mouth.

I could have players roll for whatever's on their bodies when they fall below 0 HP, but again circumstances should dictate whether or not a roll is necessary.

I could make each attack hit a semi-randomly determined part of the body and have that item roll its resistance to the blow (1d20, then the 1d100 on a 1). But then there are way too many rolls going on for each attack.

At this point, I am going to implement the complex rule for weapons and keep the break roll limited to situations that call for it. Items will naturally still take daily stress while out in the wilderness, so they'll still break if they ever hit their total resistance.

Now time to implement!