Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Request: Map Tile Transform

Satori

Member

Script Request Template
This is a request for a new script, or a request for a link to an existing script.

Script Title:
Map Tile Transform

Detailed Description:
I'm tinkering with a farming game like the Harvest Moon games. Imagine the following scenarios:

1. [Hero] has [Till] equipped and hits the Action Button in the direction of [Dirt Tile]
Result: [Dirt Tile] is now [Tilled Tile]

2. [Hero] has [Till] equipped and hits the Action Button in the direction of [Grassy Tile]
Result: [Grassy Tile] remains [Grassy Tile]

3. [Hero] has [Seed] equipped and hits the Action Button in the direction of [Tilled Tile]
Result: [Tilled Tile] now has a [Seed]-relevant Common Event added to it.

Thus, PCs are given license to rip up the terrain in various screens throughout their little world. All that's really lacking is the means of checking and swapping terrain tags, and Common Events should be able to handle the rest. Yes?

No screenies; this is a request for something that probably doesn't exist yet.

This has to be possible with RGSS. Is there a more efficient means of achieving this effect?
 

zchin

Sponsor

If I were to create this there would be only two ways I would think of:
1. Place events all over the map, downside is, it will cause lagging.
2. Create different maps and common events that respond to your needs, downside is, you would have to make a map for every single combination.

I would probably ask for a script eventing it is possible but would take up a lot of space...

Thank you and have a nice day!
 

Satori

Member

Atoa":2tp3ww9r said:
HM system?
Go eventing.
That was my first thought, but I want viable field tiles everywhere, in various maps throughout the game. Lag city.

zchin131":2tp3ww9r said:
If I were to create this there would be only two ways I would think of:
1. Place events all over the map, downside is, it will cause lagging.
Agreed.

2. Create different maps and common events that respond to your needs, downside is, you would have to make a map for every single combination.
Agreed. This would be less than optimal.

I would probably ask for a script eventing it is possible but would take up a lot of space...
Yes, the actual map array itself can actually be altered - to contain additional variables, and so forth. This could get quite large, so the options from here would seem to be:

1. Have a script to alter the existing terrain tiles, and another to add Common Events to given tiles.

2. Alter the map structure so that each tile contains an additional switch by default. When the switch is thrown, the tile has become "special" in some way and gets added to a short list (hash) of active special tiles that are checked at regular intervals.

Some combination of the two would probably be optimal, as hashing the special tiles optimizes the process and prevents lag, and the first approach does not allow for Common Event execution while the player is in other maps.

Wait... 3. Maybe a global array, and one uniform Common Event in each map to add tiles to it (including co-ordinates, map name and special variables), and to go through the tiles in the list at intervals? This would seem to accomplish the global tileswapping efficiently (with very little lag) as well as prevent the need to mine every tile in the world with a Common Event.

This could be the ideal approach, actually. Of course, it would depend on the ability to perform a tileswap... which still needs a script.

Thank you and have a nice day!
You as well, zchin131 and Atoa. Thank you for replying.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top