HomeForumSearchRegister
Pages: [1]
Topic: Battle Scapes  (Read 1558 times)
0 Members and 1 Sneaky Snooper are viewing this topic.
modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« on: December 29, 2009, 04:56:55 PM »
IP Logged

Battle Scapes
Version: 1.0
Author: modern algebra
Date: December 29, 2009

Version History


  • <Version 1.0> 12.29.2009 - Original Release

Description


This script allows you to create dynamic battle backgrounds consisting of as many layers of pictures as you want that can be zoomed in on, scrolled, blended, or a number of other effects to make your battle scenes look beautiful. Further, unlike other battleback scripts, you can make battlebacks for areas and not just by maps. You need to supply your own pictures and import them into the Parallaxes folder of your game.

Features

  • Can create a battle scape by area, as well as by map
  • Can make beautiful backgrounds for battle, rather than the ugly swirly effect
  • Can use as many pictures as you like to compose a battle scape
  • For each layer of the battle scape, you can apply a host of parallax effects, such as scrolling and zoom
  • Battle Scapes by Troop ID ADDON  - can use battle scape by troop ID, in addition to the default ways

Screenshots


This image is composed of three separate pictures. The battle foreground seen here was created by Megatronx

Instructions

Please see the header and editable regions of the script for instructions, as well as the demo for examples.

Script


Please see the attached demo for this script. While it is not a long script, I feel that due to the high customizability of the script, it is better if you receive a demo, as you will need to study it to see how to configure. Note that the nice battle foreground in the demo was created by MegaTronx.

Addons

(click to show/hide)

Credit


  • modern algebra

Support


Please give feedback or report any bugs in this thread at RMRK.

Known Compatibility Issues

This script may not work with battle systems that heavily modify the way the scene is processed or what is shown. If you do encounter a problem, try putting this script below the other script in the editor first, and then if that does not fix it, report the problem in this thread.

(click to show/hide)

Demo


Demo is attached. Note that the nice battle foreground in the demo was created by MegaTronx.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.

* Battle Scapes.exe (1302.37 KB - downloaded 209 times.)
« Last Edit: February 11, 2010, 04:36:08 PM by Modern Algebra »


grafikal
  Male
*****
Resource Artist
Rep: +153/-97
Level 65 (02%)
Dog Hat
View Profile
« Reply #1 on: December 29, 2009, 05:06:53 PM »
IP Logged

bad-                          -assssssss


modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« Reply #2 on: December 30, 2009, 09:39:23 AM »
IP Logged

I'm glad you like it, graf.


Baz Wolftail
  Male
**
Rep: +0/-0
Level 30 (30%)
View Profile
« Reply #3 on: January 04, 2010, 04:20:41 PM »
IP Logged

Truly an awesome script.  It makes battles more "interactive" if you will, giving it a more realistic feeling.  I do have one question though.  I am currently using this world map script.  I will provide a link for you.  Basically what it does is, that is makes a world map by using actual picture, instead of a VX in game map.  When you leave say like a village, and want to enter the world map, you use a call script, and there you go, you are on the world map, but technically you are still "located" at the last VX map you were on.

Now, my question is, is there a way you might be able to tweak this script to be compatible with this world map script?  The reason I ask, is because since you are always on a certain map when you are viewing the world map, the map uses the different terrain colors that you designate to determine the random battles and the battle backgrounds.  So basically what I was curious about was, if it was possible to see if your script could be worked into the world map, where, instead of the map or map area id, it could use the terrain from the map script to determine what back ground will be used.

I realize I probably didn't explain it the best way, but, here is the link to the script, and you can take a peek at it.  If it would be too much of a hassle, I understand, and no worries.  I just thought it couldn't hurt to ask, you know?  Thanks a bunch!

http://www.rpgrevolution.com/forums/index.php?showtopic=30815&hl=world+map

P.S.  Oh, almost forgot to say, that if it is indeed possible, I also still wanted the script to work the original way as well, you know, by using a map id too.  If it can only work one way or the other, than that's fine, but I didn't want it to seem like I wanted you to re-write the entire script heh, just to add a compatibility if possible.  Thanks again!
« Last Edit: January 04, 2010, 04:24:29 PM by Baz Wolftail »
modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« Reply #4 on: January 07, 2010, 11:02:38 AM »
IP Logged

Here, you can try putting this patch in its own slot below both Battle Scapes and the World Map Script, but still above Main.

Code:
#==============================================================================
# ** Game Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - battle_scapes
#==============================================================================

class Game_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Battle Scapes
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_rei_wrldmp_btlscpes_7jv2 battle_scapes
  def battle_scapes
    # IF on World map, use battleback
    $game_system.battleback = $game_system.battleback.to_a if !$game_system.battleback.is_a? (Array)
    if $game_system.battleback.empty?
      return malg_rei_wrldmp_btlscpes_7jv2
    else
      scapes = []
      $game_system.battleback.each { |scape_id|
        scapes.push (ModernAlgebra.battle_scape (scape_id))
      }
      return scapes
    end
  end
end

#==============================================================================
# ** Scene Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - start
#==============================================================================

class Scene_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modb_ri_bscape_wmap_strt_5sq1 start
  def start (*args)
    modb_ri_bscape_wmap_strt_5sq1 (*args)
    $game_system.battleback = []
  end
end


To set which scapes appear where, modify the ENCOUNTER_TERRAINS array and put in arrays of which scapes you want where it has the "" argument.

So, instead of:


Code:
  ENCOUNTER_TERRAINS << [Color.new(1,152,18), [1,2,3,6], ""]
  ENCOUNTER_TERRAINS << [Color.new(0,93,11), [4,5,7], ""]
  ENCOUNTER_TERRAINS << [Color.new(168,162,114), [1,9,15,22], ""]

put

Code:
  ENCOUNTER_TERRAINS << [Color.new(1,152,18), [1,2,3,6], [1, 2]]
  ENCOUNTER_TERRAINS << [Color.new(0,93,11), [4,5,7], [1, 3, 5]]
  ENCOUNTER_TERRAINS << [Color.new(168,162,114), [1,9,15,22], [1, 2, 3]]



In any case, I'm not entirely sure it will work. Report back to me if it does or if there are any errors


Zero2008
 
**
Rep: +1/-0
Level 38 (62%)
View Profile
« Reply #5 on: January 07, 2010, 01:16:14 PM »
IP Logged

Um is it possible to create Battle scapes by troop numbers too?
modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« Reply #6 on: January 07, 2010, 02:24:20 PM »
IP Logged

Umm, no, but I suppose I could write an addon for that:


EDIT::

Try this: Put it below the Battle Scapes entry in the editor but still above Main
Code:
#==============================================================================
#    Troop Battle Scapes
#      [Addon for Battle Scapes 1.0, by modern algebra]
#    Version: 1.0
#    Author: modern algebra
#    Date: January 7, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This is an addon for Battle Scapes 1.0, that allows you to set battle
#   scape by troop ID, rather than just Area or Map ID. It will take priority
#   over those, so if a troop battle scape exists, that is what will be used.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place this script below Battle Scapes in the Script Editor, but still
#   above Main. To set it up, see the EDITABLE REGION at line 27
#==============================================================================

#==============================================================================
# ** Game Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constant - BS_TROOP_SCAPES
#    aliased method - battle_scapes
#==============================================================================

class Game_Map
  TROOP_BATTLE_SCAPES = {
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  EDITABLE REGION
    #````````````````````````````````````````````````````````````````````````
    #  Set up what scapes you want for the troops as follows:
    #
    #    troop_id => [scape_1_id, scape_2_id, ..., scape_n_id]
    #      troop_id   : ID of the troop you want scapes to be battleback for
    #      scape_n_id : the ID of each scape you want to use, as set up in the
    #                  original script
    #
    #  You only need to set up the ones for which you want the troop ID to take
    # precedence over area or map ID. You can exclude any troops for which you
    # want to default to the regular method. Note that troop ID will take
    # priority over area or map ID, so if you set it here, that troop will
    # always have this battle scape, unless there is another addon or patch
    # placed below this script in the script order
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 => [],
    2 => [],
    4 => []
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  }
  TROOP_BATTLE_SCAPES.default = []
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Battle Scapes
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_zro28_btlscp_troopscape_4we1 battle_scapes
  def battle_scapes (*args)
    if $game_troop.troop.id > 0 && !TROOP_BATTLE_SCAPES[$game_troop.troop.id].empty?
      return TROOP_BATTLE_SCAPES[$game_troop.troop.id]
    end
    # If no special BG for troop set, default to showing by area or map
    return ma_zro28_btlscp_troopscape_4we1 (*args)
  end
end
« Last Edit: January 07, 2010, 02:47:52 PM by modern algebra »


Baz Wolftail
  Male
**
Rep: +0/-0
Level 30 (30%)
View Profile
« Reply #7 on: January 07, 2010, 04:10:59 PM »
IP Logged

It looks like it works flawlessly.  I really appreciate you taking the time to work on this.  Thanks so very much 
Zero2008
 
**
Rep: +1/-0
Level 38 (62%)
View Profile
« Reply #8 on: January 09, 2010, 02:35:59 PM »
IP Logged

Wow thanks man!
I'll try this ASAP!


Edit:
Hey modern wouldn't it also be possible to make the battle scapes be played by frames? Like an animation?
« Last Edit: January 09, 2010, 11:23:36 PM by Zero2008 »
Deity
  Male
**
Rep: +0/-0
Level 16 (92%)
Hiho
View Profile WWW
« Reply #9 on: January 11, 2010, 03:01:44 PM »
IP Logged

An amazing Script. Cheesy
I've just tried it out and have to say really good work., no errors and do what it promise.
I have to update my Battleback System.  Tongue

Greets
Deity

<br />
dicks
 
*
Rep: +0/-0
Level 10 (83%)
View Profile
« Reply #10 on: February 14, 2010, 02:38:59 PM »
IP Logged

How do you tie a graphic to a troop exactly?
modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« Reply #11 on: February 14, 2010, 02:46:40 PM »
IP Logged

You have to use the Addon for it, located under the Addons heading. These are the instructions for it, and you place the actual codes directly within that editable region

    #   troop_id => [scape_1_id, scape_2_id, ..., scape_n_id]
    #      troop_id   : ID of the troop you want scapes to be battleback for
    #      scape_n_id : the ID of each scape you want to use, as set up in the
    #                  original script

So a code like:

5 => [1, 2]

would tie scapes 1 and 2 to troop 5, so that whenever you are up against troop 5, then it will be those two scapes.

I'm not sure how better to explain it... could you tell me specifically what you are confused about.


krepta8
 
**
Rep: +0/-0
Level 40 (58%)
View Profile
« Reply #12 on: February 24, 2010, 09:52:34 PM »
IP Logged

This is really a great script. Thank you.

Is there a way that you could streamline the process of assigning Battle Scapes by area? For example, once a person has compiled the pictures needed for a forest battle scene, that person could then just name each subsequent area meant to use that Battle Scape as "Forest", rather than only going by the Area ID. In this scenario, it would probably be best for the assigned strings to get priority over Area IDs. I suppose it would just be a matter of assigning a string to a particular array of parallaxes, but I am not sure how to go about it.

Anyway, thanks again for gracing us with your talents. It is always appreciated. Smiley
modern algebra
  Male
*
Rep: +313/-110
Level 71 (44%)
View Profile
« Reply #13 on: February 25, 2010, 01:01:04 PM »
IP Logged

Interesting idea. I will think about it, but I am busy right now, so maybe not for some time.


Pages: [1]
Jump to:  

hi