Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Possible methods to create a unique combat system.

April 29 (10 years ago)

Edited April 29 (10 years ago)
G'day all,

I run a game based off the Naruto universe, and I'm looking to implement a new combat system that's a little more lore compliant.

  • What I currently run:
    • Justu (that is, specific types of attack, of which there are dozens) as macros embedded in individual character sheets.
    • /roll 1d6 + @{Speed}+@{Strength} - @{target|AC} style attacks.
  • What I want to change to:
    • A database of jutsu, independent of specific charactersheets
    • Any jutsu being performable by any character possessing the requisite skill level[s]
    • If possible, macros alerting a character to what jutsu are available to them at any given time combat arises (based on current level, remaining energy, any stat debuffs, etc)
    • /roll {character|level}d@{strength}+@{speed} style attacks.
      • That is, character level determining the number of dice, and the sum of two (or more) added stats being equal to the number of sides of the dice rolled.
I'd call myself reasonable with HTML and CSS, and beginner to intermediate with JavaScript, but I'd say with my current level of knowledge, I'd struggle. What I'm looking for is a nod in the right direction. Is this possible? What would you recommend I familiarize myself with to make it happen?

Cheers.

-EDIT-

I was thinking it might be doable in JS if I create a script which defines each jutsu as an object, and then uses if-else to see if a character can use each one.

Thoughts?
Depending on the math and rolls associated with Jutsu, you could probably create a rollable table and assign the table to a shared sheet as a token. That allows you to drag it to the map if it need visual representation (think summoned creatures) and lets players use any Abilities defined on that sheet... which I assume would be simple macros to assist in rolling the table.

Listing available Jutsu dependent on conditions is definitely in the Mentor / API realm. A Case statement or traversing an array or collection with conditions is probably simple enough, though I'm no .JS expert. I'd probably use something more like Case or Switch instead of a long series of If/Then/Else...they're easier to deal with and more efficient.

The variable dice is a standard roll. The latest update adding nested inline rolls actually helps you quite a bit here, as it used to be a pain to change the right-side of calculated dice with math.
[[ (@{selected|Level)d[[@{selected|Strength} + @{selected|Speed} ]] ]]
That's actually brilliant - it hadn't occurred to me to pin the 'database' to a token; I was thinking I'd have to run it as an API. I'll definitely have to look more into this.

Thanks very much!