Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,572
Reaction score
12,117
First Language
English
Primarily Uses
RMVXA
The title says it all.  I am wondering if it is possible to set a battleback to scrolling, rather than static.

If it is not, and I suspect that it won't be, my alternative would be to transfer the party to a map with a scrolling parallax.  However, how would I stop the Battle Processing command (it's an evented battle) from automatically taking me to the normal battle scene?

Thank you.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,025
First Language
Tagalog
Primarily Uses
RMVXA
You could do them both, but I do think the first one would be tons easier as on the second one, you will need to recreate the battle system since you'd make it happen on a map scene rather than the battle scene.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,572
Reaction score
12,117
First Language
English
Primarily Uses
RMVXA
Thank you for the information, but I regret that just saying "you could do them both" doesn't help me as I don't know how to do either.

Any details of the first, as that is easier?
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,025
First Language
Tagalog
Primarily Uses
RMVXA
Since the battleback is just an image created at the back of the scene, you could for example make the update call for the battle backs on Spriteset_Battle change the bitmap used by the battleback sprite or just move it to a different part of the same image.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,572
Reaction score
12,117
First Language
English
Primarily Uses
RMVXA
No I couldn't because I don't even understand your answer, let alone know how to do it.  I am not a scripter.  

Although I think it's obvious from the OP, I should perhaps also mention that this is just for one battle, so any change would have to be done by e.g. a script call, or a switch.  It will, therefore (I assume, but again I stress, I am not a scripter) need some snippet or other.
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
880
First Language
English
Primarily Uses
RMMV
Hmm, give the following snippet a try :

Code:
#==============================================================================# ** NS#==============================================================================class NS; end # NS  #==============================================================================# ** NS::Battle_Plane#==============================================================================class NS::Battle_Plane        # Switch to Enable Scrolling Background    Enable_Switch    = 15        # Variables for Horizontal and Vertical Scroll Speed    Back1_X_Variable = 10    Back1_Y_Variable = 11    Back2_X_Variable = 12    Back2_Y_Variable = 13    end # NS::Battle_Plane#==============================================================================# ** Spriteset_Battle#==============================================================================class Spriteset_Battle  #--------------------------------------------------------------------------  # * Create Battle Background (Floor) Sprite  #--------------------------------------------------------------------------  unless method_defined?(:battleback_C42W53GD_sb_create_battleback1)    alias_method(:battleback_C42W53GD_sb_create_battleback1, :create_battleback1)  end    def create_battleback1(*args, &block)    if $game_switches[NS::Battle_Plane::Enable_Switch] == true      @back1_sprite = Plane.new(@viewport1)      @back1_sprite.bitmap = battleback1_bitmap      @back1_sprite.z  = 0            @back1_sprite_ox = 0      @back1_sprite_oy = 0    else      battleback_C42W53GD_sb_create_battleback1(*args, &block)    end  end    #--------------------------------------------------------------------------  # * Create Battle Background (Wall) Sprite  #--------------------------------------------------------------------------  unless method_defined?(:battleback_ms67JgWE_sb_create_battleback2)    alias_method(:battleback_ms67JgWE_sb_create_battleback2, :create_battleback2)  end    def create_battleback2(*args, &block)    if $game_switches[NS::Battle_Plane::Enable_Switch] == true      @back2_sprite = Plane.new(@viewport1)      @back2_sprite.bitmap = battleback2_bitmap      @back2_sprite.z = 1      @back2_sprite_ox = 0      @back2_sprite_oy = 0    else      battleback_ms67JgWE_sb_create_battleback2(*args, &block)    end  end  #--------------------------------------------------------------------------  # * Update Battle Background (Floor) Sprite  #--------------------------------------------------------------------------  unless method_defined?(:battleback_HNirC0QE_sb_update_battleback1)    alias_method(:battleback_HNirC0QE_sb_update_battleback1, :update_battleback1)  end    def update_battleback1(*args, &block)    if $game_switches[NS::Battle_Plane::Enable_Switch] == true      @back1_sprite_ox += $game_variables[NS::Battle_Plane::Back1_X_Variable].to_f / 64      @back1_sprite_oy += $game_variables[NS::Battle_Plane::Back1_Y_Variable].to_f / 64      @back1_sprite.ox = @back1_sprite_ox * 16      @back1_sprite.oy = @back1_sprite_oy * 16    else      battleback_HNirC0QE_sb_update_battleback1(*args, &block)    end  end    #--------------------------------------------------------------------------  # * Update Battle Background (Wall) Sprite  #--------------------------------------------------------------------------  unless method_defined?(:battleback_zmrQkMCU_sb_update_battleback2)    alias_method(:battleback_zmrQkMCU_sb_update_battleback2, :update_battleback2)  end    def update_battleback2(*args, &block)    if $game_switches[NS::Battle_Plane::Enable_Switch] == true      @back2_sprite_ox += $game_variables[NS::Battle_Plane::Back2_X_Variable].to_f / 64      @back2_sprite_oy += $game_variables[NS::Battle_Plane::Back2_Y_Variable].to_f / 64            @back2_sprite.ox = @back2_sprite_ox * 16      @back2_sprite.oy = @back2_sprite_oy * 16    else      battleback_zmrQkMCU_sb_update_battleback2(*args, &block)    end  endend # Spriteset_Battle

EDITED BY @Archeia TO INCLUDE CODE FORMATTING FIX:
Code:
#==============================================================================
#** NS
#==============================================================================
class NS;
end #NS

#==============================================================================
# ** NS::Battle_Plane
#==============================================================================
class NS::Battle_Plane       
    # Switch to Enable Scrolling Background    
    Enable_Switch    = 15        
    # Variables for Horizontal and Vertical Scroll Speed    
    Back1_X_Variable = 10    
    Back1_Y_Variable = 11    
    Back2_X_Variable = 12    
    Back2_Y_Variable = 13    
end # NS::Battle_Plane


#==============================================================================
#** Spriteset_Battle
#==============================================================================
class Spriteset_Battle  

    #--------------------------------------------------------------------------  
    #* Create Battle Background (Floor) Sprite  
    #--------------------------------------------------------------------------  
    unless method_defined?(:battleback_C42W53GD_sb_create_battleback1)    
        alias_method(:battleback_C42W53GD_sb_create_battleback1, :create_battleback1) 
    end    

    def create_battleback1(*args, &block)    
        if $game_switches[NS::Battle_Plane::Enable_Switch] == true    
            @back1_sprite = Plane.new(@viewport1)      
            @back1_sprite.bitmap = battleback1_bitmap    
            @back1_sprite.z  = 0            @back1_sprite_ox = 0   
            @back1_sprite_oy = 0    
        else     
            battleback_C42W53GD_sb_create_battleback1(*args, &block)   
        end  
    end   

  #--------------------------------------------------------------------------  
  # * Create Battle Background (Wall) Sprite  
  #--------------------------------------------------------------------------  
    unless method_defined?(:battleback_ms67JgWE_sb_create_battleback2)    
        alias_method(:battleback_ms67JgWE_sb_create_battleback2, :create_battleback2)  
    end    

    def create_battleback2(*args, &block)   
        if $game_switches[NS::Battle_Plane::Enable_Switch] == true     
            @back2_sprite = Plane.new(@viewport1)      
            @back2_sprite.bitmap = battleback2_bitmap      
            @back2_sprite.z = 1      @back2_sprite_ox = 0     
            @back2_sprite_oy = 0    
        else      
            battleback_ms67JgWE_sb_create_battleback2(*args, &block)   
        end  
     end  
  #-------------------------------------------------------------------------- 
  #* Update Battle Background (Floor) Sprite  
  #--------------------------------------------------------------------------  
    unless method_defined?(:battleback_HNirC0QE_sb_update_battleback1)    
     alias_method(:battleback_HNirC0QE_sb_update_battleback1, :update_battleback1) 
    end    

    def update_battleback1(*args, &block)   
        if $game_switches[NS::Battle_Plane::Enable_Switch] == true    
            @back1_sprite_ox += $game_variables[NS::Battle_Plane::Back1_X_Variable].to_f / 64 
            @back1_sprite_oy += $game_variables[NS::Battle_Plane::Back1_Y_Variable].to_f / 64 
            @back1_sprite.ox = @back1_sprite_ox * 16      @back1_sprite.oy = @back1_sprite_oy * 16  
        else      
            battleback_HNirC0QE_sb_update_battleback1(*args, &block)   
        end  
    end   
    
    #--------------------------------------------------------------------------  
    # * Update Battle Background (Wall) Sprite  
    #-------------------------------------------------------------------------- 
    unless method_defined?(:battleback_zmrQkMCU_sb_update_battleback2)   
        alias_method(:battleback_zmrQkMCU_sb_update_battleback2, :update_battleback2)
    end   
    
    def update_battleback2(*args, &block)    
        if $game_switches[NS::Battle_Plane::Enable_Switch] == true    
            @back2_sprite_ox += $game_variables[NS::Battle_Plane::Back2_X_Variable].to_f / 64  
            @back2_sprite_oy += $game_variables[NS::Battle_Plane::Back2_Y_Variable].to_f / 64   
            @back2_sprite.ox = @back2_sprite_ox * 16      @back2_sprite.oy = @back2_sprite_oy * 16  
        else      
            battleback_zmrQkMCU_sb_update_battleback2(*args, &block) 
        end  
    end

end # Spriteset_Battle
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,572
Reaction score
12,117
First Language
English
Primarily Uses
RMVXA
Well on first inspection, and following a little playing around on scrolling speed, I have to say - sheer genius.  This does precisely and exactly what I had hoped for.

I am enormously appreciative of this.  Thank you very much indeed.

EDIT

Unfortunately it seems I spoke too soon.  Although everything works fine with the battle that involves the scrolling battleback, an earlier encounter (with, therefore, the switch still OFF) gives this error message:

ErrorMessage_zpsjmiow7y1.png
 
Last edited by a moderator:

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
880
First Language
English
Primarily Uses
RMMV
Well on first inspection, and following a little playing around on scrolling speed, I have to say - sheer genius.  This does precisely and exactly what I had hoped for.


I am enormously appreciative of this.  Thank you very much indeed.


EDIT


Unfortunately it seems I spoke too soon.  Although everything works fine with the battle that involves the scrolling battleback, an earlier encounter (with, therefore, the switch still OFF) gives this error message:


ErrorMessage_zpsjmiow7y1.png
Unfortunately, you copied the script right as I was updating my post because I forgot to change a line of code. Use the updated code in my previous post and it should work fine.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,572
Reaction score
12,117
First Language
English
Primarily Uses
RMVXA
I am delighted to be able to report that all is fine at my end.  It seems my eagerness was my undoing.

Once more, many, many thanks for this.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,696
Reaction score
9,431
First Language
German
Primarily Uses
RMMV
I've moved this thread to Script Request. Please be sure to post your threads in the correct forum next time. Thank you.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

jeetje, you are told to read forums and learn about them before you post, cmon ppl, it is impossible?
plugin for this, plugin for that, i should probs just buy all the visustella plugins lol
Hey you know that problem I had with my old project file? I figured out what went wrong, so I fixed it there! Now I don't need this new file! *deletes*

......

*remembers I made good changes on it and did not write those changes down elsewhere*

.....Well ****.
Why won't you play above 10 fps game. you were working fine yesterday
pkJASCkjl;n

Forum statistics

Threads
121,516
Messages
1,142,236
Members
159,678
Latest member
Mic34588
Top