Jump to content

Fog of the map


Recommended Posts

Yes, there is. There's a game event action called "ResetMap" and one of its properties is "remove_discovery". The other property is "remove_waypoints" but I don't know if you also want to remove the waypoints.

 

Here's the relevant code from the "action_lost" action sequence, in gameevents.xml:
 

<action class="ResetMap">
    <property name="phase" value="4" />
    <property name="remove_discovery" value="true" />
    <property name="remove_waypoints" value="true" />
</action>

 

Now, how you trigger the action sequence is another matter. There are several ways to trigger a game action (e.g. through a quest or buff), but I don't know when you want this to happen.

 

Also - this works in A21.2. I don't know for sure that it will work in earlier A21 versions. (I think it was introduced with the "permadeath" setting, so I don't know if the code was ready before then.)

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

On 3/11/2024 at 3:00 AM, Jessy said:

It works well thank you, I will use it to each death.
I also wanted to add a loss of XP and not a simple penalty as I can do?

 

If you are trying to do this on player death, there are already action sequences which you can use.

 

The action sequences are "game_on_death_[option]", which is fired as the player dies, and "game_on_respawn_[option]", which is fired when the player respawns in the world. Here, "[option]" is the player death penalty option, which can be "none", "default", "injured", or "permanent".

 

I don't know what you mean by "a loss of XP" since the default death penalty option is to add an XP deficit.

 

If you want to outright remove a specific number of experience points, I don't think there's any way to do that. But you could also reduce the amount of XP gained via a buff. The passive effect to use is "PlayerExpGain", and you could use "perc_add" with a negative value. Look at the "twitch_buffBadLearner" buff for an example.

Link to comment
Share on other sites

On 3/15/2024 at 10:57 PM, FramFramson said:

There's no way to just remove fog of war is there?

Or a way to greatly expand the area of the map revealed as we travel to better match what we can see visually?

 

There is a console command named "visitmap full" that theoretically does that. I say "theoretically" because I don't know if it works.

 

When I was creating my "Rogues and Psychos" NPC pack, I made some small prefabs that were used as biome decorations, and I tried using that command so I could see all of them on the map. At that time it did not work.

 

However, the recent A21.2 b30 EXP release notes say they added this:
 

Quote
  • Console command "visitmap full" version 

 

I have not tried it since that version came out.

 

Even if it does work, it would take a long time. Things like biome decorations are not generated with the world, they are generated when the chunk is visited. But they show up on the map, so for the entire map to show, all the chunks in the map need to be visited.

Link to comment
Share on other sites

I've used that command in the past, but it didn't reveal the map for some reason. I tried it again in a current game just to see if the update to the command had changed anything, but no, it doesn't seem to reveal any map now either.

 

Clearly there's something going on under the hood which is not being accounted for. Either you're not actually visiting those chunks (in spite of it being called a "visit" command) and you're just generating their basic contents at a distance, or else map reveals are not an inherent or automatic feature of chunk visits, and you need to run a second console command (which may not exist) to reveal visited chunks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...