Un-marking a town location

MIB88

So Old I'm Losing Radiation Signs
Modder
Have a few ideas which would require un-marking a town location on the worldmap.

Tried using the script function of mark area known to 0, but that didn't work. Used it in another critter's script in dialog rather than the obj_dude script, though, but that shouldn't matter. Right?

Anyone out there have any suggestions to accomplish this?
 
From memory and may be wrong but I believe it is set area to -66. It's somewhere in the headers. Not command.h. Update maps maybe.

Edit: it's in define.h
#define MARK_STATE_INVISIBLE (-66)
which should go with
mark_area_known(MARK_TYPE_TOWN, x, MARK_STATE_INVISIBLE);
or in raw code
mark_area_known(0, x, -66);
I think. Should work.
 
Last edited:
Thanks, @Muttie . You were close... right there in the define header. It didn't work, though. And I'm pretty sure that the rest of my code is solid. Hopefully I can get it working.

@Mr Fish : I've got a few ideas I'd like to implement because of this. In no particular order:
1. Although it's been done in the other games, imagine the player character losing all or part of their memory.
2. An idea for a location in which an NPC, robot or pack animal knows the way, and is so remote that upon leaving, the player character might never be able to find it again (unless taken again).
3. Similar to the above, but what if the player is kidnapped? In their rush to get the heck out of there, an accurate map wasn't made.
4. Great to use in order to make a location completely different (remove the old location, add the new one in the same place) due to something like, I don't know, complete and utter destruction due to a nuclear weapon or massive attack.
 
Should...

I put this
procedure map_exit_p_proc begin
//if (global_var(145) == 1) then begin
mark_area_known(0, AREA_DEN, -66);
//mark_area_known(0, 19, 2);
//set_global_var(145, 2);
//end
end
in DcMom (with all the lines commented out) and it removed the Den from Worldmap.
Maybe sfall? I used 4.3.6. If not, maybe something forces the map back on (like another mark_area command)...

I also tried the line with the Toxic Caves (area w/o Town Rep) in a few scenarios and it [mark_area_known(0, AREA_, -66);] worked again. So the command itself should work.
 
I have no idea what happened. Had it very similar to what you have above in a section of dialog... didn't work.
Moved it to another node which was triggered after dialog... works like a charm!

Thank you very, very much, @Muttie.
 
Odd...

Did some more research over the day. Not needed anymore, but as I already did it:

Research:
It's not sfall, checked mark_area_known(0, AREA_DEN, -66); w/o sfall. And it works with the vanilla engine.

And as far as I can tell there are only two things that toggle worldmap: "start_state (off/on)" and "script (mark_area)". Nothing else does. At least I haven't found anything, and I messed around a bit (e.g. if a save on map may force something, but nothing).

An area that is set to start_state=off should never appear on worldmap unless you mark it in script. [I tested to access these maps with "load_map" and it never put the locations on worldmap]. So that's another option, but requires a new game.

There is only a special case of "lock_state" for encounters marked as "special" in worldmap.txt. But other than that it's only "start_state" and "script", it seems.
 
Back
Top