Mode7
#1
New Mode7 script
by MGCaladtogel

EDIT 02/05/07 : new version
EDIT 03/05/07 :"$game_system.reset" corrected
EDIT 05/05/07 : English version (variables with English names, and a few comments). Old versions removed.
EDIT 06/05/07 : ZTBS compatibility script updated for Mac's version. Removed bug with autotiles in Mode7 script.
EDIT 07/05/07 : Bug with vertical tiles removed.
EDIT 21/05/07 : Flat-drawn events support, and some other small features.

Introduction
This new mode7 script is written from an old french script I created, and it is far different from Mewsterus's Mode07 script.

Features
  • flat maps (not curved)
  • high resolution (each screen line is independent)
  • map looping (x or/and y)
  • animated autotiles
  • (new version) Tiles with fixed terrain_tag not drawn flat with the map
Screenshots
[Image: m701nu3.png]

Script (new English version)
http://paste-it.net/raw/public/o11d836/

Instructions

You must add to the map's name :
- [M7] : to activate Mode7
- [#XX] : XX is the slant angle (in degree). Default value is 0 (it looks like normal maps)
- [Y] : Y-map looping
- [X] : X-map looping. This option needs resources (lower fps).
- [A] : animated autotiles (with 4 patterns). This option increases significantly the loading time, so it may crash for large maps (SystemStackError)
- [C] : to center the map on the hero (even for small maps)
- [P] : to have a fixed panorama
- [H] : to have a white horizon (screenshot's horizon)
- [OV] : Overworld Sprite Resize (a Mewsterus's script feature)

Or :
Prepare your own settings for mode7 maps (script : l.48).
Add for example
Code:
$mode7_maps_settings["Worldmap"] = ["#60", "X", "Y", "A", "H", "OV"]
and just add in the map's name "Worldmap" to have these settings applied.

New version


The map is drawn from all the tiles of the three layers that do not have a terrain_tag's value of 1 or 2.
The other tiles (terrain_tag = 1 or 2) form elements that are drawn vertically, like the 3rd-layer elements in the old version.
The two values used by my script (1 and 2) can be modified line 6 ($num_terrains = [1,2]).
There are two values so that we can create two distinct vertical elements in contact in one layer.

Example :
With these terrain_tags :
screenshot

The three layers:
screenshot
screenshot
screenshot

We obtain :
screenshot

Other commands (for events) (EDIT : modified for the English version) :

Code:
$scene.spriteset.tilemap.mode7_set (new_angle)
To redraw the map with the new_angle

Code:
$scene.spriteset.tilemap.mode7_set_p(new_angle)
To redraw progressively the map from the current angle to the new

Code:
$scene.spriteset.tilemap.mode7_redraw
To redraw the map (useful with the following commands)

Code:
$game_system.opacite = value
To define the opacity for Mode7 maps (it needs to redraw)

Code:
$game_system.couleur = Color.new(Red, Green, Blue)
To define the tone for Mode7 maps (it needs to redraw)

Code:
$game_system.horizon = value
To define the view's distance (default : 960) (it needs to redraw)

Code:
$game_system.reset
To initialize the previous options

Code:
$game_system.map_gradual_tone = Tone.new(Red, Green, Blue, Gray)
To define a gradual tone for Mode7 maps (it needs to redraw, and it doesn't work with horizontal looping)

Code:
$game_system.map_gradual_opacity = value
To define a gradual opacity for Mode7 maps (it needs to redraw, and it also bugs with horizontal looping)

- To obtain flat events :
just add a comment in the event's commands list with : "Flat"
Moving flat events are supported, but it will take resources.

- To handle the height of a vertical event :
add a comment in the event's commands list with : "Heigth X", where X is the height value ("Heigth 2" will draw the event 64 pixels above its original position - you can use floats)

Compatibility

This script redefines a lot of classes, so it is probably not compliant with most of other scripts

English version : ZTBS compatibility
The compatibility is not perfect, but it doesn't crash.
EDIT 21/05/07 : the sprites used for ranges and areas are flat-drawn
Mode7 script must be above ZTBS, and this script below :
- ...
- Scene_Debug
- SDK
- Mode7
- ZTBS scripts
- Macs addons
- This script
- Main
compatibility script
Some scripts :
Working on :
Reply }
#2
His download link is dead so...


.doc   Mode7.doc (Size: 158.27 KB / Downloads: 18)

Version dated May 21, 2007 (I reformatted the instructions)
* It's a txt file with a .doc extension



Just in case.... (seeing a problem with this version switching from Mode7 to non-Mode7 maps...)


.doc   Mode7_old.Doc (Size: 144.2 KB / Downloads: 5)
Version dated May, 5, 2007 (I reformatted the instructions there too)
* It's a txt file with a .doc extension
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   H-Mode7 MGC 395 735,354 09-19-2017, 03:39 AM
Last Post: DerVVulfman
   H-Mode7 Visual Equipment Chaotech Games 8 36,772 03-30-2017, 01:58 AM
Last Post: wrathx
   H-Mode7 Caterpillar Chaotech Games 8 18,952 03-10-2017, 12:19 AM
Last Post: Lizzbutt
   Lycan ABS / MGC Mode7 Edit Patch DerVVulfman 2 9,456 10-18-2015, 07:12 PM
Last Post: DerVVulfman
   Lycan Enemy Bars / MGC Mode7 Edit Patch DerVVulfman 0 5,786 06-12-2014, 04:05 AM
Last Post: DerVVulfman
   MGC's Mode7 Edit DerVVulfman 0 5,500 06-12-2014, 03:49 AM
Last Post: DerVVulfman
   H-Mode7 / UMS Patch DerVVulfman 1 6,890 07-29-2012, 04:12 AM
Last Post: MetalRenard
   Zenith TBS / MGCaladtogel's Mode7 Patch DerVVulfman 0 8,644 03-05-2008, 06:24 PM
Last Post: DerVVulfman



Users browsing this thread: 1 Guest(s)