Show MDF Stat Boost in Shops?

KyddWyld

Warper
Member
Joined
Mar 4, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
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.
 

ArcaneEli

Mage of Thunder
Veteran
Joined
Mar 24, 2012
Messages
205
Reaction score
35
First Language
English
Primarily Uses
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.
 

KyddWyld

Warper
Member
Joined
Mar 4, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
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.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
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).
 

KyddWyld

Warper
Member
Joined
Mar 4, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Hi guys,

Thank you all very much ^_^

This newbie is very grateful!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
If you want that optimization thing, then Trihan has done a script which does precisely that  You can find it here
 

deilin

Ranger/Elementalist
Veteran
Joined
Mar 13, 2012
Messages
1,188
Reaction score
172
First Language
English
(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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top