Jump to content
Vlue

Weapon/Armor Randomization

Recommended Posts

Weapon/Armor Randomization v1.0
by Vlue of Daimonious Tails

Introduction
I'm sure there's a few of these out there already, but I do so enjoy making my own stuff. So...
Allow the stats of an item to be randomized, yay! Also can tack on random prefixes and suffixes. Oooh, fancy.
Really though, this script allows you to add items that have random stats based on rules set up in their note boxes.
In addition you can create prefixes and suffixes to add to weapons which can add stats and even features!
Deadly Bow of Doom, here we go.

How to Use
Two simple script calls: add_armor(id, value) and add_weapon(id, value) and gets more complicated when dealing with features!
Full instructions are in the script for easy(?) reference. (90 lines long, good luck!)

Script
You can get it here, as usual: http://pastebin.com/6Je40VFn
 
Demo
Need a bit more demonstration? Take a look at this demo..nstration...
Just click here: Here

FAQ
To be announced:

Credit and Thanks
- By V.M. of D.T.
- Free to use in any project with credit given Edited by Vlue

Share this post


Link to post
Share on other sites

Price variances!? Yah, that's a good idea. And easy, so easy in fact that it's already done. Though that statement would mean more if I wasn't too lazy to do it yesterday.

Share this post


Link to post
Share on other sites

This is exactly what I've been looking for, and I didn't even realize I was looking for it! :D (Don't you love it when you come across a script like that. Lol!)

Random price generation is a great idea and would love to see that with the script, also, would it be possible to get it to have random names depending on the stats? (Example #1 Item Name: "Sword". Attack = 10. Generated Attack = 5. Sword is now called "Rusty Sword" because the attack power is less.

Example #2 Item Name: "Axe". Attack = 20. Generated Attack = 30. Axe is now called "Sharp Axe" because the attack power is more.)

I hope that makes sense. If that is too complicated or not even possible to script I understand. And if it is, would this work instead?

 

Have a list of multipul names "Iron", "Holy", "Dreaded", "of Diamond", "of Monsters" "of Strength" and when it generates the value of the item, it will also place the random name either before or after the original items name.

Examples: Original name of item is "Boots". But the item "Boots" could appear with these different names, randomly based on what the creator put in the notes section. "Iron Boots", "Holy Boots", or "Dreaded Boots". Or "Boots of Diamond", "Boots of Monsters" or "Boots of Strength."

Just an idea. Not sure if that would be annoying to script or if it's even possible. Just a thought the make this script even more awesome than it already is!

Either way, thanks for this amazing script, I will definitely be using this in my project! Credit will be given for sure!

 

 

edit:^^^Never mind what I said up there, after looking through the script it looks like you can already apply differing names to weapons and armor^^^

Edited by KevinFrost

Share this post


Link to post
Share on other sites

Wow, this implement a weapon system very similar to Disgaea series... It's pretty interesting.. Surely i will try this out. Awesome script (Y). I'll be right back and post my guess about the "In game" result.

 

Edit:

 

Pretty good as i expected. Keep up the good work. 

Edited by OBubblesO

Share this post


Link to post
Share on other sites

Does this work with drops from enemies?

No, but sound thinking, I'll get that in when I can.

 

 

is it just me getting the suffix's and prefix's flipped in the name?

Oops, nope. That's not just you, I was backwards. Pastebin has been updated.

Share this post


Link to post
Share on other sites

edit: removed since Vlue added it to his script.

Great script.

 

any chance for more than 1 pre/suf-fix or a way so we can use $data_items/armors/weapons.size-1 and not have duplicate

Edited by Xypher

Share this post


Link to post
Share on other sites

Aww, guess I should've checked here before I added that in! Nicely done too~ 

Could you put it in a spoiler at least though? It's a bit big!

Share this post


Link to post
Share on other sites

edit: removed since Vlue added it to his script.

Great script.

 

any chance for more than 1 pre/suf-fix or a way so we can use $data_items/armors/weapons.size-1 and not have duplicate

 

I'mma look into it~

 

 

Can you post a demo of this because I am getting a little confused?

 

Sure, I'll whip one up.

Share this post


Link to post
Share on other sites

Whoop whoop. Update main post to show a link to a demo containing this script and some viewable examples, as well as updated the script so items with the same name, price, and stats, will stack. Which means less sizeable sizes of size arrays!

Share this post


Link to post
Share on other sites

You can do that! Mainly because I just made it so. Not like that though, you can set the color in the affix list like...

:color => Color.new(red,green,blue)

Where r, g, b is a value from 0-255, the usual.

 

So grab the new version of the script and have fun!

Share this post


Link to post
Share on other sites

The script has been updated to include... randomness from shop buys if allowed, a pool based rarity affix choice option as opposed to the generic first come first serve model, arbitrary rarity data for weapons and armors, and being able to set the animation id for certain affixes! Yay!

Share this post


Link to post
Share on other sites

I think I need some assistance in using this script.

I just got an example code in this section of script:

 

AFFIXES = { 1 => { :name => "Superior ",
                   :color => Color.new(255,255,255),
                   :features => [[21, 2, 1.5]],
                   :SpriceP => 50,},
            2 => { :name => " of Life",
                   :color => Color.new(25,25,255),
                   :features => [[21, 0, 1.1]],
                   :SpriceP => 50,}
                   
          }

Share this post


Link to post
Share on other sites

They work fine to me, Superior adds attack and of Life adds hp, and the of Life affix adds the color, however you don't need the color tag on superior or else it cancels out of Life. You can avoid that by using the rarity tag though.

 

Do you have the notetags set up on the items correctly, and are adding them via the script call commands?

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.

×