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.

EQ Skills (requested)

EQ Skills
Version: 2.0


As I have officially left this forums, I will not reply here anymore. If you have question about this script, please post it here.

[EDIT]I won´t keep this post up date anymore.[/EDIT]

Introduction

Originally this script is a derivate from my script called "Soul Rage System" aka "IP skills".

Features

  • Characters learn skills, when they equip items and forget them after they unequip them
  • Set up your database easily
  • Full instructions inside the first comment
v2.0
  • Fixed bug, that appeared, when more equipment parts had the same skill
  • New multi-skill support!
Screenshots

N/A for this sort of script

Demo

N/A

Script

Just make a new script above main and paste this code into it.
Code:
#==============================================================================
# EQ Skills by Blizzard
# Version 2.0
# Date: 28.05.2006
# v2.0 Date: 13.06.2006
# 
# Recent upgrades:
# 
# v2.0:
# - Fixed bug, that appeared, when more equipment parts had the same skill
# - New multi-skill support
# 
# 
# Compatibility:
# 
# 99% chance of full compatibility with SDK, not tested altough. WILL cause
# incompatibility with custom equipment scripts but there are instructions how
# to configure the script. Please note, that this script depends on the layout
# of your Equip Screen and needs to be put UNDER a CMS script if you are using
# one. Also there needs to be something changed if you are using another script,
# that uses dummy elements. Add your dummy element IDs to the triple commented
# array (###).
# 
# 
# Instructions:
# 
# - Configuration:
# Press CRTL+SHIFT+F and type into the window: FIND_THE_DATABASE
# You can jump now to the database directly. There are more instructions.
# Also change $eq_element = XXX, where XXX is the ID number of the dummy
# element, that determines, which skill is bound to the equipment. Be sure to
# give that element
# 
# - Merge with a Custom Equipment System:
# The lines, that need to be edited are double commented with ##. If you are no 
# at least a bit of experienced scripter, it may be better to ask somebody else
# to perform the edit for you. Please note, that the person, who is going to
# edit this script needs the custom equipment script for reference.
# 
# 
# NOTE:
# DO NOT USE EQ SKILLS AS NORMAL SKILLS! THE SYSTEM WORKS WITH TEMPORARY
# LEARNING AND FORGETTING THE EQ SKILL. IF YOU LET YOUR CHARACTER LEARN AN EQ
# SKILL BY NORMAL MEANS, HE WILL FORGET IT AFTER HE UNEQUIPS THE APPROPRIATE
# EQUIPMENT!
# 
# 
# If you find any bugs, please report them here:
# http://www.chaosproject.co.nr/index.php?showtopic=157
# or send me an e-mail:
# boris_blizzard@yahoo.de
# 
#==============================================================================

$eq_element = 17 # YOUR EQ ELEMENT ID

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  def elements_correct(element_set)
    dummy_elements = [$eq_element] ### ADD YOUR DUMMY ELEMENT IDS/MACROS HERE
                                   ### AND SEPARATE THEM WITH KOMMAS
    elements = element_set.clone
    if elements == []
      return 100
    end
    multiplier = 0
    size = 0
    for i in elements
      next if dummy_elements.include?(i)
      multiplier += self.element_rate(i)
      size += 1
    end
    if size == 0
      return 100
    end
    return multiplier/size
  end
  
end

#==============================================================================
# Window_EquipRight
#==============================================================================

class Window_EquipRight
      
  alias dispose_eq_later dispose
  def dispose
    id = []
    id.push(@actor.weapon_id) ## THIS PART HERE NEEDS TO BE EDITED IF A CUSTOM
    id.push(@actor.armor1_id) ## NUMBER OF EQUIPMENT PART IS USED. IN THAT CASE
    id.push(@actor.armor2_id) ## IT IS ENOUGH TO ADD MORE OF THESE COMMANDS
    id.push(@actor.armor3_id) ## HERE. ALSO BE SURE TO USE THE CORRECT NAMES
    id.push(@actor.armor4_id) ## FOR THE IDS e.g. "armor3_id"
    database(id)
    for i in 0...$data_skills.size
      skill = $data_skills[i]
      unless skill == nil
        if skill.element_set.include?($eq_element)
          @actor.forget_skill(skill.id)
        end
      end
    end
    temp = []
    for i in @skill_ids
      @actor.learn_skill(i)
    end
    dispose_eq_later
  end
  
#===============================================================================
#
# FIND_THE_DATABASE
#
# This is your equipment database. To add one or more new EQ skills to a weapon
# is very simple. Add another "when"-branch in the script snipplet below
# (they have comments next to it). Configure it like this template:
# 
# when "weapon ID"
#   @skill_ids.push(EQ_SKILL_ID1)
#   @skill_ids.push(EQ_SKILL_ID2)
# 
# The same works for armors:
# 
# when "armor_ID"
#   @skill_ids.push(EQ_SKILL_ID1)
#   @skill_ids.push(EQ_SKILL_ID2)
# 
# Please note, that you need to configure this for every equipment part
# separately. That means you need to set it seperately for shields, armors,
# helmets and accessories. This also goes for custom equipment additions.
# 
# The lines are commented below so you should have no problems with the script.
# 
#===============================================================================

  def database(id)
    @skill_ids = []
    case id[0]
      when 6 # weapon ID
        @skill_ids.push(10) # EQ skill ID
        @skill_ids.push(11) # EQ skill ID
      when 10 # weapon ID
        @skill_ids.push(8) # EQ skill ID
        @skill_ids.push(12) # EQ skill ID
      end
    case id[1]
      when 1 # armor1 ID
        @skill_ids.push(1) # EQ skill ID
        @skill_ids.push(25) # EQ skill ID
      when 19 # armor1 ID
        @skill_ids.push(25) # EQ skill ID
      end
    case id[2]
      when 5 # armor2 ID
        @skill_ids.push(15) # EQ skill ID
      when 18 # armor2 ID
        @skill_ids.push(27) # EQ skill ID
      end
    case id[3]
      when 13 # armor3 ID
        @skill_ids.push(2) # EQ skill ID
        @skill_ids.push(25) # EQ skill ID
      when 3 # armor3 ID
        @skill_ids.push(7) # EQ skill ID
        @skill_ids.push(4) # EQ skill ID
    end
    case id[4] ## add more ids if you are using a custom number of equip parts
      when 29 # armor4 ID
        @skill_ids.push(10) # EQ skill ID
      when 8 # armor4 ID
        @skill_ids.push(32) # EQ skill ID
        @skill_ids.push(29) # EQ skill ID
      end
  end
  
#===============================================================================
# END_OF_DATABASE
#===============================================================================
    
end
Instructions

Inside the script in the first comment.

Compatibility

99% chance of full compatibility with SDK, not tested altough. WILL cause incompatibility with custom equipment scripts but there are instructions how to configure the script. Please note, that this script depends on the layout of your Equip Screen and needs to be put UNDER a CMS script if you are using one. Also there needs to be something changed if you are using another script, that uses dummy elements. Add your dummy element IDs to the triple commented array (###).

Credits and Thanks

  • made by Blizzard
  • derivate from "Soul Rage System" originally made by Blizzard
  • requested by JackHorrorshow
  • multi-skill support requested by Clive
Author's Notes

Thank you for using my EQ Skills and crediting me!
Regards, Blizzard alias Boris Mikić

That´s it! N-Joy! =D
 

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