Fomar Individual Equipment conflict with Common Event in game.

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
What is the purpose of using that script.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Yes, It is required for leveling equipment. Weapons level up, but this script is required for the level up script.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
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.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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


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.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.

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.
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
----------------

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?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top