Grimrock Unlimited: A Procedurally Generated Adventure

Are you looking for fun Custom Dungeons that you could play or do you want to share your mod with others? Then this forum is for you!
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Scotty »

I do want to avoid putting a crystal mid way through, to keep the whole one attempt and start on a new dungeon if you die. I could up the amount of resurrection potions, at the moment they're quite rare and only appear in chests.

I'll add a bunch more armour sets when I get a chance tomorrow.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Drakkan »

Scotty wrote:I do want to avoid putting a crystal mid way through, to keep the whole one attempt and start on a new dungeon if you die. I could up the amount of resurrection potions, at the moment they're quite rare and only appear in chests.

I'll add a bunch more armour sets when I get a chance tomorrow.
yes definitely some armours are good idea. I met spider which killed both my tanks with one attack :/
as for the crystal . what about giving as default one healing shard in the starting bag ? Should help a lot.
Breath from the unpromising waters.
Eye of the Atlantis
sirashton
Posts: 2
Joined: Tue Nov 18, 2014 12:00 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by sirashton »

get an error when trying to take anything from an item room

mod_assets/scripts/library.lua:14: attempt to concatenate local 'l' (a nil value)
stack traceback:
mod_assets/scripts/library.lua:14: in function <mod_assets/scripts/library.lua:12>
[string "Script.lua"]: in function 'sendMessage'
[string "Component.lua"]: in function 'triggerConnectors'
[string "Component.lua"]: in function 'callHook'
[string "Surface.lua"]: in main chunk
[string "GameObject.lua"]: in function 'sendMessage'
[string "Item.lua"]: in function 'onClickComponent'
[string "GameMode.lua"]: in function 'mousePressed'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Scotty »

sirashton wrote:get an error when trying to take anything from an item room

mod_assets/scripts/library.lua:14: attempt to concatenate local 'l' (a nil value)
stack traceback:
mod_assets/scripts/library.lua:14: in function <mod_assets/scripts/library.lua:12>
[string "Script.lua"]: in function 'sendMessage'
[string "Component.lua"]: in function 'triggerConnectors'
[string "Component.lua"]: in function 'callHook'
[string "Surface.lua"]: in main chunk
[string "GameObject.lua"]: in function 'sendMessage'
[string "Item.lua"]: in function 'onClickComponent'
[string "GameMode.lua"]: in function 'mousePressed'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk

I'm having trouble replicating this bug. Was there anything strange about the room? Did all 6 altars spawn in right?
sirashton
Posts: 2
Joined: Tue Nov 18, 2014 12:00 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by sirashton »

Scotty wrote: I'm having trouble replicating this bug. Was there anything strange about the room? Did all 6 altars spawn in right?
ye all 6 had items on them it happened 3/3 times now
Curak
Posts: 27
Joined: Thu Nov 20, 2014 4:34 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Curak »

Hey there, I had the same crash bug with the "Choose Wisely" item room, and have avoided it since. So not much help here, but I can verify its not just one person.

Slight texture/clipping Issue with something being inside the stairs but that might be hard to fix with random gen.

Other than that its pretty cool, I did the short run and everything else worked well. You get alot of xp from mobs, so I was level 8 or something by the end of floor 4. So if thats true in the longer runs you will be way over leveled.
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Scotty »

I've still been unable to replicate that crash or find the issue. If anyone who's had the crash could answer any of these questions, it would help hugely!

Steam Workshop or Nexus Mods?

Which version number?

Did you load a saved game at any point prior to the crash?

Would it only sometimes crash at an item room or would it happen at every single one?

Which dungeon length?

Is it always the "attempt to concatenate local 'l' (a nil value)" error?



Thanks :D


Edit: I'll also just paste the relevant script here, see if anyone can spot anything wrong with it.

When the altars are spawned in, they get an onremoveitem connector:

Code: Select all

			spawn("altar",	level_index, herei, herej, layout[(j*7)+i+1] - 5, 0, altar_ID)
				spawn(item_room_list[selected_item], level_index, herei, herej, 0, 0, altar_item_ID)
				
				item_room_altars[store_string][altar_count] = altar_ID
				altar_count = altar_count + 1
				
				findEntity(altar_ID).surface:addItem(findEntity(altar_item_ID).item)
				findEntity(altar_ID).surface:addConnector("onRemoveItem", "library", "itemRoomDelete")
and the itemRoomDelete function itself:

Code: Select all

function itemRoomDelete(altar, chosen_item)
	local x,y,f,l = altar.go:getPosition()
	local s = "floor" .. l
	if item_room_active[s][1] == true then
	for i = 1, 6, 1 do
		removeItemsFromSurface(findEntity(map_generation.script.item_room_altars[s][i]).surface)
	end
	playSound ("generic_spell")
	item_room_active[s][1] = false
	end
end
So the error message would imply that this line: local x,y,f,l = altar.go:getPosition() isn't grabbing 'l' correctly.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by minmay »

GameObject:getPosition() returns only the x position in some circumstances in 2.1.17, if you update to 2.1.18 it should fix the issue.
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.
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by Scotty »

minmay wrote:GameObject:getPosition() returns only the x position in some circumstances in 2.1.17, if you update to 2.1.18 it should fix the issue.

You legend!!! I'll put the requirement up.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Grimrock Unlimited: A Procedurally Generated Adventure

Post by minmay »

So I've played this a while and I'd like to make a suggestion: make the levels smaller, and ideally, more connected. You generally want to explore the whole level so they end up with a lot of backtracking. If the generator only used, say, 24x24 squares instead of 32x32 this would be greatly improved. If the stairs are too easy to find that way you can always e.g. add levers elsewhere on the level that need to be pulled to open them, so that the player has to explore a larger percentage of the level.

edit: I reached floor 5 in marathon mode and nothing shows up on my map. PgDn gets me the floor 4 map but there's nothing on level 5. Clicking the "center party" button takes me to a spot on the map but it's still completely blank. The problem persists on floor 6 but my map works again on level 7.
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.
Post Reply