Page 3 of 3

Re: RPG Overworld Engine

Posted: Sat May 18, 2019 3:56 pm
by Dragonstar89
Hello! This script is great, and the examples in the source are pretty easy to follow with. The only thing I'm trying to find out, is how are buildings being specifically placed? I'm wanting to try and write around this script to handle multiple maps, and make different areas using custom tiles and such. I found the array of assets, where I added my skyscraper for example:

Code: Select all

["4", "cute_buildings/4", (258,320),None,False,"scinterior1"],
Script runs with no errors returned, but I have no clue how to actually draw in the image? I found this in overworld.rpy:

Code: Select all

                        for tile in tileList:
                            if col == tile[0]: #make buildings
                                self.buildings.append(OverworldDisplayable.Scenery(x,y, tile[1] + ".png", tile[2][0], tile[2][1], 2, tile[4], tile[5], tile[6]))
                                self.sceneryList.append(self.buildings[bldngCount])
                                self.NPCObstacles.append(self.buildings[bldngCount])
                                self.zList.append(self.buildings[bldngCount])
So, I might be staring at a snake I don't see, but I still don't have an idea of the actual placement of buildings here. Any ideas, or where the function is at? Thanks!

Re: RPG Overworld Engine

Posted: Sat May 18, 2019 4:08 pm
by Dragonstar89
Of course I figured it out as soon as I posted my question.

For anyone who wants to know, here's how the map layout gets drawn:

1)Tiles get defined. Define your tiles with their signifier (used in the actual matrices that draw the map), file source path (minus the extension, currently it uses .png automatically), size (XxY, the actual photo dimensions), roof dimensions (same thing, but for the roof tile image if the building has one), has roof (True if you have a roof for the building), goToLabel (string to jump to, good for switching maps or scenes to the interior), and the action which can be a text string. Here's the example code, with my own custom skyscraper tile added as "4":

Code: Select all

    #TILESETS
      
    #signifier, base name, building size, roof size, has roof, goToLabel, actionLabel (used for descriptions)
    moordell_tiles = [
    ["1","cute_buildings/1", (256,216), (256,256),True,None,"building_locked"],
    ["2","cute_buildings/2", (256,216), (256, 256),True,None,"building_locked"],
    ["3","cute_buildings/3", (256,216), (256,256),True,None,"building_locked"],
    ["*","cute_buildings/inn", (342,216),(342,256),True, "inn","inn_desc"],
    ["n", "cute_buildings/wall", (128,128),None,False,None,None],
    ["e", "cute_buildings/wall", (128,128),None,False,None,None],
    ["w", "cute_buildings/wall", (128,128),None,False,None,None],
    ["s", "cute_buildings/wall", (128,128),None, False,None,None],
    ["4", "cute_buildings/4", (258,320),None,False,None,"inn_desc"],
    ["p", "dirt", (128,128),None, False, None,None],
    ["g", "grass", (128,128),None, False, None,None],
    ]
2)Next, the program uses the signifiers of sprites, objects, etc., in a matrix to layout the map. Here's my example one:

Code: Select all

    moordell_layout =[
    "nnnnnnnonnnnnnn",
    "w3oo*ooo4oo4ooe",
    "woooooo+ooooooe",
    "woooooooooooooe",
    "w3oooooo1oooooe",
    "woooooooooooooe",
    "woooooooooooooe",
    "w2o3ooooo1oo2oe",
    "woooooooooooooe",
    "woooooooooooooe",
    "w3ooo4o3o2oo1oe",
    "woooooooooooooe",
    "woooooooooooooe",
    "w1o2o2ooo3o4ooe",
    "woooooooooooooe",
    "woooooooooooooe",
    "sssssssssssssss",
    ]
Notice the number '4" in there. That's where my Skyscraper tile will be placed in the graph/map when it is drawn out. The same goes for the other buildings, and even the walls ("w" = west wall, "e" = east wall, "s" = south wall and so forth).

Hope it helps.

Re: RPG Overworld Engine

Posted: Sat May 18, 2019 4:46 pm
by Mole-chan
Dragonstar89 wrote:
Sat May 18, 2019 4:08 pm
Of course I figured it out as soon as I posted my question.

For anyone who wants to know, here's how the map layout gets drawn:
<snip snip for brevity>
Haha, it's alright. Happens to the best of us.

I'm sure any visitors would appreciate the explanation, anyway. :wink:

Re: RPG Overworld Engine

Posted: Tue May 21, 2019 4:23 pm
by Dragonstar89
I do have a question regarding roof tiles.

Are character sprites enabled to move through them? As in, behind them? I set one of my buildings to utilize the roof, but it still has collision as if it were a normal object, which is causing problems for making a city-themed map.

Any enlightening would be much obliged.

Re: RPG Overworld Engine

Posted: Sat Jul 06, 2019 1:35 pm
by Mole-chan
Dragonstar89 wrote:
Tue May 21, 2019 4:23 pm
I do have a question regarding roof tiles.

Are character sprites enabled to move through them? As in, behind them? I set one of my buildings to utilize the roof, but it still has collision as if it were a normal object, which is causing problems for making a city-themed map.

Any enlightening would be much obliged.
Hello!
I'm so sorry I didn't see this earlier. I never even got an email, so I hope my answer is still useful after such a massive delay.

The roof tiles should not have any collision for either the player or NPC's, as long as hasRoof is set to true in the array, and the filename matches the building's file name with a "_roof" suffix. If those are both true, the roof will be set to its own collision group that neither the player or NPC's check against.

Re: RPG Overworld Engine

Posted: Sat Aug 17, 2019 3:49 am
by luat1995
Mole-chan wrote:
Wed Jan 14, 2015 2:05 am
ImageImage


Well, after a ton of work, and just as much asking silly questions (for which I can't thank you lovely forum-goers enough for answering! Thank you!), I've finally completed this. Hopefully it proves useful enough to pay you back. :'3

It’s a reasonably featured RPG overworld engine for use in Ren’py. The engine is intended to be used alongside Jake’s battle engine, but is versatile enough for pretty much anything that requires real-time movement in a hub world.

Download
(The download is a game directory, not a build. Put it in your Ren'py folder and launch/edit from there)

Features
  • Easy, text based layouts
  • Scrolling and static maps
  • Static and roaming NPC’s with user defined ranges
  • Easy conversation system based on labels
  • Z-ordering, with three layers of depth
Commercial Use
For now, the engine is released under a Attribution-NonCommercial 3.0 United States (CC BY-NC 3.0 US) license. However, I am more than flexible about licensing it to those who are interested. As it is such a modest engine, the terms will be generous to say the least. I can be contacted here, or by email.

Art Credits:
NPC sprite- charas-project
NPC Portrait - sapiboonggames@ Lemmasoft
Tileset - Planet Cute
Hello, I tried creating tall character, but it's stuck

Image

I want change to like this:

Image
What should i do?
Please help me
Sorry for my bad english

Re: RPG Overworld Engine

Posted: Mon Apr 26, 2021 2:25 pm
by Mole-chan
luat1995 wrote:
Sat Aug 17, 2019 3:49 am
Hello, I tried creating tall character, but it's stuck

Image

I want change to like this:

Image
What should i do?
Please help me
Sorry for my bad english
Hello,
I'm sorry I wasn't alerted to this earlier.
Unfortunately, due to how the collision system works in this version, there is no way to do this at present, but I'd be happy to look into use cases like this for an update I've been sitting on.

Sorry this was so late, and ultimately not much help.

Re: RPG Overworld Engine

Posted: Sat Oct 22, 2022 8:51 pm
by lucky77
I know this is a really old post, but I have a question that I can't find the answer to no matter how many times I parse the code of all readable files and google whatever I think might help. This is my first time making a game, though, so I apologize if any of these questions I ask are plain dumb.

I can't get the player to interact and activate a label in my own game's build. I put the untouched files into a game folder to see if it worked there while also cross referencing the two files for errors, and the only interactions that worked was the "inn" (not the inn_desc) and the Ari caught scene, along with the portal to leave. I approached the NPC's from all angles, and even tried clicking on them both, but nothing would trigger their interactions. None of the buildings had the "building_locked" description either. I understand that the part that's not working here are the action/conversation labels (but the battle labels somehow work?). But no matter how hard I look, I can't seem to find any way to activate them.

As for my own game, I've set up the map so that you can only move left and right, and "turning to face" (moving "up" towards) an "object" (just a symbol in the ground texture) will have the player interact with it (but actually, you're interacting with the tile above you). So my layout ends up looking something like this, sorry if it's not formatted correctly for this blog;

moordell_layout =[
"sswsssss*ssssss",
"soooooo+oooooos",
"sssssssssssssss",
]

with the tiles in use being:

["*","cute_buildings/inn", (342,216),(342,256),True, "inn","inn_desc"],
["w", "yellow", (300,300),None,False, "pile","pile_desc"],
["s", "white", (300,300),None,False,None,None],
["g", "purple", (300,300),None, False, None,None],

so yellow tiles are meant to be intractable, the white tiles are barriers, while the purple tiles are the ground. I included the inn as I tried to see if I could interact with it in this context, which I couldn't, just like the yellow tile. There is no error message, I simply can't activate these labels. Is there a keybinding?? One of the files, overworld.rpy I believe, says you should be able to interact with objects by facing up when close to them, or getting close to npcs, so am I doing something else wrong, or is it a movement or collision issue? Maybe I'm using an incompatible version of Ren'Py (7.4.11)? I am pulling my hair out trying to figure out how to activate these labels and action labels.