How to disable automap ina floor? (trying to make labyrinth)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
ChizFreak
Posts: 6
Joined: Mon Jan 14, 2013 9:18 am

How to disable automap ina floor? (trying to make labyrinth)

Post by ChizFreak »

Just that. I want to know if there is any way to prevent the player from opening the automap while he is on a floor. I'm trying to make a labyrinth and an automap would make it a trivial challenge. Making an effective labyrinth for an automap would require far more effort than to make a common labyrinth for non-map users. The Labyrinth is just one of the floors, so I would like to know if I can make it happen for just 1 floor.

Just came to my mind... maybe making a script that instantly kills the player if he opens the map? If this possible? Obviously I would warn the player about this when he reaches this floor.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to disable automap ina floor? (trying to make labyri

Post by Komag »

You could kill the player when pressing tab by detecting the key press with a gui hook. You could also manage to kill the player if they ever click on the little inventory/stats/skills map icon at the top, but that would be much harder to properly set up (depends on resolution, which can vary).

But as far as I know there is no current way to actually prevent the map showing (I'm not sure the effect of instantly killing the party upon the open map command, they might die before or after the map shows, or something different, don't know). The map is a different gui thing, and it would be nice to have its own hook so we could prevent it if wanted.
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: How to disable automap ina floor? (trying to make labyri

Post by Neikun »

Remind me not to Alt-Tab in your dungeon! :lol:
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
vidarfreyr
Posts: 71
Joined: Sat Oct 20, 2012 4:40 am

Re: How to disable automap ina floor? (trying to make labyri

Post by vidarfreyr »

It would be very useful to have some map related functions. Like disable. Or even the ability to make parts of the map permanently under the 'fog of war', and player icon disappearing when walking into the permanent FOW.

There are two main reasons I could name for this:
  • 1. The map ruins all puzzles involving teleporting or changing facing of the player without him knowing.
    2. The map reveals hidden passages behind invisible walls.
ChizFreak
Posts: 6
Joined: Mon Jan 14, 2013 9:18 am

Re: How to disable automap ina floor? (trying to make labyri

Post by ChizFreak »

vidarfreyr wrote:It would be very useful to have some map related functions. Like disable. Or even the ability to make parts of the map permanently under the 'fog of war', and player icon disappearing when walking into the permanent FOW.

There are two main reasons I could name for this:
  • 1. The map ruins all puzzles involving teleporting or changing facing of the player without him knowing.
    2. The map reveals hidden passages behind invisible walls.
I completely agree.
ChizFreak
Posts: 6
Joined: Mon Jan 14, 2013 9:18 am

Re: How to disable automap ina floor? (trying to make labyri

Post by ChizFreak »

Komag wrote:You could kill the player when pressing tab by detecting the key press with a gui hook. You could also manage to kill the player if they ever click on the little inventory/stats/skills map icon at the top, but that would be much harder to properly set up (depends on resolution, which can vary).

But as far as I know there is no current way to actually prevent the map showing (I'm not sure the effect of instantly killing the party upon the open map command, they might die before or after the map shows, or something different, don't know). The map is a different gui thing, and it would be nice to have its own hook so we could prevent it if wanted.
Well that's unfortunate, anyway could you please tell me how to test that? If they die before the map shows then there is no damage. If they die after the map shows then the labyrinth it's already a bit "spoiled".
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to disable automap ina floor? (trying to make labyri

Post by Komag »

you have to add the gui hooks to your party then code in what you want to happen, such as damageTile where the party is. You can see all the party gui hook info here (at the bottom of the "Party" section):
http://www.grimrock.net/modding/asset-d ... reference/
Finished Dungeons - complete mods to play
User avatar
vidarfreyr
Posts: 71
Joined: Sat Oct 20, 2012 4:40 am

Re: How to disable automap ina floor? (trying to make labyri

Post by vidarfreyr »

Perhaps we could use one of the following

drawRect(x, y, width, height): draws a filled rectangle with current pen color.
drawImage(filename, x, y): draws an image modulated with current pen color.

So that whenever the map is opened you could draw a rectangle over part or all of it, or a picture of an empty map page (a more elegant solution).
User avatar
mahric
Posts: 192
Joined: Sun Nov 04, 2012 3:05 pm

Re: How to disable automap ina floor? (trying to make labyri

Post by mahric »

vidarfreyr wrote:Perhaps we could use one of the following

drawRect(x, y, width, height): draws a filled rectangle with current pen color.
drawImage(filename, x, y): draws an image modulated with current pen color.

So that whenever the map is opened you could draw a rectangle over part or all of it, or a picture of an empty map page (a more elegant solution).
Sadly, none of the draw functions we currently have allows us to draw over a map.
The map is always drawn *over* user drawn objects.
Did you visit the Wine Merchant's Basement? And heard about the Awakening of Taarnab?
User avatar
vidarfreyr
Posts: 71
Joined: Sat Oct 20, 2012 4:40 am

Re: How to disable automap ina floor? (trying to make labyri

Post by vidarfreyr »

mahric wrote:Sadly, none of the draw functions we currently have allows us to draw over a map.
The map is always drawn *over* user drawn objects.
It's a shame that. We should request that kind of function with the developer.
Post Reply