[Release] Lost Halls of the Drinn 1.0.0

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
leewroy
Posts: 531
Joined: Fri May 25, 2012 10:17 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by leewroy »

minmay wrote:You can look at the source if you really want to spoil yourself. But for people who want to try to find it themselves here's a hint:
SpoilerShow
Try out all of the different spells.

I'll see :)
User avatar
sapientCrow
Posts: 608
Joined: Sun Apr 22, 2012 10:57 am

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by sapientCrow »

That was a truly fantastic experience!!

All those custom assets and new music and sounds as well as the puzzles/riddles were brilliant.
Thanks so much for creating this!

Will we see the sequel in LoG2 editor. I really really hope so.
I need to know more about the Drinn.

oh and....
I would have already endorsed it but I downloaded direct from your site. I am now working on downloading from Nexus so I can endorse it proper.

I am also curious how you deal with the exp sharing.
I am using seebs old function for exp share:

Code: Select all

function d.intercept_die(...)
  d.last_die_event = { ... }
  local f = d.last_die_event[1].flags
  d.last_die_event[1].flags = math.floor(f / 16) * 16 + 15
  return d.saveMonsterDie(...)
end

function d.share_exp()
  if Monster.die ~= d.intercept_die then
    d.saveMonsterDie = Monster.die
    Monster.die = d.intercept_die
  end
end
I run it with all dungeons with an old console that lets me run external script.
Can you share what else you do so I can add it into the debug file?
I like how you have it that even on death full experience is awarded and even if the killing blow is not by any party members like the light motes.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by minmay »

sapientCrow wrote:Will we see the sequel in LoG2 editor. I really really hope so.
I need to know more about the Drinn.
Yes, and it resolves all the plot points. It'll also be quite a bit longer. I'm actually planning on posting a preview fairly soon once I have a few choice models and textures done.
sapientCrow wrote:I am also curious how you deal with the exp sharing.
It's not pretty. Here's how it works:
- Every monster's onDie hook calls the giveFullXp function.
- giveFullXp spawns a timer with a 1ms delay (so it will trigger on the next frame) with the monster's id stored in its id (unless there's already a timer for that monster), and returns false (leaving the monster alive).
- The timer calls a function that sets the monster's health to 1 and does a damageTile on it that's credited to all 4 champions. This awards full experience to all living champions. Since killing the monster calls the giveFullXp hook again, the monster's id is marked in the "removingMonster" table; when giveFullXp is called on such a marked monster it simply returns true without doing anything else.
- To award experience to dead champions, there is a manually-maintained table with experience values for every monster in the game, awarded with Champion:gainExp(). This is by far the easiest part.
- If the monster is an uggardian, giveFullXp replaces it with a dummy monster because the uggardian's flame effect causes a crash if you return false from its onDie. This puts the light and particle effects in the wrong place if the uggardian was moving, so that's why I don't use it for other monsters. (The dummy monster is spawned because I want the "+500 XP" text.)

Code: Select all

-- XXX: be absolutely sure these are accurate to monsters.lua!
xpvals = {
  ["monster_herder"] = 50,
  ["monster_herder_small"] = 100,
  ["monster_crab"] = 150,
  ["monster_blue_slime"] = 250,
  ["monster_uggardian_ghost"] = 600,
  ["monster_willowhisper"] = 250,
  ["monster_guardian_red"] = 1000,
  ["uggardian"] = 0,
  ["uggardian_fake"] = 1000,
  ["monster_guardian_green"] = 1000,
  ["monster_guardian_cyan"] = 1000,
  ["monster_guardian_blue"] = 1000,
  ["monster_guardian_magenta"] = 1000,
  ["goromorg"] = 2000,
  ["monster_the_simulacrum"] = 2500,
}

-- give full xp to all party members from killing a monster
-- pass the real onDie here
-- note: will not work with monster groups, and would require
-- obvious modification to work with level >1 monsters!
--
-- the damageTile *must* be the hit that kills the monster, otherwise
-- you will still get no xp for monsters killed by no champion at all.
-- i don't see any way to kill the monster on the same frame because
-- of this.
--
-- XXX: i'm not sure of the exact reason but this
-- causes a crash with the "uggardian" id's flame effect.
-- therefore we spawn a fake one instead and kill that.
-- unfortunately this means that the particle effects will be in
-- the wrong place if the uggardian was killed while moving.
givingXp = false
removingMonster = {}
function giveFullXp(mon,onDie)
  -- special case to prevent flame effect crash; real uggardian
  -- should give 0 xp for this to work
  if mon.name == "uggardian" then
    onDie(mon)
    local l,x,y,f = mon.level,mon.x,mon.y,mon.facing
    mon:setPosition(1,1,1,1)
    awardDeadXp(spawn("uggardian_fake",l,x,y,f):setHealth(1))
    damageTile(l,x,y,f,0x7c,"poison",2)
    return true
  end

  if findEntity("t"..mon.id) then return false end -- killed it twice on the same frame (or 2 consecutive frames?)
  if removingMonster[mon.id] then removingMonster[mon.id] = nil return true end
  if onDie and not onDie(mon) then return false end
  spawn("timer",mon.level,mon.x,mon.y,mon.facing,"t"..mon.id)
  :setTimerInterval(0.0001)
  :addConnector("activate",ME,"killMonster")
  :activate()
  return false
end
function killMonster(t)
  local mon = findEntity(t.id:sub(2))
  t:destroy()
  if mon then
    awardDeadXp(mon)
    removingMonster[mon.id] = true
    mon:setHealth(1)
    damageTile(mon.level,mon.x,mon.y,mon.facing,0x7c,"poison",2)
  else game.bugPrint("NO_DEADMONSTER") end
end
function awardDeadXp(mon)
  local xp = xpvals[mon.name]
  if not xp then game.bugPrint("BADMONSTER") return true end
  for i = 1, 4 do
    local champ = party:getChampion(i)
    if champ:getEnabled() and not champ:isAlive() then champ:gainExp(xp) end
  end  
end
Now, to answer your next questions:
Q: Why don't you just do a damageTile in giveFullXp to credit damage to all champions, then return true? You wouldn't have to delay it with a timer that way.
A: This works great, except that it still requires the killing blow be dealt by a party member. You're returning true to the original killing blow, not the damageTile, so if the original killing blow was, say, a projectile from another monster, no experience will be awarded.

Q: Okay, then why don't you return false for the original killing blow, but make your damageTile kill the monster and return true to that? You still wouldn't need a timer.
A: Returning true from an onDie hook and subsequently returning false leaves monsters in a partially-destroyed state. At first they appear to die normally, but you'll find that the entity sticks around for a while and can even be damaged and killed again with burst spells and the like. Calling destroy() does not fix this (and has other undesirable effects).

Q: All right, what if you return true from both?
A: Then the monster dies twice. We wanted full experience, not double experience, and we also didn't want double sound, double particles, and double light...

Q: Well why don't you just award experience to all party members with gainExp() and make the monster kill give 0 XP?
A: I wanted the "+100 XP" text to still pop up.

So the timer approach was really the only option I had left.

Now, if you want to award full XP for all kills in Grimrock 2, it's really easy, because recent versions have a Champion:getExp() method. You don't have to care about how much experience they get from killing the monster because you can just adjust it yourself.
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
sapientCrow
Posts: 608
Joined: Sun Apr 22, 2012 10:57 am

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by sapientCrow »

Thanks for posting that!
It helps a lot. Trying to figure out how I can do it so I can run it on any dungeon though but I think that will not work since I have to find the monster table of each dat.
Regardless that is a cool and interesting code there.
I am so glad they did away with damage per champion for experience distribution and they made it much more simpler to award exp.

Thanks again for the Dungeon and the Code and I am totally looking forward to the sequel!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by Batty »

This is my new favorite mod. The puzzles are brilliant. I finally caught that f&@#%*# jumping key now I can go to bed.

Only 109 dl on Nexus, that is shameful! Should be 10x that number. Maybe in your upcoming sequel thread attention can be directed to this while we wait for part 2.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by Batty »

I did a 2nd playthrough with an
SpoilerShow
all mage party which is the way to go, very powerful and lots of fun with the wands firing in succession
but about the easter egg
SpoilerShow
I cast 18 spells & nothing happened, do I have to have thunderstruck_awakened also to get the easter egg? (or is that the egg?) I dug through the source too...
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by minmay »

Batty wrote:but about the easter egg
SpoilerShow
I cast 18 spells & nothing happened, do I have to have thunderstruck_awakened also to get the easter egg? (or is that the egg?) I dug through the source too...
Full spoiler:
SpoilerShow
Use Glacial Power on the color fountain.
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.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by Batty »

ahh, ok thanks, got it, very nice. This mod is worthy of multiple playthroughs, I discovered new things the second time like the opening and closing musics are well-crafted versions of the Grimrock theme!

There is much here:
  • tough but still logical puzzles
  • challenging yet intelligent combat
  • particle effects taken to their limit
  • original sound & music that fits the atmosphere
For those considering playing, don't let the removal of the game systems discourage you. When I first read the description, I thought "ugh, drastically changing the game mechanics, that won't work." But, it does.
Looking forward to part 2. I'm especially curious to see what you'll do with the LoG2 access to shaders (not sure how flexible it is, slimes can be properly retextured at least).
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by Azel »

I'm jumping late on this one - only started playing my very first Grimrock Mod's this week - but I am enjoying it. Made it to level 5 in one sitting.

I only had to use your hint/spoilers twice so far. The puzzles are great, the new implementations to the game are fantastic, and I love the Sound Wall.
Last edited by Azel on Wed Apr 22, 2015 10:53 pm, edited 1 time in total.
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: [Release] Lost Halls of the Drinn 1.0.0

Post by Duncan1246 »

Wonderful indeed! It's an alien mod, no other can be compared to!
It reminded me a cd-concept of Peter Gabriel"s team which had created a game type point and click on a musical basis.
I had particularly appreciated the organ and the visual effects, as well as the poetic quality of the texts.
However, it"s so different of others dungeons that it"s not a dungeon at all, but a new concept-game wearing old clothes (sorry for my approximative english...).
Anyway, I have lived an astonishing experience, thanks to you!
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
Post Reply