Weapon/Armor Randomization

● ARCHIVED · READ-ONLY
Started by Vlue 20 posts View original ↗
  1. 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
  2. D: is this a script in which I can use a script call to increase a weapon's EX Params? Because if so BOOYAH.
  3. 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.
  4. Vlue said:
    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 :)
  5. 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.
  6. Now people will be crawling the dungeons for hours looking for stuff now :3.
  7. pretty nice... 

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

    Spoiler
    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?
  8. 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.
  9. oh... 5MB for 30,000 new items... that's pretty small IMO... XD...
  10. 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.
  11. 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...
  12. Script has been updated to allow randomized weapon/armor monster drops! Ooooh, yah~
  13. Hmm, is there a way to have a weapon inflict a random state from a set, that corresponds with the weapon's name?
  14. 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.
  15. 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!
  16. 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 :)
  17. 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?
  18. 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?
  19. 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*
  20. 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.