Ask a simple question, get a simple answer

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!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Ask a simple question, get a simple answer

Post by Skuggasveinn »

HonorableSquidman wrote: Thu May 30, 2019 7:45 pm The issue is that for some reason, many of the tile walls (not object walls) are transparent on some or all sides.
Hi. What tiles are you using ? , and can you post the definition of the tiles ?
Many tiles don't have walls defined by default, like the forest_ground for example, I'm guessing that you are using tiles that are relying on hightmap alone. (if you have not defined your own tiles and are just using the default ones then this is most likely the case.)

If you are going to build a multi elevation map than your tiles need to have walls defined.

This is an example of a tile that will not have walls.

Code: Select all

defineTile{
	name = "forest_ground",
	editorIcon = 200,
	color = {70,150,70,255},
	builder = "dungeon",
	-- floor geometry is generated by heightmap
	heightmapMaterial = "forest_ground_01",
	diggable = true,
	moveSound = "party_move_grass",
	automapTile = "grassy_ground",
}
And this is a tile that will have walls.

Code: Select all

defineTile{
	name = "dungeon_floor",
	editorIcon = 192,
	color = {150,150,150,255},
	builder = "dungeon",
	floor = {
		"dungeon_floor_dirt_01", 1,
	},
	ceiling = {
		"dungeon_ceiling", 1,
	},
	wall = {
		"dungeon_wall_01", 35,
		"dungeon_wall_02", 35,
		"dungeon_wall_drain", 2,
	},
	pillar = {
		"dungeon_pillar", 1,
	},
	ceilingEdgeVariations = true,
	ceilingShaft = "dungeon_ceiling_shaft",
}
You want to make sure that your tiles are using the forest_elevation_edge as the walls.

Hope this helps, if not post again and we will get this sorted out.

kind regards.
Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Kapvera
Posts: 1
Joined: Fri May 31, 2019 1:56 am

Re: Ask a simple question, get a simple answer

Post by Kapvera »

Hello everyone! I am new to the editor. There are two problems:
1.
a) a wall texture appears when there is a height difference;
b) I can go through the walls back and forth.
SpoilerShow
Image

Image

Image
2.
а) floor level is 1 instead of -1;
b) I can go through the walls;
c) I am stuck within the square.
SpoilerShow
Image

Image
:!: EVERYTHING FIXED. Module Height in the level properties was set on 0. It must be 3.
Last edited by Kapvera on Fri May 31, 2019 7:58 am, edited 1 time in total.
HonorableSquidman
Posts: 2
Joined: Thu May 30, 2019 7:31 pm

Re: Ask a simple question, get a simple answer

Post by HonorableSquidman »

Skuggasveinn wrote: Thu May 30, 2019 10:14 pm
HonorableSquidman wrote: Thu May 30, 2019 7:45 pm The issue is that for some reason, many of the tile walls (not object walls) are transparent on some or all sides.
Hi. What tiles are you using ? , and can you post the definition of the tiles ?
Many tiles don't have walls defined by default, like the forest_ground for example, I'm guessing that you are using tiles that are relying on hightmap alone. (if you have not defined your own tiles and are just using the default ones then this is most likely the case.)

If you are going to build a multi elevation map than your tiles need to have walls defined.

This is an example of a tile that will not have walls.

Code: Select all

defineTile{
	name = "forest_ground",
	editorIcon = 200,
	color = {70,150,70,255},
	builder = "dungeon",
	-- floor geometry is generated by heightmap
	heightmapMaterial = "forest_ground_01",
	diggable = true,
	moveSound = "party_move_grass",
	automapTile = "grassy_ground",
}
And this is a tile that will have walls.

Code: Select all

defineTile{
	name = "dungeon_floor",
	editorIcon = 192,
	color = {150,150,150,255},
	builder = "dungeon",
	floor = {
		"dungeon_floor_dirt_01", 1,
	},
	ceiling = {
		"dungeon_ceiling", 1,
	},
	wall = {
		"dungeon_wall_01", 35,
		"dungeon_wall_02", 35,
		"dungeon_wall_drain", 2,
	},
	pillar = {
		"dungeon_pillar", 1,
	},
	ceilingEdgeVariations = true,
	ceilingShaft = "dungeon_ceiling_shaft",
}
You want to make sure that your tiles are using the forest_elevation_edge as the walls.

Hope this helps, if not post again and we will get this sorted out.

kind regards.
Skuggasveinn.
Thank you for the speedy response!
This seems to be the issue, exactly as you've described. I was indeed using the default tiles provided by the editor, and the forest_elevation_edge object is exactly what I needed to fix it.

However, is there a faster method of fixing this than placing the forest_elevation_edge object on each of the missing walls? You did mention the definition of the tiles. I found a text file in the mod_assets folder for custom tile definitions, but the file is blank (I assume this is because I am using the default tiles).

Another thing I find odd is that some of the walls are appearing fine, despite the fact that I am uniformly using the same default tiles throughout the level but I digress.

Thank you for the advice!
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Most people that start out with the editor face these "problems" at first.
When you get more experience however, you will realize that this quirky behaviour has advantages as well and is actually a blessing and not a problem.

You can fix "missing walls" manually anyways. It's the other way around that's more "obnoxious"
Walls/ceilings/pillars that pop up everywhere where you don't want them to be.
That's the real issue. Placing a floortile on a spot and suddenly you're stuck with 4 walls around it and a ceiling.

Some tilesets even feel unfinished/broken.

You just have to experiment with every tileset and see what works and what doesn't. If something doesn't work out as intended, just use something else until it does or simply use objects instead of tiles. If you want your custom mod to look even remotely fancy you will have to anyways. Time is the answer. Time and experience by simply trying out stuff.

Some wall tiles usually don't place walls at all. Walls are placed around your floor tile next to the wall tile, granted that you used the correct floor/ceiling heights.

Most custom tilesets from modders therefor have usually better options in this aspect.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Ask a simple question, get a simple answer

Post by Skuggasveinn »

HonorableSquidman wrote: Fri May 31, 2019 5:32 am However, is there a faster method of fixing this than placing the forest_elevation_edge object on each of the missing walls?
Yes, define your own tile, you have already located where you can define your own tiles, objects etc. under your mod_assets

in tiles.lua place this. (with comments on what everything is)

Code: Select all

defineTile{
	name = "costum_forest_ground",  -- this is the name of your costum tile, if you leave it as forest_ground you will overwrite the default one.
	editorIcon = 200, -- this is the editor icon for tiles
	color = {70,150,70,255}, -- this is the color of the editor icon (greenish)
	builder = "dungeon", -- how models should be arranged, dungeon or mine
	-- floor geometry is generated by heightmap
	heightmapMaterial = "forest_ground_01", -- this is the material of the floor in a heightmap, if you don't want I heightmap you need to define a floor model, see dungeon_floor tile.
	diggable = true, -- can you use a shovel to dig on this tile ?, true or false
	wall = { -- this is where we tell the tile what model should be used for walls.
		"forest_elevation_edge", 1,   -- the number indicates how often is should be placed if there are more then one model.
	},
	moveSound = "party_move_grass", -- what sound should be played when the party moves on the tile
	automapTile = "grassy_ground", -- what gfx should be used on the map
}
shift-clicking will fill your current tile with the selected tile, so changing your tiles should be an easy job.



kind regards.
Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

https://youtu.be/9Euc-RzZQeE

g1_tables
4 "dish" sockets that link to a script that accepts food items.
Creating a simply food puzzle where one has to insert the right kind of food as displayed on a painting in a haunted house as the spirits are "hungry"

I'm not a fan of using consumable items as puzzle solvers, but since they're plenty it shouldn't be an issue.

Is there a way to spawn food on the plates when the game starts since the dishes themselves don't have a surface component without using setWorldPosition?

This way the food is readily available on the dishes already, they just have to be placed on the right dishes.
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Are you using the dishes-socket script from minmay's Grimrock 1 Megapack?

Then all dishes should have sockets and you are able to add items. In example like this:

Code: Select all

local chee = spawn("cheese")
local magg = spawn("baked_maggot")
local frui = spawn("horned_fruit")
local eggs = spawn("turtle_eggs")

cozy_table_with_dishes_2.sock1:addItem(chee.item)
cozy_table_with_dishes_2.sock2:addItem(magg.item)
cozy_table_with_dishes_2.sock3:addItem(frui.item)
cozy_table_with_dishes_2.sock4:addItem(eggs.item)
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

I can work with that :)
User avatar
melierax
Posts: 29
Joined: Sat Oct 27, 2012 2:08 am
Location: Quebec, Canada

Re: Ask a simple question, get a simple answer

Post by melierax »

Hello I really do not understand how the minmay stairs works :? can anyone build me a little dungeon with so that I can finally understand it Thanks in advance :)
User avatar
Khollik
Posts: 171
Joined: Tue Aug 29, 2017 6:44 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by Khollik »

Hello

I'm trying to create a new item which produces light only in one direction (like a torchlight).

So far, I've managed to attach a new LightComponent to the party and I use it to enable/disable light when the item is used. I took an existing asset and customized it to have the right color, range and brightness I want for the item (and kept the brightness variation):

Code: Select all

class = "Light",
			range = 12,
			color = vec(1.3, 0.68, 0.35),
			brightness = 2,
			--fadeOut = 0.6,
			castShadow = true,
			staticShadows = true,
			destroyObject = true,
			shadowMapSize = 256,
			offset = vec(0, 1.5, -0.4),
			onUpdate = function(self)
				local noise = math.noise(Time.currentTime()*3 + 123) * 0.5 + 0.9
				self:setBrightness(noise * 2.5)
			end,
To be totally realistic, I want the light to be cast on a specific angle in front of the party instead of a "halo" of light (like the light spell).

Is it possible to achieve that?

I've tried to change parameters with setSpotAngle(), setClipDistance() and so on, but not being a professional coder I'm not even sure what is their use.

Thanks for your help!
Post Reply