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!
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

mrochions wrote:Hi - daft question - ocean over a heightmap beach coast - any reason I'm getting black bands in the little region at the edge of the water between where the waves recede and advance to? Thanks in advance.
reflection doesn't work properly in the editor preview port because parts of the game think it's at a different resolution than it actually is (this is also why gui elements don't draw in the correct positions/sizes). press f to expand it to the whole window and the problem will go away
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.
mrochions
Posts: 2
Joined: Wed Dec 16, 2015 9:26 pm

Re: Ask a simple question, get a simple answer

Post by mrochions »

Thanks you were right in full view it's perfect. Much obliged :)
maximilien
Posts: 3
Joined: Mon Sep 02, 2013 8:26 pm

Re: Ask a simple question, get a simple answer

Post by maximilien »

Hi,

simple question !
How can we stop the dungeon ?
I have my ending boss, my ending cinematic, but... after I com back in the room and the game don't stop.
How can I stop it to back to the screen title of the game ?

Thank you very much ! :)
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Call GameMode.completeGame() when you are ready to end the game.

Optionally, you can include an ending video as an argument.
GameMode.completeGame(video_path_string)
Cinderheart
Posts: 1
Joined: Sun Dec 27, 2015 7:20 pm

Re: Ask a simple question, get a simple answer

Post by Cinderheart »

Dr.Disaster wrote:
Duncan1246 wrote:I want to use a scriptable wizard, but I wonder about 3 monster's actions which seems to be identical except the animation: "escape", "crystal" and "letter". I don't remenber how they are used in the main game (if they are...). Does anyone knows how wizard's brain select one of them (hardcoded or by additional script) and if animation is the only difference, what each one do?
These animations are used in the main campaign at several places for storytelling purposes when the party can / will run into the wizard. None of them is combat related so they can only be accessed by scripting. For example the letter deposite scene when the party enters Sleet Island the first time is executed by calling wizard_lake.brain:performAction("letter")

Hi, new person here.

How would I get the letter in the tree, i.e., treat it like a normal alcove, without the wizard coding?
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 »

Cinderheart wrote: Hi, new person here.

How would I get the letter in the tree, i.e., treat it like a normal alcove, without the wizard coding?
Hi, welcome to the forums.

The letter (and map) are simply placed next to the tree, the tree is not an alcove so a script is used to move the letter into place so it looks like it is sticking out from the tree hole.

this is the code from the original campaign, movemap is called with a small delay that moves the letter and map into the correct position for that given situation, your coordinates will have to be placed into the script.
the other function called action is triggered by a floor_trigger and performs the animation of the wizard and you can simply remove that if you don't want the wizard coding.

Code: Select all

delayedCall(self.go.id, 1, "moveMap")

function action()
	wizard_lake_light.pointlight:fadeOut(4)
	if wizard_lake then wizard_lake.brain:performAction("letter") end
end

function moveMap()
	tree_hole_letter_2:setWorldPosition(vec(23.6, 1.65, 16.72-0.35))
	tree_hole_letter_2:setWorldRotationAnglesWithOrder(60, 125-90, 20, "xzy")

	island_map_1:setWorldPosition(vec(23.6, 1.65, 16.72-0.4))
	island_map_1:setWorldRotationAnglesWithOrder(55, 140-90, 25, "xzy")
end
Hope that helps.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Thorham
Posts: 80
Joined: Sat May 04, 2013 5:12 pm

Re: Ask a simple question, get a simple answer

Post by Thorham »

It seems that onComputeAccuracy and onComputeCritChance when used in skils are only called when the stat panel is visible. Is this correct? I sure hope not...

Edit:

Okay, I'm officially an idiot :lol: I was testing onComputeAccuracy and onComputeCritChance with melee weapons, and for those these events only happen when you hit something :lol:
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Thorham wrote:It seems that onComputeAccuracy and onComputeCritChance when used in skils are only called when the stat panel is visible. Is this correct? I sure hope not...
It is not correct. They are also called whenever an attack is made that could potentially hit a monster. And presumably in any other circumstance where accuracy/crit matters.
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.
User avatar
Thorham
Posts: 80
Joined: Sat May 04, 2013 5:12 pm

Re: Ask a simple question, get a simple answer

Post by Thorham »

minmay wrote:It is not correct. They are also called whenever an attack is made that could potentially hit a monster. And presumably in any other circumstance where accuracy/crit matters.
Thanks, I was testing it with melee attacks and wondering why it didn't print anything :lol:
User avatar
LunasC
Posts: 38
Joined: Sun Feb 10, 2013 1:46 pm

Re: Ask a simple question, get a simple answer

Post by LunasC »

has anyone gotten one shot spell scrolls worked out?
I have tried a few things but I just cant get them to work.
Post Reply