Weapon/Armor Randomization

Well hmm, how do you set up range and whatnot with that system? Is it by notetags or in the script?
Well hmm, how do you set up range and whatnot with that system? Is it by notetags or in the script?
What do you mean?
Sorry, that was for Mojo, hehe.
Well hmm, how do you set up range and whatnot with that system? Is it by notetags or in the script?
projectile=normal

range=[2, 0, true, false, 0, 24, 12]

The example above would be note tag for a weapon with a range of 2 tiles.

projectile=normal

range=[2, 0, true, false, 0, 24, 12]

<PREFIX1 50>

<PREFIX2 40>

<PREFIX3 30>

<PREFIX4 20>

Would be the setup of notetag with your system installed, but once the item is created say with prefix1, the weapon no longer has a range of two tiles, it defaults to one tile.
Oh man was that confusing, try this mess put below my script.

Spoiler
Code:
module GTBS  def self.easy_config_wa(type, all_config)    data = $data_weapons if type = 'Weapon'    data = $data_armors if type = 'Armor'    data = $data_items if type = 'Item'    max = data.size    for i in 1...max      note = data[i].note      note.gsub!(/[ \t\r\f]/,"")       for line in note.split("\n")        for config in all_config          line_note = line.clone          line_note.scan(config[1])          if $1            case config[2]            when 8 # hash int array push              config[0][i] = eval("[" + $1 + "]") #push eval data            when 7 # hash string array push (as array)              config[0][i] = [] if (config[0][i]).nil?              config[0][i] << $1            when 6 # Custom for Map battle transfers based off area              temp = eval($1)              config[0][i] ||= {}              config[0][i][temp] = eval($2)            when 5 # Custom for battlebacks              temp = eval($1)              config[0][i] ||= {}              config[0][i][temp] = $2            when 2 # add to array              if !config[0].include?(i)                config[0] << i                config[0].sort!              end            when 1 # is a string              config[0][i] = $1            when 0 #is a switch parameters              config[0][i] =  true             else#value parameter              config[0][i] =  eval($1)            end            break          end        end      end    end  endendclass Game_Party  alias aw_gtbs add_weapon  alias aa_gtbs add_armor  alias ai_gtbs add_item  def add_weapon(*args)    item = aw_gtbs(*args)    GTBS.easy_config_wa('Weapon',GTBS::WEAPONS_EASY_CONFIG)    item  end  def add_armor(*args)    item = aa_gtbs(*args)    GTBS.easy_config_wa('Armor',GTBS::ARMORS_EASY_CONFIG)    item  end  def add_item(*args)    item = ai_gtbs(*args)    GTBS.easy_config_wa('Item',GTBS::ITEMS_EASY_CONFIG)    item  endend
Unfortunately, it still does not work properly together... Don't rack your brain over it too much, the GTBS is something I liked, but not needed. I like the use of your system, and can just continue to work with Battle Symphony.

The time you spend being helpful is most appreciated 😀 !
I'm quite jazzed that you're so involved with those who use your scripts. I also use the GTBS Tactical System, and I was about to add the randomization script to my lineup before I read about its compatibility issues, so I'm really hoping the kinks can be worked out without a major headache.

That said, I'm also using a custom damage script by Kread-EX that allows weapons to be assigned damage on a weapon-by-weapon basis in their note boxes. For example,

<formula>rand(8) + a.atk - b.def</formula>which is very simple to use and very flexible.

That said, would the weapon/armor randomization script be likely to cause problems with it? It seems to conflict with a few other scripts that alter notebox tags, and I can't quite test it with the GTBS being my mainstay at the moment. I'd really appreciate any insight that anyone might have.
It shouldn't have any problems with note tag scripts, the notes of the base weapon are copied over. The problem with the GTBS is the way it's handled, weapon range and stuff are not handled through notetags but constants in the script, however there's a patch in there that adds to those constants based on the notetags used to make it easier and I guess I can't get it to work. So when in doubt, just try it! Whee
It shouldn't have any problems with note tag scripts, the notes of the base weapon are copied over. The problem with the GTBS is the way it's handled, weapon range and stuff are not handled through notetags but constants in the script, however there's a patch in there that adds to those constants based on the notetags used to make it easier and I guess I can't get it to work. So when in doubt, just try it! Whee
Yeah, I knew it was more to deal with how GTBS works, than your system (as I use quite the few note tag scripts, and they all work fine). It would be awesome if all scripts could just get along lol!
Hey Vlue. I just thought of an interesting thing to do for affixes.

Random formulas based on certain parameters.

For example say I want two affixes: of Defense and of Greater Defense.

of Defense would be something like this: Defense = Static(or random of) up to 8 * Player level +2 / 1.5

Or something like that. This way the parameters on the weapons and affixes are more dynamic and are a bit more flexible.

Please excuse me if this is not clear, as I'm going on no sleep right now. Cheers!
Hey Vlue. I just thought of an interesting thing to do for affixes.

Random formulas based on certain parameters.

For example say I want two affixes: of Defense and of Greater Defense.

of Defense would be something like this: Defense = Static(or random of) up to 8 * Player level +2 / 1.5

Or something like that. This way the parameters on the weapons and affixes are more dynamic and are a bit more flexible.

Please excuse me if this is not clear, as I'm going on no sleep right now. Cheers!
You can kinda already do that in the script by having it set a stat by a specific percentage instead of a value. That's what I did for mine, lesser boosts being +5%, medium being +10%, and greater being +15%, for example.
You can kinda already do that in the script by having it set a stat by a specific percentage instead of a value. That's what I did for mine, lesser boosts being +5%, medium being +10%, and greater being +15%, for example.
A straight up percent isn't exactly what I need. I'm pretty familiar now with this script after messing with it for a week or two. I also know I can mix just a straight up number and a percent. But thats not quite what I want either, as it will skyrocket as I progress the items.

The reason I need a formula is because to make it balance easier as the way I'm doing my game is going to go really low scale stuff to decently high. Which means I need to formulate stuff. Actually thinking now I may need to formulate more then just the armors and items. Lol
Hmm, formulas could be interesting, I might have to look into that. Though, off the top of my head, player level wouldn't be usable (unless it's like average player level or something).
Hmm, formulas could be interesting, I might have to look into that. Though, off the top of my head, player level wouldn't be usable (unless it's like average player level or something).
You couldn't do individual actor level? Average level should work too actually, as in most games the party level will be relatively close.
Not as it stands no, the items stats are set when you obtain the item so it wouldn't even know what actor to work off of and then there's the whole switching equipment. That'd be a whole different script.
Ah, I suppose having the base something else then? Maybe based off actors ATK? Or something of the likes. Though average level could work too. Also, it would be a one time thing, meaning it doesn't scale with your level after you have gotten it. The reason why I want to edit the item the first time you get it and not as you level up, or anything like that is because if it was scalable you would only need the equipment to scale after you found what you needed. Which is not very good for a dungeon crawler/loot game. Lol

EDIT:

Oh I just though of another thing. For Attack Element can I do a percent of the element then the rest physical? Or have the multiple attack elements. For example

of the Elements

Fire 25%

Ice 25%

Lightning 25%

Physical 25%

It does all that. Is that possible?

EDIT 2:

Also another request.

Multiple Prefixes and suffixes on an item.

You could have it setup were you could choose how many you want. For my purposes I'd have 2 Prefixes and 1 suffix. F

For example you would have this:

+1 Magic Bronze Sword of Fire

"+1" "Magic" Bronze Sword "of Fire"

^ two prefixes. I'm not too sure how hard that would be and it would save time. Instead of having 16 of each of the 14 materials I have and having to do +1 Copper +2 Copper etc etc. Having the materials. 15 normal ones, and 15 magic ones I could simply reduce the amount of affixes I would have, and have it quite randomized a bit better. Also easier to calculate percentages!
At first look, it seems like it checks for all affixes and try to apply them one by one... but it seems like once it gets 1 affix done, it stops checking the others... 

For example:

<affix1 50>

<affix2 50>

<affix3 100>

it checks for affix1 first, if it doesn't get picked it proceeds to affix2, if it doesn't get picked too it proceeds to affix3... 

so It's not the same as a lottery ticket chance...

for your problem with the bonus, since it's quite small (5% of 20 is supposedly 1), but the game might be rounding it down to 0 for some reason... try it on higher values of base defense...

@Vlue: I think it's better to let it have multiple affixes... that way you stay true to the rarity being the actual percent of having the affix... 

Else you might wanna just change it into an affix pool, where the user adds the possible affixes and their "weight"... 

ex:

<affix1 1>

<affix2 2>

So this means to add affix1 once to the pool, and affix2 twice... then you just pick a random affix from that pool... this way we know when we set-up that affix1 has a real 1/3 chance to be picked while affix2 has 2/3 chance...

but doing so, we should also be able to add a "blank" affix so that if we can have the chance of not having an affix

But as you see, working with a pool is more complicated than just allowing multiple affixes to be applied which is just removing the break command from the methods like this one:

break if add_affix(item, $~[1].to_i, false) if rand(100) < $2.to_iso it will be

add_affix(item, $~[1].to_i, false) if rand(100) < $2.to_i
perhaps one could try adding a variable based on rarity (if that is the first affix you apply) so that uncommon can have 1, rare 2, very rare 3, etc to said equation then incrementing it each time an affix is added breaking when max is reached. I dont know this scripting language but here is an example of what I mean in such a way as you see what Im getting at...

<affixes>

        <common> 1, set.var <affix> ==1

        <uncommon> 2, set.var <affix> ==2

        <rare> 3, set.var <affix> ==3

        ETC.........

<prefixes>

       <Light> 55, set.var <affix1> +=1

             {

                  if affix1 == affix

                       break

             }

etc etc so on and so forth.

by a method like this the rarity of the item would be only used to determine POTENTIAL strength through the ability t have more affixes as oppossed to actualy changing the item stats by itself. getting a legendary item would be akin to the item having 5+ affixes as oppossed to just getting a stat boost where as getting a common item would leave you with just the base item.

I realize this may not be grammatically, or syntax correct but I hope you catch my meaning.
Hi love the script. Is there a way I can make the description a prefix or suffix? Any chance you might be able to mod the script to do this? I would be very grateful. I am also wondering if the color changing of the names has a priority? I thought that prefixes would take priority in color coding but I might be wrong just a question. No big issue for me but making the description as a prefix or suffix would be beautiful addition. Thank you for this wonderful script.
Hi love the script. Is there a way I can make the description a prefix or suffix? Any chance you might be able to mod the script to do this? I would be very grateful. I am also wondering if the color changing of the names has a priority? I thought that prefixes would take priority in color coding but I might be wrong just a question. No big issue for me but making the description as a prefix or suffix would be beautiful addition. Thank you for this wonderful script.
Hi love the script. Is there a way I can make the description a prefix or suffix? Any chance you might be able to mod the script to do this? I would be very grateful. I am also wondering if the color changing of the names has a priority? I thought that prefixes would take priority in color coding but I might be wrong just a question. No big issue for me but making the description as a prefix or suffix would be beautiful addition. Thank you for this wonderful script.

Original thread: https://forums.rpgmakerweb.com/threads/weapon-armor-randomization.14771/