Fomar Individual Equipment conflict with Common Event in game.

I have some weaponry designed only for use when activated through a skill. Because these weapons are part of a robotic suit. The skill calls up a Common Event meant to either turn on the weapon or turn it off. The common event alone works fine. There are no errors inside of it. There is some conflict however, when I apply Fomars Individual Equipment script..

When I try to use the call/remove weapon skill to remove the weapon, instead of the common event removing the weapon, even though I do get the text "turning off weapon" which is neatly placed in the conditional branch necessary, it doesn't do this. It adds a duplicate instead.

http://cobbtocs.co.uk/wp/?p=148
What is the purpose of using that script.
What is the purpose of using that script.
I was thinking the same thing, because this could just be done with regular use of common events, no need for a script.
My question was more along the lines of "do you need it for anything other than just being able to have instance equips", because Instance Items is more compatible with the default project.


I suggest this as an alternative whenever someone mentions Fomar's individual equips because if all they need is that particular function, there are several scripts that accomplish it.
Yes, It is required for leveling equipment. Weapons level up, but this script is required for the level up script.
Selchar wrote a equip level script for instance items


http://forums.rpgmakerweb.com/index.php?/topic/22013-equipment-level-base-leveling-by-exp/
Alright. Trying this setup now. Got this error on startup:

InstanceItems script line 1398 SyntaxError occurred
unexpected '\n', expecting tCOLON2 or '[' or '.'

The line just says Flag for copyright.
You get that line if you copy the bottom most part of the dropbox page that has nothing to do with the script itself.  Go ahead and delete that line and try again.
Oh I see. Well I did it. Now I get

line 2: NameError occurred.

Uninitialized content Object::dropbox

XD okay. It was teh same thing as the end. Just extra words that needed to be removed. It's going now.

Alright, now the conditional branch wont work.

It allows me to use the skill to call up the cannon. But now it just loops the conditional section "Activating cannon" when I use the skill again to turn off the weapon. So I'm still getting duplicates of the weapon.

Okay. When I set the weapons instance to FALSE the event now works properly.
Show how your event is set up
Alright, well I got two things going on.

First is that the common event only works if I turn everything to False for the Instance script. Here is the picture of my event

Spoiler
[IMG]http://i60.tinypic.com/5w9lkk.jpg[/IMG]

And second is I get a line 54 error undefined method '+; for nil:Nilclass

On the equipment level up script.

This only occurs when I try to give the level tags to weapons. It works on my armor. But it wont work on either my blade or cannon weapons.
That is a known issue: checking whether you have equipped something is not working correctly.

This is an unofficial fix which somewhat replaces the way conditional branch is done.

Spoiler
class Game_Interpreter alias :th_instance_items_command_111 :command_111 def command_111 result = false case @params[0] when 4 actor = $game_actors[@params[1]] if actor case @params[2] when 0 # in party result = ($game_party.members.include?(actor)) when 1 # name result = (actor.name == @params[3]) when 2 # Class result = (actor.class_id == @params[3]) when 3 # Skills result = (actor.skill_learn?($data_skills[@params[3]])) when 4 # Weapons result = (actor.weapons_include?(@params[3])) when 5 # Armors result = (actor.armors_include?(@params[3])) when 6 # States result = (actor.state?(@params[3])) end end end @branch[@indent] = result # none of them passed, so let's check the other conditions th_instance_items_command_111 if !result endendclass Game_Actor def weapons_include?(id) weapons.any? {|obj| obj.template_id == id } end def armors_include?(id) armors.any? {|obj| obj.template_id == id } endend
You should be able to turn instances on with this.
It allows my common event to work but I'm still having some issue with getting the weapon to level. I just got a message saying stack level too deep. Other times the game just freezes at end battle. No message.
Set up a new test project to get familiar with the new weapon leveling script.


It requires weapon instances to be enabled.


Then plug in your other scripts and see if it works.


If it still gives stack level error upload the project.


Note that if you have existing equip level scripts still lying around that may be a cause.
Here is the game file. This is the project in which I tested the script. See the armor section for the tags on teh first item. And you can see the scripts in the editor too. Go and do a test battle if you want to see the crash.

Weapons and Armor in instance are set to True.

http://rapidshare.com/share/33EBB9487F72714C0D9408CE0A537D16

Set up a new test project to get familiar with the new weapon leveling script.
It requires weapon instances to be enabled.

Then plug in your other scripts and see if it works.
If it still gives stack level error upload the project.

Note that if you have existing equip level scripts still lying around that may be a cause.
I've already cleaned up old scripts by removing them and made sure to have weapon instances enabled. I will test on a new project and see what's up.

Okay. I've copied and pasted tags exactly as instructed in script in both weapons area and armor area for the new project. I played and it freezes at end of battle when weapon or armor is supposed to level up. The crash alternates between just a frozen screen and a SystemStack error.

One question, and I think this might be the issue:

Your temporary fix for the known issue of instances. Is that supposed to go in a new script slot? Or do I plug it in somewhere? I have it in a new slot since I wasn't sure of where to put it in the instance script.
----------------

Um...ok, I just figured everything out. I got the curves working. No more crashing or questions. I learned how to properly write out the stuff. Everything is good to go! I just wasn't reading some of it right. But everything is good now. Thanks for your assistance, for giving me the script and all that.

--------------

I may have spotted the error. It appears I cannot change the level curve of different items. When I tried to give the weapons a different exp curve from the default, so that the main armor and removable weapons would level at different rates, the system didn't like that. It made the game freeze up.

Maybe I'm just not understanding the instructions in the script, so to be safe and so that I hopefully learn more about this script and how to properly edit it for my needs, I'll just ask:

<exp curve: x>
<exp curve>
x
</exp curve>

Where x in either notetag is a formula that'll be used to determine an equip's
exp curve.
=end
module TH_Instance
  module Equip
    #Set this to what you want the default exp curve to be.
    Default_Exp_Curve = '(level+1)*4'
What can I do there? Why are there two different exp curve note tags?

<mult level param: x>
Where param is the same as above, and x is a decimal number that will be used
to determine how much said param changes.  Default setting is down below.
So if I have a default mult level bonus of 1.40

and my tag is:

<mult level 'mhp': 1.25> would this be a valid tag?

Can I have more than one parameter in the same tag or must I have different tages for each parameter?
Yes, the instance item fix can be placed in a separate slot. I will integrate that with the main script when I am satisfied with it.

When you wrote 400, I'm assuming you mean 400 per level.

This script assumes 400 literally means you just need 400 exp to level up, and ends up throwing itself into an infinite loop because equips never actually lose exp, so once you hit 400 exp, you always have 400 exp.

If you want it to be 400 per level, you'd write something like

400 * levelAs for why there are two tags, they are used if you have different formula needs.

Code:
<exp curve: x>
is used for one-liner formulas. For example, level * 400

Code:
<exp curve>x</exp curve>
is used for multi-line formulas. Some people might have complex formulas that are easier to write on separate lines.For the parameters, you would write

<mult level mhp: 1.25>This will increase the equip's HP bonus by 25% per level I think.You need to use separate tags for each parameter.

Original thread: https://forums.rpgmakerweb.com/threads/fomar-individual-equipment-conflict-with-common-event-in-game.25127/