Need Help With Yanfly Scripts

SirDanzil

Warper
Member
Joined
May 7, 2017
Messages
3
Reaction score
0
First Language
Russian
Primarily Uses
RMVXA
Hello fellow Rpg Makers!
So I am using a bunch of Yanfly's scripts: Ace Shop Options, Ace Item Menu. And I ran into this problem.
yeah, its in Russian, but thats not the case
So it draws MAT and MDF stats eveth though I commented out thease stats in Game_BattlerBase and even assigned their ids to other stats, so MAT and MDF doesn't even exist in my game, yet still the script shows them.
Here is the part of the script that is responsible for it.
#--------------------------------------------------------------------------
# draw_item_stats
#--------------------------------------------------------------------------
def draw_item_stats
return unless @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
dx = 96; dy = 0
dw = (contents.width - 96) / 2 #2
for i in 0...8
draw_equip_param(i, dx, dy, dw) # draw_equip_param(i, dx, dy, dw)
dx = dx >= 96 + dw ? 96 : 96 + dw #dx = dx >= 96 + dw ? 96 : 96 + dw
dy += line_height if dx == 96
end
end

#--------------------------------------------------------------------------
# draw_equip_param
#--------------------------------------------------------------------------
def draw_equip_param(param_id, dx, dy, dw)
draw_background_box(dx, dy, dw)
change_color(system_color)
draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
if $imported["YEA-EquipDynamicStats"]
draw_percentage_param(param_id, dx, dy, dw)
else
draw_set_param(param_id, dx, dy, dw) # draw_set_param(param_id, dx, dy, dw)
end
end

#--------------------------------------------------------------------------
# draw_percentage_param
#--------------------------------------------------------------------------
def draw_percentage_param(param_id, dx, dy, dw)
if @item.per_params[param_id] != 0 && @item.params[param_id] != 0
text = draw_set_param(param_id, dx, dy, dw)
dw -= text_size(text).width
draw_percent_param(param_id, dx, dy, dw)
elsif @item.per_params[param_id] != 0 && @item.params[param_id] == 0
draw_percent_param(param_id, dx, dy, dw)
else
draw_set_param(param_id, dx, dy, dw)
end
end

#--------------------------------------------------------------------------
# draw_set_param
#--------------------------------------------------------------------------
def draw_set_param(param_id, dx, dy, dw)
value = @item.params[param_id]
if $imported["YEA-EquipDynamicStats"] && @item.var_params[param_id] > 0
value += $game_variables[@item.var_params[param_id]] rescue 0
end
change_color(param_change_color(value), value != 0)
text = value.group
text = "+" + text if value > 0
draw_text(dx+4, dy, dw-8, line_height, text, 2)
return text
end

#--------------------------------------------------------------------------
# draw_percent_param
#--------------------------------------------------------------------------
def draw_percent_param(param_id, dx, dy, dw)
value = @item.per_params[param_id]
change_color(param_change_color(value))
text = (@item.per_params[param_id] * 100).to_i.group + "%"
text = "+" + text if @item.per_params[param_id] > 0
draw_text(dx+4, dy, dw-8, line_height, text, 2)
return text
end
I am also using luna engine, that requires Yanfly's Core Engine, so maybe somthing there overwrites BattlerBase stats.
I may or may not be piss drunk typing this post, so exuse me if my English seems odd or this questions has been already answered or there is a specific place for this kind of threads.
Best of luck! SirDanzil
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Support. Please be sure to post your threads in the correct forum next time. Thank you.


Yanfly has code in the scripts to draw all 8 base parameters (HP/MP/ATK/DEF/MAT/MDF/AGI/LUK). You'll have to find the code that draws those extra stats and comment it out.
 

SirDanzil

Warper
Member
Joined
May 7, 2017
Messages
3
Reaction score
0
First Language
Russian
Primarily Uses
RMVXA
Sorry for posting it in the wrong foum.
So I've hunted down the code.
#--------------------------------------------------------------------------
# draw_equip_param
#--------------------------------------------------------------------------
def draw_equip_param(param_id, dx, dy, dw)
draw_background_box(dx, dy, dw)
change_color(system_color)
draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
if $imported["YEA-EquipDynamicStats"]
draw_percentage_param(param_id, dx, dy, dw)
else
draw_set_param(param_id, dx, dy, dw)
end
end
draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
and
draw_set_param(param_id, dx, dy, dw)
are responisible for displaying stats.
I can change param_id to show the needed stat, like only show param(1) but what is the correct way to make it show say param(1) param(2) param(6) and param(5)? How my code should look like?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top