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

Re: Ask a simple question, get a simple answer

Post by THOM » Tue Dec 15, 2020 11:54 pm

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

ratman
Posts: 139
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman » 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?

Zo Kath Ra
Posts: 864
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra » Thu Dec 17, 2020 7:23 pm

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: 166
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul » Fri Dec 18, 2020 1:36 am

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 Mod The Old Nexus (wip)

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

Re: Ask a simple question, get a simple answer

Post by Isaac » Fri Dec 18, 2020 2:05 am

It occludes.

ratman
Posts: 139
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman » 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?

User avatar
7Soul
Posts: 166
Joined: Sun Oct 19, 2014 1:56 am
Location: Brazil

Re: Ask a simple question, get a simple answer

Post by 7Soul » Fri Dec 18, 2020 4:37 am

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

My Mod The Old Nexus (wip)

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 » Sat Dec 19, 2020 9:11 pm

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.

ratman
Posts: 139
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman » Thu Dec 24, 2020 1:01 am

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)

Zo Kath Ra
Posts: 864
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra » Thu Dec 24, 2020 1:27 am

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