Resetting the automap?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Resetting the automap?
Law Bringer
Member # 2984
Profile Homepage #0
Is there some way to reset the automap of a town after the players have already explored it? I don't need to block the automap feature completely, I just need the game to "forget" this area has already been explored.

The call could even be made once upon entering the town; I don't need to reset the map while the player inside the town. This is because there are substantial changes to the town, and I can't have the automap showing the previously explored, but now changed areas.

I'm trying to avoid having to generate a new town for this, since it needs to happen at least several, if not an almost unlimited number of times - is that possible?

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #1
You need to make it a new town. There really isn't any other way of doing it.

[ Saturday, November 12, 2005 08:15: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Law Bringer
Member # 2984
Profile Homepage #2
I see. Nasty.

What happens when a script makes changes to the town while the player is inside it - is the automap immediately redrawn, or only once the player goes through that part of the town again?

[ Saturday, November 12, 2005 08:50: Message edited by: NaNoWriMo ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Shake Before Using
Member # 75
Profile #3
Only once the player goes through that part of town again, I'm pretty sure. You can get a pretty bugged-up Automap this way.
Posts: 3234 | Registered: Thursday, October 4 2001 07:00
BANNED
Member # 4
Profile Homepage #4
This may be a bit drastic, but before you send it out for release, you can make all of the terrains and floors have no editor icon or an editor icon of just blackness.
Well, okay. That's more like disabling automap. But there you go.

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Law Bringer
Member # 2984
Profile Homepage #5
Perhaps it would even be enough to have a special set of "unmappable" terrains and floors. Since the cave would only need cave wall, floor and perhaps a few special features, it would not take a lot of slots.

I'm currently thinking (vaguely; I haven't got a solid plan yet) about how one could implement a randomly generated dungeon or even an infinitely continuing dungeon as in Adom or Angband. Generating a dungeon randomly was basically impossible with nodes, but I haven't yet learned enough about Avernumscript to know that it is hopeless in BoA as well. ;)

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
BANNED
Member # 4
Profile Homepage #6
It was not impossible- see, for example, Echoes' town 8.

It was effectively impractical and useless, though...

As for the dungeon idea: It would have to be something along the lines of the Ancient Cave of Lufia II. There are a set of rooms in each level, and some of them have a treasure chests, in which is an item (random). There are given monsters, randomly determined. The rooms are joined to one another randomly (sometimes omitting whole rooms).

Practically, this could be done by clearing all monsters via erase_char and then reviving random ones. Chests can be set to have randomized existences, and when they do exist, they can become blank terrains and have items inside. If the town is to be used multiple times, you can customize the objects in each room (set them up beforehand and use set_terrain(x,y,0) to ranzomize), and erase items on all spaces when the town is enterred.

Okay, that's really bizarre and time-consuming... But it IS possible.

EDIT: Also, you can use set_level and alter_stat calls to revert the party back to level 1 like Lufia II does... You'd just have to make sure to revert it afterwards.

[ Saturday, November 12, 2005 16:11: Message edited by: Shingai no Junkyousha ]

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Apprentice
Member # 5044
Profile #7
I'm currently working on a scenario that features randomly generated levels and although I wasn't going to mention it until release, it may help you to see what I've been doing. I can send you the scenario file if you're interested.

I noticed the problem of automap change and, whilst annoying, I've decided to ignore it in the hope that it will go away (which it won't unless force_automap_redraw() and set_seen(short x, short y, short seen) become the reality I have fantasised about).
Posts: 30 | Registered: Sunday, October 3 2004 07:00
BANNED
Member # 4
Profile Homepage #8
This is a horribly roundabout way of going about things, but still, have you tried this:

leadchar = 0;
while(char_ok(leadchar) == FALSE){
leadchar = (leadchar + 1);
}

rctx = 0;
while(rctx <= 47){
rcty = 0;
while(rcty <= 47){
relocate_character(leadchar,rctx,rcty);
rcty = (rcty + 1);
}
rctx = (rctx + 1);
}
It's very unlikely since you might run the 64000 commands limit pretty quickly, but if you absolutely need to call such a node, well... It exists.

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Apprentice
Member # 5044
Profile #9
If I am interpreting this script correctly, this makes the whole map "seen", which I suppose makes the automap look neater. I kind of want something that will make the whole map "unseen" (or at least a bit of it).

The cave in my scenario is meant to be magically enchanted so that the walls are constantly moving. Each time you enter the cave it is different.

EDIT: So you need to re-explore every time (and that won't infuriate players...)

[ Monday, November 14, 2005 00:16: Message edited by: demipomme ]
Posts: 30 | Registered: Sunday, October 3 2004 07:00
...b10010b...
Member # 869
Profile Homepage #10
quote:
Originally written by demipomme:

If I am interpreting this script correctly, this makes the whole map "seen", which I suppose makes the automap look neater. I kind of want something that will make the whole map "unseen" (or at least a bit of it).
Easy. Make the entire cave out of blackness to start with, and only place the walls and rooms after you've danced the party through all the blackness. That way, the whole map is "seen", but it's "seen" as blackness.

(It isn't necessary to put the party on every space in town, though -- just make the initial blackness non-opaque, and dump the party on every 4th space or so. That'll still result in the whole town being mapped -- or rather, unmapped -- or better still, demapped.)

[ Monday, November 14, 2005 01:51: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Apprentice
Member # 5044
Profile #11
I haven't checked, but I think the automap remembers what squares the party has seen and then displays on the automap exactly what's there, so your method would effectively reveal the entire map. But thanks for the idea and I will go and check just to make sure I'm not chatting mumbo jumbo.

EDIT: In fact I wouldn't mind if the automap remembered the exact map as it was and this changed as you got to it. This would fit in with party exploring and mapping an area (thus having a map of how it was) and then coming back to see the walls moved and thinking this is weird.

[ Monday, November 14, 2005 05:36: Message edited by: demipomme ]
Posts: 30 | Registered: Sunday, October 3 2004 07:00
BANNED
Member # 4
Profile Homepage #12
Well, what you could do is use rectangle calls to clear the whole town and then place the party on every sixth space or something. Then, you'd use the stairway node to place the party back at the beginning of the town.

(Stairway nodes reset all terrain to the way you set it in the editor.)

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Law Bringer
Member # 2984
Profile Homepage #13
What does this "command limit" entail - the commands you can execute in a certain town throughout the game, or the commands that can be run while the player is in a certain town (reset when he leaves), or what?

Setting the town to blackness and forcing an automap redraw this way would be a possibility - blackness would take the place of unexplored terrain.

But combined with the functions that generate the dungeon (which will likely use a lot of commands), it'd be a lot of stuff for the script to do. Where are the limits?

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #14
That limit is the number of commands you can run in a row. If you do, for example, this:
while (TRUE) {
print_num(i);
i = i + 1;
}
Then you will run into the limit. Once a tick has elapsed, the number resets.

As far as relevant BoA limits, you have a limit on the length of a script — something like 4000 lines — and the number of commands you can run in a row — something like 60000. You can have at least 100 states, probably many more. So in other words, this is not likely to be a problem.

[ Monday, November 14, 2005 15:08: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
...b10010b...
Member # 869
Profile Homepage #15
quote:
Originally written by demipomme:

EDIT: In fact I wouldn't mind if the automap remembered the exact map as it was and this changed as you got to it. This would fit in with party exploring and mapping an area (thus having a map of how it was) and then coming back to see the walls moved and thinking this is weird.
This is how it worked in BoE. You may be right about it working differently in BoA, although I wasn't aware of it.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Law Bringer
Member # 2984
Profile Homepage #16
So it's a safeguard against endless loops, I assume. Well, 64k is still quite a lot, especially considering that you don't need to call them all at once.

quote:
Originally written by Shingai no Junkyousha:

Well, what you could do is use rectangle calls to clear the whole town and then place the party on every sixth space or something. Then, you'd use the stairway node to place the party back at the beginning of the town.

(Stairway nodes reset all terrain to the way you set it in the editor.)

Every sixth space due to the range of LOS, presumably. Is it possible for the player to have a reduced LOS for some reason?

By the way, is this noticable to the player? They do get moved around somewhat after all. Does the screen get redrawn in that time, or is the moving invisible?

Oh... if the stairway nodes reset the town's terrain (does that include the floors, btw?), then I could just start out with a blank town and generate the dungeon on each entry after the stairway node, it would save the blanking out.

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #17
The screen doesn't get updated unless you use a force_instant_terrain_redraw or run_animation or something. Floors and terrains get reset to their original (editor) states when you leave and re-enter, so yes.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
...b10010b...
Member # 869
Profile Homepage #18
quote:
Originally written by NaNoWriMo:

Every sixth space due to the range of LOS, presumably. Is it possible for the player to have a reduced LOS for some reason?
Yes, if it's dark.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Law Bringer
Member # 2984
Profile Homepage #19
Mh. It would probably be better to have full light in the cavern - it's impossible to have varying light anyway, and that will make it easier to redraw the outmap.

This is getting interesting. Once I'm done with my Nano writing, I'll see if I can make some test or proof of concept thing for an infinite cave. :)

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Law Bringer
Member # 2984
Profile Homepage #20
Couldn't hold the ideas back any longer - I've started to make some basic functions that generate rooms in an ascii-format.

Of course, coding functions like this in Avernumscript rather than PHP or Java will be a lot different - besides, walls are no longer separate floor squares unlike in the Exile engine.

Still.

##############
#............#
#............#
#######################............#
###..................................#
#......##################............#
#......# ##############
#......#
#......#
#......#
#......#
#......#
#......#
#......#
########
#############
#...........#######
#####.####............#
###.....# #............#
##...##### #............#
######## #..### #............#
#......# #.## #............#
#......# #.# ##############
#......# #.#
#......######.#
#.............#
#......########
#......#
#......#
#......#
########
A function to create a room, and a function to connect two rooms via a single-space tunnel, randomly. It would need a lot of work even in the present form, and after that, porting it to Avernumscript would be something else entirely.

[ Friday, November 18, 2005 10:02: Message edited by: NaNoWriMo ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Shock Trooper
Member # 4557
Profile #21
You could convert the Angband code into Avernumscript. It might be easier.

[ Friday, November 18, 2005 11:07: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Law Bringer
Member # 2984
Profile Homepage #22
It is always easier to port something you have coded yourself. Also... do you *have* the Angband code? Because I sure don't, and don't know where or how to obtain it if it is available anywhere...

Edit: New idea! I could leave the walls out in the beginning, and then go over the map to check for boundaries between blackness and cave floor, and put walls in. Not sure if the 64k command thingy would kick in by that time though...

[ Friday, November 18, 2005 11:34: Message edited by: NaNoWriMo ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Shock Trooper
Member # 4557
Profile #23
Angband source: http://www.thangorodrim.net/download.html#source

quote:

besides, walls are no longer separate floor squares unlike in the Exile engine.
This shouldn't stop you from treating a wall as just a floor. If a spot is to designated a wall, put the corresponding terrain and nothing else.

EDIT: typo

[ Friday, November 18, 2005 18:24: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
...b10010b...
Member # 869
Profile Homepage #24
quote:
Originally written by KernelKnowledge12:

This shouldn't stop you from treating a wall as just a floor. If a spot is to designated a wall, put the corresponding terrain and nothing else.
There's still the non-trivial issue of working out which wall type to place in each spot, though.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00

Pages