Show MDF Stat Boost in Shops?

Hi,

I was just wondering is there anyway I can show the Magic Defence on the Shop Window Screen when buying Headgear?

On the Window_ShopStatus line in the script, from line 93 is this code:

 def param_id

    @item.is_a?(RPG::Weapon) ? 2 : 3

  end

 

Is there anyway I can add to it so that when I choose the Head Armour, it shows the Magic Defence instead of just Defence?

In the game, Armour (Body) increases your Defence (Vitality) while Armour (Head) increases your Magic Defence (Spirit).

This only shows the Defence so while it shows how good certain Body Armour is, it does not show the effect of the Head Armour and all of them say 0 as none of them increase in defence.

 

I would think only a line or two of code is needed (hopefully) but I am no scripter. Any help and advice would be very much appreciated.

 

Thanks.
I mean you could just get a shop script that shows you all the stats it adds instead of just defense.

I use Yanfly's Shopping Script.

What I really wish is that when you optimize equipment with like

ArmorA +1def

ArmorB +0def +3.3billion mdf

that it checks other stuff besides what has the highest DEF cause normally it would just pick ArmorA.
I can't get the Yanfly script - whenever I try to download it, it says an error.

All I need is that when you choose certain armour, it'll show the MDF value.

I tried also adding it to the script but it will only show the DEF stat still.
https://github.com/Archeia/YEARepo/blob/master/Menu/Ace_Shop_Options.rb

There you go, just copy+paste it into your scripts area.
Yep, use the Github links for Yanfly's scripts, because his traffic is high enough to often produce errors for the normal Dropbox (etc.) links.  That shop script will pretty much give you what you need; I recommend it.

What I really wish is that when you optimize equipment with likeArmorA +1def

ArmorB +0def +3.3billion mdf

that it checks other stuff besides what has the highest DEF cause normally it would just pick ArmorA.
Believe it or not, this is incorrect (to my surprise as well as yours).  I just checked into the RPG::Weapon and RPG::Armor classes using the help manual, and they reveal the formula for optimization to be:

(weapons)

def performance params[2] + params[4] + params.inject(0) {|r, v| r += v }end(armor)

def performance params[3] + params[5] + params.inject(0) {|r, v| r += v }endIn other words, for armor, it gives you a combined total of all parameters, but counts DEF and MDF double.

You can test this by buying Armor A with 10 DEF and a Armor B with 5 DEF and 8 MDF and you will see Armor B is chosen.  If you add in Armor C with 5 DEF and 12 Max HP, Armor B will still be chosen (because DEF and MDF count double).  But if you ratchet Armor C's Max HP gain up to 50, Armor C will be chosen.

Ideally, however, it would be really nice if future versions of RPG Maker let you just enter your own value for an equip's "performance" and it optimized based on that (or, even better yet, if it offered an option to let you choose a "performance" number for the equip for each actor, as well as a General performance number for each actor that you don't specifically enter it for).
Hi guys,

Thank you all very much ^_^

This newbie is very grateful!
If you want that optimization thing, then Trihan has done a script which does precisely that  You can find it here
(weapons)

Code:
def performance  params[2] + params[4] + params.inject(0) {|r, v| r += v }end
(armor)
Code:
def performance  params[3] + params[5] + params.inject(0) {|r, v| r += v }end
With this in mind, you could also just snippet your own formulas for performance, even adding the other params types as well.

Original thread: https://forums.rpgmakerweb.com/threads/show-mdf-stat-boost-in-shops.40893/