[Help] How to reveal Map?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

[Help] How to reveal Map?

Post by BoostHungry »

I'm trying to write a Game Start and I would like to reveal the map in certain zones but I can't figure out how to clear the fog of war overlay.

I can discover every "Sector", but discovering the "Zones" doesn't do anything.

Code:
Spoiler
Show

Code: Select all

<find_cluster name="$Clusters" multiple="true" />
<do_all exact="$Clusters.count" counter="$ClusterCounter">
	<set_value name="$Cluster" exact="$Clusters.{$ClusterCounter}" />
	<set_known object="$Cluster" known="true" />
	
	<find_sector name="$Sectors" space="$Cluster" multiple="true" />
	<do_all exact="$Sectors.count" counter="$SectorCounter">
		<set_value name="$Sector" exact="$Sectors.{$SectorCounter}" />
		<set_known object="$Sector" known="true" />
		
		<find_zone groupname="$Zones" space="$Sector" multiple="true" />
		<do_all exact="$Zones.count" counter="$ZoneCounter">
			<set_known object="$Zones.{$ZoneCounter}" known="true" />
		</do_all>
		
		<find_station name="$Stations" space="$Sector" multiple="true" />
		<do_all exact="$Stations.count" counter="$StationCounter">
			<set_known object="$Stations.{$StationCounter}" known="true" />
		</do_all>
	</do_all>
</do_all>

Anyone figured out how to do this? I think I saw other mods that were putting ships into the game. I guess I could take a ship and move it around and then set it back to the starting point, but there's gotta be a better way to reveal the map...
MutantDwarf
Posts: 716
Joined: Tue, 20. Jun 06, 02:29
x4

Re: [Help] How to reveal Map?

Post by MutantDwarf »

You can program something up to plop a bunch of temporary satellites at the start of the game where you need them in order to reveal the map where you need it revealed, then delete them before the player can do anything with them.

I don't know of any way to just reveal the locations of things without doing anything like that, though.
Langy the Mutant Dwarf
BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

Re: [Help] How to reveal Map?

Post by BoostHungry »

Thanks, I guess I can plop down a satellite near every station in certain zones and that will be good enough.

Do I need to put the satellites down and then let some time pass before deleting then in my start up script? Or can I create them and then immediately delete them?

I'd also like to reveal the full loop of that nice travel lane. Do you think I can play a game and place satellites along that path and then get their locations from my save game and then mimic those locations in a start up script?
iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [Help] How to reveal Map?

Post by iforgotmysocks »

Not sure why u'd want to reveal the entire map (makes exploration completely pointless), but doing it with satellites shouldn't be an issue. I'm currently working on an update for a mod of mine but i can write something up that will do the trick after.
luci
Posts: 39
Joined: Thu, 21. Nov 13, 23:27

Re: [Help] How to reveal Map?

Post by luci »

iforgotmysocks wrote: Fri, 7. Dec 18, 16:56 Not sure why u'd want to reveal the entire map (makes exploration completely pointless) [...]
Not you would do it like this: viewtopic.php?f=181&t=404943 :wink:

#selfadvertisement
iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [Help] How to reveal Map?

Post by iforgotmysocks »

luci wrote: Fri, 7. Dec 18, 17:40
iforgotmysocks wrote: Fri, 7. Dec 18, 16:56 Not sure why u'd want to reveal the entire map (makes exploration completely pointless) [...]
Not you would do it like this: viewtopic.php?f=181&t=404943 :wink:

#selfadvertisement
Sorry, i don't understand what u're trying to say.
Blackscorp_81
Posts: 72
Joined: Sat, 20. Aug 11, 19:25
x4

Re: [Help] How to reveal Map?

Post by Blackscorp_81 »

As far as i understand the mechanics behind those satellites, there has to be a piece of code, which is telling the game something like "on placement of satellite remove fog in radius of X meters". My thought about the fog-removal-mod is:

- find that code "on placement of satellite remove fog in radius of X meters"
- copy it to a new script, increase range like in "increased satellite-range-mod" to cover complete sector
- and create a function like "on game start get center of sectors" and run that "remove fog in radius of X meters" on that position.
- once that is done, ad some kind marker in savegame, that tells the script, that this action was performed already, to prevent this from happening on every load/start of game.

Should work without the need to place satellites. (i hope)

and sorry for the poor description of my idea, since i am not a scripter at all...
Last edited by Blackscorp_81 on Fri, 7. Dec 18, 19:34, edited 1 time in total.
luci
Posts: 39
Joined: Thu, 21. Nov 13, 23:27

Re: [Help] How to reveal Map?

Post by luci »

iforgotmysocks wrote: Fri, 7. Dec 18, 17:43 Sorry, i don't understand what u're trying to say.
I'm sorry, too. My keyboard is acting out tonight... maybe needs some fresh juice!
I was trying to promote my request for revealing just the questionmarks on a map, so that exploration is still a thing but with a 100% success rate to finding something.

If Blackscorp_81 is aiming for something like this, I am all for it :)
Blackscorp_81
Posts: 72
Joined: Sat, 20. Aug 11, 19:25
x4

Re: [Help] How to reveal Map?

Post by Blackscorp_81 »

That was not, what i was aiming for. but if u just want to reveal the "?-Marks", it's basically the same idea, with just the use of "Long-range-scanner"-Script instead of Satellites.
BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

Re: [Help] How to reveal Map?

Post by BoostHungry »

iforgotmysocks wrote: Fri, 7. Dec 18, 16:56 Not sure why u'd want to reveal the entire map (makes exploration completely pointless), but doing it with satellites shouldn't be an issue. I'm currently working on an update for a mod of mine but i can write something up that will do the trick after.
I don't want to clear everything, I only want to clear certain sectors. I'm working on an Argon start so I can replay more quickly when patches rework everything. I want a slightly advanced Argon start that starts with full knowledge of Argon space and stations and slight knowledge of other areas.

I can deal with the satilites easily also, but that seems like a hack to me, I'd rather clear fog directly if possible.
luci
Posts: 39
Joined: Thu, 21. Nov 13, 23:27

Re: [Help] How to reveal Map?

Post by luci »

Blackscorp_81 wrote: Fri, 7. Dec 18, 19:33 That was not, what i was aiming for. but if u just want to reveal the "?-Marks", it's basically the same idea, with just the use of "Long-range-scanner"-Script instead of Satellites.
That sounds genious!
I will be out of your face then and let you pursue your own goals... but I will keep this in mind for later :wink:
BoostHungry
Posts: 122
Joined: Sat, 23. Nov 13, 20:33

Re: [Help] How to reveal Map?

Post by BoostHungry »

Blackscorp_81 wrote: Fri, 7. Dec 18, 18:03 As far as i understand the mechanics behind those satellites, there has to be a piece of code, which is telling the game something like "on placement of satellite remove fog in radius of X meters". My thought about the fog-removal-mod is:

- find that code "on placement of satellite remove fog in radius of X meters"
- copy it to a new script, increase range like in "increased satellite-range-mod" to cover complete sector
- and create a function like "on game start get center of sectors" and run that "remove fog in radius of X meters" on that position.
- once that is done, ad some kind marker in savegame, that tells the script, that this action was performed already, to prevent this from happening on every load/start of game.

Should work without the need to place satellites. (i hope)

and sorry for the poor description of my idea, since i am not a scripter at all...
This is what I was thinking but I can't find any code related to this. I found some similar stuff like a list on the Zone object related to Obscured things and methods related to when an object becomes or stops being visible, but I can't find anything related to making areas visible.

I'm starting to think that visibility is game engine specific and isn't something we can interact with in scripts.
Sidrat Flush
Posts: 6
Joined: Sat, 15. Jun 13, 12:10
x4

Re: [Help] How to reveal Map?

Post by Sidrat Flush »

I understand there's two "requests" in this thread.

First to reveal the entire map and everything in it.
Secondly to reveal the map but only leave the ? in place.

While there's the temporary satellite or long range scanner on start up, perhaps a more easier method would be to create a ship mod that increases sensor range? This of course wouldn't reveal the sectors and having started more new games than I care to remember, it's not going to help with the ridiculous amount of time it takes to open up the system.

Perhaps this isn't what either person wants it may however offer a good half way house that is achievable. I really don't know why a citizen doesn't start with the knowledge of their own faction locations. Saying that, I'm not French, but I do know the basic layout of France. It's like cartography is a thing of the past.

Return to “X4: Foundations - Scripts and Modding”