Jump to content

Recommended Posts

I really like this script but I have a pretty bad problem. My game starts with no party members, and having no party members gives me the following error:

Script 'FA Patch' line 107: NoMethodError occurred.

undefined method 'weapons' for nil:NilClass

 

Also, is there a way to make the Hookshot know when it hits walls and come back? I tried putting events all over the walls but it lags the game. Maybe using region IDs?

Share this post


Link to post
Share on other sites

I really like this script but I have a pretty bad problem. My game starts with no party members, and having no party members gives me the following error:

Script 'FA Patch' line 107: NoMethodError occurred.

undefined method 'weapons' for nil:NilClass

 

Also, is there a way to make the Hookshot know when it hits walls and come back? I tried putting events all over the walls but it lags the game. Maybe using region IDs?

 

 

Make your game start with 1 party member, then go to your database, under systems tab turn 'Transparency ON' on. When the game launches, it'll look like you have no party, but you really will, then you can just change transparency though an event when needed.

 

That should solve the issue, I also imagine a lot of other scripts might have problems with no party members.

 

Edit: No idea on the hookshot, though :(

Edited by halrawk

Share this post


Link to post
Share on other sites

 

I really like this script but I have a pretty bad problem. My game starts with no party members, and having no party members gives me the following error:

Script 'FA Patch' line 107: NoMethodError occurred.

undefined method 'weapons' for nil:NilClass

 

Also, is there a way to make the Hookshot know when it hits walls and come back? I tried putting events all over the walls but it lags the game. Maybe using region IDs?

 

 

Make your game start with 1 party member, then go to your database, under systems tab turn 'Transparency ON' on. When the game launches, it'll look like you have no party, but you really will, then you can just change transparency though an event when needed.

 

That should solve the issue, I also imagine a lot of other scripts might have problems with no party members.

 

Edit: No idea on the hookshot, though :(

 

Thanks for the answer, but that solution is a placeholder at best. There should be a more solid fix involving the script itself. I didn't have problems until I added the patch that adds the tools HUD and all that. I'll wait for the OP to read and see if he can come up with a solution.

Share this post


Link to post
Share on other sites

After around 20 minutes of playing around with events, I found a pretty cool way to make the hookshot know when it hits a wall and has to come back, it involves an event with "Hook start" that makes a sound and is always in front of the character, moves away from him until it touches a wall. If anyone is interested I can post it, but I still would like a solution to the ''no party'' error.

Share this post


Link to post
Share on other sites

Is their any way to add tools to the script?

 

Like i want to add items to the tool menu that activate common events.

 

Also,the too menu that comes with the add-on interrupts any text being displayed and forces it to start from the beginning.

 

Anyway to fix this.

Edited by WinglessRM

Share this post


Link to post
Share on other sites

There is a way, yes.

I managed to combine 2 dungeon tools script, this one and the one from CasperGames (CSCA).

So, I got all of the tools from this system, plus a boomerang and a reset tool.

Pretty cool stuff you can do with these combined. :)

 

Also added all items into one tool menu.

 

As for adding completely new items, that can be done too.

I got to go now, but when I come back, I will try to explain how can that be done.

 

Edit:

Okay, got back now.

 

So, here is what you need to do for adding new items to the tool menu, and activating common events when the player selects them.

 

First, at the main script, at the configuration part (meaning anywhere between the 'module FalInt' and the first 'end' line), make a new setting and name it whatever you want. In my example, I will name it "CommonEvTest". This setting must get an equip ID for the tool. So at the end, the new setting will look like this:

CommonEvTest = 15
This is all you have to do in the main script.

 

Now head over to the tool menu script. Here, in the 'Interactive_Weapons' settings, make a new one like this:

  Interactive_Weapons = { 
  
  HweaponId     => [  ],  # HookShot
  FweaponId     => [  ],  # Flame
  BweaponId     => [  ],  # Bomb
  BAweaponId    => [  ],  # Barrel
  BladeWeaponId => [  ],  # Blade
  ArrowWeaponId => [  ],  # Arrow
  CommonEvTest  => [  ],  # New! - Common Event test
  
  } 
After this, search for this line in the script:

Sound.play_equip
Just above this line, insert these lines:

      if @tool_window.item == $data_armors[FalInt::CommonEvTest]
        $game_temp.reserve_common_event(ID) # Common Event test
      end
Replace '$data_armors' with $data_weapons' if you use weapons for your tools.

Replace 'ID' with the ID of the common event you want to trigger.

 

By doing this, every time the player selects that tool, the specified common event will trigger.

 

You can add as many new items as you want by simply adding new settings to the 2 scripts and add more if/elsif conditions in the common event trigger part.

 

Note that doing this will only run the common event once when the player selects the new tool. It won't trigger the common event when the player press the 'use tool button'.

 

But we can get around that with another method.

 

Instead of adding a direct common event trigger at the if/elsif condition, we can add a switch trigger like this:

      if @tool_window.item == $data_armors[FalInt::CommonEvTest]
        $game_switches[ID] = true # switch on
      else
        $game_switches[ID] = false # switch off
      end
Replace '$data_armors' with '$data_weapons' if you are using weapons for your tools.

Replace 'ID' with the ID of the switch you want to trigger. Both IDs must be the same!

 

This will activate a switch if the new tool is selected and deactivate it when another tool is selected.

 

Now we got a switch trigger on selecting a new tool... But that alone won't make it a "real tool", right?

 

Time to make your common event for the tool. Select the switch you choose above for the activation of the common event and make it a parallel process.

The first command in the common event must be a conditional branch command.

That condition check must check if a button is pressed. Do not use the default event command to check that, that one is not reliable.

Instead use a script method in the conditional check and type the following into the little script box:

Input.trigger?(:button)
Replace ':button' with the button needed to use a regular tool (the one you set up with the 'ToolActionKey' setting in the main script).

We don't need the 'else' part of the check, so make sure to un-check the 'Set handling when conditions do not apply' option in your conditional branch.

Now, inside of this conditional branch command, make whatever you want to happen when the player press the tool trigger button when the new tool is selected.

 

It is up to your eventing knowledge what can you achieve with this.

 

Hope I made every point clear, but if you got any questions, just ask away! :)

 

Ohh and for the tool menu anomaly when a text is displayed, you can disable the tool menu when there is a text displayed on the screen by doing the following thing:

 

Search for this line in the tool menu script:

if Input.trigger?(IntTool::ToolSelectorKey)
Just below this line add this:

return if $game_message.busy? || $game_message.visible
This will disable the tool menu calling if a message is shown. Edited by Sixth

Share this post


Link to post
Share on other sites
*Solution*

 

You are a genius sir.

 

Ty for your help!

 

Edit: If possible,could you go into more detail on how to make the tool activate upon the button press and the whole switch/conditional branch process?

 

I would appreciate just a bit of clarification on that.

 

Another Edit: Lets say i want to make an item that allows the player to swim in the water.

 

How it would fuction is the player stands at the edge of the water and when prompted by an action button,a choice is given as to whether they would like to swim or not.

 

"would you like to swim?" etc.

 

If they want to walk back on land,they would need to again press na action button and a choice to get out oft he water is presented to them.

 

If the answer is yes,the player changes to a swimming graphic and can move on water tiles.

 

Do you have any idea as to how i would go about setting this up?

Edited by WinglessRM

Share this post


Link to post
Share on other sites

Sorry for the late reply!

 

Well, this involves a lot of complex eventing. It also needs some scripting in the event itself.

 

Here is what you need to make:

 

Go into the tileset database and mark your water tiles with a terrain ID. Use whatever terrain you want. I used terrain ID 1 in the example.

 

The first common event, which is the core for our swimming event:

http://www.mediafire.com/view/h01a8dpuehetpvd/swimming5.PNG

So, parallel process and use the switch you used in the tool menu script I showed you.

 

The second common event, which controls what happens in the water:

http://www.mediafire.com/view/fg827v094kb89q8/swimming2.PNG

Parallel process too, use the switch used in the previous common event.

 

These common events would do the following:

 

When the player is outside the water, and presses the button trigger, and chooses "yes", he would go into the water. I left out the graphic change and such stuffs, because that is easy enough to event there. Make it change the graphic before he goes in, you can even fade out the screen while the player "changes outfits", and fade it in when he is inside the water, etc.

 

And when the player is inside the water, he can press the button again to get out of the water.

 

In both cases, the event would only trigger if the player looks in the direction of the water/land.

 

As you can see, I used many script calls in it.

Here is what each do:

- Input.trigger?(FalInt::ToolActionKey):

This will be out button trigger. It reads the data for the required button from the Tool script itself.

You can however change the button press needed to whatever you want (like :C, :A, :L, etc., but it needs to be a valid button press).

- @x = $game_map.round_x_with_direction($game_player.x, $game_player.direction)

- @y = $game_map.round_y_with_direction($game_player.y, $game_player.direction)

Saves the co-ordinates of the player depending on where he faces. This will be the co-ordinate in front of the player regardless where he faces.

- $game_map.terrain_tag(@x,@y) == x

This checks the terrain ID of the above mentioned co-ordinates on the map.

- $game_player.terrain_tag == x

This checks the terrain tag of the player's current position.

 

"!=" means that the check will return true if the conditions specified do not match.

 

So, by combining all this, we made an almost perfect swimming event.

It has a downside thou...

If the player faces away from a coast but stands next to it in the water, and presses the direction towards the coast, he can get out of the water.

Eliminating this would be a big chunk of code in the event itself, which makes me believe that maybe you would be better off with a real script for this as eventing this to be fully functional is just not something an event box should contain. It would look messy, confusing and there is no guarantee that it would work flawlessly.

This event would also slow down movement and would make it look like the player moves one tile at a moment, stops, moves one tile again, stops, and so on.

 

But if you are not bothered by that little flaw, go ahead and use this.

There is a script from Tsukihime called "Water Walk" which could help you.

Or even better, you could use a custom vehicle script, and make a vehicle with your swimming graphic, and you got yourself a "swimming tool". Try CSCA: Custom Vehicles script or something similar.

Or you could try your luck in the event support section of the forum, maybe someone can make this for you with eventing without any flaws.

Share this post


Link to post
Share on other sites

On the off chance this is still being updated or can be fixed, I found a pretty nasty bug.
When using the hook shot on an object defined as both being able to be grabbed by the hook shot and being able to be pushed, and walk towards it, you'll be locked in place.
I tested this in the demo itself after seeing happen in my game, and it does infact still happen.
Unlike the issue I was having with walking around in holes that was caused by a script conflict rather than being an actual bug..

And since I'm here, is there any way I can make it so that objects only able to be grabbed by the hookshot can trigger switches?

Share this post


Link to post
Share on other sites

I'm having a small compatibility problem with Tsukihime's Instance Items. 

The push/pick up/fall/jump/vision range work well, but the tools don't work

when I press the action key unless I erase Instance Items. 

 

I'd like to keep instance items as it's required by several other scripts to work,

like item charges&recharge, and item durabilty&repair.

All other alternatives I've found also require Hime's script or a similar script of their own.

 

Has anyone had the same problem? Did you find a solution?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×