[ACE] Compatibility between Yanfly Equip Engine & Instance item -new error-

Fatalys93

Villager
Member
Joined
May 4, 2014
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
Hi, sorry for my english but i'm italian.
My problem is that I can't use DC2 Weapons with Yanfly Equip Engine because I get this problem:


How can I fix this error? Thank you to everyone :)
 
Last edited by a moderator:

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
562
Reaction score
273
First Language
German
Primarily Uses
Hi,

I only overlooked the two scripts and can't tell for sure if this will solve all issues between them. The error occurs because the equip engine initializes certain additional features for each equip item at the start of the game. The DC2 weapon system on the other hand replaces the database weapons with custom weapon objects that copy the basic properties of the corresponding database weapon, but not the ones the equip engine introduced.

You could try to add this code below the DC2 weapon system to fix this issue:

Code:
class Game_DC2Weapon   alias_method(:scan_base_ILC_takeAdditionalIVs, :scan_base)  def scan_base    base.instance_variables.each do |var|      instance_variable_set(var, base.instance_variable_get(var))    end    scan_base_ILC_takeAdditionalIVs  endend
 

Fatalys93

Villager
Member
Joined
May 4, 2014
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
Thank you for the quick reply :D
It seems to work now, awesome!!
I'm trying to do some tests to make sure that everything goes right! Fingercross XD
 

Fatalys93

Villager
Member
Joined
May 4, 2014
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
Sorry for bump, there is a new error. This time between DC2 Weapons and Instance items .

This is a little video where I explain the problem(s)




CASE 1

If I move DC2 Weapon and the patch (Thank you Another Fen) scripts OVER Instance item's script then:

1)I can open the Weapons Upgrade Scene.
2)I CAN'T Equip nothing. I'm selecting a Weapon --> Katana ... turn back and i've nothing equipped.
CASE 2

If I move DC2 Weapon and the patch scripts BELOW Instance item's script then:

1)I get an error in Window base (?) when I open Weapons Upgrade scene

2)When I open Equip Scene, i can't equip anything and no weapon is shown
As you can see there are also 4 scripts about rarity that are linked to instance items but seems that they don't cause any problem. The problem is in  Instance Item script o DC2 Weapons script :/

Otherwise... If there isn't a way to resolve this issue, I've to remove All the scripts that make Items unique and rarity system :(
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,562
Reaction score
3,832
First Language
English
Instance items only changes how data and inventory management is handled, so here is some code that should work with the new system

class Game_Party alias :dc2_gain_item :gain_item def gain_item(item, amount, include_equip = false) if item.is_a?(RPG::Weapon) item = Game_DC2Weapon.new(item) unless item.is_a?(Game_DC2Weapon) end dc2_gain_item(item, amount, include_equip) end def item_number(item) broken_dc2weapons_gameparty_itemnum(item) endendDC2 changes the way item_number is handled (because the default scripts use class equality comparison, whereas DC2 script simply checks whether it is_a? weapon or not).The order of the scripts should be as follows:

Code:
DC2Instance ItemsMy snippet above
I don't know how the DC2 script works so I'm unable to test whether the script actually works, but I have verified that you are holding DC2 weapons instead of the default weapons.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Hi! I've been working on some character sprites for my pirate themed game.
Still somewhat new to pixel art, so feedback or inputs would be appreciated ^^
TRIVIA: I love Japanese food and culture! I've never been to Japan, but someday I'm going to go to Tokyo and do some touring, including Disneyland Tokyo and DisneySea! And I even prepared myself for earthquake safety.
The virus really doesn't want us to do this GameJam. v .v' Even if we don't meet the deadline because of it, still plan on making it a game we'll release.
Has anybody else noticed in the freebie Sci-fi tilesets that they have a hologram of Cybertron from Transformers?
Halloween is my favorite of the international festive days, always gets me in the mood to draw cute devil things...

Forum statistics

Threads
104,242
Messages
1,004,943
Members
135,763
Latest member
Ashimpure
Top