Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> More terrain tags per map
ze1
post Dec 27 2011, 08:00 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 20
Type: None
RM Skill: Undisclosed




Hi,

I was wondering if it's possible to have more than 8 terrain tags per map.
I've found a scipt that enables you to have more terrain tags, you still can only assign at most 8 tags per map.
http://www.rpgrevolution.com/forums/index....showtopic=53017
But, that's not what I want... =(

Can anyone help me?

Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Dec 29 2011, 04:39 AM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




Can you explain this better?

If you want a script that allows you to use e.g. 14 different terrain tags, I think it's possible.
If you want to modify these tags from the database, no, it's actually impossible.
Remeber that a script employing more than 8 terrains has to set every tile's terrain with a matrix or a chart:
If you have a 8x120 tileset, then you'll have to define 8x128 terrains (one for every square) by script...
I think it could be painful...

There's however an alternative:
setting just the terrain tiles you want to modify (e.g. the tile which has row = 3 and column = 7 in your tileset...)
Maybe this could be scripted...

Jens

EDIT:

Try this one...

CODE
#Jens of Zanicuud terrain mod script
#free use, just credit
MOD_TERRAIN = {
1 => {394 => 22,},

}

class Game_Map
  def terrain_tag(x, y)
    if @map_id != 0
      for i in [2, 1, 0]
        tile_id = data[x, y, i]
        if MOD_TERRAIN.include?(@map.tileset_id)
          if MOD_TERRAIN[@map.tileset_id].include?(tile_id)
            return MOD_TERRAIN[@map.tileset_id][tile_id]
          end
        end
        if tile_id == nil
          return 0
        elsif @terrain_tags[tile_id] > 0
          return @terrain_tags[tile_id]
        end
      end
    end
    return 0
  end
end


HOW MOD_TERRAIN WORKS:

MOD_TERRAIN is a hash with this structure:
{
Tileset id => {
tile_id => new terrain,
tile_id => new terrain,
...
},
Tileset id => {
tile_id => new terrain,
tile_id => new terrain,
...
},
...
}

Remember that the first tile of the second row (i.e. below autotiles) has tile_id equal to 384;
To select the tile you intend to use, just count:
second tile would be 385,
first tile of third row will be 392 and so on...
Just sum smile.gif

In the example, I set first tileset , third column, third row tile (394) to have terrain equal to 22.

Hope this can help...

Jens

This post has been edited by Jens of Zanicuud: Dec 29 2011, 05:06 AM


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 03:16 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker