Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Independent Player Actor v. 1.4
- # VX Ace version
- # by mikb89
- # Details:
- # This script lets you have the Player as an Actor which isn't really in party.
- # Configurations:
- module INDIEPLA
- PLAYER_ACTOR_ID_VARIABLE = 1
- # A Variable will contain the ID of the Actor which represent the leader.
- # Setting this variable as <1, will deactivate the script. This way you can
- # multiply the value by -1 to activate/deactivate without losing the
- # selected Actor ID!
- # NOTE! Once you change this variable value, you must execute a call script
- # with:
- # $game_player.refresh
- # to let the graphic be renewed. Using the Debug screen, will automatically
- # do this, so that you can easily test in debug mode.
- end
- # Others:
- # Ispired by SowS script Exclude Player in party, requested from Emi in
- # rpgmkr.net forum.
- #Codename: indiepla
- ($imported ||= {})[:mikb89_indiepla] = true
- # License:
- # - You can ask me to include support for other scripts as long as these scripts
- # use the $imported[script] = true;
- # - You can modify and even repost my scripts, after having received a response
- # by me. For reposting it, anyway, you must have done heavy edit or porting,
- # you can't do a post with the script as is;
- # - You can use my scripts for whatever you want, from free to open to
- # commercial games. I'd appreciate by the way if you let me know about what
- # you're doing;
- # - You must credit me, if you use this script or part of it.
- class Game_Player < Game_Character
- alias_method(:actor_b4_indiepla, :actor) unless method_defined?(:actor_b4_indiepla)
- #class Game_Player#def actor() <- aliased
- def actor
- if $game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1
- actor_b4_indiepla
- else
- $game_actors[$game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE]]
- end
- end
- end
- class Game_Follower < Game_Character
- alias_method(:actor_b4_indiepla, :actor) unless method_defined?(:actor_b4_indiepla)
- #class Game_Follower#def actor() <- aliased
- def actor
- if $game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1
- actor_b4_indiepla
- else
- $game_party.battle_members[@member_index - 1]
- end
- end
- end
- class Game_Party < Game_Unit
- alias_method(:max_bm_b4_indiepla, :max_battle_members) unless method_defined?(:max_bm_b4_indiepla)
- #class Game_Party#def max_battle_members() <- aliased
- def max_battle_members
- return max_bm_b4_indiepla + (($game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1) ? 0 : 1)
- end
- alias_method(:leader_b4_indiepla, :leader) unless method_defined?(:leader_b4_indiepla)
- #class Game_Party#def leader() <- aliased
- def leader
- if $game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE] < 1
- leader_b4_indiepla
- else
- $game_actors[$game_variables[INDIEPLA::PLAYER_ACTOR_ID_VARIABLE]]
- end
- end
- end
- class Scene_Debug < Scene_MenuBase
- alias_method(:terminate_b4_indiepla, :terminate) unless method_defined?(:terminate_b4_indiepla)
- #class Scene_Debug#def terminate() <- aliased
- def terminate
- $game_player.refresh
- terminate_b4_indiepla
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement