[MOD] Tactical Map

The place to discuss scripting and game modifications for X Rebirth.

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

ns88ns
Posts: 90
Joined: Sun, 11. Sep 11, 22:00
x4

Post by ns88ns » Sun, 25. Mar 18, 06:54

It is OK. I have found the issue.

Your mod conflicts with an other mod named "Jump to XYZ" (link to Steam). Or vice versa :-)

Andy_MB
Posts: 72
Joined: Fri, 24. Jul 15, 17:47
x4

Post by Andy_MB » Sun, 25. Mar 18, 12:01

The compatibility problem is that we use the same resource to make changes:

Code: Select all

<diff>
    <replace sel="//cue[@name='SectionHandler_Nav']/actions//open_conversation_menu[@menu='MapMenu']">
        <do_all>
            <do_if value="@event.param3 != null and (not event.param3.{1})">
                <set_value name="$hasMode" exact="@event.param3.{7} != null" />
            </do_if>
            <do_else>
                <set_value name="$hasMode" exact="@event.param2.{7} != null" />
            </do_else>
            <!-- <debug_text text="'Opening map - has mode = ' + $hasMode" filter="general" /> -->
            <do_if value="$hasMode">
                <open_conversation_menu menu="MapMenu" param="event.param2" param2="event.param3" />
            </do_if>
            <do_else>
                <open_conversation_menu menu="MeJ_TacticalMapMenu" param="event.param2" param2="event.param3" />
            </do_else>
        </do_all>
    </replace>
    
    <replace sel="//cue[@name='SectorMapStarted']/actions/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
    <replace sel="//cue[@name='SectorMapStarted']/actions/do_else/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
    <replace sel="//cue[@name='SectorMapStarted']/actions/do_else/do_else/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
    
    <replace sel="//cue[@name='ZoneMapStarted']/actions/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
    <replace sel="//cue[@name='ZoneMapStarted']/actions/do_else/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
    <replace sel="//cue[@name='ZoneMapStarted']/actions/do_else/do_else/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
</diff>
my changes is same:

Code: Select all

<diff>
  <replace sel="/mdscript/cues/cue[@name='SectionHandler_Nav']/actions/do_elseif/open_conversation_menu[@menu='MapMenu']">
      <open_conversation_menu menu="MapMenu1" param="event.param2" param2="event.param3" />
  </replace>
 
    
  <replace sel="/mdscript/cues/cue[@name='SectorMapStarted']/actions/do_if/open_conversation_menu[@menu='MapMenu']">
      <open_conversation_menu menu="MapMenu1" param="event.param2" param2="event.param3" />
  </replace>
  <replace sel="/mdscript/cues/cue[@name='SectorMapStarted']/actions/do_else/do_if[@value='player.primaryship.sector.exists']/open_conversation_menu[@menu='MapMenu']">
    <open_conversation_menu menu="MapMenu1" param="[0, 0, 'sector', player.primaryship.sector, null, player.primaryship.zone]" />
  </replace>
  <replace sel="/mdscript/cues/cue[@name='SectorMapStarted']/actions/do_else/do_else/open_conversation_menu[@menu='MapMenu']">
    <open_conversation_menu menu="MapMenu1" param="[0, 0, 'cluster', player.primaryship.cluster]" />
  </replace>
  <replace sel="/mdscript/cues/cue[@name='ZoneMapStarted']/actions/do_if/open_conversation_menu[@menu='MapMenu']">
      <open_conversation_menu menu="MapMenu1" param="event.param2" param2="event.param3" />
  </replace>
  <replace sel="/mdscript/cues/cue[@name='ZoneMapStarted']/actions/do_else/do_if[@value='player.primaryship.sector.exists']/open_conversation_menu[@menu='MapMenu']">
    <open_conversation_menu menu="MapMenu1" param="[0, 0, 'zone', player.primaryship.zone]" />
  </replace>
  <replace sel="/mdscript/cues/cue[@name='ZoneMapStarted']/actions/do_else/do_else/open_conversation_menu[@menu='MapMenu']">
    <open_conversation_menu menu="MapMenu1" param="[0, 0, 'cluster', player.primaryship.cluster]" />
  </replace>

  <add sel="/mdscript/cues/cue[@name='SectionHandler_Nav']/actions/do_if" > <!--pos="after"-->
    <add_player_choice_sub text="{1005,227}" position="right" section="gAMB_JD_XYZ" choiceparam="[0, 0]" tooltip="{98981,6227}" comment="Вызвать cue name AMB_MainMenu_JD_Button"/>
  </add>  

</diff>
If you can refuse to use the hotkey, then you can solve the compatibility issue by adding a key to the main menu.
For example *.lua :

Code: Select all

local destination = "XYZ"
local menuAddon2 = {
    entry = {
        section = "gAMB_JD_XYZ", -- Your section
        icon = "mm_ic_navig_zonemap",
        name = ReadText(1001, 3218), -- Your text
        sectionparam = {
            0,
            0
        },
        info = string.format(ReadText(1015, 156), destination), -- Your text
    }
}

local function createSetupJD_XYZ(menu)  -- new function name = MeJ_TacticalMapMenu(menu)
   for _, subMenu in ipairs(menu.setup.top) do
        if subMenu.icon == "mm_ic_navig" then
            table.insert(subMenu.list, menuAddon2.entry)
        end
    end
end

local function createSetupWrapper()
    menuAddon2.origCreateSetup()
    createSetupJD_XYZ(menuAddon2.menu)
end

local function init()
	if Menus then
		for _, menu in ipairs(Menus) do
            if menu.name == "MainMenu" then
                menuAddon2.menu = menu
                menuAddon2.origCreateSetup = menu.createSetup
                menu.createSetup = createSetupWrapper
                break
            end
		end
	end
end

init()
_____________

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Mon, 26. Mar 18, 19:33

Ah, I see, thanks Andy for the detailed post :) I have the code for creating the jump button as its own method, so I might be able to offer another possible solution soon.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Fri, 30. Mar 18, 17:48

To gauge interest - how many people like the search box on the vanilla map, and want it to return in the tactical map?

I have been experimenting with edit boxes, and I have an idea for a nifty feature that might make navigation easier. But I thought I'd ask before spending too much time on it.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Sun, 8. Apr 18, 00:07

Sorry for the late reply - I personally don't use the vanilla search box.

Mainly because it only works on downwards (e.g. from a Sector map the search function won't find other Sectors in the same System, or anything in other Systems) and I'm often wanting to find an object somewhere else.

If that vanilla limitation was removed, the search function would probably be better. Unfortunately I cannot remember why the limitation was implemented. Maybe there's a good reason I can't think of.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Sun, 8. Apr 18, 06:51

No problem, just putting feelers out :)

I don't use it either, but I thought it'd be nifty if you could use it to descend very quickly - EG from galaxy view, type Omicr <enter> Commerc <enter> Vora <enter>, and you're in Voracious Lady. I've decided to shelve the idea for now, thanks to some difficulties, though.

Good point about the different-level searching though, I'll keep it in mind if I dust off the edit box idea.

saradeus
Posts: 25
Joined: Thu, 5. Aug 10, 19:50
xr

Post by saradeus » Sun, 15. Apr 18, 23:14

Hi, its great mod. Is any chance for compatibility mod with CWIR , just missing one info - who owns zone. Small thing but very annoying.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Mon, 23. Apr 18, 06:08

Sorry for the delay, I didn't notice there was a new post. That sounds quite odd, if you look at this image it should show the zone owner above "Zoom In", on the bottom right of the holomap. Is that not what it does on your end?

marceldev89
Posts: 19
Joined: Tue, 10. Apr 18, 17:36

Post by marceldev89 » Tue, 24. Apr 18, 19:44

MegaJohnny wrote:To gauge interest - how many people like the search box on the vanilla map, and want it to return in the tactical map?

I have been experimenting with edit boxes, and I have an idea for a nifty feature that might make navigation easier. But I thought I'd ask before spending too much time on it.
It was the first thing I missed when I tried out the mod. I'm a newbie and I don't remember all the zone names so I use the search for that. It's also fairly handy to find specific stations you're looking for.

saradeus
Posts: 25
Joined: Thu, 5. Aug 10, 19:50
xr

Post by saradeus » Wed, 25. Apr 18, 12:43

MegaJohnny wrote:Sorry for the delay, I didn't notice there was a new post. That sounds quite odd, if you look at this image it should show the zone owner above "Zoom In", on the bottom right of the holomap. Is that not what it does on your end?
Everythink is ok, im just blind, CWIR shows the owner in a different place with logo togheter .

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Expanding station subsystems

Post by Greg_G » Wed, 20. Jun 18, 06:10

I'm uncertain if I'm making a mistake or have installed the mod incorrectly (I did install both components), but I cannot expand station subsystems like I can with the vanilla zone map. Is this expected behavior? Thank you.

Edit: Furthermore, is there a way to one-shot bring up the vanilla maps (without fully reverting to vanilla via removing MainMenu.xml). The documentation referring to one or the other as default leads me to believe it's possible, but I couldn't find mention of how in the readme.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: Expanding station subsystems

Post by MegaJohnny » Wed, 20. Jun 18, 09:42

Greg_G wrote:I'm uncertain if I'm making a mistake or have installed the mod incorrectly (I did install both components), but I cannot expand station subsystems like I can with the vanilla zone map. Is this expected behavior? Thank you.
Yeah, sorry about that - it's not a feature I used much, so I lazily omitted it. But I will try to get it in for the next release (which is mostly finished).
Greg_G wrote:Edit: Furthermore, is there a way to one-shot bring up the vanilla maps (without fully reverting to vanilla via removing MainMenu.xml). The documentation referring to one or the other as default leads me to believe it's possible, but I couldn't find mention of how in the readme.
I'll have a look at this for the next release, too. For now, you could do a kind of hybrid setup by going to your MainMenu.xml and deleting the following lines:

Code: Select all

<replace sel="//cue[@name='SectorMapStarted']/actions/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
<replace sel="//cue[@name='SectorMapStarted']/actions/do_else/do_if/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
<replace sel="//cue[@name='SectorMapStarted']/actions/do_else/do_else/open_conversation_menu[@menu='MapMenu']/@menu">MeJ_TacticalMapMenu</replace>
Basically the ones that have "SectorMapStarted" in them. Then the "," hotkey will open the vanilla map. But if you hang on for a couple of days, I can hack together a little addon for this :)

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Re: Expanding station subsystems

Post by Greg_G » Wed, 20. Jun 18, 20:29

Thanks for the response! Honestly, the subsystems expansion isn't a feature one needs all that much, even less so for me this playthrough since I'm not doing the laborious manual subsystem scanning. The reason I asked was (a) I was mostly worried I had done something wrong with my install since I didn't see anyone else mention it and (b) if we had a way to manually bring up the vanilla map on demand (while keeping your tactical map the default) on those rare occasions we need some feature from it, it would make proper integration of the feature even more trivial. But, despite saying that, I applaud your drive to make yours vanilla feature complete. :)
MegaJohnny wrote:But if you hang on for a couple of days, I can hack together a little addon for this :)
You rock, thanks.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Sat, 23. Jun 18, 17:24

No problem! I do think it's kind of a duty to make it mostly feature-complete if it's replacing a vanilla menu, and doubly so if it's one you use all the time like the map.

Here is the addon to open the vanilla map - it's a Sidebar Extender entry under option 4 (navigation) and goes into sector view.

The caveat is the next release will break this addon, but I'll put out an updated version of it at the same time - be sure to upgrade both the mod and the addon when they're out.

Greg_G
Posts: 110
Joined: Tue, 26. Apr 05, 19:15
xr

Post by Greg_G » Mon, 25. Jun 18, 01:50

Excellent and understood, I'll try it out tonight and report back.

Edit: It works, thanks again!

User avatar
StoneLegionYT
Posts: 1428
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [MOD] Tactical Map

Post by StoneLegionYT » Mon, 15. Oct 18, 00:09

So your vanilla addon did not work so I removed the sector shortcut from the main menu and it worked for me that way. Really cool mod btw I played it around in testing I enjoyed it a lot. I hope to see it expanded more in the future.

I will be using on New Frontier not sure if you checked it out really awesome mod.

man1ak
Posts: 2
Joined: Mon, 13. Oct 08, 20:27
x4

Re: [MOD] Tactical Map

Post by man1ak » Mon, 15. Oct 18, 13:58

Wow! this mod is real and working for XR ? Too much time that I do not play XR because many phases of the game bored me.
Congratulations MegaJohnny you made a great work :-)

Regards

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD] Tactical Map

Post by MegaJohnny » Mon, 15. Oct 18, 15:09

Hey thanks, guys! ;)

I won't bother updating the vanilla addon right now, if you're happy with the workaround. I have some spicy updates I've been sitting on for a while, and I will try to get them out very soon.

User avatar
StoneLegionYT
Posts: 1428
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [MOD] Tactical Map

Post by StoneLegionYT » Mon, 15. Oct 18, 15:55

MegaJohnny wrote:
Mon, 15. Oct 18, 15:09
Hey thanks, guys! ;)

I won't bother updating the vanilla addon right now, if you're happy with the workaround. I have some spicy updates I've been sitting on for a while, and I will try to get them out very soon.
Awesome! Yeah the vanilla modification is easy to use on our own and it works 100% so I'm super happy. Looking forward to the update :)

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD] Tactical Map

Post by MegaJohnny » Tue, 16. Oct 18, 00:40

It's out! I've done a No Man's Sky and skipped over 1.4 since there's so much. Check the OP for the change notes. :)

This mod is now what I'd call finished, and until sacred 30/11 I'll try to squeeze in extra feature requests when possible. So if you have any ideas, let me know.

I'll have a new version of the vanilla menu addon tomorrow - it's not difficult, but I've run out of time to do it tonight.

Post Reply

Return to “X Rebirth - Scripts and Modding”