Calling on minmay (Drinn Sound Wall)

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!
Post Reply
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Calling on minmay (Drinn Sound Wall)

Post by Azel »

So my favorite thing about the Lost Halls of Drinn Mod:
viewtopic.php?f=14&t=6742

...is that wall of sound. I am currently in the process of making a Mod for LoG2 and I absolutely must implement your sound wall. May I borrow it purty please? :mrgreen:
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Calling on minmay (Drinn Sound Wall)

Post by minmay »

The Lost Halls of the Drinn source comes with a file called "READ THIS BEFORE USING ANY ASSETS.txt" which has complete licensing information for every file in the mod. All of the resources used in the music wall are either in the public domain, or under the terms of the Grimrock 1 Asset Pack. Therefore, they may be used in Grimrock 1 or 2 mods with no restrictions, do not require any form of attribution, and do not require asking for permission.

The only files in the mod with any such restrictions are certain sounds (those not listed in the "public domain" section) and possibly jKos' Grimrock Scripting Framework (which I don't know the exact licensing of). Note that all of the sounds in sounds/notes/ - which are all the sounds used in the music wall - are in the public domain.

If you want to port the music wall to LoG2 you can greatly improve it in a lot of ways:
- the Grimrock 2 component system allows the music wall to be implemented much more easily, and scale effortlessly to any number of rows/columns:
- instead of the model with 56 slots, use a model with just 1 slot, and use multiple ModelComponents with offsets
- instead of the 56 alcoves + onPickUpItem hack + items for each of the gems, you can just use ClickableComponents and more ModelComponents for the gems
- Grimrock 2 allows SoundComponents to play their sounds at arbitrary pitches and arbitrary volume, so you won't need a sample for every single note
- looping sounds can also be used much more flexibly in Grimrock 2, so with some precise timing trickery you might be able to do sustained notes
- you can temporarily stop the regular background music by spawning something with a BossFightComponent or calling GameMode.playStream(), although the music can only restart instead of resuming, so this isn't really ideal
- the flat wall model is unnecessary because Grimrock 2 comes with one (assets/models/env/dungeon_wall_01_occluder.fbx) that is identical except for the material - which you can simply override in the object definition

I would also like to point out that even the Grimrock 1 version of the music wall is a better MOD player than WinAmp, because it actually handles tempo changes correctly.
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
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Calling on minmay (Drinn Sound Wall)

Post by Eleven Warrior »

Hey Minmay how did you do the Exp thing. When you put the correct item on the round Altar the exp coloured text twirls around? Now that's cool. Also I cant believe I missed your mod man sorry. So it's back to LOG 1 to play it from the .dat file thxs for any help mate :)
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Calling on minmay (Drinn Sound Wall)

Post by minmay »

The "XP +50" text is simply a particle effect with an image of the text as its texture. The "zoom in" effect is accomplished by starting the particle at a distance (of 20) and making it move towards the party. It is a screen effect emitted to object space so it moves with the camera. Here's the definition:

Code: Select all

xpvals = {50,100,200}
for k,v in ipairs(xpvals) do
	defineParticleSystem{
		name = "xpgain"..v,
		emitters = {
			{
				objectSpace = true,
				spawnBurst = true,
				maxParticles = 1,
				boxMin = {0,0,20},
				boxMax = {0,0,20},
				sprayAngle = {0,0},
				velocity = {0,0},
				texture = "mod_assets/textures/particles/xp"..v..".tga",
				lifetime = {1.9,1.9},
				color0 = {1, 1, 1},
				opacity = 1,
				fadeIn = 0.9,
				fadeOut = 0.9,
				size = {v/50, v/50},
				gravity = {0,0,-44},
				airResistance = 4,
				rotationSpeed = v/25,
				blendMode = "Translucent",
				depthBias = -2,
			},
		}
	}
end
There are actually a couple of serious problems with it:
- if there's a wall (or other object) directly in front of the party, the particle could clip with it near the start. This is why a huge depthBias value is used. Unfortunately, if the depthBias is too dramatic, it will clip with the camera near the end instead. If I recall correctly, with the values I used, there's some clipping at the start and unnoticeably tiny clipping at the end.
- obviously you need a different texture for every line of text you want to display, and the textures have to be huge (I used 1024x1024) or the scaling artifacts look awful.
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.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Calling on minmay (Drinn Sound Wall)

Post by Azel »

badass, minmay. Thanks for the info.

I'm about 75% done with my mod which is a recreation of the original Myst. Anyone who has ever played the game, or the series, knows that "sound" is a major element in its puzzle solving. For example, trying to fly the original spaceship on Myst Island involves typing the correct keys on the piano and then matching those sounds on the ships control panel.

I plan to implement your Sound Wall as a re-interpretation of Myst's sound puzzles. Up to this point I have used only the default assets in Grimrock 2; so this will be my first attempt at customization. Fun!
Post Reply