Programming + Absence

Well it’s Friday and I’ve about missed my chance of having a D&D post this week.

I started writing one and I just kept adding more to it. The consequence is no post about Cimmeria this week, but hopefully a giant sized one for next week!

If you’re still craving your weekly D&D post from the GoCorral blog then I still have something for you.

I completed that script I was working on for criticals in Hackmaster on Roll20. Not only that, I completed two more scripts for melee and ranged fumbles in Hackmaster!

They are available for download on GitHub at these locations:
Critical: https://gist.github.com/GoCorral/1297d794e80e78f6238e2bd6c7661e37
Melee Fumble: https://gist.github.com/GoCorral/9240004810d0667c5ac76a083d7a94d3
Ranged Fumble: https://gist.github.com/GoCorral/f0fd318795fdf76643cfd0b2e0908c5f

So if you play Hackmaster using Roll20 and have a Roll20 Pro subscription then these should be pretty valuable to you. If not… you might be able to modify it for use outside of Roll20’s API and still get some fun out of it.

The other announcement of the week is that I will be on vacation the next two weeks.

I’ll do my best to stay constant with updates over that time, but I believe it is inevitable that I’ll be distracted by something in the city in visiting, Nashville.

And when I get back I’ll have a lot to say about the capitol of country music!

Thanks for reading!
-GoCorral

Roll20’s API Scripts

Continuing from my previous post about Roll20, I wanted to talk about how script writing for Roll20 works and the particulars of the script I’m writing.

Roll20 has something called an API (Application Programming Interface) a term that the programmers reading this are already aware of, but one which I had to look up while writing this.

Behind all the fancy jargon I read, an API is a way to write and test programming code.

The simplest “API” is something like Notepad. You can design a program in it, but Notepad won’t run your program or tell you where you messed up.

There are more complicated APIs track syntax errors in your code, color the different key words, point out where you messed up, and even let you test run your code.

Roll20’s API tracks syntax and color codes. It tells you IF you messed up, but not WHERE. So when there is inevitably a problem you get to play hide and seek until you find it.

Every API is designed for a specific programming language. Roll20 uses Javascript.

I didn’t know any Javascript going into this.

I’m familiar with the basics of programming. I’ve taught myself a little bit of Python, I took a course on C in college, and I know a little about Perl and HTML* from various places.
*Not exactly a programming language but I’ll bet that nobody really cares.

To learn the particulars of Javascript I started taking a course on CodeAcademy.

The CodeAcademy course is pretty cool! Nice assisting prompts. A little poor on alternative ways of solving the problems, but that’s actually a good thing for programming courses.

I learned a little about Javascript from that, enough to write the program I wanted to for Roll20.

And what program is that? Something to automatically spit out the results of a critical hit in Hackmaster!

Hackmaster is a game like D&D that I play with my friends sometimes. Hackmaster has a ton of cool rules that make the game quite a bit more fun and shocking than D&D.

One of those rules is what happens when you hit your opponent real good. Depending on your height advantage over your opponent, the weapon you used, and how hard you hit, a special event occurs.

Why do I want a program for that? Well… Take a look.

Critical hit chart comes with lion and everything else you see here.
Critical hit chart comes with lion and everything else you see here.

There are about twenty pages like this that just go on and on.

It’s a bit much to flip through all those pages, cross reference with the different numbers you need, and then trail your finger down the chart to see what happens.

Instead, why not have a program do the work for you?

The program is started when a player uses the Critical Hit macro. Remember how macros can ask for values? That’s all the Critical Hit macro does. No dice are rolled.

The Critical Hit macro asks for seven different values: your size, your opponent’s size, your attack roll, your opponent’s defense roll, your damage roll, your opponent’s armor strength, and the type of weapon you’re using (Crushing, Hacking, or Piercing).

Next comes the script. The script is triggered when the Critical Hit macro is entered.

Nowhere near Matrix levels of code yet.
Nowhere near Matrix levels of code yet.

I looked around on Roll20’s forums and found the skeletons of some other scripts to use for the script to take information out of the Critical Hit macro and use it in the program.

From there, the script rolls a several thousand sided die that represents the location hit by the critical with different sized dice depending on the difference between the attacker’s and the defender’s sizes.

After getting that roll, the script enters a gigantic ~3,000 line long if/else tree that serves in place of the twenty page table. This comes up with a different results based on the location of the blow, how hard the target was hit, and what type of weapon was used.

Finally, the program spits out the result into Roll20’s chat along with some background information to make sure that it worked correctly.

Does the code work? Well, I don’t know yet. I’ve been typing away at it for about a week now and have transferred roughly one fifth of that giant table in the book to the programming script.

Due to how I structured the code, I can’t tell if it works correctly until I finish the whole thing.

Unfortunate, but what can I do at this point?

So here’s hoping that when I’m done in a few weeks and I press that Critical Hit macro button, it runs as smooth as melted chocolate.

If not, then I’ll probably have a blog post to make about code debugging…

-GoCorral

P.S. If you play Hackmaster and are interested in this code I will be posting the completed version of it on the Roll20 forums and the Hackmaster forums once I’ve finished. I’m also planning on doing a similar thing for the Fumble charts for Hackmaster so stay tuned for those as well.

Gurutama Timeline Revising Part 28

Previous: Gurutama Timeline Revising Part 27

Last Timeline Revising post! Here we go!

Like I said in the last post, the Avians are coming back so that their race will have more places to interact with the world than as slaves or a mysterious culture physically constrained to one location. Strife continues in Hykma in various ways. Fortunately, that strife can be used for a bunch of adventure hooks! I keep mentioning adventure hooks because that was the whole point of creating Gurutama with the Dawn of Worlds game.

This post also sees the weakening of the Merfolk trade empire a little bit. They’ve started having to negotiate with Hykma instead of dictating as they did during the Great Blockade.

One of my favorite points is the return of Engrenildo! We decided about halfway through our Dawn of Worlds game that the world was flat, not round. How did Engrenildo circle the globe if the globe isn’t round? A question for someone to answer when it really matters! Also, an opportunity for a particular GM to make up geography in a different place that the Engrenildo family discovered on their voyage.

And war consuming the world everywhere if GMs want to use that as a background for a plot. All great stuff!

My next step for working on Gurutama will be:
1. Going through the timeline as a whole in a printed off version. I find this works better for catching small errors that I might’ve missed. Any edits I make at that point will be included in the Revised Timeline page, but not as individual blog posts.
2. Race descriptions. I’ve got that little tree of races set up on the menu bar of the website, but there’s no info there! I want to get some pictures in there and short descriptions of what the races are like and basic history. I’d also like to put in some stuff about statistics for the races in different gaming systems. I currently plan to include stats for D&D 3.5, D&D 4E, Hackmaster, and possibly Dungeon World (I don’t know much about the last one but someone in my gaming group does).
3. Religion descriptions. A few of the religions were introduced in the timeline updates, but we don’t know much about them. We never want to fully flesh out every single religion to maintain creative freedom for GMs and players, but a little more stuff would be nice. I’ll probably work on this in tandem with the race descriptions, jumping back and forth as feels appropriate. For example, I’ll describe the races of Hearthland and describe their religions in the same spat of updates I write on Gurutama.

That’s all for now! Enjoy the update and look to see more Gurutama stuff in the future.

751 NA: Hykma and the Hearth, both wounded by the civil war and the battles afterwards, began to rebuild. This process incorporated much of the artistic movement the Rana initiated, and so the cities reveled in the new beauty.

After negotiating the terms for passage through the Great Canal with new reps from the Revered Administration, the Merfolk organized more and more armies in Proaxium, Drolfo’s Cove, and Cyflenwi. The new recruits were sent to retake Tortuga along with a massive fleet. The Avians were cast out, but separate roosts had already been established on the northern side of the ocean, creeping ever north towards the high cliffs of the Mandibles.

The city of Balkus, already a fine port city, continued to grow in size and wealth. While the Merfolk occupied themselves with the Avians, a new settlement, named Mershe, appeared on Crautor Island. A new Bwarlor nation came onto the global scene.

752 NA: The True Arrows infiltrated Rotandean. They found allies there among all those who resisted the Brotherhood of Living Immolation. The common man may not have known of the Brotherhood, but the Arrows knew. Frugal Profiteers who went into hiding after the end of the civil war also joined up with the True Arrows. Sabotage and trickery were rampant in the city. Rumors of rebellion spread.

753 NA: Engrenildo’s grandson, Engrenildo the Third, finally docked on the western side of Hearthland with grand stories of land beyond the four known continents. He established a colony at the edge of the river named Victoria, after his mother.

754 NA: The Metal Dwarves formed up more armies and then went marching out against the Grez. Machines were made to assist in crossing the ice and breaching the fortress of the wraiths. A few soldiers were lost in the trek to Reesrevoton to eliminate the Grez threat, but discipline kept the men in line. Upon arriving, the monstrous creations of the Grez shocked the Dwarven armies. They fought and fought, before realizing that their only chance laid in retreat. The Dwarves pulled out, but only a few survived to tell the tale of the ice golems of the Grez.

755 NA: King Tenzomak sat in the throne room of Syluk. His father’s armor stood in a trophy case against the wall. The King stared at the armor and felt it calling to him. He walked over to it in silence and slowly donned the armor. He felt vast strength flowing in his veins. He had to use the strength quick! Before it consumed him! He lashed out at the grand columns supporting the ceiling of the throne room. His kicks and punches, powered by the ruby plate, brought the walls down around him. Servants fled the royal castle and a few were crushed in the ruins. The King dug himself out of the collapsed keep with his bare hands. He addressed the gathered crowd around his former palace, “For too long we have sat in luxury, enjoying the splendors the world has given us! It has weakened our resolve! Made us like the little people who think of nothing but their pipe-weed and mushrooms! NO LONGER! We shall forge our bodies into a new army and reclaim the glory of the dwarves! NO MORE MERCY FOR THE EMPIRE!” A cry goes out among the Dwarves and Humans of the city.

Immediately the city prepared for war. Old metal was melted down for new. Fine heirloom luxury goods were sold off to incoming merchants to finance the growing army. Thousands of men reported for the draft. Those that do not were found and punished. Bards were sent out to spread tall tales of Tenzomak’s Ten Hundred Thousand.

756 NA: The first graduates of the agoge assembled outside of Crodolan. They marched forward without fear, thousands dying to the ancient magical defenses around the city. The Hobgoblins had been told from a young age; a Hobgoblin never gives up, never surrenders, and never retreats. That is for the lesser races. Hobgoblins are strong, brave, and as hard as steel. They marched forward, unfazed as their brothers were blown to pieces by fire and lightning. The defenses around Crodolan were used up except for an odd one here and there.

The humanoids and Giants reached the city walls. Grand General Krak-Sho-Khan ordered the rams brought out. The Elves tried to defend their city, but for every Goblin they shot, two more took its place. Giants and Trolls helped with the siege of the walls. The Elves ran out of arrows, and then they fell. Crodolan was taken. Krak-Sho-Khan named himself King of the Halusho Forest, with his generals as the official council.

757 NA: The Humans of New Prestounasi grew wary of the war between the Elves and the Hobgoblins spreading to their city. The ships were made ready to cast off if the Hobgoblins turned their way. The generals of the Bastion felt secure behind their walls, but awaited an order from Hykma to cross the Bridge and engage the filthy Bwarlor spawn.

The Rana kept the influence of Navillus out of the Shanties with many spells, wards, baptisms, and exorcisms. This earned them many friends among the commoners, but few among the faithful in the Brotherhood. It was no longer a rare incident for a Gossamer Monk to be attacked on his way home from a house call. The Brotherhood’s spies are everywhere and their thugs are ready to pounce.

The Grez learned of artificial intelligence for their golems. An unthinking automaton is a foe worthy of the greatest heroes, but a thinking one? Only the immortal gods could slay such a beast. The Grez rejuvenated their golem armies in Reesrevoton and sent the golems at the Bronze Port. The Dwarves and Profiteers evacuated the city, but many did not make it out in time.

758 NA: The Grez attacked Bronze Port last winter. It is spring and a new year dawns upon the world. What quests lie in wait for those who seek adventure? Only the gods know.

-GoCorral

Back to the beginning: Gurutama Timeline Revising Part 1

Gurutama Language Map

Language Map

Last night I made a map representing the relationships between different languages in Gurutama.

Since I am playing on using the Hackmaster rule system for Gurutama I modeled the relations between the languages on how languages work in Hackmaster.

Languages are treated as skills in Hackmaster with proficiencies ranging from 0-100%.

0-25% is when you know a few words in the other language. Most Californians have at least this much understanding of Spanish.

26-50% is when someone knows how to construct sentence frames, but can’t really carry a conversation. Someone who’s still learning the language.

51-75% is when someone knows enough to go on vacation to another country and speak that country’s language, but not enough to have a conversation about philosophy or something. My wife and I probably have this level of proficiency with Spanish.

76-87% is a normal mastery of a language. Hackmaster treats this level as the amount most people have in their native language.

88-100% is when someone knows lots of fancy words in their language. My dad has a PhD in linguistics, so he probably falls into this range.

That should give you a better idea of what the penalties listed in the image above mean.

Lets say that English is Merese on that map up there. My dad with his PhD in English linguistics would have around 20% mastery of a language that English borrows words from, like Swedish. He’d recognize a few cognates between the languages and he might know how to construct sentences, but he can’t really speak Swedish.

I’d guess that I have around 60% proficiency in Spanish. French is a very similar language. Everyone else in my family spoke French occasionally when I was growing up and the little bit of Spanish I know allowed me to understand the gist of the conversation even if I couldn’t participate. French and Spanish would be considered divergent languages in the Hackmaster system (along with Portuguese, Italian, Romanian, etc.).

A few of the languages up there might not be recognizably from Gurutama. Some of those are for monster races like trolls, giants, and orcs. The others, like Krangi, Lathlani, and Sqwuani, are for a few of the main races. Krangi is Hobgoblin, Lathlani is Elven, and Sqwuani is Avian.

The other members of my D&D group are getting a little more interested in Gurutama lately and there was talk of setting up a wiki for the campaign setting so everyone could edit and add stuff on.

If the wiki is set up I’ll start moving content there. The stuff I create will still be posted here but my friends can’t make the same promise.

That’s it for today!

-GoCorral

Knights of the Dinner Table

20140401-175844.jpg
I read comics a lot when I was a kid, but the only subscription I’ve kept into adulthood is for Knights of the Dinner Table.

Knights of the Dinner Table is abbreviated as KODT. Why does “Of” make it into the abbreviation if “The” doesn’t? Because the authors don’t have copy editors and make a few mistakes every issue.

The mistakes in the magazine have become charming over time, some even seem to me to be done on purpose at this point.

The image above shows the typical art style for the comic, a bunch of talking heads.

The heads are literally just rotated using an image editing software and new expressions put on. The exact sort of thing that I’ve heard people dislike about comics in the newspaper.

So about now the comic seems like its done by unprofessionals, right? It kind of is.

None of the people who are involved in the comic’s creation have any sort of training or experience in the comic industry outside of KODT.

But the comic has been in circulation for over twenty years now. That’s gotta count for something!

KODT’s shining point is the content. While the art is minimal, that’s all that’s needed.

The comic is about a large gaming community in Muncie, Indiana. The Knights of the Dinner Table, shown above, are just one of many gaming groups within that community.

The comic follows the gaming sessions of the community as well as the random events of life.

The most recent issues cover B.A., the DM for the Knights, starting to date someone for the first time in his adult life.

I started reading KODT at issue 50 about the same time I started playing D&D. Over ten years later and they’re up to issue 207 now.

The comic and the game seem like almost the same thing to me at this point.

I look forward to getting my issue every month, even though they are technically two months behind schedule.

I still get one comic a month with the two months behind thing, but the holiday themed issues end up being a little strange. Everyone is wearing costumes in December and celebrating the new year in February.

The company that makes KODT has also put out an amazing roleplaying system called Hackmaster. I’ve bought it and look forward to playing it sometime.

But Hackmaster is something for a different blog post! That’s all for now.

-Mister Ed