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.
Ha, I just read someone say this is the best "Customize Weapons" script ever... No its not...
This is easily one of the best scripts, period. This is such a usefull script that is more than just a fancy visual sparkle like some out there. This is truly a work of art and we can all tell that you have a passion for this one, Charlie Lee. Very nice  work. I got some questions/ideas for you. Figure I can help you out a little, for helping all of us out so much.

1- If I were to sell a "small sword" for 10 GP, should I not be able to sell a "small sword + Atk Stone" for 20 GP. Catch my drift? Anyway you could boost selling prices for items that are "enhanced". Say, 20% the original price for every Slot filled up. I know it may seem unfair to sell a sword with 10 Atk bonus on it for 10 GP more, or a sword with 250 Atk on it for still 10 GP more. Maybe you could figure this out, if your intrested in the whole "Item Worth" idea.

2. I'm sure your allready thinking about this, and I think you were refering to it on your "to do" list.  Better item stats descriptions. Instead of just the ATK, PDEF, MDEF... ect. showing up, you should add the elements/states as well.

-I'm going to tinker around in the script to see if I can come up with anything, but my skills are far inferior to yours so, I'm only hoping that you take the ideas into consideration.

Either way, keep up the awsome work man. And thank you, from everyone.
-Polidoro

Ps. Congrats on being at Rmxp.org for one year*
 
This is a nice script, but I wish it was compatible with Mr. Mo's SBABS. When used with that ABS, it messes up the projectile weapons. Perhaps an SDK version would make it more compatible?
 
Hey Zata,
  This probally wont help but its worth a shot. Make sure this script is After everything else, but before Main of course. If it is alleady, try putting before the SBABS.
-Polidoro
 
Nope, didn't work... :-/

Thanks for trying though, Joepolidoro. I have heard that what you said solves other compatability issues with other scripts. I'll probobly have to find a different one, unless Charlie Lee comes out with an SDK version.
 
Hi people.
I don't know if an SDK version can solve all the problems, actually i'm sure it wouldn't. I'll work on the multi-slot patch asap but probably i won't release an SDK version...
 
Zetaraptor03":2yvbmnry said:
This is a nice script, but I wish it was compatible with Mr. Mo's SBABS. When used with that ABS, it messes up the projectile weapons. Perhaps an SDK version would make it more compatible?

I know where this problem is, I encountered it in the Zenith Tactical Battle System. Essentially, because the script assigns a new entry in the database for the weapon when it is customized, it breaks the script array association in the other script. What I did to fix the ZTBS was to use an element tag to read the weapon attributes. Since elements carry over when you customize the weapon, it keeps the connection in the script.
At any rate, the fix needs to be made in the other script rather than this one. It seems pretty involved, though, as you would need to change how the ABS script calls ranged weapons. It looks for weapon ID by default, you need to change that to look for a tag element.
 
As complicated as that sounded, I know what you mean. That's what I was afraid of...

I'll try to modify Mr. Mo's SBABS, but if I can't then I'll have to find a new weapon enhancement script.
 
Just added a demo with a patch for the multi slot script. I haven't tested it thoroughly but so far it seems to work. If you find bugs, report them.
 
Charlie Lee":1rdji1cr said:
Just added a demo with a patch for the multi slot script. I haven't tested it thoroughly but so far it seems to work. If you find bugs, report them.

It works perfectly fine on this end with SDK 2.3 and G777's  script.  (I'm not a very thorough tester, though) Thank you for this fine script, I'll be using it.
 
Oh thank god!  I can finally take those last steps to finishing my demo.  Now all I need is your skills script to work with multi-equip.  Let me give it a go then I'll let you know if I can find any bugs/errors.
 
For all those people who ask for patches for the various ABS out there. All the Enhanced weapons have an attribute that links them to the original weapon. It's "ref_id". Therefore all the systems that base their logic on IDs of weapons can check weapon.ref_id.
Example
Code:
if (weapon.ref_id is_a?(Enhanced_Weapon)) and (ARRAY_OF_RANGED_WEAPONS.include?(weapon.ref_id ))
  do something
end
 
Exactly where do you store the weapons after they are turned into Enhanced Weapons? I assumed that you put them back in $data_weapons. Every time I try to access a weapon from there and call its ref_id variable, it throws me an error that the weapon doesn't have a ref_id and thinks it is a normal RPG::Weapon.

Maybe I'm calling ref_id wrong?  $data_weapons[@actor.weapon_id].ref_id

Don't worry about the database, I went in there and made all of my weapons into Enhanced Weapons.
I put this script above main and the SBABS scripts and below the other regular scripts.
 
No, weapons are not turned into enhanced weapons. A copy is created, that belongs to that class.

Look at this small piece of code:
Code:
# CHARLIE: add new weapons which cannot be part of the weapon set
        if i > $game_party.max_database_weapon_id
          if $game_party.weapon_number(i) > 0 and weapon_set.include?($data_weapons[i].ref_id)
            @data.push($data_weapons[i])
          end
        end
i is the ID of a weapon and the first condition checks if it is a weapon in the original database or it's been added after. Note that weapons in the original database are not Enhanced_Weapon and they don't have any ref_id. All created weapons are stored in the data_weapons array as well, starting from the ID $game_party.max_database_weapon_id+1 onwards. Only these belong to the Enhanced_Weapon class ok? So you can use
Code:
$data_weapons[i].ref_id
Hope this helps.
 
So you preserved the order of the array, but you changed the values in their id variables......

Perhaps I could say @actor.weapon_id - ($game_party.max_database_weapon_id / 2) ???

I know what you mean, but it will take me awhile to figure out how to implement. I'll tell you how it goes tomorrow.
 
Nope. It wasn't the IDs that were the problem. I couldn't fix it that way. There's something else that was changed and I have no idea what it is. I'm sorry, but I think I'm going to give up on this script. Maybe a more compatible one will be made someday.

Still a great script, Charlie Lee.

EDIT: Actually, the IDs are the problem. I'm close to figuring it out....

EDIT: Well, I figured it out. I learned a lot more about the two scripts in the process. Thanks for your help Charlie Lee.
 
I'm glad you made it. Would you post a patch or pm me one? I can put it in the first post under compatibility issues or something similar, with credit given of course (and responsibility as well).
 
I love you! :D I've been looking for something like this for ages and this is just perfect! It's awesome and works great :)

A little suggestion too, could you possibly add a 'success rate' function?
For example, in my game, 3 slots for 1 item would be the max. And if you enhance the first slot, its 75% chance that you succeed (if it fails, the item either gets destroyed (not really sure about this tho) or nothing just happens, you only lose the enhancement item.) Upgrading the 2nd slot would be 50% success rate, and 3rd slot with 25% success rate. It would be even better if the success rates would be customizable too.
Hm as I said I'm not really sure if the item should be destroyed or not... If it would, then preferably the rate for that is really tiny, like 3% or 5% maybe? Depending on which slot you try to upgrade...

However you could tween/change it though (so it would be good for everyone, it turned out more like a personal request, hehe) or just make a simple addition that the success rate isn't 100%, it's kinda boring that way in my opinion. Anyway I really hope you figure something out :)

Good luck and I hope to see more updates on this, I'll keep checking it once in a while :)
 
Success rate would be an alright idea. From another point of view I like it with 100% all the time. But hell, thats just me. If you do make an update Charlie-Lee I can always keep everything at 100  ;)  But what i was thinking was a success rate for the weapon hit, itself. The more powerfully it is the less chance it has of hitting the target. You could also add enhancements that changes that rate. One item could bring the rate up to a 100% and another could add Fire element, but lower hit% down 25%.
  Just a thought.
-Polidoro
Ps. Great job.
 
I hate to be a pain, Charlie Lee, but I just learned that I only was able to fix the weapons of the main player. The weapons held by other party members don't work. When I call them by their ref_id, I get an error saying that they are not enhanced weapons. Any ideas?
 
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