2 hours ago
(This post was last modified: 2 hours ago by DerVVulfman.)
(Yesterday, 04:20 AM)DerVVulfman Wrote: The second a sort of RMXP scripts database rewrite based on the old RMXP SDK. But for that, I am using kyonides's HiddenChest system as it is using a much newer version of Ruby so it is definitely more compliant with newer versions of RUBY. The old SDK focused mostly on initialization and the main update methods in the scene classes... but ignored much anything else. LOTS to break down where would-be scripters could comparatively attach code much easier.
Funny thing when you actually work to slice and dice the default scripts that the original team of the RMXP SDK of 2006-2008 didn't finish break into smaller sections.
I found this in Scene_Battle.
def start_phase4
# Shift to phase 4
@phase = 4
# Turn count
$game_temp.battle_turn += 1
# Search all battle event pages
for index in 0...$data_troops[@troop_id].pages.size
# Get event page
page = $data_troops[@troop_id].pages[index]
# If this page span is [turn]
if page.span == 1
# Clear action completed flags
$game_temp.battle_event_flags[index] = false
end
end
# Set actor as unselectable
@actor_index = -1
@active_battler = nil
# Enable party command window
@party_command_window.active = false
@party_command_window.visible = false
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
I'm sorry. The comment/description says the party command window is being ENABLED? # Shift to phase 4
@phase = 4
# Turn count
$game_temp.battle_turn += 1
# Search all battle event pages
for index in 0...$data_troops[@troop_id].pages.size
# Get event page
page = $data_troops[@troop_id].pages[index]
# If this page span is [turn]
if page.span == 1
# Clear action completed flags
$game_temp.battle_event_flags[index] = false
end
end
# Set actor as unselectable
@actor_index = -1
@active_battler = nil
# Enable party command window
@party_command_window.active = false
@party_command_window.visible = false
# Disable actor command window
@actor_command_window.active = false
@actor_command_window.visible = false
HAHAHA! Yeah, whoever was translating the original Japanese comments to English.... missed a spot.Now when I say I am breaking down the scripts... er...
def make_skill_action_result
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# Exit if unable to use due to SP running out
return if make_skill_action_result_blocked?
end
# Apply cost
make_skill_action_cost
# Refresh status window
@status_window.refresh
# Set Skill/Item actions
make_object_action_effects(@skill)
# Apply skill effect
make_skill_action_effect
end
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# Exit if unable to use due to SP running out
return if make_skill_action_result_blocked?
end
# Apply cost
make_skill_action_cost
# Refresh status window
@status_window.refresh
# Set Skill/Item actions
make_object_action_effects(@skill)
# Apply skill effect
make_skill_action_effect
end
I invite you to look at the original method from RPGMaker's Scene_Battle. Its a bit larger.
For this, I made several smaller methods
- make_skill_action_result_blocked? Which determines if a skill can be used or not...
- make_skill_action_cost Which reduces the attacker's SP cost
- make_object_action_effects Which updates the help, sets the animations, common events and targets (also used by Items)
- make_skill_action_effect Which finally performs the Game_Battler attack effects on the target(s)
Being broken into smaller sections makes adding new content (script addons) easier as rewriting the base method will likely not be needed.
The old RMXP SDK had a couple of good ideas; standarization on script method names, smaller and more manageable methods which would allow more compliance with other works, a means to optimize the code so systems automatically update without needs to be called.
They just sucked at marketing as they kept making updates after updates after updates, so when you made your SDK script it was immediatly broken by the NEXT version. I'm gong to work a bit on this... and see what tricks I can retrieve whilst keeping the XP naming standards.
.... this is just one of the many things I have been working upon...

![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)