-
Content Count
702 -
Joined
-
Last visited
-
Days Won
37
Content Type
Profiles
Forums
Calendar
Blogs
Gallery
Everything posted by roninator2
-
This works # ╔═════════════════════════════════════╦════════════════════╗ # ║ Title: Materia Skill Level Array ║ Version: 1.00 ║ # ║ Author: Roninator2 ║ ║ # ╠═════════════════════════════════════╬════════════════════╣ # ║ Function: ║ Date Created ║ # ║ ╠════════════════════╣ # ║ Adds no breed option / Skill Array ║ 24 Jan 2022 ║ # ╚═════════════════════════════════════╩════════════════════╝ # ╔══════════════════════════════════════════════════════════╗ # ║ Use <no breed> to not have a materia duplicate ║ # ║ when mastered. ║ # ║ ║ # ║ Added option to Have skills learned at the same level ║ # ║ Using notetag <skills: 5: 10, 7: 12> is the default way ║ # ║ With this addon you can specify the levels to be the ║ # ║ same for several skills ║ # ║ <skills: 5: 8, 5: 10, 5: 12, 6: 15> ║ # ║ Skills 8, 10, & 12 will be learned at level 5 ║ # ║ ║ # ║ Not compatible with scripts that modify skills learned ║ # ║ e.g. Fomar - Skill Replace ║ # ╚══════════════════════════════════════════════════════════╝ # ╔═════════════════════════════════════╗ # ║ Terms of use: ║ # ║ Free for all uses in RPG Maker ║ # ╚═════════════════════════════════════╝ class RPG::Armor < RPG::EquipItem def setup_skills @skills = {} values = note =~ /<SKILLS:\s([\d\s\:,;]+)>/i ? $1.dup : "" values.scan(/(\d+):\s*(\d+)/i).each {|x, y| @skills[x.to_i] ||= [] @skills[x.to_i] << y.to_i } end def gain_ap(n, growth) old_level = level @ap += (n * growth).to_i breedoff = note =~ /<NO BREED>/i ? true : false if Materia_Breeding && old_level < max_level && level == max_level $game_party.gain_materia($data_armors[@id]) unless breedoff == true end end end class Game_Actor < Game_Battler def gain_materia_skill(m, i) if m.enemy_skill? m.learn.values[i] learn_skill(id) @materia_skills.push(id) else m.skills[i + 1].each do |l| learn_skill(l) @materia_skills.push(l) end end @materia_skills.compact! end end class Window_MateriaInfo < Window_Base def draw_materia_abilities y = @materia.skills.keys.size z = @shop ? 120 : 88 change_color(normal_color, true) list = @materia.effects.keys.collect {|effect| effect } list.each_with_index do |effect, i| if @materia.effect_name contents.draw_text(12, z + (@sl + i + y) * 18, 172, 24, @materia.effect_name) break elsif @materia.effects[effect].numeric? name = make_string(effect).capitalize value = @materia.effects[effect] * 100 draw_effect_value(effect, i + y, name, value) else name = make_string(effect).capitalize contents.draw_text(12, z + (i + y) * 18, 172, 24, name) end end end def draw_materia_skills draw_materia_price if @shop change_color(system_color) y = @shop ? 120 : 88 @sl = 0 contents.draw_text(4, y - 20, 172, 24, "Ability list") change_color(normal_color) @materia.skills.keys.sort.each_with_index do |key, i| @materia.skills[key].each_with_index do |k, j| name = $data_skills[k].name @sl += 1 if j >= 1 change_color(normal_color, key <= @materia.level) contents.draw_text(12, y + (@sl + i) * 18, 172, 24, name) end end end end I just need to figure out how to get the lines to draw properly. Currently it doubles up when there are more than one entry for a skill level. Figured it out. I was missing the effect name drawn at the bottom, which was in another method. This mod makes the materia system not compatible with other scripts that adjust skills learned.
-
You should be able to block breeding with a simple change like this. Line 737, then use notetag <no breed> (not case sensitive) def gain_ap(n, growth) old_level = level @ap += (n * growth).to_i breedoff = note =~ /<NO BREED>/i ? true : false if Materia_Breeding && old_level < max_level && level == max_level $game_party.gain_materia($data_armors[@id]) unless breedoff == true end end For the multiple skills at one level you should just be able to do a note tag like this <skills: 5: 9, 5: 12, 5: 15, 5: 22> etc Glad you figured out the master materia. True it doesn't have a note tag to say give me all commands or all magics or all skills. You have to set it up manually.
-
Drawing Text Overlapping and Refreshing Windows
roninator2 replied to Zen Blood's topic in Programming
You could try something like def description_clear @description_window.clear end # in Window_ArtworkDescription def clear self.contents.clear end that should remove the draw text- 4 replies
-
- 1
-
-
- window contents
- custom windows
-
(and 4 more)
Tagged with:
-
Weapon casting a random skill (Yanfly Ace Weapon Attack Replacement)
roninator2 replied to Aslanemperor's topic in Editor Support and Discussion
The code I posted previously and now the finished product will do just that. The choice of TP swap and MP swap is an option. Yes. require yanfly's script. It's your choice to use as little or as much as you want for the note tags. -
Weapon casting a random skill (Yanfly Ace Weapon Attack Replacement)
roninator2 replied to Aslanemperor's topic in Editor Support and Discussion
As with all scripts they go in the script editor. You can't expect to have a modification to a script function without putting in some code. Damage formulas can not make changes to the skill used in that manner. As the name says, it's the damage formula, not skill selection formula. You said you wanted a range. How did you expect to have that work? I'm asking because maybe you have an idea that is possible. I've almost got the list selection working. One thing I've noticed though is that you will not be able to attack unless you have enough tp for the skill. So having a random selection will sometimes cause the actor to not act or not allow you to select attack. -
Weapon casting a random skill (Yanfly Ace Weapon Attack Replacement)
roninator2 replied to Aslanemperor's topic in Editor Support and Discussion
This will do a range 10, 15. Working on having it as a list. 1, 2, 3, 4 etc. Added list option -
Yanfly Engine Addon - Ace Status Menu Changed (Shows Stats, Params, Element & State Resistances)
roninator2 replied to Japhasca's topic in Programming
Please place all that code into a code block which goes into a spoiler. If you don't it can mess up formatting and turn some of the code into emoji's. -
NEED INFO: How large are your maps?
roninator2 replied to ElCodes's topic in Editor Support and Discussion
Most maps in my project are 100x100 with some smaller than that, but my world map is 400x500 I have large maps because I'm doing a large project. And I'm expecting to need a lot of maps so I combined most together to save on files. So a house map will actually have 4-10 houses in it spaced apart so you would not see the other house when your inside one. -
Working on a script for someone and I have everything except one part. When doing evented battles (event command start battle - command_301), it calls Game_Interpreter::command_301 Well for the function of my script I need to make command_301 call a method in Scene_Map. I just learned about self. for methods for this instance (knew about them before but not for calling a method in a class, I knew about them only for modules) When I try this it doesn't access the same data. in the new method 'self.method_name' in Scene_Map, I put in a call to 'actual_method', but it always says it cannot find that method. So is there a good way to do this?
-
upon examination of SceneManager I see what you mean. So, the only scene you could probably affect is Scene_Map, since it would be loaded and you normally return to Scene_Map not goto. That makes it bad coding then if someone was to use goto Scene_Map instead of return from like the menu or something. You could get duplicate map scenes in the stack. Thanks for making me go look. My script is working because when the command 301 is called the person would be on the map talking to an NPC or an event is running so using SceneManager.scene.method works fine. And I needed to call the method because it's in the map scene where I make a command to the instance variable to do a method (dispose). Here's the entire script https://forums.rpgmakerweb.com/index.php?threads/panic-window.143427/
-
Well, take any class in RPG Maker VX Ace, then make it call any method in any scene. but that method in that scene HAS to affect the variables already in that scene. Understand what I mean now? It just seems like a flaw in ruby that you can't call a method from another location that has nothing to do with that method, just because you need something in another class or scene to make a change or update in a completely different class or scene. The best example of this is Game_Variables. But not everything runs off of variables. Being able to affect class variables or instance variables would be useful.
-
Skill acquirement not mentioned after a battle.
roninator2 replied to dnel57's topic in Editor Support and Discussion
no all skills are listed when learned. You must have something that changes this function. Do a new project and do a battle that will raise your character 20 levels, you will see all skills listed in the battle results. Assuming you are using the default. -
Right got it. I was trying to do something like SceneManager.Scene_Map.method But after realizing that I'm currently in Scene_Map when the command 301 is called then I can use the statement you said. SceneManager.scene.method Otherwise is there a way to call a method from another class. You said instance = this_class.new but that makes a new instance so you would not be able to affect variables in the original just the new instance, correct?
-
Script updated. Auto life aliased the turn end and mine overwrote. I changed it to alias so it should work now.
-
module R2_State_GameOver States = [4, 7] Message = "died in a frenzie." Act_Name = true # use actor name in message end module BattleManager class << self alias r2_turn_end_dead_msg turn_end end def self.turn_end r2_turn_end_dead_msg call_dead_msg end def self.call_dead_msg actbat = nil actname = nil dthmsg = nil @msgcnt = 0 if @msgcnt == nil $game_party.battle_members.each do |act| if act.dead? actbat = $game_actors[act.id] actname = act.name dthmsg = R2_State_GameOver::Message dthmsg = "#{actname} " + R2_State_GameOver::Message if R2_State_GameOver::Act_Name == true @msgcnt += 1 end if actbat != nil if actbat.dead? && (actbat.states.any? { |st| R2_State_GameOver::States.include?(st.id) } ) $game_message.add(sprintf(dthmsg, actname)) if @msgcnt >= 1 wait_for_message @msgcnt = 0 SceneManager.goto(Scene_Gameover) end end end end end
-
I tested it again with both scripts. (they are both needed) and it worked fine.
-
Did you remove Gamefreaks Stop State removal script?
-
True, I forgot to test without the state. Updated the code above.
-
Try this Set the message. module R2_State_GameOver State = 4 Message = "died in a frenzie." Act_Name = true # use actor name in message end class Game_Actor < Game_Battler attr_reader :message_window def perform_collapse_effect if $game_party.in_battle @sprite_effect_type = :collapse Sound.play_actor_collapse end actbat = nil actname = nil dthmsg = nil @msgcnt = 0 if @msgcnt == nil $game_party.battle_members.each do |act| if actor.id == act.id actbat = $game_actors[act.id] actname = actor.name dthmsg = R2_State_GameOver::Message dthmsg = "#{actname} " + R2_State_GameOver::Message if R2_State_GameOver::Act_Name == true @msgcnt += 1 end end if actbat != nil if actbat.dead? && actbat.state?(R2_State_GameOver::State) $game_message.add(sprintf(dthmsg, actname)) if @msgcnt == 1 BattleManager.wait_for_message SceneManager.goto(Scene_Gameover) end end end end
-
Look for game over scripts. I think I wrote one that showed a message on the game over. Let me see... Ah, this is for a herb recover, but I can make something for you that will show a message because the call to game over with the previous code is different. https://forums.rpgmakerweb.com/index.php?threads/event-before-game-over.130993/#post-1146044
-
Two things Gamesfreak keep state on death script #============================================================================== # # ▼ Gamesfreak13563 - Stop State Removal on Death # -- Last Updated: 2012.4.29 # #============================================================================== # ▼ Introduction # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script allows you to set states that won't disappear upon actor death. # The states will act as usual when the actor is dead, including counting down. # #============================================================================== #============================================================================== # ■ Options #============================================================================== module GF module STOP_STATES #State IDs that you would like to persist through death. EXCLUDED_STATES = [20] end #STOP_STATES end #GF #============================================================================== # ▼ Do not edit past this point. #============================================================================== #========================================================================== # ■ Game_BattlerBase #========================================================================== class Game_BattlerBase def clear_states_GF for state in $data_states next if state.nil? erase_state(state.id) unless GF::STOP_STATES::EXCLUDED_STATES.include?(state.id) end end end #========================================================================== # ■ Game_Battler #========================================================================== class Game_Battler < Game_BattlerBase def die @hp = 0 clear_states_GF clear_buffs end end and module R2_State_GameOver State = 4 end class Game_Actor < Game_Battler def perform_collapse_effect if $game_party.in_battle @sprite_effect_type = :collapse Sound.play_actor_collapse end actbat = nil $game_party.battle_members.each do |act| if actor.id == act.id actbat = $game_actors[act.id] end end if actbat != nil SceneManager.goto(Scene_Gameover) if actbat.dead? && actbat.state?(R2_State_GameOver::State) end end end change the state number
-
How to make a button that goes down when you stand on it and up when you don't
roninator2 replied to Ash1977's topic in Editor Support and Discussion
There is if you want it to be easier. Changing the graphic instead of changing the switch is more thought process (IMO). I find it easier to see the different graphic on the other page. IF you just do teh move route then when you leave the map and come back it will be reset with an object on top. If that's what the ash1977 is doing. You put the players x and y conditions inside each other. If you looked at my suggestion, they are separate conditions. Also why do you need to set the events location into a variable? Does the button move on the map? I think you got confused with my images. The event coordinates I used is for the boulder that moves onto the switch. -
How to make a button that goes down when you stand on it and up when you don't
roninator2 replied to Ash1977's topic in Editor Support and Discussion
I personally like using location variables The last page is not used but you could change the conditions so that once the object is on the switch that the object does not move again and then the switch can be set to the last page so that it does not run in parallel. The self switch command for event 5 is the door that opens. Then when you pass the door, you could do this -
Delete save file from in game
roninator2 replied to ChimkinTheGamer's topic in Editor Support and Discussion
Event command -> script Put the line in and see? I just tried it and it worked fine. Just have to remember DataManager.delete_save_file(0) if DataManager.save_file_exists? is for savefile01. -
Delete save file from in game
roninator2 replied to ChimkinTheGamer's topic in Editor Support and Discussion
I can be done by eventing using a script command. But you have to delete all save files if you were to make sure to remove the one the player is using since you can save in multiple slots. Untested, but this is the command I use in a script. DataManager.delete_save_file(1) if DataManager.save_file_exists?


