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!
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Pompidom wrote: Sun Aug 12, 2018 1:05 pm
What are my options to make sure the cave stairs don't light up like a christmas tree because of the daylight that goes through everything?
Are there any day_sky blocker tiles/walls/ceilings or something like that?
I found an old asset pack from bongo which contains "shadow removers", basically black flat walls and ceilings that fix everything when making buildings in an outside map.

Unlike the name implies it basically does the opposite and gives proper shadows to any wall / ceiling. No more sun through the ceilings/walls :)
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

Pompidom wrote: Sun Aug 26, 2018 9:57 pm I found an old asset pack from bongo which contains "shadow removers", basically black flat walls and ceilings that fix everything when making buildings in an outside map.
Can you or Bongobeat provide a link to this old asset pask? :)
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Sure, let me look for it,
Be aware that it overwrites certain sx_town stuff and actually broke my mod for a short while when I added all of it in one go.
Which is basically my own fault for combining every single asset pack together in 1 mod.

edit: viewtopic.php?f=22&t=9320&hilit=bongobeat+assets

But apparently you already downloaded it a long time ago akroma :D
You probably missed the shadow removers or have forgotten about it.
They're extremely helpful in fixing broken shadows when creating buildings in outdoor areas where the sun shines through walls and ceilings.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

Pompidom wrote: Tue Aug 28, 2018 2:53 pm But apparently you already downloaded it a long time ago akroma :D
You probably missed the shadow removers or have forgotten about it.
They're extremely helpful in fixing broken shadows when creating buildings in outdoor areas where the sun shines through walls and ceilings.
Im sure I did (yup) ... I was just asking for the thread's reference sake 8-)
Cant remember those shadow removers but I havent needed them yet either
Cant wait to start building....
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Has anyone tried exchanging the axe a skeleton (warrior?) holds in his righthand into a burning torch? And would this be easy to create? So that they illuminate the corridors they walk through.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

yes, it's in G1MP. try this in your init file:

Code: Select all

g1_createWeaponMonster("skeleton_trooper","torch","skeleton_knight_shield","skeleton_torcher")
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.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Holy crap, this works perfect :)
This is exactly what I was looking for! A skeleton trooper that holds a burning torch :)

I'm looking at your G1mp weapon_monsters.lua file trying to understand how you did it.
Since I only see 2 unarmed models, I suppose this can only be done with these 2 specific monsters in your current G1mp file?

Looking at weapon_monsters.lua in notepad++ I see that the torch option is only listed for right hands weapon slot and the left hand is only limited to different shields. Does that mean, that currently it's impossible to put a torch in his left hand without changing your code? If so, that's okay. I'm more than happy with right hand torch using troopers.

My idea was to use zim's human knights (which are basically based off the original skeleton trooper) to carry torches as well patrolling the townstreets and gates at night. But I suppose that would require too much coding actually getting the torches in their right hand.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

I'm looking for codelines/script lines that make assets like a castle_candle_holder and a dm_painting to disappear to a different location when pressing a button. Basically something like setworldposition when you have pressed the button. and then when you press a 2nd button i want the script to be disabled so that they get back to their original position.


In this particular case I want them to change position to for example a floor lower so that they're under the ground and thus out of sight. And that they're instantly replaced by hellish equivalents.
a white candle changes positions with a red one. A painting of a cheeky fellow is exchanged by the painting of a vampire
A chandelier starts turning and other spooky effects suddenly activate etc...

Also scripts in my mod are instantly and permanently enabled like for example this script:

Code: Select all

dungeon_stand_candle_center_1:setWorldPosition(vec(7.5,0,79.8,0))
Is there a way to keep this script disabled until it's triggered?

I suppose i have to make something like this?

Code: Select all

function switch()

dungeon_stand_candle_center_1:setWorldPosition(vec(7.5,0,79.8,0))

end
And then attach the button to it?

What are my options? or am i just grasping at straws here?

Or is there a way/script to destroy assets like a castle candle holder at a certain location and spawn a DARKcastle candle holder at a certain location when clicking/triggering a button.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Do you have the alternate [hellish] models?
Pompidom wrote: Sun Sep 02, 2018 11:06 am Is there a way to keep this script disabled until it's triggered?
The way to execute code when triggered, is to encapsulate it in a function; then call that function when needed—as with a button.

ie.

Code: Select all

function moveCandle()	
	dungeon_stand_candle_center_1:setWorldPosition(vec(7.5,0,79.8,0))
end
Another way to position it, is to make a socket-object that positions the candle exactly where you want it, and use a script function to spawn a candle into the socket; or destroy the candle to make it disappear.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

I'll need to experiment and see what I can come up with then :)
Post Reply