The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on December 29, 2009, 09:56:55 PM

Title: Battle Scapes
Post by: modern algebra on December 29, 2009, 09:56:55 PM
Battle Scapes
Version: 1.0
Author: modern algebra
Date: December 29, 2009

Version History



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


Screenshots

(http://img704.imageshack.us/img704/5882/battlescapescreen.png)
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 (http://rmrk.net/index.php?action=dlattach;topic=36812.0;attach=18845) 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

Spoiler for Battle Scapes by Troop ID:
This is an addon that allows you to tie battle scapes to troop IDs. This is useful if you want specific or all troops to always have a particular battle scape and ignore the map or area scapes. If you do not tie a battle scape to a troop, then the system will resort to getting battle scape by area or map.

Place this script into its own slot below the Battle Scapes entry in the editor but still above Main
Code: [Select]
#==============================================================================
#    Troop Battle Scapes
#      [Addon for Battle Scapes 1.0, by modern algebra]
#    Version: 1.1
#    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?
      scapes = []
      TROOP_BATTLE_SCAPES[$game_troop.troop.id].each { |scape_id| scapes.push (ModernAlgebra.battle_scape (scape_id)) }
      return scapes unless scapes.empty?
    end
    # If no special BG for troop set, default to showing by area or map
    return ma_zro28_btlscp_troopscape_4we1 (*args)
  end
end

Spoiler for Battle Scapes by Variable:
This addon lets you specify which battle scape you want by variable.

Code: [Select]
#==============================================================================
#    Variable Battle Scapes
#      [Addon for Battle Scapes 1.0, by modern algebra]
#    Version: 1.0
#    Author: modern algebra
#    Date: May 16, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This is an addon for Battle Scapes 1.0, that allows you to set battle
#   scape by variable, rather than just Area or Map ID. It will take priority
#   over those, so if the variable is set to anything greater than 0, it will
#   be the battle scape
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  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
  # The ID of the variable you want to use to control which battle scape is
  #  shown. When the value of the variable corresponds to one of the scapes in
  #  VARIABLE_BATTLE_SCAPES, it will take priority and be shown.
  BATTLE_SCAPES_VARIABLE = 1
  VARIABLE_BATTLE_SCAPES = {
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  EDITABLE REGION
    #````````````````````````````````````````````````````````````````````````
    #  Set up what scapes you want for the troops as follows:
    #
    #    variable_value => [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 that you want to get to be variable.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 => [1, 2, 4, 5],
    2 => [],
    3 => []
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #  END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  }
  VARIABLE_BATTLE_SCAPES.default = []
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Battle Scapes
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modal_varadon_bscp_8ik2 battle_scapes
  def battle_scapes (*args)
    scapes = []
    VARIABLE_BATTLE_SCAPES[$game_variables[BATTLE_SCAPES_VARIABLE]].each { |scape_id| scapes.push (ModernAlgebra.battle_scape (scape_id)) }
    return scapes unless scapes.empty?
    # If no special BG for that variable value set, default to showing by area or map
    return modal_varadon_bscp_8ik2 (*args)
  end
end

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.

Spoiler for Rei's World Map Support:
The script does not, as is, work with Rei's World Map script in that it does not recognize the different terrains in order to create the appropriate battlebacks by default. The following is a compatibility patch to resolve that:

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: [Select]
#==============================================================================
# ** 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 replace the "" arguments with an array of the battle scapes you want for that terrain.

So, instead of:


Code: [Select]
  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: [Select]
  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]]


Demo


Demo is attached (http://rmrk.net/index.php?action=dlattach;topic=36812.0;attach=18845). 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.
Title: Re: Battle Scapes
Post by: Grafikal on December 29, 2009, 10:06:53 PM
bad-                          -assssssss
Title: Re: Battle Scapes
Post by: modern algebra on December 30, 2009, 02:39:23 PM
I'm glad you like it, graf.
Title: Re: Battle Scapes
Post by: Baz Wolftail on January 04, 2010, 09:20:41 PM
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!
Title: Re: Battle Scapes
Post by: modern algebra on January 07, 2010, 04:02:38 PM
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: [Select]
#==============================================================================
# ** 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: [Select]
  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: [Select]
  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
Title: Re: Battle Scapes
Post by: Zero2008 on January 07, 2010, 06:16:14 PM
Um is it possible to create Battle scapes by troop numbers too?
Title: Re: Battle Scapes
Post by: modern algebra on January 07, 2010, 07:24:20 PM
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: [Select]
#==============================================================================
#    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
Title: Re: Battle Scapes
Post by: Baz Wolftail on January 07, 2010, 09:10:59 PM
It looks like it works flawlessly.  I really appreciate you taking the time to work on this.  Thanks so very much  :zwink:
Title: Re: Battle Scapes
Post by: Zero2008 on January 09, 2010, 07:35:59 PM
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?
Title: Re: Battle Scapes
Post by: Deity on January 11, 2010, 08:01:44 PM
An amazing Script. :D
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.  :P

Greets
Deity
Title: Re: Battle Scapes
Post by: dicks on February 14, 2010, 07:38:59 PM
How do you tie a graphic to a troop exactly?
Title: Re: Battle Scapes
Post by: modern algebra on February 14, 2010, 07:46:40 PM
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.
Title: Re: Battle Scapes
Post by: krepta8 on February 25, 2010, 02:52:34 AM
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. :)
Title: Re: Battle Scapes
Post by: modern algebra on February 25, 2010, 06:01:04 PM
Interesting idea. I will think about it, but I am busy right now, so maybe not for some time.
Title: Re: Battle Scapes
Post by: ?????? on April 07, 2010, 03:52:36 PM
This script is very cool! The background and effects in battle... COOL
Title: Re: Battle Scapes
Post by: Sir Tobbii on April 26, 2010, 12:28:59 PM
I've got a problem with the script, I always tend to get this message:

"Script 'Battle Scapes' line 209: NoMethodError occured.

undefined method `z' for 1:fixnum"

Any idea what's wrong?
Title: Re: Battle Scapes
Post by: modern algebra on April 27, 2010, 03:01:59 PM
Sorry, it was a problem with the Troop Battle Scapes Addon. I updated it in the main post so if you replace your troops addon with the new one it ought to get rid of that error.
Title: Re: Battle Scapes
Post by: Rexilia on April 29, 2010, 03:37:26 AM
AWESOME SCRIPT!
It just rocks.  I am using it for my game =)
I support Zero2008's idea on animations.
Maybe we could add a shiny star moving from side to side

Modern Algebra, you are The Man.  :rk: :rk:


EDIT: Could you add an option to "rotate picture"? That would be awesome.
Imagine this: In the parallax by MegaTronx, in the first pillar there is this big green symbol.
If that symbol was in a different "z:" position, we could use rotate picture.  ;D

Title: Re: Battle Scapes
Post by: The Frontera on April 30, 2010, 05:49:58 PM
Cool script !   ;D

I have only a question...

I want to assign the battleback not to a map or an area ID, but to a variable.
I mean, when this variable = 0 than the battleback is the swirly default one,
but when is = 1 the battleback become a picture I want and so if it's = 2 or = 3 ...

Is it possible ?  ???

Can you do it for me ?  ???
Title: Re: Battle Scapes
Post by: Sir Tobbii on May 03, 2010, 12:11:55 AM
Sorry, it was a problem with the Troop Battle Scapes Addon. I updated it in the main post so if you replace your troops addon with the new one it ought to get rid of that error.
Thanks! It works great now, it's awesome!
Title: Re: Battle Scapes
Post by: Moxy on May 15, 2010, 03:25:30 PM
Thanks modern algebra for your hard work. A few observations.

1. You spelled your name wrong in the script header. (line 4) This caused me to spell your
    name wrong on my credits page, which I changed, of course.
2. I set area battle scapes to nil in lines 59-62 which produced an error because I don't
    know Ruby syntax yet. Solution - leave as is or add an area.
3. The fog foreground was too murky for dark backgrounds and the enemies weren't visible.
    Problem - can only set opacity to each picture, rather than tailored to each case. So if
    you wish to use the fog on a lighter background then it will be too opaque. Solution -
    learn Ruby and write your own script or have multiple fog foreground pictures.
4. Wish list - setting battle backgrounds according to terrain on a World Map. Evidently this
    was possible in other versions of RPG Maker. Since I'm a newb, maybe I'm missing something.
    My World Map is just a map with generic terrain and building features. Would be nice if
    I could tailor the backgrounds to each terrain (grassland, desert, tundra, etc.) Solution - set
    up hundreds of areas that cut the World Map into tiny rectangles, yuck.

I am not asking for additional script add-ons but general direction and perhaps some sage advice.   
Title: Re: Battle Scapes
Post by: modern algebra on May 15, 2010, 03:45:22 PM
Yeah

1. Sorry.
2. You could also just have it as AREA_BATTLE_SCAPES = {} - but yeah, don't set it to nil
3. You can make more than one scape with the same picture very easily, so you could make one with a lighter opacity and one with a darker opacity, like so:
Code: [Select]
  when 3
    picture = "Fog"
    opacity = 255
  when 4
    picture = "Fog"
    opacity = 120
 
You can also change the blend type. In any case, I don't see that as a major issue since it's easy to do and I prefer the setting up in a database and accessing by ID over the alternative.

4. You would need a terrain script, like mine (http://rmrk.net/index.php/topic,34410.0.html). It only allows for battle scapes with two pictures though, a background and a foreground. If you want me to and I find time, I could try to integrate this script with that one.
Title: Re: Battle Scapes
Post by: Moxy on May 15, 2010, 04:48:53 PM
Don't worry about writing scripts for me. I will buy a book and learn Ruby and write
my own. Although thank you for the syntax correction, I used [] which was wrong.
I see your point of compartmentalizing picture features from map id calls. Can work
with that. Rather than using your terrain script (it's good but cumbersome) I decided
to redesign the World Map to be separated into areas divided by impassable tiles
(mountains, rivers, etc) and this should solve the laborious task of copious area
rectangles.

No need to remit, last post here. Thanks again.
Title: Re: Battle Scapes
Post by: modern algebra on May 16, 2010, 11:42:19 PM
@The_Frontera - I made a Battle Scapes by Variable Addon. You can get it in the Addons section of the first post.
Title: Re: Battle Scapes
Post by: EdwinX7 on October 06, 2011, 12:56:15 PM
can add more AREA_BATTLE_SCAPES keep have a Error i wanna like this

 "MAP_BATTLE_SCAPES = {
    1 => [1, 2, 3]
    2 => [4, 3, 5]
  }
  MAP_BATTLE_SCAPES.default = []
  AREA_BATTLE_SCAPES = {
    1 => [1, 2],
    2 => [4, 5]
    3 => [6, 7]"

like that
Title: Re: Battle Scapes
Post by: modern algebra on October 06, 2011, 11:22:14 PM
Well, you need to place commas after each entry, so:

Code: [Select]
MAP_BATTLE_SCAPES = {
    1 => [1, 2, 3],
    2 => [4, 3, 5],
  }
  MAP_BATTLE_SCAPES.default = []
  AREA_BATTLE_SCAPES = {
    1 => [1, 2],
    2 => [4, 5],
    3 => [6, 7],
}
Title: Re: Battle Scapes
Post by: EdwinX7 on October 08, 2011, 12:22:12 AM
it work thx
Title: Re: Battle Scapes
Post by: digdarkevil on November 17, 2011, 03:20:03 PM
Really Awesome Script Ma.. ;D
When Im Going To Script Hunting i Always Check Yours First ;8
Title: Re: Battle Scapes
Post by: dudeguy119 on March 26, 2012, 04:15:27 PM
Posting here may be futile, but I was wondering if I could get help. I'm not asking for computer help, but every time I attempt to get the demo, my computer crashes when it tries to decompress the file. I'm not really tech savvy, so I don't know why. It's done this before, but usually not every time without fail (usually randomly). Checking my comp for viruses is all I can think to do.

Anyways, I'm not asking for computer help. I was wondering if Modern Algebra or someone could just give me the script. I'll just have to do without the demo and figure it out. Though, if someone wouldn't mind giving me a quick explanation, then I'd appreciate it, but, really, I just want the script. I can figure it out.

Thanks!
Title: Re: Battle Scapes
Post by: D&P3 on March 26, 2012, 04:23:00 PM
txt file


Also, I put the demo in a rar file.
See if it works now.
Title: Re: Battle Scapes
Post by: dudeguy119 on March 26, 2012, 09:06:22 PM
Thank you so much! Yes, I was able to extract the demo this time. Thank you. If it pleases you (and even if it doesn't), you're gonna receive a credit in my project. Thanks, again!
Title: Re: Battle Scapes
Post by: FlipelyFlip on November 03, 2012, 02:07:20 AM
heyey,

I know it's a long time since the last post, but I need to know this:

is there any way to add by skills some battle scapes in the battle?
I've tried many methodes to add them, but I always faild /:
So I wanted to ask, is it already implemented now or could you give
me a hint how to do that? ._.

~flipy (:
Title: Re: Battle Scapes
Post by: modern algebra on November 03, 2012, 01:16:55 PM
No, there isn't.