Thursday, December 30, 2021

Campaign Manager: Engagements / Zoom / Music

Engagements

The Campaign Manager encounters had an ability to add "NPCs" and start a combat with them, but it didn't take advantage of the new assets. You had to manually type in the monster type, initiative, and hit points. This past month that "NPCs" item has been replaced by a new "Engagement" item:


An "Engagement" is the combat of an encounter. You assign which NPCs and monsters that are part of the combat. When you click "Start Combat", it automatically pulls the hit points and initiative based on the monster types that were selected.


You can't assign maps and monster locations... yet... but that is on the short to-do list. This will be the method of getting a combat encounter ready for players.

Zoom

The canvas of the Campaign Manager had the ability to pan around, but it was begging for the ability to quickly zoom in and out on it. That feature is now complete. Zoomed in:



And zoomed out:


Scroll bars automatically appear when appropriate.

Licensed Music

And not the most exciting feature, but I now have licensed royalty free music included with the Campaign Manager. I can now distribute the software freely without worrying about music legalities.


The music I have included is not as good as Table Top Audio (what I've been using in my own DnD campaign), but it's adequate. Thankfully users can copy in their own wav/mp3 files for the Campaign Manager to pull from (including from https://www.tabletopaudio.com/ ). 


Sunday, November 28, 2021

Campaign Manager: Assets

Big feature update this month was adding the concept of "Assets" that can be imported and managed in the Campaign Manager. Rather than being campaign specific, these are characters/monsters, abilities/spells, and items/equipment that can be utilized by any campaign.

Wizards of the Coast publishes a "System Reference Document 5.1 (SRD5)" via the Open Game License that includes a huge library of monsters/spells/equipment for use in custom user created campaigns and applications. It doesn't have a few monsters such as Beholders nor does it include any proper names, locations, or religions, but it's still very comprehensive. There are some requirements that I must do such as making it very clear what is SRD5, including the license, and making the data accessible outside the program, but all of that is not a problem at all with my Campaign Manager.

So a new menu item has been added:


In that menu you can search through assets, import, create, and edit existing. Included in the software now is an "Example" custom asset to show what the the user can create and the ready-to-use "SRDv5.1".

My favorite feature though is the search. Select Asset->Search or just CTRL+ALT+F and then start typing the name or category of a character, ability, or item.


That's going to be sooo nice when a player casts a spell I don't remember the details of. A few key strokes and I have all its details ready to go.


Next up is integration of all these assets with the rest of the campaign. I've got big plans on how to manage combat at encounters with these assets.

Friday, October 29, 2021

Campaign Manager: Regions / Groups / Installer

Major improvements this month to the Campaign Manager:

  • Simplified the Encounter control - options for the encounter can be set via right clicking or from the Encounter menu at the top.



  • Added a "grouping" function that gift wraps selected encounters to visually show they're grouped together.

  • Added "Regions" that can have background colors or background images assigned to them. Regions are always drawn behind Encounters, so Encounters can be overlaid on top of them. Additionally, Encounters can be linked to specific spots of a Region (like map markers).
  • Fixes to click ordering of encounters, selection, and made the campaign size adjustable.

  • Added sample campaigns to help users see the potential use cases of the software.

  • Created an installer that automatically places the executable in Program Files, supporting music and sample files in Program Data, and shortcuts.


And finally, I've shared the Campaign Manager with some friends to get feedback. I still have lots of features I want to add, but I'm at a point that I'm ready for input from others.

Tuesday, September 28, 2021

Campaign Manager: Clipboard

I've not published the Campaign Manager for public use yet, but quite a few more features have been added to it.

The clipboard for encounters is complete - you can Cut/Copy/Paste them now.


Context Menus have been greatly expanded as well.

Right clicking in the open campaign area...


Right clicking on an encounter...

Right clicking on a link between encounters...

Combats are now saved / loaded with the campaign. If closed, they can be brought back from the Players menu.

A big must have improvement is the ability to select paths to be relative or absolute. If relative, then the Campaign Manager stores the saved paths relative to where the loaded campaign is saved. If absolute, then it stores the full path. The manager asks if the target should be saved as relative or absolute path. Relative paths are useful when your resource files for the campaign are located alongside the campaign manager file. Alternatively, it's possible you have a shared folder for many campaigns / projects in which case you may want an absolute path. Those paths will continue to open even if only the campaign manager file has been moved.

If relative selected...


Lastly I've cleaned up lots of little glitchy things like dialog boxes appearing behind encounter / combat forms, flashing background images, not marking the campaign as unsaved when it should have been, and some other minor items.

Sunday, August 29, 2021

Campaign Manager Progress

I've made solid progress on my Campaign Manager this past month. I'm hoping I can polish it sufficiently in the next month to post it to itch.io for others to try.

Some of the latest improvements:

- You can now drag a window to multi-select encounters. And consistent with other Windows apps, if you hold down CTRL you can add or remove selected encounters.

- Items within an encounter can be reordered and resized. (Arrow buttons on far right side.)

- You can define a player list for the whole campaign and a NPC list for each individual encounter.

- Then with a single click it can create a combat with automatically assigned initiative orders from the user entered Initiative Modifier values. Have the players report their initiatives and you're ready to combat. A "Health +/-" button is available to do the math for you as enemies are damaged or healed.

- I have several notepad files for my campaign that aren't encounter specific. Just notes of future campaign ideas, potential magical items, and player equipment. So now you can have a general notepad embedded in the campaign file to type anything you want.

- After each session with my players, I type out what we did so we have an easy reminder of where we left off for our next session (and so in a few years I can make a short book covering the entire adventure).

- And a whole bunch of other smaller changes.

Saturday, July 24, 2021

Campaign Manager

I've been running a DnD campaign for a couple years now. It's not only my first time being a dungeon master, it's basically my first time playing DnD. (Had 2 single sessions attempts as a player before that didn't continue.) The vast majority of my Dungeons and Dragons knowledge before playing came from listening to Critical Role Campaign 1, which is quite a few hours of education.

My campaign began with the DnD Starter Set, but I diverged pretty far by the time the players reached Wave Echo Cave. Before they reached the cave, I had added in hooks for future places to go and gone totally homebrew.

To organize my sessions, I've been using folders for each area the players may go to. The folders contains maps and text files of what they may encounter. There are references within one text file that may point to other folders or text files. I also attempt to play music during my sessions based on if the players are outdoors, in a tavern, in a battle, etc. However I frequently forget to swap it out when appropriate.

I've seen a variety of online tools for battle maps and individual encounters, but I didn't see a good way to manage your entire campaign. (Admittedly, I didn't look that hard. It's fun making my own program tailored exactly to what I need, so I did that...)

Presenting (the work in progress) Campaign Manager!

It is now at minimum-viable-product stage. You can add encounters, link them together, play music, and save and load the campaign.

Encounters are the individual pieces of a campaign. On the overview window for any encounters you've added, you can assign a name, status (editing, reviewing, done, skipped), background color, and links.

The + button on the encounter is how you get to the details. That's where you can add in links to files, websites, folders, text, checklists, and music.


Adding one of each...


You can pick and choose which items to add and have multiples of the same type. So I could have several websites linking to a bunch of monster stats, notes describing what the area is to the player, and appropriate music ready to play with a single click.

And there are no limits to the number of encounters and how they're linked...


(Oh, and you can set the background color and image.) Scroll bars automatically appear as encounters are added / moved outside the current visible window.

The encounter details are (optionally always-on-top) separate forms that can be rearranged as desired.


Future plans are a way to group encounters, sizable background images that can go behind encounters, easier ways to link encounters, and better ways to manage players with monsters / initiative order. I've got a couple other people that I'm hoping will try it out and give me feedback over the next couple months. Ultimately though I expect to publish it on itch.io for anyone to use.

Saturday, June 26, 2021

RPG: Skills

Stats in my game are things that can go up and down as you venture in the world. If you concentrate on melee combat, those stats will go up and spells will suffer. If you concentrate on spells, those stats will go up and melee combat will suffer. If you stay a balanced player using both, then all stats can be high, but it will be essentially impossible to keep them all maxed.

Skills though are something that you learn and never forget. Even getting knocked out, your stats may go down but your skills won't budge. Repeat from my post on stats: "You never forget how to ride a bike, but if you haven't been on one in a couple years you're not going to win the Tour De France."

What I don't like:

I hate when games only allow you to pick a single skill to improve each time you level. I don't have a problem with requiring points in lower skills to unlock higher skills, but it's designed to force you to concentrate on one skill path. Trying to be a well rounded character or attempting to try all skills just means the "good" skills you want in the end game are never going to be as powerful as they could have been. This is my only real gripe with Diablo 2.

What I like:

A few decades ago, I played a MUD (text based Internet telnet game) that had the best implementation of skills I'd ever seen. They were all in categories and subcategories, and improving a single item in a subcategory would benefit everything in the tree.

For example say there were short swords, broadswords, longswords, daggers, and spears as available melee weapons. And say my character mostly used a short sword but just started using a broadcast. His skill tree may look something like this:

- Melee Weapons : 5
  - Swinging Weapons : 15
    - Short Sword : 30
    - Broadsword : 25
    - Longsword : 15
  - Thrusting Weapons : 5
    - Dagger : 5
    - Spear : 5

Using any melee weapon increases the overall "Melee Weapons" value a little. With how much my character has used short swords and broadswords, the overall value has reached 5. Any subcategory of "Melee Weapons" will be at least 5 as well. Since my character hasn't used thrusting weapons, it's a 5 and each thrusting weapon is 5. Which makes sense... although the motion of a swinging weapon is very different vs a thrusting weapon, someone highly experienced in one can likely pick up the related melee weapon very quickly.

Digging down a bit further, short sword is the highest (because that is what my character practiced with most) followed by broadsword (next highest). My character has never used a longsword, but because he has so much experience in swinging weapons, he automatically has a skill level of 15 in that.

This was absolutely something I wanted in my game. I haven't broken it out to specific weapons, but skills are now categorized with subcategories. Improving a skill in a subcategory ultimately helps all skills in that category.


Spells are broken out as well...


In the process of implementing the skills, I also added more capabilities. For defense, there is blocking and dodging. If you're holding a shield, it uses blocking. Otherwise it uses dodging. So now you can use shields in my game.


Additionally, the game now supports single handed weapons, two handed weapons, and dual wielding two single handed weapons. If you pick a weapon combination that is not acceptable, then it puts a red mask over the weapon so you know it's not in use.


In the above screenshot, I'm holding a single handed weapon and a two handed weapon. Since both hands are required for the two handed weapon, it's masked in red and I don't get its attack benefits. If I stop using the single handed weapon though...


It becomes available and I get its full attack benefit. How about the one handed weapon and a shield?


Now players can have interesting combinations of two handed weapons, dual wielding weapons, or mixing single handed weapons and shields. The more they use a certain combination they more they'll improve with it, but they can still switch to other weapon types without it being a complete loss.

Wednesday, May 26, 2021

RPG: Attack Types & Resistances

May has been a great month for improvements to the game. Invisible to the user was reworking memory to handle large numbers of terrain types, items, characters, and animations. Characters unarmed attack sounds were externalized along with timing of the weapon attacks. 

On the visible side to the user are Attack Types and Resistances.

There are 6 damage types: blunt (a club), piercing (a dagger, bow), slashing (a sword), water, fire, and electricity. The last three are used in spell attacks and magical weapons.

Each character has its own unarmed damage types. My "rats of unusual size" do piercing damage for their unarmed attack whereas my humans do blunt unarmed attacks. Swords do slashing damage. Any weapon or spell can have any combination of any value of damage types. For example a Blizzard spell does blunt and water damage.

The attack stats are shown to the user; unarmed my player only has a blunt attack of 0.2

Armed with a sword my player has a slashing attack of 1.

In addition to the attack type, each character has its own base resistance. For example trees are resistant to piercing and water damage. Items can adjust a character's resistance.

If I equip some armor, my blunt and piercing resistances go up.


Skills are next up to be revamped, and I already have significant progress on them. That however will wait for the June update.


Sunday, April 25, 2021

RPG: 3D Art Assets from Unity

I really like the Diablo 1 / Diablo 2 art style, but I don't have the time or skill to model that number of 3D characters. Even though I'm not using Unity as the game engine, it has an asset store with a huge library of 3D models that many of which match my desired art style. So, how about use the Unity art assets and just convert them into sprites for my game? I had no experience with Unity and I've got plenty of work to do without becoming a Unity expert, so I attempted the least amount of work possible to generate usable sprite sheets.

To generate the sprites from the 3D models, I found an asset called "Animation Baking Studio" for $24. As a test I found some free models that I'll likely replace in the future, but they're far better placeholders than the eyesores I had before.

My steps to produce a sprite sheet from a 3D model (written here for my own documentation just as much to help someone else!):

1. Create a new Unity project.

2. Wait for it to build...

3. Go to Window->Package Manager, under Packages select "My Assets". Import "Animation Baking Studio" and the desired art model.

4. Wait for the import...

5. Navigate to Assets->AnimationBakingStudio in the Project, double click Studio. Studio will be selected in the Hierarchy.

6. Delete the sample models under the Hierarchy.

7. Navigate to the desired asset model, drag from the Project folder into the Hierarchy window.

8. Select the new art model in Hierarchy, in the Inspector on the side, click add Component and select "Mesh Model (Script)".

9. Drag all desired animations into Mesh Model (Script) Animations list. This is so the AnimationBakingStudio will know which animations to apply to the character.

10. Select "Studio" under "Studio" in Hierarchy. In the Inspector "Models" section, drag the desired art asset in.

I'm still fine tuning the options to find what works best, but my current setup is as follows:

Main Camera:
  Perspective, Field of View 60 deg
  Relative Distance, 2
Directional Light: Directional light (Light)
  Follow Camera Rotation Checked
  Follow Camera Position Checked
Model Rotation:
  View Slope Angle 30
  Show Reference Tile Unchecked
  View Size 8
  Base Angle 0
  Angles checked: 0, 45, 90, 135, 180, 225, 270, 315
Shadow Type:
  None
Extractor:
  DefaultExtractor
Apply Variation:
  Unchecked
Show Preview:
  Checked
  Background Type: Checker
Resolution:
  X: 150, Y: 150
  Frame Size: 10
  Simulate: 0
  Delay: 0
Trim:
  Unchecked
  (Ensure Unified for All Frames is also Unchecked, otherwise a bug prevents it from generating the animations. Developer said they'll have the bug fixed in the next version though.)
Pack:
  Unchecked
Make Animation Clip
  Checked, Frame Rate 20, Interval 1
  Make Animator Controller Unchecked
  Make Prefab Unchecked
  Generate Normal Map Unchecked
File Name Prefix: Empty
Output Directory: As Desired

11. Once the options have been entered, click "Bake all models".

12. And wait for the render...

13. When it's complete, navigate to the sprite sheet folder and enjoy!

I made some modifications to how sprites are loaded in my game so I don't need to do any additional processing on the images. The game can load the Unity exported images as is; including even the files names. I still have some changes to make to support all the animation frames, but the proof of concept is overwhelming successful.

Again long term I'll likely not use these 3D art assets, but it's a gigantic step from where I was and now I've developed the process for potentially all future characters in the game.

There may be better ways to do this in Unity, but so far this has been the least amount of effort for greatest return I've found.