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.

[XP] Customizable Weapons by Charlie Lee (v0.5)

Status
Not open for further replies.
Any idea how this occured?

Script 'Customizable Weapons' line 96: NoMethodError occured
undefined method `[]=' for nil:NilClass

And where do I put the piece of code above?
 

omegax

Member

i have a little problem...

i can have everything working except i cant see any letters in my game

everything else works perfectly :P
 
@Admiral_Stalfos19
I posted a demo. Copy the three pages "Tag 1.0" "Enhanced Weapons" and "Scene Enhance" above Main and see if you get this error.

@omegax
You should have posted in the general support forum, not here. It looks that your pc misses some fonts. Generally that's the problem.
 
Charlie Lee":2sltakk3 said:
@Admiral_Stalfos19
I posted a demo. Copy the three pages "Tag 1.0" "Enhanced Weapons" and "Scene Enhance" above Main and see if you get this error.

I've tried to download the demo, but it doesn't want to open properly for some reason.
 
This system change the weapon's ID right? do you think it will work with GubiD's TBS?
Is there a way to this script work whithout messing the ID's?
 

Hyde

Member

omegax":108x3bj0 said:
i have a little problem...

i can have everything working except i cant see any letters in my game

everything else works perfectly :P

You need the legal RMXP for starters...
 
Notes for scripters that want to create patches.

This script creates new weapons in the database, with new IDs of course. I use this technique because every enhanced weapon needs to be unique in order to store different sets of attached enhancements.
Since elements are copied during the duplication process, all the scripts that use element-tagging should work fine.
On the other hand, all the scripts that use a configuration with weapons' IDs written in some arrays cannot work properly without a patch. However the patch is usually simple. Infact, all the enhanced weapons contain a value "ref_id" that is the ID of the database weapon from which the enhanced weapon was generated. When the script checks if the ID of a weapon is included in some array, it needs to check if the weapon is an Enhanced Weapon (by using is_a? for example) and if this is the case, it must verify if ref_id (and not id) is included in that array.

If you need a patch you'd better ask to the author of the script to be patched, because he(she) knows where to insert the changes needed better than me.
 
Charlie Lee":vs2twf7d said:
Notes for scripters that want to create patches.

This script creates new weapons in the database, with new IDs of course. I use this technique because every enhanced weapon needs to be unique in order to store different sets of attached enhancements.
Since elements are copied during the duplication process, all the scripts that use element-tagging should work fine.
On the other hand, all the scripts that use a configuration with weapons' IDs written in some arrays cannot work properly without a patch. However the patch is usually simple. Infact, all the enhanced weapons contain a value "ref_id" that is the ID of the database weapon from which the enhanced weapon was generated. When the script checks if the ID of a weapon is included in some array, it needs to check if the weapon is an Enhanced Weapon (by using is_a? for example) and if this is the case, it must verify if ref_id (and not id) is included in that array.

If you need a patch you'd better ask to the author of the script to be patched, because he(she) knows where to insert the changes needed better than me.

Could this explain why Mog Hunter's Treasure Display stopped working on me?
 
Hi,

I think this question may have been asked earlier; I looked through the posts before but I didn't see a response to it, but...

Is there any way to make the enhancements one-time use items? I'm not looking for Fixed items per se, but I want the slot to be able to be cleared in some way or another, and then the enhancement to disappear afterwards so it cannot be reused.

For a more concrete example, say I had a Sword with three slots. I also have three ATK stones that I want to place in these slots. I place the stones in the sword, and then continue on my merry way. However, eventually I find a PDEF stone and decide that I want that instead of the ATK. I want the PDEF to replace it, but then the ATK stone to disappear.
 
I think that I will include an option in a next release as a variation of fixed enhancements so that they disappear once attached, leaving the slot free. Thanks for stopping by.
 
So more incompatibility errors.  Your scripts aren't very friendly.  Rye.Jp's battle system's ranged won't work with it.  I think it's because of the whole creating a new item for every item...  Is their any way I could take that out because you can't even get new weapons in my game.
 
Charlie Lee":1hs8xm7o said:
Notes for scripters that want to create patches.


On the other hand, all the scripts that use a configuration with weapons' IDs written in some arrays cannot work properly without a patch. However the patch is usually simple. Infact, all the enhanced weapons contain a value "ref_id" that is the ID of the database weapon from which the enhanced weapon was generated. When the script checks if the ID of a weapon is included in some array, it needs to check if the weapon is an Enhanced Weapon (by using is_a? for example) and if this is the case, it must verify if ref_id (and not id) is included in that array.

In other words how can I do that?

EDIT:Opps, sorry for double post I thought I was editing my old one>_<

EDIT 2: Woohoo! I got it on my own.  I actually just switched the system over to a element tagged system instead of a array.  So if anybody is using Rye.jp's side view battle system you can get the ranged to work by changing this;
Code:
  # Because the one below is one example to the last
  # Please make it originally.
  
  class Weapon
    #--------------------------------------------------------------------------
    # Weapon sctions. Set what weapons are a stand still weapon.
    #--------------------------------------------------------------------------
    def battle_actions
      case @id
      when 21 # Ranged Weapons
        return BattleActions::Actions["One step advancement Attack"]
      end 
      return BattleActions::Actions["Normal Attack"] # default
    end
  end
  class Skill

to this;

Code:
  # Because the one below is one example to the last
  # Please make it originally.
  
  ranged = "Ranged"
  
  $data_system = load_data("Data/System.rxdata")
  $r_element_id = $data_system.elements.index(ranged)

  class Weapon
    #--------------------------------------------------------------------------
    # Weapon sctions. Set what weapons are a stand still weapon.
    #--------------------------------------------------------------------------
    def battle_actions
      if $data_weapons[id].element_set.include?($r_element_id)
        return BattleActions::Actions["One step advancement Attack"]
      end 
      return BattleActions::Actions["Normal Attack"] # default
    end
  end

Hope that helps out some people.  A lot of people couldn't use this because of the whole changing of id thing.  Well it's easier to change the other script to use element tags instead.
 
Status
Not open for further replies.

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