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
THOM
Posts: 1266
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Wow - finally. The candle item works and is finished.

Thanks minmay!
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
ratman
Posts: 158
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman »

I have a few new questions: what does the reflection tile drawing mode do? And also what is the point of an occluder and what is it used for?
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

ratman wrote: Thu Dec 17, 2020 5:31 pm I have a few new questions: what does the reflection tile drawing mode do? And also what is the point of an occluder and what is it used for?
> what does the reflection tile drawing mode do?

Skuggasveinn has explained it in LoG2 editor tutorial - part 4 - Creating water inside your dungeon @ 4:25

If you haven't already done so, I suggest downloading all of his LoG2 tutorials with https://youtube-dl.org/
User avatar
7Soul
Posts: 199
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

ratman wrote: Thu Dec 17, 2020 5:31 pm And also what is the point of an occluder and what is it used for?
Add a wall to your level (like a ruins wall, preferably outdoors with lots of stuff around) and disable the model to see for yourself what it does ;)
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

It occludes.
User avatar
ratman
Posts: 158
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman »

So what is the point of it? is it for performance so it doesn't load the models the player usually wouldn't see or something?
User avatar
7Soul
Posts: 199
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul »

Exactly, every game does it
Join the LoG discord server: https://discord.gg/ArgAgNN :D

My Mods
User avatar
Skuggasveinn
Posts: 561
Joined: Wed Sep 26, 2012 5:28 pm

Re: Ask a simple question, get a simple answer

Post by Skuggasveinn »

ratman wrote: Fri Dec 18, 2020 3:30 am So what is the point of it? is it for performance so it doesn't load the models the player usually wouldn't see or something?
They are super important, some engine create their own mesh from models to use for vision culling, the Grimrock 2 engine uses models that you have to define as an Occluder model for that specific task.

Perhaps long overdue but I decided to record a short video about occluders and there function and how you can see what they are about. Hope it helps.
https://youtu.be/xAj65MM2lww

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
ratman
Posts: 158
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman »

Two more questions: first, if the player creates a party, changes the position of champion 1 and champion 2, then imports that party
into a different mod, would the game remember the original Ordinal or make a new one based on the party's formation when it was imported? Second, is there some sort of offset function that can be used repeatedly on the same object? Such as using something like setSubtileOffset but if you call it twice on the same object it would move it twice? Something like this?

Code: Select all

teleporter_1:setSubtileOffset(2, 2)
but if I call it again, it would move it again? (or alternatively, could I do something like

Code: Select all

local offset = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(offset + 1)
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

ratman wrote: Thu Dec 24, 2020 1:01 am Second, is there some sort of offset function that can be used repeatedly on the same object? Such as using something like setSubtileOffset but if you call it twice on the same object it would move it twice? Something like this?

Code: Select all

teleporter_1:setSubtileOffset(2, 2)
but if I call it again, it would move it again? (or alternatively, could I do something like

Code: Select all

local offset = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(offset + 1)
GameObject:getSubtileOffset() returns two values:
- x subtile offset
- y subtile offset
( see https://www.lua.org/pil/5.1.html )

If you want to change the subtile offset by some amount, you could do it like this:

Code: Select all

local x, y = teleporter_1:getSubtileOffset()
teleporter_1:setSubtileOffset(x + 0.1, y + 0.1)
Post Reply