intro post (+LOG1 modding questions!)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Zan-zan-zawa-veia
Posts: 3
Joined: Sat Nov 26, 2022 1:57 pm

intro post (+LOG1 modding questions!)

Post by Zan-zan-zawa-veia » Sat Nov 26, 2022 9:53 pm

Hi! I've been into game modding and dungeon crawlers a long time... huge fan of Dungeon Master, Captive, EOtB and now Grimrock! also big into Ultima Underworld, big into Doom and various types of tile-based puzzlers and strategy games, too.

I've been playing with the modding tool included in Grimrock for a while, making little test dungeons as I went, and it occurred to me I'd reached the point where I needed help with things I'll never work out solo:

1) Where can I go to get a glimpse of every possible attribute I can add to a monster or to an item? Is there a legal way to compile a list or spreadsheet of such from the basic grimrock.dat? I haven't been able to find a comprehensive one anywhere, it's already very obscure to work out, eg, what the variable name for the digestion rate modifier on items is called.

2) re the Walkabout puzzle from LOG1's 6th level, how do you prompt a sound effect upon entering a certain tile? I've been lamenting the way that invisible pressure plates don't go *clunk* even when silent's unchecked and have been wanting this sort of action to make my own puzzles.

I don't wanna go too deep into coding; my taste is more in dungeon and world building, wanting to make story-based stuff that isn't super tricky under the hood. but I'll learn a few basic scripts if it means I can fire off SFX whenever I like!

thanks for any help in advance! (yes, I am aware LOG2 exists, and I like it! I just feel like the scope of this game is closer to my ideal!)

minmay
Posts: 2745
Joined: Mon Sep 23, 2013 2:24 am

Re: intro post (+LOG1 modding questions!)

Post by minmay » Sat Nov 26, 2022 11:39 pm

The fields you can put on objects are listed here: http://www.grimrock.net/modding_log1/as ... reference/
You won't find the name of a variable for a digestion rate modifier on items in Grimrock 1, because no such variable exists. The effects of the Diviner's Cloak and Brace of Fortitude are hardcoded for champions wearing items named "diviner_cloak" and "brace_fortitude".
You may want to consider making your mod for Grimrock 2 instead, which has more modding features and does have this stat ("food_rate" on EquipmentItemComponent).

To play sounds, use the playSound() or playSoundAt() functions listed here: http://www.grimrock.net/modding_log1/sc ... reference/
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.

Zan-zan-zawa-veia
Posts: 3
Joined: Sat Nov 26, 2022 1:57 pm

Re: intro post (+LOG1 modding questions!)

Post by Zan-zan-zawa-veia » Sun Nov 27, 2022 12:15 am

ah, thanks for the quick answers! too intimidated by all LOG2's stuff to want to dive into editing it, more comfy in game number one!

re: playSound(), how is that applied in the game editor? what sort of framework needs to be written in a script entity so that it's always checking for the right conditions to play the sound?

edit: never mind, did some prodding and got this going

Code: Select all

function governMystClunkA()
	if melusnare_mystclunk_A:isDown() == true then
		playSound("pressure_plate_pressed")
		end
	end
	
function governMystClunkB()
	if melusnare_mystclunk_B:isDown() == true then
		playSound("pressure_plate_pressed")
		end
	end
my new less naive question is can I generalize this to a single function and pass it a less specific name? thanks again

minmay
Posts: 2745
Joined: Mon Sep 23, 2013 2:24 am

Re: intro post (+LOG1 modding questions!)

Post by minmay » Sun Nov 27, 2022 1:00 am

Sure. You can make a function like this:

Code: Select all

function pressurePlateSound(plate)
	if plate:isDown() then
		playSoundAt("pressure_plate_pressed", plate.level, plate.x, plate.y)
	else
		playSoundAt("pressure_plate_released", plate.level, plate.x, plate.y)
	end
end
Then you can connect any number of pressure plates to this function, and the sound will be played at the correct position for each one.
In general, when a connector to a script function is triggered, the entity with said connector will be passed to the function. Some connectors pass even more, e.g. a Receptor will pass itself as the first argument and the entity that hit the Receptor as a second argument.
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.

Zan-zan-zawa-veia
Posts: 3
Joined: Sat Nov 26, 2022 1:57 pm

Re: intro post (+LOG1 modding questions!)

Post by Zan-zan-zawa-veia » Sun Nov 27, 2022 4:10 pm

ahh thank you! that unlocked a lot in my brain!




Image

hard at work at a dense, somewhat non-linear hold :3
so far it's a bit of a tribute to that RPG tendency to have the player rediscover a civilization, or a secret society, or a scientific project, by finding everyone's bodies and reading everyone's notes to each other. that system shock, prey, ultima underworld 2 kinda feel. i just can't help writing lots of notes and grafitti!

User avatar
Komag
Posts: 3648
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: intro post (+LOG1 modding questions!)

Post by Komag » Mon Dec 05, 2022 12:45 am

That looks really impressive at first glance!
Finished Dungeons - complete mods to play

Post Reply