automap tile

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
bongobeat
Posts: 964
Joined: Thu May 16, 2013 5:58 pm
Location: France

automap tile

Post by bongobeat » Sun Dec 10, 2017 5:21 pm

Hello there,

I wonder if someone can explain how to make a custom automap tile? Like the void automap.
I want to make lava that is shown on the automap.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

User avatar
Isaac
Posts: 2994
Joined: Fri Mar 02, 2012 10:02 pm

Re: automap tile

Post by Isaac » Sun Dec 10, 2017 6:24 pm

Are you asking how to make map-graphics, or how to define a map-tile like the ones used in the editor to draw map terrain?

*Mentioning the void tile, has me thinking you mean the latter. What you seek is defined in tiles.lua; in the LoG2 asset pack. You can add your own.
Example:

Code: Select all

defineTile{
	name = "mine_floor_grass",
	editorIcon = 192,
	color = {50,140,50,255},
	builder = "dungeon",
	heightmapMaterial = "swamp_ground_02",
	floor = {
		"swamp_grass_01", 1,
	},
	ceiling = {
		"mine_moss_ceiling_01", 1,
		"mine_moss_ceiling_02", 1,
		"mine_moss_ceiling_03", 1,
	},
	wall = {
		"mine_elevation_edge", 1,
	},
	moveSound = "party_move_grass",
}
(Direct from wiki)
https://github.com/JKos/log2doc/wiki/As ... netiledesc
SpoilerShow
defineTile(desc)

Defines a new tile for Dungeon Editor or replases an existing definition. desc is a table with the following fields:

name:the name of the tile to define or replace.
editorIcon:index of the icon in Dungeon Editor tile atlas.
color:(optional) color of the editor icon, e.g. {255,255,255,255} is solid white.
randomFloorFacing:(optional) a boolean, when true facing of spawned floor objects will be randomized.
solid:(optional) a boolean, if true the square is solid wall.
diggable:(optional) a boolean, if true the square can be digged.
underwater:(optional) a boolean, if true the square is under water.
heightmapMaterial:(optional) material name for heightmap building.
heightmapMaterialPriority:(optional) priority for heightmap material blending. Higher priority materials blends over low priority materials.
builder:(optional) type of geometry builder, “dungeon” or “mine”.
floor:(optional) a table of floor object names and their relative probabilities. See below.
wall:(optional) a table of wall object names and their relative probabilities. See below.
pillar:(optional) a table of pillar object names and their relative probabilities. See below.
centerPillar:(optional) a table of pillar object names to be placed in the center of cells and their relative probabilities for mine builder. See below.
ceiling:(optional) a table of ceiling object names and their relative probabilities. See below.
ceilingShaft:(optional) the name of the object automatically spawned if there’s a pit above.
ceilingEdgeVariations:(optional) a boolean, if set ceiling objects use 16 different variations for all possible configurations of adjacent tiles. A bitmask _XXXX will be appended to ceiling object name, where each bit is either 0 (adjancent tile is empty space) or 1 (adjacent tile is solid).
automapTile:(optional) the name of the automap tile: “ground”, “grassy_ground”, “water”, “wall”, “rocky_wall”, “trees” or “chasm”
moveSound:(optional) the name of sound played when the party walks on the tile.

The tables referred above contain lists of objects and their probabilities that are used to randomly pick up pieces for generating the levels. At every odd table index there must be a valid object name. At every even table index there must be a number that indicates the relative probability of the object.

For example, the following would generate a wall drain approximately every 50th generated wall:

bongobeat
Posts: 964
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: automap tile

Post by bongobeat » Sun Dec 10, 2017 8:06 pm

I'm talking about the terrain that you see on the map.

Like the chasm tile on this map, I want to use a custom one, that use a "chasm" tile that is red. I suppose you have to make a new king of automapTile, but I don't know how. I know how to do a map graphic, but not an automap that act like the chasm.
Image
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

minmay
Posts: 2697
Joined: Mon Sep 23, 2013 2:24 am

Re: automap tile

Post by minmay » Sun Dec 10, 2017 8:10 pm

Custom automap tiles are not supported. Your only options are MapGraphicsComponent or writing your own automap from scratch.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.

bongobeat
Posts: 964
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: automap tile

Post by bongobeat » Sun Dec 10, 2017 10:31 pm

hum ok, I guess this is too complex for me! I'm gonna keep the chasm automap then.

thanks for your answers!
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

User avatar
AndakRainor
Posts: 673
Joined: Thu Nov 20, 2014 5:18 pm

Re: automap tile

Post by AndakRainor » Sat Dec 16, 2017 8:04 pm

Is there a way to "reset" the revealed tiles of a map? (let's say I change everything in a map and the automap becomes totally wrong, and I want the player to start over exploring it as if it was an entirely new level)

User avatar
Isaac
Posts: 2994
Joined: Fri Mar 02, 2012 10:02 pm

Re: automap tile

Post by Isaac » Sat Dec 16, 2017 9:53 pm

I suspect that this is not open to the scripting interface; likely only Petri (or perhaps minmay) would know for certain.

Barring a built in option, I think you would have to script your own automap feature.

I once used custom automap tiles to occlude part of the map, affording a limited fog-of-war over a small area; it crudely exposed itself as the player explored it. :roll:

User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: automap tile

Post by zimberzimber » Thu Dec 21, 2017 4:48 am

Bongobeat - You can mimic it by creating empty objects that only have a map graphics for each possible tile, and placing them manually
AndakRainor wrote:Is there a way to "reset" the revealed tiles of a map? (let's say I change everything in a map and the automap becomes totally wrong, and I want the player to start over exploring it as if it was an entirely new level)
A crappy workaround would be clearing the entire map of everything, and teleporting the party all over the map :P
My asset pack [v1.10]
Features a bit of everything! :D

User avatar
AndakRainor
Posts: 673
Joined: Thu Nov 20, 2014 5:18 pm

Re: automap tile

Post by AndakRainor » Thu Dec 21, 2017 11:07 am

zimberzimber wrote:
AndakRainor wrote:Is there a way to "reset" the revealed tiles of a map? (let's say I change everything in a map and the automap becomes totally wrong, and I want the player to start over exploring it as if it was an entirely new level)
A crappy workaround would be clearing the entire map of everything, and teleporting the party all over the map :P
Ahah! A very creative crappy workaround :) I didn't even think about it!

kelly1111
Posts: 339
Joined: Sun Jan 20, 2013 6:28 pm

Re: automap tile

Post by kelly1111 » Thu Dec 21, 2017 2:02 pm

Really wish there was a way to disable the automap. I have my dungeon designed in a way that it uses stairs on the same editor level that connect to eachother, creating the illusion of depth (but saving levels in the editor) ... and the autmap completly destroys the inmersion.

Right now I have a document (and a scroll ingame at the start that strongly suggests using old school game mode) ... and another thing is, I have my maps at a larger scale than the original 32 x 32 size, they are 50 x 50

Any suggestions or workarounds are welcome !

also another question I would really like to have answered:
does it matter to have say 40 levels of 32 x 32 map size or 20 levels of 64 x 64 map size? impact wise in the game.. ? ( I read somewhere that the game only loads the above 3 levels and the below 3 levels that the party is at ... dont know where I got that from)

and another question is... would this be possible: (levels are directly below eachother)
first level 32 x32
second level 32 x 32
third level 42 x 42
fourth level 52 x 52
... in other words of I create say 20 levels of 64x 64 in size but say in the last few levels I use only a little bit of space for rooms / floors... does it matter If a have alot space open for game performance?

Post Reply