Console command list?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Frenchie
Posts: 219
Joined: Wed Oct 16, 2013 2:50 am

Re: Console command list?

Post by Frenchie »

I looked in the default item list of the editor and in the grimrock remake, but there are no copper, sliver or golden gor coins. So spawn("golden_gor_coin") doesn't work. Some items must be hard-coded into the game to avoid cheating. Since I don't have the editor files of mods that do have those items, the makers probably created their own gor coin items (which can be spawned)

As for my lock problem there are entities like lock_gold and gold_key. You can spawn random keys and try every one on the lock. I must search for every entity in a square like in the Sesame() script, but can I search for a "partial" name like "lock_" (with or without split command with '_' delimeter) or only for full lock names?

What I didn't calculate is that it stops after finding the first key, which might not be the closest or an accessable one. Perhaps I should complicate it by a search spiral around the party or search through a list of found keys and then find the closest one. The latter seems better, but then I would have the search through a {table} ?

Below I made a very rough script with an unknown LOCK object:

function LockSpy()
fa = party.facing
le = party.level
xx = party.x
yy = party.y
dx, dy = getForward(fa)
for e in entitiesAt(le, xx, yy) do
if e.LOCK and e.facing == fa then LockFound()
end
end
for e in entitiesAt(le, xx + dx, yy + dy) do
if e.LOCK and e.facing == (fa + 2) % 4 then LockFound()
end
end
end

function LockFound()
lock = e.LOCK
key = keyName
key.x, key.y, key.level = findEntity(key)
hudPrint "The lock you're looking at is ",lock, "and its key ",
key, "can "
if keyLevel == party.level then hudPrint key, "be found at
(",key.x,",",key.y") on this level"
else hudPrint "not be found on this level"
end
Natlaan
Posts: 1
Joined: Wed Aug 28, 2024 5:23 pm

Re: Console command list?

Post by Natlaan »

Diarmuid wrote: Sat Oct 26, 2013 6:12 am Here's what you need to do to open a door ahead of the party, but it's a lot to compress in one line:

Code: Select all

dx, dy = getForward(party.facing)
for e in entitiesAt(party.level, party.x, party.y) do
	if e.setDoorState and e.facing == party.facing then e:open() end
end
for e in entitiesAt(party.level, party.x + dx, party.y + dy) do
	if e.setDoorState and e.facing == (party.facing + 2) % 4 then e:open() end
end

Thank you, this has been very useful!
I'm currently testing an exported dungeon and this helped me with a bugged door.
Post Reply