- Joined
- Dec 22, 2014
- Messages
- 359
- Reaction score
- 111
- First Language
- English
- Primarily Uses
- RMVXA
http://cleovlyers.blogspot.com/
Are there any backups for any of this user's scripts?
Are there any backups for any of this user's scripts?
Yeah, I checked through those forums too hahaI know the person. He was a part of our local Indonesian RM community. But he's already long gone, and I forgot his FB name (or he might change his FB name again or something). In short, yeah idk how to contact him anymore.
Removed code, use the code provided by Sixth.Hi there!
How can I put for instance LV 1 to LV 01?
also how to change the color if the first case is 0 ?
thanks in advance
change_color(actor.level > 9 ? text_color(17) : normal_color)
draw_text(x + 32, y, 24, line_height, sprintf("%02d", actor.level), 2)
method_1 if xyz > value
method_2 if xyz < value
method_3 if xyz == value
method_4 if xyz != value
# Or even worse:
method_1 if xyz < value
method_2 if xyz < value
My bad, Kept messing up with the draw_text method and rushed for a solution.Use the built-in text formatting options instead.Code:change_color(actor.level > 9 ? text_color(17) : normal_color) draw_text(x + 32, y, 24, line_height, sprintf("%02d", actor.level), 2)
Also, never do this in your code:
If xyz can't change in the executed conditioned methods, there is no reason to recheck xyz every single time.Code:method_1 if xyz > value method_2 if xyz < value method_3 if xyz == value method_4 if xyz != value # Or even worse: method_1 if xyz < value method_2 if xyz < value
Use elsif or case (if applicable) statements, and group your methods inside a single branch when possible.
Thank you so much, what I meant was to change color only in the "0".change_color(actor.level > 9 ? text_color(17) : normal_color) draw_text(x + 32, y, 24, line_height, sprintf("%02d", actor.level), 2)
class Game_Party
def get_all_level
level_a = all_members.collect {|actor| actor.level }
level_a.inject(0, :+)
end
end
class Game_Interpreter
def party_level
$game_party.get_all_level / $game_party.all_members.size
end
end
class Game_Variables
def [](variable_id)
return <your desired value> if variable_id == 10
@data[variable_id] || 0
end
end
module BattleManager
def self.can_escape=(val)
@can_escape = val
end
end
BattleManager.can_escape = true
That worked beautifully, thank you kind sir.I don't work with VXA, but I'm sure it's as simple as adding this to your scripts
And using the script callCode:module BattleManager def self.can_escape=(val) @can_escape = val end end
Code:BattleManager.can_escape = true
adding this to your scripts
Fascinating, this does not work for me in a test project at all.That worked beautifully
You probably need to refresh the party command windowFascinating, this does not work for me in a test project at all.
Well I'm also using a bunch of other scripts, including but not limited to Yanfly Battle Engine and Yanfly Command List, so maybe that's why. I don't know much.Fascinating, this does not work for me in a test project at all.