Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Dungeons & Dragons translated to RPG Maker

[Intro]
The new (fourth) edition of the most famous Role Playing Games got released this year: Dungeons & Dragons. While looking at the new mechanics, I've felt a RPG Maker style. This feeling made me download again the RMXP and try the new RMVX. I've noted both are quite different from each other, but I'm interest in work with the version where I can have most progress in attaining my objectives, so if you can help me with XP or VX...

[Alterations]
What I'm looking for is [possibly] a script to change basic abilities of heroes, changing the Attack, Defense, Agility an Intelligence for the six D&D abilities [Strengh, Dex [=Agility], Constitution, Wisdom, Int, Charisma]. Changing the range of the scores to be more close to the rule books would be great too. But the most important alteration [from the 3.5 edition to the 4th; and aimed for the RPG Maker] is the Powers. Powers are Skills that can be used in combat, and are organized in 3: At-Will powers, Once-per-Encounter powers, and Daily powers; but I lack of knowledge on how to change the skill system of the Maker to attain this kind of modification. Also, the new edition of D&D focus on tactical combat, so I'll use a Tactical Battle System wich, by the way, would fit like a glove with the new powers and archery. A character creation system isn't necessary at this point, since it would just better to allow players to chose from a pool of pre-created characters.

List
  • Change the 4 atributes of the Maker to the six abilities of D&D
  • Modify the scores of Maker's Atributes from hundreds to D&D range of abilites scores
  • Skill alterations, to accept the use of at-will, once-per-encounter and daily powers
  • Tactical Battle System

[Hi All]
I'm new to this forum, and newer to the mod of Maker, so, be kind to me. Since I feel my necessities need the use of scripting, I've put it here.

Thank You
 
First off, I would like to congratulate you on the great format for the post. This is exactly what the mods are looking for in a request. THe next thing I was going to say is that if you are going to have a DnD styled system, dice rols are necessary. So, that means you also need to revamp the damga and hit ratio portions of the battle system so that they incorporate randomality. (And possibly a window to show your roll) Finally, I wanted to say that if I'm not too busy, I'd be really willing to help with part of this.
 
Thank you for your compliment, Glitchfinder. I'm new to this forum, but already used many other foruns before, so I know how important is to be clearly on what you're saying. Also, i apologize for any grammar or syntax problem: I'm not a native English speaker, so some mistakes are constant.

About the dice rolls, I know how it's the core of the D&D. But since I had join this forum, I've read through some tutorials to RGSS language, and found ways to make it work like the Dungeons & Dragons mechanic.
  • One of the rules includes an always round down. RGSS work with fractions? If not, to the number got round up or down?
  • If we could make the RPG Maker to roll a D20, working with an array of number [from 1 to 20], it would made everything easier, since D&D is all about roll dice, sum modifiers when appropriate, and compare to a fixed mumber
  • The wish to work with a tactical battle system is because many powers functions within a battle grid, e.g. if you hit your target, do x damage and the target is pushed one square away from you.
  • The ability scores [and the respectives modifiers] work as the formula: (score-10)/2, round down, so a Charisma score of 13 has a modifier of +1, and a score of 8 has a -1.
  • The attack is simple [from the RPG Maker point-of-view]: Basic Attack + Ability Modifier + Any Other Modifier + D20 >= Target Defense (10 + Ability Modifier + Other Modifiers), so a simple conditional branch do the work.

I know how difficult is to work on a TBS [at least I can imagine], so if any already made can help my quest, I appreciate.

Also, if anyone wants to comment, feel free to do so. Over 70 views and one reply must mean something. Throw an idea, guide to a tutorial, explain something you think it's important or just cheer me up: All are welcome.

Thank You
 
My sincere thanks, Fenwick. While this script uses the mechanics of the RPG Maker, it'll help so much on the work. I've printed the RPG RGSS Tutorial and started to read it. He sures make a great work with it.

Again, thanks to all for making my dream more easy to be made.
 
I'm bumping my thread.

Also, i'm messing around with the Script Editor (RMXP), reading and seeing what does this or that. I've saw where to define the attributes (str, agi, int...), and it felt easy to just copy the text, paste it and change the necessary to have 6 and not 4 atributes. But I'll need to change the Window_(don't know what) too, so I can see my modification in game.

Also [2], the Data Base... Can it be modified by scripts? So it would show any alterations made in the Script Editor? [Example]I change the scripts so I have 6 atributes, and then I can change the atributes of my actors through the Data Base, using the more friendly appresentation?[/Example]

You're way more friendly than the Script Editor for answering my questions...
lol

Thanks
 
Gee...  I thought someone would have jumped all over this by now and started scripting something up.

I would love to see this push forward as I would love to see a system with the Old School D&D Battling (Hit with a roll of a d20, Dmg by weapon dice ie: long sword 1d6, etc...).

Now, I'm no scripter, but I am trying to find a way to do this, even if it is very basic to see if even I (none -scripter) can do it.

After editing the above posted script, I have managed to get the "Damage" for weapons to work.  This is done by adding "[1d4] or [2d12]" in the name of the weapon.  The script searches the weapon's name for any occurance of the listed addons and performs the neccessary damage. 

To All Others:  Like I said, rough, and I am not a scripter, so don't bother jumping all over the cruddy design, your just wasting your breath people.

Pattousai:  I will dust off all my AD&D books and see what I can come up with, but, working 6 days aweek, I only have minimal time to work on it on Sundays.

Here is what I have so far, new additions are in "Red":

#==============================================================================
# ** CW: DnD Formula **                                     ver. 1.0 (01/03/08)
#------------------------------------------------------------------------------
# Clockwise [B.Gale]
#   PLEASE GIVE CRIDIT IF YOU ARE GOING TO USE THIS SCRIPT
#   
#==============================================================================

class Game_Battler
  Default_Weapn = 'Melee'
  Type = { 17 => 'Range', 18 => 'Range', 19 => 'Range', 20 => 'Range', 21 => 'Range',
           22 => 'Range', 23 => 'Range', 24 => 'Range'}
#===============================================================================
# How to control the "dice" in the database...
#
#  First we need to go to weapons.
#  Here the value of ATT is broken down into two parts:
#
#    > the first digit is the number of dice
#    > the second digits are the number of side on the dice
#
#  so for example...
#  106 = 1d6
#  210 = 2d10
#
#  and so on...
#
#  this means if you had a weapon with 2d8 (ATT = 108) you could "roll" as
#  much as 16 (plus @modifiers) or as little as 2 (plus mods)
#
#===============================================================================
  alias fenwick_dmgnew_initialize initialize 
  def initialize 
    #Original Call
    fenwick_dmgnew_initialize
    #Setup placeholders
    @tmpdmg1 = 0
    @tmpdmg2 = 0
    @modifier = 0
  end 
 
 #--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  #def attack_effect(attacker)
  def attack_effect(attacker, unleash) #Fenwick - Added ", unleash)"
    # Clearing the critical flag
    self.critical[attacker] = false
    state_p[attacker] = []
    state_m[attacker] = []
    # Formulas #
    atk_roll = rand(20)
    atk_bonus = attacker.agi
    dodge = ((self.dex - 10) / 2)
    hit_con = attacker.hit
    if Type.has_key?(attacker.weapon_id)
      atk_mod  = (attacker.dex - 10) / 2     #Range
    else
      atk_mod  = (attacker.str - 10) / 2     #Melee or Enemy
    end
    #### CALCULATE #####========================================================
    # Hit Detection #
    hit_result = (hit_con * (atk_mod + atk_roll + atk_bonus) > 9 + self.pdef + dodge)
      if hit_result == true or atk_roll == 19
        # Calculate Base Damage #---------------------------------------------
       # atk = attacker.atk.to_s
       # dice  = atk.chop.chop.to_i
       # side = atk[-2,2].to_i
       # self.damage[attacker] = [dice * rand(side) + atk_mod,1].max
       
        The Initial Call To Find Damage
        #@tmpdmg1 = 0
        find_dmg(attacker,@tmpdmg1)
        self.damage[attacker] = @tmpdmg1 
     
        #---------------------------------------------------------------------
        # Element correction
        self.damage[attacker] *= elements_correct(attacker.element_set)
        self.damage[attacker] /= 100
        # If damage value is strictly positive,
        if self.damage[attacker] > 0
          # Critical Chance #-------------------------------------------------
          if atk_roll == 19
            crit_roll = rand(20)
            crit_result = (atk_mod + crit_roll + atk_bonus > 9 + self.pdef + dodge)
            if crit_result == true
              self.damage[attacker] *= 2
              self.critical[attacker] = true
            end
          end
          #---------------------------------------------------------------------
        # Defense correction
        if self.guarding?
          self.damage[attacker] /= 2
        end
      end
      # Second on-target hit decision
      eva = 8 * self.agi / attacker.dex + self.eva
      hit = self.damage[attacker] < 0 ? 100 : 100 - eva
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
    end
    # In case of on-target hit
    if hit_result == true
      # State shocking cancellation
      remove_states_shock
      # From HP damage subtraction
      # State change
      @state_changed = false
      states_plus(attacker, attacker.plus_state_set)
      states_minus(attacker, attacker.minus_state_set)

      #states_plus(attacker, plus_state_set)
      #states_minus(attacker, minus_state_set)
    # In case of miss
    else
      # Setting "Miss" to the damage
      self.damage[attacker] = "Miss"
      # Clearing the critical flag
      self.critical[attacker] = false
    end
    # Method end
    return true
  end
 
 
  #--------------------------------------------------------------------------
  # * Find Normal Attack Damage
  #     attacker : battler
  #--------------------------------------------------------------------------
  #The Initial Call To Find Damage
    #@tmpdmg1 = 0
    #find_dmg(battler,@tmpdmg1)

  def find_dmg(attacker, tmpdmg1)
    @tmpdmg1 = tmpdmg1
   
    #Find Damage Amount Dealt By Current Weapon On Hand.
    weapon = $data_weapons[attacker.weapon_id]
   
    if weapon.name.include?("[1d4]")
      @tmpdmg1 = rand(4)
    elsif weapon.name.include?("[1d6]")
      @tmpdmg1 = rand(6)
    elsif weapon.name.include?("[1d8]")
      @tmpdmg1 = rand(8)
    elsif weapon.name.include?("[1d10]")
      @tmpdmg1 = rand(10)
    elsif weapon.name.include?("[1d12]")
      @tmpdmg1 = rand(12)
    elsif weapon.name.include?("[2d4]")
      @tmpdmg1 = rand(4)
      @tmpdmg2 = rand(4)
      @tmpdmg1 += @tmpdmg2
    elsif weapon.name.include?("[2d6]")
      @tmpdmg1 = rand(6)
      @tmpdmg2 = rand(6)
      @tmpdmg1 += @tmpdmg2
    elsif weapon.name.include?("[2d8]")
      @tmpdmg1 = rand(8)
      @tmpdmg2 = rand(8)
      @tmpdmg1 += @tmpdmg2
    elsif weapon.name.include?("[2d10]")
      @tmpdmg1 = rand(10)
      @tmpdmg2 = rand(10)
      @tmpdmg1 += @tmpdmg2
    elsif weapon.name.include?("[2d12]")
      @tmpdmg1 = rand(12)
      @tmpdmg2 = rand(12)
      @tmpdmg1 += @tmpdmg2
    end

    #Find attackers Damage @modifier By Their Current Strength.
    if attacker.str == 17
      @modifier = 1
    elsif attacker.str == 18
      @modifier = 2
    elsif attacker.str == 19
      @modifier = 3
    elsif attacker.str == 20
      @modifier = 4
    end

    #Add Temporary Damage Placeholder With @modifier For Total Damage
    @tmpdmg1 += @modifier

    #Return the Total Damage
    return @tmpdmg1
  end


 
 
 
  #--------------------------------------------------------------------------
  # * Apply Skill Effects
  #     user  : the one using skills (battler)
  #     skill : skill
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # Clearing the critical flag
    self.critical[user] = false
    state_p[user] = []
    state_m[user] = []
    # Effective range of skill with friend of HP 1 or more, your own HP 0,
    # Or when the effective range of skill with the friend of HP 0, your own HP are 1 or more
    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
      # Method end
      return false
    end
    # Clearing the effective flag
    effective = false
    # When common event ID is valid setting the effective flag
    effective |= skill.common_event_id > 0
   
     ####  SKILL FORMULAS   #####================================================
    # Basic Damage Roll #
      b_atk   = user.atk.to_s
      b_dice  = b_atk.chop.chop.to_i
      b_side  = b_atk[-2,2].to_i
    base_dmg  = [b_dice * rand(b_side),1].max
    # Skill Damage Roll #   
      s_atk   = skill.power.to_s
      s_dice  = s_atk.chop.chop.to_i
      s_side  = s_atk[-2,2].to_i
    skill_dmg = s_dice * rand(s_side)
    # Basic Damage Multiplier #
    dmg_mod   = skill.atk_f
    # Stat @modifiers #
    stat_mod =  ((user.str - 10) / 2) * (skill.str_f / 100)
    stat_mod += ((user.dex - 10) / 2) * (skill.dex_f / 100)
    stat_mod += ((user.int - 10) / 2) * (skill.int_f / 100)
    stat_mod += ((user.agi - 10) / 2) * (skill.agi_f / 100)
    # Defenses #
    skill_pdef  = (self.pdef * skill.pdef_f / 100)
    skill_mdef  = (((user.int - 10) / 2) + self.mdef) * (skill.mdef_f / 100)
    dodge = ((self.dex - 10) / 2)
    #===========================================================================
    # Hit Detection#
    hit = skill.hit
    if skill.power > 0 or skill.atk_f > 0
      hit *= user.hit / 100
      skill_roll = rand(20)
      hit_result = (hit * (skill_roll + stat_mod) > skill_pdef + skill_mdef + dodge)
    else
      hit_result = (hit > rand(100))
      stat_mod *=  (-1)
    end
      # Set effective flag if skill is uncertain
    effective |= hit < 100
      # If hit occurs
    if hit_result == true or skill_roll == 19
     
      ### DAMAGE ###------------------------------------------------------------
      self.damage[user] = (skill_dmg + (base_dmg * dmg_mod / 10) + stat_mod).to_i
      #-------------------------------------------------------------------------
     
      # Element correction #
      self.damage[user] *= elements_correct(skill.element_set)
      self.damage[user] /= 100
      # When the mark of the damage is correct
      if self.damage[user] > 0
        # Defense correction
        if self.guarding?
          self.damage[user] /= 2
        end
      end
      # Second on-target hit decision
      eva = 8 * self.agi / user.dex + self.eva
      hit = self.damage[user] < 0 ? 100 : 100 - eva * skill.eva_f / 100
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
      # In case of uncertain skill setting the effective flag
      effective |= hit < 100
    end
    # In case of on-target hit
    if hit_result == true
      # In case of physical attack other than power 0
      if skill.power != 0 and skill.atk_f > 0
        # State shocking cancellation
        remove_states_shock
        # Setting the effective flag
        effective = true
      end
      # The fluctuation decision of HP
      last_hp = [[self.hp - self.damage[user], self.maxhp].min, 0].max     
      # Effective decision
      effective |= self.hp != last_hp
      # State change
      @state_changed = false
      effective |= states_plus(user, skill.plus_state_set)
      effective |= states_minus(user, skill.minus_state_set)
      unless $game_temp.in_battle
        self.damage_effect(user, 1)
      end
      # When power 0 is,
      if skill.power == 0 and skill.atk_f == 0
        # Setting the null line to the damage
        self.damage[user] = ""
        # When there is no change in the state,
        unless @state_changed
          # Setting "Miss" to the damage
          self.damage[user] = "Miss"
        end
      end
    # In case of miss
    else
      # Setting "Miss" to the damage
      self.damage[user] = "Miss"
    end
    # When it is not in the midst of fighting,
    unless $game_temp.in_battle
      # Setting nil to the damage
      self.damage[user] = nil
    end
    # Method end
    return effective
  end
end
 
Thank you, Fenwick, for your support. I don't work, but the college takes most of my time, since when I'm not in class I'm studing. So, I get the same amount of time you have, nly splitted on the seven days of the week, but with no script knowledge whatsoever.
I, too, was a Second Edition player (Dungeon Master), and evolved to the 3rd. I've saw the others new editions, but don't have people (or time) enough to start even a simgle adventure. If you need any help with rules, I can get my AD&D books too.

I'm looking for any step-by-step or "for dummies" Scripting Tutorial for RGSS, the one that I've found is helping me learn the language, but I'm still very newbie. A more guided tutorial like "how to make a Class" would help a lot.

Thanks.

I'm trying to learn the language as best as I can, so please don't consider this request a "I'm lazy and want the other to do the game for me" type of request. I have most of the plot ready for two or three games, but won't start work without the system ready to avoid wasted work.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top