[MOD] Tactical Map

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

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

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

[MOD] Tactical Map

Post by MegaJohnny » Mon, 4. Sep 17, 04:39

Overview
This is a mod I've been making for a while, spurred on by the X4 announcement, that adds a new map menu with a bunch of changes. I like the new holomap in XR, especially with its mouse controls, but the actual map menu leaves a lot to be desired... Not to mention that the workflow for applying a new order is the same as in X3, where you have to lose sight of the map.

Tactical Map is a total replacement of the vanilla map from scratch. It has all of the same features as the vanilla map, but also lets you select your ships and give commands to them with quick and easy mouse-based controls. You can give any number of commands to your ships without closing the menu. It also features a whole boatload of UI differences with the vanilla map, designed to make it more compact, pretty, and informative!

Images
Using multi-select mode
Looking at a crowded zone
Reviewing assets in the sector view

Download
Nexus Mods
When installing, make sure you get both main files, as there are no built-in commands in the map! Each zip contains a folder containing a game extension, so just drop it into your extensions folder in each case.

Also view the source code at Github

Changes

Tactical Map 1.5
Major Changes:
  • Switch to a pure-Lua way of replacing the vanilla map, removing the save-game dependency
  • Add support for selection modes, and replace the vanilla map for selection modes
    • In a selection mode, invalid choices on the object list are grey
    • Command functionality is completely disabled when in a selection mode
  • Add middle click as a way to give orders
    • Middle click only works in zone or sector mode, and selects a position for giving a command, ignoring any objects under the mouse
    • Handy for telling ships to go somewhere when a station or ship is in the way
    • Keep the middle mouse button held down and drag the mouse up and down to specify a vertical offset from the ecliptic
    • The vertical offset, when middle mouse dragging, is shown over the holomap
  • Station sequences and modules are in from the vanilla map
    • Modules are ordered by their module type (production, storage, etc)
    • Each sequence has its letter code (A, B, C, ...) on display as well as its current stage
    • Module types have their own little icon - any replacements would be gratefully accepted!
Minor Changes:
  • Display the player's current ship (Skunk or docked capital) in a different colour
  • Gates are displayed under their zone/sector in the appropriate view
  • Implement the vanilla Shift+A, F1 and F3 hotkeys
Tactical Map 1.3
  • Larger font is used for small HUD detailmonitor mode, fixes debug output produced by this (only tested on 1920x1080)
  • In multi-select mode, the "X" button for clearing selection now has hotkey 6/RB
Vanilla Commands 1.3
  • Add grid commands for "stop order", "join squad", and "leave squad"
Tactical Map 1.2
  • New multi-select mode
  • Ships selected for commands now have very obvious yellow arrows on the right-hand list, so they pop out a bit more
  • In the sector view, only commandable ships are displayed now
  • Reveal percentage display as in vanilla map, except for ships
  • Shield and hull condition alerts on player-owned ships. If hull is below 70% a yellow alert is shown, which turns red if the hull is below 40% - if shield is below half then a cyan alert is shown
  • Adjusted command accept text on bottom left, added colouration
  • Removed Sidebar Extender file (it's just renamed, so you can get it back if you like)
  • Jumpgates and jump beacons now shown in light grey, more in keeping with map colour
  • Fixed bug causing map -> object menu -> plot course to have no effect (and produce debug log error)
  • Fixed bug where zooming out wouldn't select the space you just zoomed out of
  • Fixed bug where trying to return from the map to a previous section would close out instead
Vanilla Commands 1.2
  • All commands are valid in multi-select mode, with the following exceptions:
    • Stop Task: If you right-click one of the selected ships on itself, the other ships are still being clicked onto a different ship, so it doesn't really work.
    • Refuel: Opens a menu pertaining to one ship, so doesn't make sense for multi-select.
    • Transfer Wares: Ditto.
Tactical Map 1.1
  • Now replaces vanilla map by default (the opposite applies - you can rename/remove MainMenu.xml to revert this)
  • Now mimics the history behaviour of the vanilla map
  • Now includes economy stats button as in vanilla map
  • Now lists jump beacons as in vanilla map
  • Rudimentary (and untested!) jumpdrive support, but not for jumpdrive kickstarter - feedback appreciated
  • Command selection displays above grid buttons (previously was directly above the right-hand list)
  • Clicking a ship in sector view highlights the zone it's in (previously would clear map highlight)
  • Stations are now valid right-click targets (previously would just select a position if you right-clicked a station)
  • Changes to API: Issuable orders can have a priority number now, and the filter function can return a number to override the priority instead of a boolean. The map accepts more than one order being applicable at once, and takes the one with the highest priority.
  • Removed unnecessary debug.log output from MainMenu.xml
Vanilla Commands 1.1
  • Added ware exchange grid command
  • Added "force attack" grid command
  • Now properly signals "stop order" followed by command-specific order, as in vanilla gameplay - this fixes a bug where sometimes commands needed to be issued twice
Last edited by MegaJohnny on Tue, 16. Oct 18, 00:34, edited 9 times in total.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13817
Joined: Sun, 20. Nov 05, 23:45

Post by UniTrader » Mon, 4. Sep 17, 16:50

just curious how difficult it would be to suppress your default options in favour of mod-defined options for certain Objects? i have been working on a Script Rewrite for some time now, and because i did everything from Scratch the Command-giving is diffrent from Vanilla - diffrent enough that the Vanilla Orders are simply ignored in most cases ^^ (i have included workarunds for some orders, but thats nothing i want to keep forever)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

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

Post by MegaJohnny » Mon, 4. Sep 17, 21:30

Ah, interesting point - I hadn't considered it. Currently if you added your new commands, the map would complain if you did a right-click and both a new command and a built-in command were applicable (and issue neither of them). But I'll let each command have a priority number, and just tell the map to pick the one with the highest.

As for commands in vanilla which have no equivalent in the rewrite, I've been tempted on and off to separate the map and its standard "command pack" into two mods, just for this eventuality - but now I'll definitely go ahead with that.

User avatar
quarren
Posts: 67
Joined: Sat, 9. Nov 02, 13:40

Post by quarren » Tue, 12. Sep 17, 14:40

This looks really cool! Looking forward to a download link. :)

Ezarkal
Posts: 739
Joined: Wed, 22. Apr 15, 02:27

Post by Ezarkal » Tue, 12. Sep 17, 14:51

oooohhhhh, I think this mod will be in my "must have" stuff.

Thank you for the effort, and please keep us posted!

:)
"I'm not saying let's go kill all the stupid people...
I'm saying let's remove all the warning labels and let the problem solve itself out."

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

Post by MegaJohnny » Sat, 16. Sep 17, 05:28

Thanks, guys. :)

I've been able to add some finishing touches and I think it's now ready enough to be uploaded. The link's in the OP. Let me know how you find it!

Ezarkal
Posts: 739
Joined: Wed, 22. Apr 15, 02:27

Post by Ezarkal » Sat, 16. Sep 17, 13:54

Many thanks. Download in progress. I will have time to test it tomorrow.
"I'm not saying let's go kill all the stupid people...
I'm saying let's remove all the warning labels and let the problem solve itself out."

User avatar
Informer
Posts: 264
Joined: Wed, 3. Jul 13, 23:10

Post by Informer » Sat, 16. Sep 17, 18:07

This looks great, gonna have a go with this mod.

Thanks m8
Information is power. But like all power, there are those who want to keep it for themselves (Aaron Swartz you will live forever)

User avatar
Informer
Posts: 264
Joined: Wed, 3. Jul 13, 23:10

Post by Informer » Sat, 16. Sep 17, 18:27

Hello MegaJohnny,

I did download and try this mod. Both files are in my extension folder.
But I don't get a right click on my ships. Also I don't get the extra sidebar what is showing in your example pictures.

Can it be a problem with other mods? I did start a save game, were I use other mods to.

Thanks,

Informer
Information is power. But like all power, there are those who want to keep it for themselves (Aaron Swartz you will live forever)

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

Post by MegaJohnny » Sat, 16. Sep 17, 19:11

Informer wrote:Hello MegaJohnny,

I did download and try this mod. Both files are in my extension folder.
But I don't get a right click on my ships. Also I don't get the extra sidebar what is showing in your example pictures.

Can it be a problem with other mods? I did start a save game, were I use other mods to.

Thanks,

Informer
Just to be clear - are you opening the tactical map via Sidebar Extender (or the optional method described in the readme)? I have a feeling you may be looking at the vanilla map menu, whereas the tactical map is a new menu altogether. Conflict with another mod I would say is very unlikely right now.

birdtable
Posts: 1348
Joined: Sat, 7. Feb 04, 21:42

Post by birdtable » Sat, 16. Sep 17, 21:10

Tried this with Rebirth VR ,, worked fine but not able to access the lower right hand control buttons ( understandable ) .. Looks good..
Tried in Rebirth beta and could not get the option tactical map to display, could be me as I was rushing a little ( had to go out)... but the VR had mods and Rebirth Beta was vanilla .....
Will give a proper testing tomorrow ....

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

Post by MegaJohnny » Sat, 16. Sep 17, 21:21

birdtable wrote:Tried this with Rebirth VR ,, worked fine but not able to access the lower right hand control buttons ( understandable ) .. Looks good..
Tried in Rebirth beta and could not get the option tactical map to display, could be me as I was rushing a little ( had to go out)... but the VR had mods and Rebirth Beta was vanilla .....
Will give a proper testing tomorrow ....
Thanks :)

I don't know much about the VR version, so sadly I can't test it properly for usability. Would you say the buttons are too squashed in the corner to be accessible?

As for the beta version, I'm on that as well. If you mean yours is totally vanilla, you'll need Phipsz's Sidebar Extender to get the item to appear. If you have that already, let me know, and I'll see if I forgot anything. Alternatively the readme tells you how to make it replace the vanilla map in some cases.

birdtable
Posts: 1348
Joined: Sat, 7. Feb 04, 21:42

Post by birdtable » Sat, 16. Sep 17, 21:35

Well I may be not quite accurate with vanilla, did have the sidebar extender or I may well have forgot come to think of it... :roll:

As I said was in a bit of a rush, spent too much time trying out in VR,, could not find key to access that lower right segment, no hassle there as I am sure it is not intended to work with VR.
Will give thorough testing tomorrow (non VR) but first impressions are good..

Edit .. I do have a few saves with different scenarios so will work through them, the buttons do not appear to be to squashed for accessibility ..

User avatar
Informer
Posts: 264
Joined: Wed, 3. Jul 13, 23:10

Post by Informer » Sun, 17. Sep 17, 00:55

MegaJohnny wrote:
Informer wrote:Hello MegaJohnny,

I did download and try this mod. Both files are in my extension folder.
But I don't get a right click on my ships. Also I don't get the extra sidebar what is showing in your example pictures.

Can it be a problem with other mods? I did start a save game, were I use other mods to.

Thanks,

Informer
Just to be clear - are you opening the tactical map via Sidebar Extender (or the optional method described in the readme)? I have a feeling you may be looking at the vanilla map menu, whereas the tactical map is a new menu altogether. Conflict with another mod I would say is very unlikely right now.
Thanks for your quick responds. But it was my own mistake. Didn't check the installed files. I did unzip the files but had I had the 2 times the same map in my directory. So off course the mod didn't work that way.
Everything works great, and I must say that you did a great job with this mod.
Will also try the mod tomorrow in x-rebirth VR edition. :D :)
Information is power. But like all power, there are those who want to keep it for themselves (Aaron Swartz you will live forever)

birdtable
Posts: 1348
Joined: Sat, 7. Feb 04, 21:42

Post by birdtable » Sun, 17. Sep 17, 14:16

All working perfectly, no issues.... :)

The following observations are based on a possible not yet implemented feature or lack of understanding on my part of intended action...

1. After using tactical map would prefer to stay with map for zones, sectors etc ...works with zoom out/zoom in but does not feel quite right.
2. Attack ... can give command to attack enemy ships (red) but command rejected if friendly (green).

The movement command works really well,, liked very much.

Post Reply

Return to “X Rebirth - Scripts and Modding”