Weapon/Armor Randomization

I was going to say, that line needs to be below the draw_text line. Though it is on the current pastebin...

The color change using item.color is a W/A thing only, yes.

And also wow, was scared at all the replies here, but glad to see it was you helping out. :3
It is possible that I moved that line accidentally when I edited that definition for the craft shop addon fix. 😀

Any chance on fixing this little thing:

http://forums.rpgmakerweb.com/index.php?/topic/14771-weaponarmor-randomization/?p=287907

I tried, but couldn't manage it, I'm not good at these things in ruby, unfortunately. 🙁
Oh right. And it's all right, I don't know what I'm doing half the time either. This fixes that problem:

Code:
class MAESB_EquipmentSet  def set_complete?(eqps = [])    weapons = eqps.collect {|item| !item.nil? && item.is_a?(RPG::Weapon) ? item.original_id : nil }    armors = eqps.collect {|item| !item.nil? && item.is_a?(RPG::Armor) ? item.original_id : nil }    wep_chk, arm_chk = @weapons & weapons, @armors & armors    return wep_chk == @weapons.compact && arm_chk == @armors.compact  endend
It works, yay!
My eternal gratitude will haunt you forever! 😀
Now I can start to make my equipment database in an orderly manner, same with the affix list.
 
Thanks a lot! *-*

Just discovered something that I decided to share:

If someone is using Yanfly's Save System, the Randomizer script needs to be below that one!

If it is above, every single randomized item will get deleted after loading a game (if you shut down the game after saving)!
Unfortunately, I have another question. 🙁


It looks exactly the same as the other two above it, other than the number and specifics. 🙁 So I can't work this out, what am I doing wrong?


EDIT: Ignore me, I need to check for commas better. >_< Man do I feel stupid.
@Eazeh

Line breaks can be used with either "\\n" or "\en" without the quotation marks.
It seems linebreaks don't work like this, or at least not in the script? I've decided to just work around the fact that I can't get the Prefix :sdesc to be added before the Suffix :sdesc (which, upon reflection, I prefer, because it means the explanation of why this sword is ON FIRE is above the explanation for why it has +5 stranth, which seems like a more pertinent point).

Unfortunately, neither the smaller text command "\}" nor the given linebreak commands "\\n" or "\en" work when included as part of a :desc, :sdesc or 😛desc line.

To show you what I mean, I stuck \} as the only part of the original weapon description, and applied the following affixes;

Spoiler
#Prefixes1 => { :name => "Crappy ", :color => Color.new(128,138,135), :SpriceP => -20, :sdesc => "\en The poor quality of this weapon is hard to believe.", },#Suffixes100 => { :name => " of Flames", :SpriceP => 10, :sdesc => "Fire Element added to attacks.", :function => [[31, 2, 0]], },
which results in the following: http://oi59.tinypic.com/263c8yv.jpg

This is so close to what I want, I mean the \\n or \en, whichever I use, it doesn't show up, so something recognises it as code and chops it out (also any word touching it, like "\enThe poor quality" shows up as "poor quality"), but doesn't actually apply a linebreak or font size change. 🙁
You must play with :rarity setups in the randomizer script.

Ignore the above line, it doesn't matter at all. I was just guessing with that.

Both line breaks methods work for me.

I tested it with these affixes:

81 => { :name => "Fireproof ", :rarity => 1, :color => Color.new(9,22,189), 😛desc => "Fire resistant ", :features => [[11,3,0.50]] },92 => { :name => " of Regeneration", :rarity => 2, :color => Color.new(255,175,75), :sdesc => " \enwhich can even heal the user.", :features => [[22,7,0.05]] },  Change the 😛desc in the Fireproof example to :sdesc, and see what happens.

Also do not put any message codes at the item's name box in the database. If you want smaller fonts for your entire description, use "\\}" or "\e}" without the quotation marks as your 😛desc.

It should look like this:

😛desc => "\\}",  If it won't work, than I have no idea...

It works just fine for me. I will post some screenshots later, gotta go back to work now.

So, I tested it again, every single message code works for me without any problem.

Here is a screenshot which is made with 2 :sdesc, the first one decreases the font size, the second one makes a line break.

As you can see, I am using the default Dragon Armour item from the database, no changes were made there.

Spoiler
example10.PNG
Ohh, I just realized that I am using Blackmorning's Base script, which modifies the help window a lot, it enhances it greatly. That help window can display every message codes, regardless of how I input them, as long as the code is a valid one.

For the default help window, you can use the default message codes, just like shown in the event editor while hovering over the message box editor window.

Sorry, sometimes I forget how many addon I use, lol.

So for a line break, a simple \n will do the trick.

Oddly enough, the font re-size works regardless of how I input it.
Okay, now the linebreaks and suffixes work, but I still don't see any difference when applying different :rarity values to affixes. No matter which one has the higher value, the suffix always applies first.


Not that it matters now, because if \} works in a :desc line, then I don't need to use 2 :sdesc lines, and so the problem is solved anyway. 😀 Many thanks!
Hi! The script works perfectly though I couldn't figure how to actually remove the prefixed/suffixed etc equipment. I also couldn't find out how to store it in a variable so I can put it back in the inventory later in the game (you know like for prison scene where you must find back your stolen inventory etc)?  
No idea how to remove them, but for storing them for eventing purposes, you can use this script:

Inventory Secure by TheoAllen

http://www.rpgmakervxace.net/topic/24091-theo-inventory-secure/

It memorizes even the randomized items, so it is ideal for that prison scene (or for multiple parties even).

I never even thought about removing them, but now that you mention it, I could use that feature too in some of my events. o.o
Hmm, yah. I guess you can't use the event commands to remove them.


If you knew the id's of the items you could use the script call:


$game_party.gain_item($data_(class)[id], -1)


(class is items, weapons, armors, and id is the id, so: $game_party.gain_item($data_weapons[5], -1)


But that isn't easy to identify either...


The previously mentioned script does a good job of saving and recalling inventories though, so hopefully that helps out!
The gain_item method works only if you got one of that item in your inventory.

But what if, for example, someone got a Burning Sword of Strength, a Sword of Oblivion and a Sharp Sword, if all of these swords use the same base ID but with different affixes and you want to remove a specific sword from that list?

Is there any way to determine the applied affixes on the items (equipped and in the inventory separately if possible) with a script call somehow? 

Using that in a conditional branch would really help in removing the specific item.

And I got another help request, if you have some time. I know, I'm annoying. >.>

I recently found this great script:

http://www.caspergaming.com/Scripts/Ace/CSCA_Gathering.txt

(It requires the CSCA Core Script, which can be found here, first script on the list: http://www.caspergaming.com/Developer_Tools.html)

I already implemented the random affixed items in it. The "only" thing I can't seem to do is to show the actual names of the received items with the affixes and colors applied, it only shows the base name of the items in the popup window.

I tried to replicate the same thing like what you did with Venka's Crafting Script, but no matter how I try, it won't show the real name in the window. 🙁

Can you, pretty please, help me with this? *-*

Wow, after meddling with it A LOT, I actually managed to show the names in that window. 😳
Is there a way not to add a name but still add features. Like weapon still has a chance to get extra critical or attack but doesn't become "strong weapon of killing and stuff". The way it works now is that if I remove the name the weapon just stacks in its base for without features. I'm running out of names to give the equipment so Id rather just not put them on and keep the features
Use this for the name settings:

:name => "",This will make no affix names to show up, but still gives the features, effects, descriptions and colors for the randomized items.

Ohh, and if it still stacks the items, turn off 'STACK_SAME_EQUIP' in the script settings.
Use this for the name settings:

:name => "",This will make no affix names to show up, but still gives the features, effects, descriptions and colors for the randomized items.

Ohh, and if it still stacks the items, turn off 'STACK_SAME_EQUIP' in the script settings.
Ah stack same equip is what was giving me the issue thanks for the help
I have a question:

As your script makes a unique item, is there a way to set a durability on these items? I am using a crafting script that you can enchant a item and it will be enchanted with random stuff. Of course it uses your randomization and the uniqueness.

I'd like a way to put a durability on the unique items.

Actually I would like a durability on the items that don't have affixes/suffixes, as they wll be normal items until they are "enchanted". But that is going to be a bit more work then it needs to be. As I would have to have two durability systems. Right?
Just wanted to say thank you for creating and continuing to perfect such a useful script. I'm sure you've saved many people countless hours of tedious database creation. Thanks again for an awesome script!
:atk , :Satk, :atkP and :SatkP don't work for me, no matter what stat I put there no stats are added. The other features are fine though. Is there anything to fix this?
Hey Vlue, I'm curious:

Can you have randomized static attributes?

For example a level 1-10 affix could be

1-10 attack

11-20 could be

11-20 attack.

so on and so forth?
:atk , :Satk, :atkP and :SatkP don't work for me, no matter what stat I put there no stats are added. The other features are fine though. Is there anything to fix this?
Could you share on of your affixes where it's not working? And is it just Atk?

Hey Vlue, I'm curious:

Can you have randomized static attributes?

For example a level 1-10 affix could be

1-10 attack

11-20 could be

11-20 attack.

so on and so forth?
In a way, you can use more then one type of bonus for each stat, so :atk = 10 and :Satk = 10 in the same affix would guarantee a static bonus of 10 + a random bonus of 1-10 (for 11-20)
it's all of the stats like that. I realised that those don't work with Dekita's Statistic Control script. I'm not sure what I can do to fix this but all of the other features from the script work.

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