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.

Guillaume777's Multi-Slot script and Blizzard's EQ Skills, a minor problem.

I'm using these 2 scripts together. They seem to be compatible except for one small problem.
I had added Guillaume777's Multi-Slot script simply to give myself an extra equipment slot (called 'Spellbook').

Then using Blizzard's EQ Skills script, I proceeded to try to set one of my Spellbooks to give me...obviously, some spells.

Problem is...it won't give me the skills.
Blizzard's EQ Skills Script notes what needed to be edited for that to work, so I did that. Seemed simple enough.
Unfortunately it won't work.

I'll post the EQ Skills script, since it's rather small, and explain what I tried to edit.



#==============================================================================
# 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
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(87) # EQ skill ID
end
case id[1]
when 34 # armor1 ID
@skill_ids.push(1) # EQ skill ID
@skill_ids.push(25) # EQ skill ID
end
case id[2]
when 35 # armor2 ID
@skill_ids.push(15) # EQ skill ID
end
case id[3]
when 36 # armor3 ID
@skill_ids.push(2) # EQ skill ID
@skill_ids.push(25) # EQ skill ID
end
case id[4] ## add more ids if you are using a custom number of equip parts
when 37 # armor4 ID
@skill_ids.push(10) # EQ skill ID
end
case id[5] ## add more ids if you are using a custom number of equip parts
when 39 # armor5 ID
@skill_ids.push(86) # EQ skill ID
end
end

#===============================================================================

# END_OF_DATABASE
#===============================================================================


end






And the very end, you can see that i had tried to give armor 39. (The Spellbook) a single spell. It didn't work.
In the # Window_EquipRight part. it explains that you need to add an extra string to that section to make it work.
So I proceeded to add
id.push(@actor.armor5_id)
just under
id.push(@actor.armor4_id)

When equipping the item. It causes a crash.
I'm at a loss as to what i'm supposed to do now. So i'm asking for some assistance here.
Thanks in advance.
 
Blizzard's EQ script assumes that the equipment slots are hard-coded/static. Guillaume777's Multi-Slot script uses flexible arrays that can change in accordance to each actor.

Right now, I have this, which replaces... well, you can see...
Code:
class Window_EquipRight

  alias dispose_eq_later dispose
  def dispose
  id = []
  
  # The old weapon id system... still needed. :(  
  id.push(@actor.weapon_id) ## THIS PART HERE NEEDS TO BE EDITED IF A CUSTOM

  # Haven't worked out the extra 'weapon' slots with the 'database' def...
  # This would function, but the database def needs to be reworked.
  #for i in 0...@actor.weapon_slots.size
  #  temp_id = 0
  #  temp_id = $data_weapons[@actor.weapon_ids[i]].id if $data_weapons[@actor.weapon_ids[i]] != nil
  #  id.push(temp_id)
  #end  

  # This part IS getting replaced.......
  #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"

  # Reworked with Guillaume777 armor slot system  
  for i in 0...@actor.armor_slots.size
    temp_id = 0
    temp_id = $data_armors[@actor.armor_ids[i]].id if $data_armors[@actor.armor_ids[i]] != nil
    id.push(temp_id)
  end  
  
  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
Now the real trick is to rewrite the database def at the end so it can accommodate the flexible array systems that hold weapon and armor slots.

But, I got the armor to work. As an example, I made armor #35 ( Iron Gauntlets(5) ) to bring about the 23rd skill. Remember that the (5) in the armor name tells it that it IS in the 5th armor slot... ;)

AND... if anyone is enterprising... feel free to add further to this edit...

I'm hitting the sack... G'night.
 
Ok, I just found another problem related to these 2 scripts.
My accessory slot is effectively broken. (slot 4.)
When I try to equip Armor ID 41. (Elusive Ring) it becomes Armor ID 40. (Mage Initiate's Spellbook(5)).
It does not grant the bonuses the spellbook should. It does not increase stats. And once its equipped (Showing Accessory: Mage Initiate's Spellbook) then unequipped. It becomes unusable.
It remains in the item menu as Mage Initiate's Spellbook. But isn't able to be equipped in either slot 4 or 5.

The same was tested with Armor ID 42 (Focus Ring). When equipped, it becomes Armor ID 39. (Cleric Initiate's Spellbook(5)), has the same problem.

I tried naming both the Elusive Ring and Focus Ring to Elusive Ring(4), and Focus Ring(4). Didn't solve the problem.
 
Oh, dude... that's the item switching system in Guillaume777's system. His demo switches weapons or armors around to 'trick' ya.

Like when you pick up what you think is a Paladin's shield or Armor (which shows AS such in your inventory) and once you equip it... it turns into a CURSED shield or Armor. That's the switching system... and there's a similar system for weapons too.

Look for the SWITCH_EQUIP_ARMORS array at the top of the MODULES section of his system.
 
Hahaha...man.
You have no idea how mad that just made me.
Easy fix for it, but it figures that i'd fall victim to a coincidence like that.
It sets to switch exactly those armor IDs isn't it?
Ha...thanks. Chances are I would've never figured that out.
 
I big thank you to DerVVulfman for informing me of this thread, as I made the same request a while ago both in CreationAsylum and here. I had the same problem with the swapping ID's, but I figured out myself :D.
About these scripts, I got frustrated cause I couldn't merge them and nobody would do it for me, so I gave it up. Bad timing, I guess.

What do you think would be better:
a) Use these two together
b) Use Trickster's Multi-Equip along with Seph's Equipment Skills (of course, we shall see about the new versions of these 2. Seph actually told me they will be compatible)
 
I have no experience with Trickster's Multi-Equip, so I cannot say how to do any merging... but if his and Seph's systems are being designed to be compatible (and it seems to be Seph designing 'em to work together...)...

But it'll also be fairly dependant on you using SDK scripts, or scripts written well with plenty of 'ALIASes' in 'em (not rewriting or replacing anything in other scripts).

But, Trickster's Multi-Equip system may not have all the features that Guillaume777 put in. I've glanced at his v3 script, so if you're wanting 'cursed' weapons... you're gonna need something else to go along with his system. Otherwise, G777 has it built in already. But he's still adding stuff...
 

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