Weapon/Armor Randomization

Hi again!
Sorry for double-post, but I got some questions, again...
 
I noticed these lines in this script:
 

Spoiler
Code:
class Window_Base  def draw_item_name(item, x, y, enabled = true, width = 172)    return unless item    draw_icon(item.icon_index, x, y, enabled)    change_color(item.color, enabled)     change_color(normal_color) # why is this line here?    draw_text(x + 24, y, width, line_height, item.name)  endend
 
There is that 'change_color(normal_color)' line in it. My question is, why? 
Because it brakes the shop's 'enable?(item)' coloring. Regardless if you got enough gold for it or not, it will show up as an enabled item (like if you got the gold for it). It is not possible to actually buy it without enough gold, but the color will always show an enabled state with that line there.
Removing it fixed the issue. So far, nothing seems to be broken because of the erased line, but I want to know if that line was an important thing for this script or was it just an accidental leftover line forgotten there?
 
And another question regarding the 'change_color(item.color, enabled)' line from that same definition...
That color change is needed for weapons/armors/items only, right? It is to color the randomized items in most of the scenes, or not?
Because I needed to make a conditional check on that, so that line could only affect items and nothing else. It was necessary for a compatibility issue with another part of the Crafting Script.
 
Thanks for the answers in advance!
Hi I'm using Falco Pearl Abs And The Enemy Drops Aren't Random With This Script I Just Get The Base Weapon From The Database. Is There Anything I Can Do To Solve This Issue?
Hi I'm using Falco Pearl Abs And The Enemy Drops Aren't Random With This Script I Just Get The Base Weapon From The Database. Is There Anything I Can Do To Solve This Issue?
 Just tested it.

Do the followings:

Insert the Randomizer script above all the scripts of Falcao's Abs.

Than go to - Pearl Sprites and find the following line:

Code:
$game_party.gain_item(@item, 1)
Replace that with this:

Code:
   $game_party.add_weapon(@item.id,1) if @item.is_a?(RPG::Weapon)   $game_party.add_armor(@item.id,1) if @item.is_a?(RPG::Armor)         $game_party.gain_item(@item, 1) if @item.is_a?(RPG::Item) # or $game_party.add_item(@item.id,1) if @item.is_a?(RPG::Item) to randomize even items!
Be careful with using randomized items though. I don't know what do you need to do to make weapons, armors, etc, functional there, but there is a chance that a randomized item can not be set to be a tool, for example. Make sure to test this after you did what I wrote!
So, just to check I understand something before I go and write out ... 120+ affixes.


:Sdesc "whatever" will change the current description of the base item by adding the string specified within quote marks, to the END of the item description, yes?


So, if I have an item where the desc is "An iron Sword", and I apply a prefix "Engraved " with :Sdesc, the engraving makes it more magical.", I will get an item with the name "Engraved Iron Sword" and the description "An iron Sword, the engraving makes it more magical."


If I then apply a suffix to it as well, also using :Sdesc, this will add on to the end of the above, or replace the previous :Sdesc addition?


I would think it would add on to it, but I don't know.


If it does add on, and not replace, is there a way to add a linebreak to it? So that I can have something like


Prefix :sdesc => ", it makes you feel stronger holding it."


Suffix :sdesc => "(/line)The flames make it burn things."


(Terrible, I know, they're 5 second thought examples, lol.)


And then have the weapon end up as


Strong Iron Sword of Fire


"An iron Sword, it makes you feel stronger holding it.


The flames make it burn things."


Purely because otherwise I've noticed that descriptions in rpgmaker don't automatically wrap or linebreak like expected, so I end up with descriptions being cut off if I'm not careful. 🙁
Hey Vlue, I am having trouble getting this script to work with Venka's crafting script. I do want it to produce random suffixes and stuff, however it won't do it, Ihave tried placing it above and below the scripts and of course it doesn't work.

I imagine I may have to change something in the crafting script but I have no idea. I can't link the scripts as they are in a demo, Ican link you the demo: 

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30-updated-71514/

Any ideas?
Hey Vlue, I am having trouble getting this script to work with Venka's crafting script. I do want it to produce random suffixes and stuff, however it won't do it, Ihave tried placing it above and below the scripts and of course it doesn't work.

I imagine I may have to change something in the crafting script but I have no idea. I can't link the scripts as they are in a demo, Ican link you the demo: 

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30-updated-71514/

Any ideas?
Everything about this and Venka's crafting script can be found here:

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30-updated-71514/?p=288763

The instructions there should fix all issues these two scripts have (including the addons from Venka's script).

You can use the "upgraded" results window popup I made too, it works pretty well with all these affixes.

That one can be found in that topic too, a little below.

@Eazeh

Pdesc goes before the regular description from the database.

Sdesc goes after the regular description from the database.

desc changes the original description from the database completely, it replaces it.

Forgot to test line breaks, one moment! 😛

Line breaks can be used with either "\\n" or "\en" without the quotation marks.
@Eazeh


Pdesc goes before the regular description from the database.


Sdesc goes after the regular description from the database.


desc changes the original description from the database completely, it replaces it.


Forgot to test line breaks, one moment! 😛


Line breaks can be used with either "\\n" or "\en" without the quotation marks.
Ahh, thank you, the linebreak is very helpful.


I think you misunderstood my first question though, it was meant to be "if I add something to a description using :Sdesc *twice* (first time as part of a prefix, second as part of a suffix), will both pieces be added to it in order, or will the second instance of :Sdesc replace the first?


I guess I can always write things out and test that myself, it just means I'll have to rewrite the descriptions if things don't work out, so that I can use 😛desc for the prefix (I don't want to do that though, because I can't see a way to do it without making the descriptions look even more Frankensteinian than they already are, lol).
To answer your question directly, yes, using 2 :sdesc will add both of them after the regular item description. 

I have no idea which one comes first thou. Try to use the :rarity setup, that may or may not affect the order, I don't know.

In my test, I used a prefix with rarity set to 1 and a suffix with rarity set to 2. The suffix's sdesc came first, then the prefix's sdesc.

Here is what can also work:

Regular item name in the database: Iron Sword

Regular description from the database: A regular iron sword. Commonly used in the army.

Now by using this setup at the randomizer script:

For the "Engraved" prefix setup add these lines:

:desc => "This weapon got some magical engravings on it which makes it stronger than regular weapons.",

This setup will give you an item which is named "Engraved Iron Sword" and the description of it will become "This weapon got some magical engravings on it which makes it stronger than regular weapons.".

Now going to setup a suffix:

Suffix name: " of Fire"

:sdesc => "\\nIt can set enemies on fire. ",

Combining both of this, we will get this:

Item name: Engraved Iron Sword of Fire

Item description line1: This weapon got some magical engravings on it which makes it stronger than regular weapons.

Item description line2: It can set enemies on fire.

Just a handy tip if you want to change an item's description completely.
Everything about this and Venka's crafting script can be found here:

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30-updated-71514/?p=288763

The instructions there should fix all issues these two scripts have (including the addons from Venka's script).

You can use the "upgraded" results window popup I made too, it works pretty well with all these affixes.

That one can be found in that topic too, a little below.
Everything works well, except the colors don't work. Also I think I did mor ethen I need to, your post wasn't clear, I did the first part then you told me not to do the first part, but I left it as it is, lol. Anyways....

Is there a way to show the color in it as well? The reward pop-up?
Everything works well, except the colors don't work. Also I think I did mor ethen I need to, your post wasn't clear, I did the first part then you told me not to do the first part, but I left it as it is, lol. Anyways....

Is there a way to show the color in it as well? The reward pop-up?
Where did I tell anything about not doing something in that post? o.o

The only thing I recommended there is to not use the "Craft Stack" option in Venka's script, because it will not work at all.

Also the only thing which got 2 versions is the initial fix, but I detailed both versions and wrote the differences between them.

Can you tell me what part of it wasn't clear enough so I can try to edit it with more details?

Anyway...

I am sure there is a way to show the colors of them somehow, but I won't bother with it.

The colors won't show up in many places anyway, so I am fine with it as is. 

It will show the correct colors in the inventory and equip scene for sure.

But I use many scripts that alter every single scene in my game, so I am not sure how the coloring behave in a fresh project.

That is the main reason why I don't bother with that, it would be a lot of edit in a lot of scripts for me to show the colors everywhere.
I only want the color to show up in the reward window, so a person can see what quality item they crafted on the spot and decide if they want to craft another. Surely that would take huge amount of editing just for that window. Ah oh well, I'll see what I can do myself, and hopefully not break everything in the process lol.

Just FYI, though. There is only two places my items will show up (Weapons and armors), is the reward screen, and crafting screens. You will not get weapons or armor or accessories from monsters. Which is why it will only show in a few places rather then a lot of scenes.

Thank you for all the other edits though.
Lmao, this was actually a lot easier than I expected. 😀

Here is what you need to do to show the colors:

In the 'Crafting_Results_Window' find the 'draw_items_recieved' part.

Here find the following line:

draw_text(w + 25, y, contents.width - w - 25 - text_size("x#{@amount}").width - 6, line_height, @item.name, 2)If you aren't using my popup window edit, you won't find this line like this, instead search for 'line_height, @item.name,'. This should lead you to the same place.

Just before this line insert this little thing:

change_color(@item.color)This will make the popup to show colored names.

I have no idea if it breaks anything thou, and I don't have time to test it right now. Report back if there are any issues found and I will test it later today.
LOL! Well it works, but it also changed the EXP Gained Color. How Interesting. 😛
How come? o.o

It does not change any other color for me.

Hmm... Try to insert this line after the draw_text command for the @item.name, just before the 'set_font🙂arrows)' line:

change_color(normal_color)But I have no idea why it changes the Exp gained color too for you.

If it won't help, can you put up a screenshot of that recolored Exp gained thing for me? 

And if you can, upload all of your crafting scripts and this randomizer script for me.

The draw_text for the Exp gained is defined in a separate definition, and that one should start with a 'set_font(xy)' line too, so I have no idea how can the above edit change that thing too. 😳

Even that 'set_font🙂arrows)' line just after the draw_text for the @item.name alone should prevent that to occur.
Screenshot:

9114a0.png


I'm not sure how to upload the scripts, other then pastebin, and isn't that against Venka's and Vlue's "ToS" to repost them like that?
Seems like you are not using my popup window edit. 

Try it with that, see if that fixes it.

If you want some edits to my popup window, feel free to PM me, and I will try to help you customize it however you want.

That is if you don't like mine. 😛

That snippet can be found here:

http://forums.rpgmakerweb.com/index.php?/topic/17560-crafting-script-v30-updated-71514/?p=288954

Just make sure to read the instructions, because it is NOT a plug and play snippet anymore!

If you don't want to use my popup window edit, try the followings:

Find the  'def draw_exp_received(y)' line in the same script, it should be a bit lower than what we edited, you can even scroll down manually to see it soon.

Just after that line insert this:

set_font🙂other_text)
This, in theory, should fix it. 
Hm, I like it, awesome. However... the arrows are showing up as squares.
I said, read the instructions, didn't I? 😀

You must find a suitable font for arrows, as not all of the font types can display it.

Monotype Corsiva can display it for sure, so use that. If you don't have that font type, search for another one.

You can do that by opening your MS Office Word, for example, copying this symbol: ' → ' there.

Then highlight that symbol, and start to change the font types. If it changes to a square symbol, change to another one, until you find one which can display it.

I made a separate font setting just for that, so you can change it without affecting anything else on the scene, because I know that not many font types can display that arrow properly.

You can also download Monotype Corsiva from somewhere too, I guess. 

I never downloaded a font type actually, so I can't help more in this regard.
Mmm I must have missed that 🙁 . I am a bit tired, lol.
Hi again!

Sorry for double-post, but I got some questions, again...

I noticed these lines in this script:

Spoiler
class Window_Base  def draw_item_name(item, x, y, enabled = true, width = 172)    return unless item    draw_icon(item.icon_index, x, y, enabled)    change_color(item.color, enabled)     change_color(normal_color) # why is this line here?    draw_text(x + 24, y, width, line_height, item.name)  endend
There is that 'change_color(normal_color)' line in it. My question is, why? 

Because it brakes the shop's 'enable?(item)' coloring. Regardless if you got enough gold for it or not, it will show up as an enabled item (like if you got the gold for it). It is not possible to actually buy it without enough gold, but the color will always show an enabled state with that line there.

Removing it fixed the issue. So far, nothing seems to be broken because of the erased line, but I want to know if that line was an important thing for this script or was it just an accidental leftover line forgotten there?

And another question regarding the 'change_color(item.color, enabled)' line from that same definition...

That color change is needed for weapons/armors/items only, right? It is to color the randomized items in most of the scenes, or not?

Because I needed to make a conditional check on that, so that line could only affect items and nothing else. It was necessary for a compatibility issue with another part of the Crafting Script.

Thanks for the answers in advance!

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

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