Modifying/Creating the Loot Table

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Modifying/Creating the Loot Table

Post by HaunterV »

My one main area of interest at the moment is Monster loot and the loot table it's drawn from;
- Is there an actual loot table used to determine what monsters drop on death ?
- Is the loot table entire dungeon defined or floor defined or monster class/race defined? or is it like some games where some monsters only ever have a chance of dropping one item like say a slime will only ever will have a chance to drop a healing potion.

I'm making a single floor dungeon and I hope it will turn out to be fun.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Modifying/Creating the Loot Table

Post by SpacialKatana »

In some of the monster defs you will find a line like:-

lootDrop = { 35, "cold_arrow" },

In the above case a 35% chance of a cold arrow dropping.

You can add more fields thus:-

lootDrop = { 35, "cold_arrow", 25, "blueberry_pie" }

So the monster now can drop a piece of yummyness 25% of the time too:)
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Modifying/Creating the Loot Table

Post by HaunterV »

SpacialKatana wrote:In some of the monster defs you will find a line like:-

lootDrop = { 35, "cold_arrow" },

In the above case a 35% chance of a cold arrow dropping.

You can add more fields thus:-

lootDrop = { 35, "cold_arrow", 25, "blueberry_pie" }

So the monster now can drop a piece of yummyness 25% of the time too:)

Ok, so your first example; I understand that fully and it clarifies a couple things I've tried to figure out in the game just by playing.

Your second example; Clarifies things further but raises some questions, at least for me it does and I'd love some help.
1) lootDrop = { 35, "cold_arrow", 25, "blueberry_pie" } <---Does that mean there is a chance at a drop of both items? and, How many items can be put into this monster's particular belly?

2)in the lootDrop = { 35, "cold_arrow", 25, "blueberry_pie" } example, do added items to this 'pool' all have to be in the same line of text to work properly? or will putting them in a list like;
35, "cold_arrow"
25, "blueberry_pie"
15, "monkey_butler"
work as well? i find the list easier to read and less of a pain to look at.

3) In the lootDrop = { 35, "cold_arrow", 25, "blueberry_pie" } example again, does the loot check or can the loot check stop once one item has dropped or will it always check every option every time?

4) Can we possibly come up with a loot table or formula that will create loot pinatas?
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Modifying/Creating the Loot Table

Post by Montis »

1), 3) and 4) The chance for each item is separate. So if you have 100 snail slice and 100 blueberry pie, it will drop both every time you kill that enemy. You can probably put as many items in the monster until the game crashes as a cause of memory usage :p

2) yes, you can implement line breaks without breaking it, but you need a comma after each entry
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Modifying/Creating the Loot Table

Post by HaunterV »

now is loot connected to loot or can we get a monster to drop say.... ANOTHER MONSTER!
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
User avatar
Emciel
Posts: 34
Joined: Fri Sep 14, 2012 2:19 am

Re: Modifying/Creating the Loot Table

Post by Emciel »

to drop another monster you'd probably need to use an onDie hook
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Modifying/Creating the Loot Table

Post by Montis »

HaunterV wrote:now is loot connected to loot or can we get a monster to drop say.... ANOTHER MONSTER!
Matryoshka monster incoming!

The lootDrop function is probably confined to loot, you're welcome to try though.
But you could easily use an onDie hook to spawn another monster on top of the dead one :D

Code: Select all

onDie = function(self)
   spawn("lesser_monster", self.level, self.x, self.y, self.facing)
end
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Modifying/Creating the Loot Table

Post by Komag »

that would be rough, an ever spawning monster. Hmm, maybe it could be a series, like a series-boss-fight: you kill the weakest, the next one spawns, kill him, the next spawns, etc
Finished Dungeons - complete mods to play
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Modifying/Creating the Loot Table

Post by SpacialKatana »

If you want adds for a boss, add an OnDIe hook to trigger a counter linked to a spawner in the boss room. When the counter gets to 0, ie you killed all 5 adds spawned,the boss is easy pickings lol.

Code: Select all

onDie = function(self)
  addcounter:activate()
end
Have the counter called addcounter set at 5, link it to a spawner. When adds in the room with the function die, more will appear. Of course you want to spawn adds WITHOUT the hook, or you will get endless monsters.

Hope this helps.
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Modifying/Creating the Loot Table

Post by HaunterV »

Well slimes are supposed to split imo.
even if its a 25% chance.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
Post Reply