Weapon/Armor Randomization

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
D: is this a script in which I can use a script call to increase a weapon's EX Params? Because if so BOOYAH.
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
You definitely could in a round-about sort of way with an affix that adds an EX-parameter increasing feature.


You could also do just a script call like:


$data_weapons[id].features.push(RPG::BaseItem::Features.new(22, exparam_id, float_value))


Replacing id with the id number of the weapon, exparam_id with the id of the EX-parameter, and float value with the percentage (1.0 for 100%)


Would work without this script, but won't save over between save files.
 

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
Would work without this script, but won't save over between save files.
As in if I used that script call, saved the game and loaded it wouldn't stick? I may just use this script then :)
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Right, though it doesn't reeaaallllyyy have to be this script, it could be any script that saves items in save files, but why look for another when you're already here.
 

Misaki

Pikalyze
Veteran
Joined
Apr 21, 2013
Messages
156
Reaction score
26
First Language
English
Primarily Uses
RMMV
Now people will be crawling the dungeons for hours looking for stuff now :3.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
pretty nice... 

btw, after looking at the script I was thinking about this scenario:

I call add_weapon(id,2)

then it means that I'll have 2 of the weapons right? and they will stack up on my inventory right?

then if I use

add_weapon(id,1)

add_weapon(id,1)

then I'd most probably get two different items, each with their own space in the inventory right?

but there's is a chance that they'll have the same stats right? maybe little but there is... in case it happens, then it might look weird since identical items added using a non-1 value on the amount will stack, but identical items created using two calls will not...

though of course, this can be prevented if the one who will use the script just use an amount of 1 for all his calls, that way, all weapons and armors created here won't stack...
btw, since it adds new entries to the database (of the saved file), it increases the file size output for saved files right?
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Yah if you use amounts it'll stack in the inventory, I wouldn't recommend it, looks weird.


Yes, it will increase file size, I played around with it to see how much, 30,000 new items increases file size to 5-6MB. Which I find acceptable, I'm not sure any one save file would reach that number anyways.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
oh... 5MB for 30,000 new items... that's pretty small IMO... XD...
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
On the plus side it only takes about a minute to open the inventory when you have 30,000 different items in it! Maybe an inventory limit to some degree would be good...


Also, updated script to include price variance note tags and affix options.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
price variance = owsum...

I don't think anyone in his right state of mind will keep 30,000 different equips in the inventory... unless he has an army and not just a party... hahahahahaha

btw, thanks to this, I think I now learned how to individualize items... XD...
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Script has been updated to allow randomized weapon/armor monster drops! Ooooh, yah~
 

Adon

ADONKADONK
Veteran
Joined
Mar 24, 2012
Messages
93
Reaction score
15
First Language
English
Primarily Uses
Hmm, is there a way to have a weapon inflict a random state from a set, that corresponds with the weapon's name?
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
If you can do it with regularly made weapons, you can do it with affixes! That being said, the best you could manage for that would be adding multiple add state features.
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Shoop doop. Updated 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!
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
This is one awesome script Vlue! I'm implementing it in my game to make for a much more fun loot experience :)

I think I might've found a bug, though; I created an item with a low chance of both a suffix and a prefix, and looted an item with neither; it then got an empty name as if it skips writing the base name of the item if neither the suffix or affix is applied. In this case, the item's name was "Knife", and the prefix was "Bronze" while the suffix was "of Lesser Power"; it displayed "Bronze Knife" when I had that prefix at 100% chance, and "Bronze Knife of Lesser Power" with both, but a blank name when neither got applied due to low chance.

I could patch this myself, but I thought I'd give you the heads up here since others might encounter this too :)
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
And you have an awesome display pic, but diverging~

Well, I'm not sure what's going on there then, the script shouldn't put a blank name, all it does is just append to it if an affix passes it's random chance roll and no touchy otherwise. It copies the base item, so it starts with the name of the item as it's name anyways.

Which is irrelevant if it's happening to you, but I can't produce that problem, no suffix added items come out with a regular name for me... is it just that one item?
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
Edit edit: I tested it in a new project now, and it seems like something's getting mixed up with item ID's when there are no affixes. I had a slime drop a Hand Axe (#001), no affixes added in Note box. In the message window, the slime dropped the Etherblast Gun (# 060). It's a new project and only your script is added :) This is tested in the Battle Test menu; this might be relevant?
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Yup yup, that's what we were looking for! Unintended side effect of sorting the items so there are no duplicates, the enemy drops wasn't done right! Well, it was, my edits to make it work with this wasn't. You know.

So that's been fixed, pastebin edited, etc. etc.

*Yay*
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
Awesome! :) I'll test it out later today. Now I just need to find a way to get it to work with Yanfly's Victory Aftermath script; shouldn't be too hard, but I'll probably need to mod a few things here and there.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Finished my Sprite for Koro :D
Evil7 added!


I did a bit of a remake on one of the maps, also I made a particle for jumping into the portal, and one for traveling through the portal. I'll probably add more sparkles later to embellish it. :LZSwink:
Polished the animation and added details :kaojoy:
Ami
What do you think about the Wood Bridge inside of Volcano?

Forum statistics

Threads
105,687
Messages
1,015,561
Members
137,364
Latest member
LordVK
Top