LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



Go to page : 1, 2, 3, 4, 5  Next

View previous topic View next topic Go down Message [Page 1 of 5]

Administrator
Administrator
#1 RMXP - SWAP LEADER Empty RMXP - SWAP LEADER
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
I know XAS is meant to be for a single actor but that didn't stop people from making an ALLY system ^,^

This script will allow you to use a two button combo to switch characters on the fly.
SO as you're making your game... give the other characters in your party a change to lead and prove their worth!

RMXP - SWAP LEADER Leader10

+ switch only works when there is more than 1 actor in your party
+ better button combination configuration
+ easy animation assignment
+ easy switch sound assignment
(may create a sound "case" based upon actor)
+ will add switch control

just RMXP version 3/9/21

Code:
################################################################################
# [RMXP] Swap Leader v3.0 by G@MeF@Ce 2/5/11 - 3/9/21
#
# www.gameface101.com remembering and giving thanks to:  
# mr_wiggles, hackel, kain nobel, modern algebra, dark_seed, and albertfish
# for all the support in the past and inspiration to make scripts in the future
#===============================================================================
# RMXP Instructions:
# Open Script Database (F11) Copy and Paste this Script above Main
#
# setup options in the module
################################################################################

  module G101_SL

#[CONTROL OPTIONS]==============================================================
      NO_SWAP = 2
      SL_PRESS_HOLD = Input::L
      TRIGGER_SWITCH = Input::X
#[GRAPHIC OPTIONS]==============================================================
      ANIMATED_SWITCH = true
      ANIMATION_ID = 66
#[SOUND OPTIONS]================================================================
      SWITCH_SOUND = true
      SOUND_SWITCH = RPG::AudioFile.new("", 100, 100)
      
     end

#===============================================================================
# ■ Game_Temp
#===============================================================================
   class Game_Temp
      attr_accessor :remember_skill
      attr_accessor :remember_item
      attr_accessor :collapse_done
       alias swap_initialize initialize

  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
     def initialize
         @remember_skill = []
         @remember_item = []
         swap_initialize
     end
   end
#===============================================================================
# ■ Scene_Map
#===============================================================================
        class Scene_Map
         alias swap_leader_update update
         include G101_SL
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------
      def update
        swap_leader_update
          actor = $game_party.actors[0]
             unless $game_party.actors.empty?
                if actor.hp == 0
                  unless $game_party.all_dead?
                    $game_party.actors.shift
                    $game_player.refresh
                    $game_map.refresh
                  end
                end    
              end
    return false if $game_system.map_interpreter.running?
      if $game_switches[NO_SWAP] == false
        if $game_party.actors.size > 1
          if Input.press?(SL_PRESS_HOLD) and Input.trigger?(TRIGGER_SWITCH)
            if ANIMATED_SWITCH == true
             $game_player.animation_id = ANIMATION_ID
            end
            if SWITCH_SOUND == true
             $game_system.se_play(SOUND_SWITCH)
           end
          g101_swap_leader
          end
        end
      end
    end
  #--------------------------------------------------------------------------
  # ● swap method
  #--------------------------------------------------------------------------
        def g101_swap_leader
         old_lead = $game_party.actors.shift
         $game_party.add_actor (old_lead.id)
         $game_player.refresh
        end
      end
#end of script ^,^

old XAS version 2/5/2011


Code:
################################################################################
#============= XAS SWITCH LEADER v2.3 by gameface101 2-5-2011 ==================
################################################################################
# special thanks to: hackel, kain nobel, modern algebra, dark_seed, albertfish
################################################################################
module XAS_SL
  SL_PRESS_HOLD = Input::X
  TRIGGER_SWITCH = Input::A
  ANIMATED_SWITCH = true
  ANIMATION_ID = 220
  SWITCH_SOUND = true
  SOUND_SWITCH = RPG::AudioFile.new("058-Wrong02", 100, 100)
end
#===============================================================================
class Game_Temp
attr_accessor :remember_skill
attr_accessor :remember_item
attr_accessor :collapse_done
alias swap_initialize initialize
def initialize
@remember_skill = []
@remember_item = []
swap_initialize
end
end
#===============================================================================
class Scene_Map
alias switch_xas_leader update
 include XAS_SL
#-------------------------------------------------------------------------------
def update
switch_xas_leader
if $game_party.actors.size > 1
if Input.press?(SL_PRESS_HOLD) and Input.trigger?(TRIGGER_SWITCH)
  if ANIMATED_SWITCH == true
$game_player.animation_id = ANIMATION_ID
end
  if SWITCH_SOUND == true
$game_system.se_play(SOUND_SWITCH)
end    
xas_switch_leader
end
end
end
end

#-------------------------------------------------------------------------------
def xas_switch_leader
$game_temp.remember_skill[$game_party.actors[0].id] = $game_system.xas_skill_id
$game_variables[1] = $game_temp.remember_skill[$game_party.actors[0].id]
$game_temp.remember_item[$game_party.actors[0].id]= $game_system.xas_item_id
old_lead = $game_party.actors.shift
$game_party.add_actor (old_lead.id)
$game_player.refresh
unless $game_temp.remember_skill[$game_party.actors[0].id] == nil
$game_system.xas_skill_id = $game_temp.remember_skill[$game_party.actors[0].id]
else
$game_system.xas_skill_id = 0
end
unless $game_temp.remember_item[$game_party.actors[0].id] == nil
$game_system.xas_item_id = $game_temp.remember_item[$game_party.actors[0].id]
else
$game_system.xas_item_id = 0
end
$scene = Scene_Map.new
end
#===============================================================================
class Scene_Map
  alias_method :switch_dead_leader_update, :update
  def update
    switch_dead_leader_update
    actor = $game_party.actors[0]
    unless $game_party.actors.empty?
        if actor.hp == 0
          unless $game_party.all_dead?
            $game_party.actors.shift
          $game_system.xas_skill_id = $game_temp.remember_skill[$game_party.actors[0].id]
          $game_system.xas_item_id = $game_temp.remember_item[$game_party.actors[0].id]
              $game_player.refresh
              $game_map.refresh
              $scene = Scene_Map.new
            else ;
                if XAS_BA::AUTOGAMEOVER == true
                $scene = Scene_Gameover.new rescue nil
            else  
            $game_switches[XAS_BA::GAMEOVER_SWITCH_ID] = true
            $game_map.refresh
            $scene = Scene_Map.new
            end
          end
        end      
     end
  end
end

I may have to add that sound case based on actor id ^,^
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Community Moderator
Community Moderator
#2 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

GeMinEye

GeMinEye
Community Moderator
Community Moderator
Community Moderator
profile
The gods should have called you the Scripting Guru cheers
Community Moderator
Show Signature
Community Moderator
http://dezrealah.tumblr.com/
Administrator
Administrator
#3 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
thanks but I am far from being a script guru...

maybe some day...
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Tutorial Wizardmaster
Tutorial Wizardmaster
#4 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

calvin624

calvin624
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
You're definitely getting there GB. Gonna have a good look at this today, see if I can help out any.
Tutorial Wizardmaster
Show Signature
Tutorial Wizardmaster
http://xasabs.com
ACTIVATED
ACTIVATED
#5 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

DontSay

DontSay
ACTIVATED
ACTIVATED
ACTIVATED
profile
Hi there... ^^

I've edited the script a little bit and finished it with common events (because I am not that good at ruby)... ^^

Now you can change the leader and he got all the weapons and Skills the leader before had equiped...

I also inserted an Game-over-Leader-Change Script I found and edited it a little bit, so it will automatically change the new leader weapon etc. ^^

There can be bugs, because I copied it over from my game to the XAS Demo... on my game it works very well... ^^

The only thing I can't get working is the exp points being parted.. ^^

Oh and if you would like to have the clothes changed also to the leader you have to do it the same way in the common events... ^^ But I don't like that... so you can also deactivate the change "shield" thing.. etc...

Maybe it will help the scripters out there to work on a script that have got all inside without common events.... ^^
Feel free to experiment with it.. ^^

Wish ya all fun with it... DOWNLOAD

Greetz,
DontSay

P.S. Sorry for my bad english, I am from Germany ^^
For the ones who don't know how to change leader "Press Button A and X" together.. for me it is Run and Shield button ^^
ACTIVATED
Show Signature
ACTIVATED
http://www.lorae.de.vu
WERDZ
WERDZ
#6 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

KenizzyNY

avatar
WERDZ
WERDZ
WERDZ
profile
Nice job Game, and welcome to the forums DontSay!
WERDZ
https://facebook.com/kilduzza
Administrator
Administrator
#7 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
@Dont Say! - (link in pink) thank you for sharing this wisdom Very Happy

don't worry... you're English is way better than my German.

wirklich!

I will learn to incorporate the game over along with the
skills and weapons when switching, then hopefully we can find
a solution for the experience points ^,^

danke wieder
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
ACTIVATED
ACTIVATED
#8 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

DontSay

DontSay
ACTIVATED
ACTIVATED
ACTIVATED
profile
Thanx KenizzyNY and Gameface101.. ^^

@ Gameface101: To prevent any mistakes... I am not "link in pink" (cause there is a guy called link in pink on a forum).. ^^ It was a joke, cause the "link" I send you, was pink ^^'
And I am looking forward to your script, will make it easier to work with, than using common events... ^^

So if you're interested, in my signature you can find a linke to my Game-Homepage... ^^ There you will find some info and screens etc. but for now only in german language... will try to translate it some day ^^

My Game is called Secret of Lorae and as you can imagine it is made with the XAS and has got a little bit of Secret of Mana in it.. ^^ cause I love this game... ^^

Greetings...
DontSay ^^
ACTIVATED
Show Signature
ACTIVATED
http://www.lorae.de.vu
Administrator
Administrator
#9 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
@Dont Say - ok I miss understood the link in pink... ha!
thanks for clarifying ^,^

but you are Dark Wonder yah?

Of course the script is just missing that method in which
skills and items are remembered for each player...
I've been kicking it around...but instead of having
a buggy script I just made it so that it clears for now.

Secret of Mana was another great game...

I look forward to seeing an english version
of your XAS project.

I noticed you have done some freehand artwork,
customized your HUD, using the MOG menu, and
have some very detailed maps.... GOOD JOB!

thanks for sharing.



EDIT: check the original post!

new SWITCH XAS LEADER V.5
remembers items and skills for each actor
(thanks to Hackel)
and shifts actors if player dies
instead of game over

:face:
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
ACTIVATED
ACTIVATED
#10 RMXP - SWAP LEADER Empty Re: RMXP - SWAP LEADER
Loading

DontSay

DontSay
ACTIVATED
ACTIVATED
ACTIVATED
profile
Woohoo... nice work... ^^

Now I can change my Common Event selfmade remember item etc thing and put your new version in game... nice work.. ^^
I am so excited to get more than one person in my game now ^^ harr ^^
ACTIVATED
Show Signature
ACTIVATED
http://www.lorae.de.vu

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 5]

Go to page : 1, 2, 3, 4, 5  Next

 

Chatbox system disabled
Personal messaging disabled