[MOD] Tactical Map

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

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

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

Post by Informer » Sat, 7. Oct 17, 15:22

Hello MegaJohnny

When I go to the "my Property menu" and select a ship, and then click on "show map" the tactical map appears, but when I hit the "back" button in the tactical map, for going back to "my property" menu, it goes directly back to the game. Would it be possible that I get back in the "my property"menu?
When I want to check many ships with the "show map" button, every time I have to select the "my property" menu over and over again. Could this be fixed?

Thanks for this great mod.

Greetzzzz :D
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: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Sun, 8. Oct 17, 14:51

Informer wrote:Hello MegaJohnny

When I go to the "my Property menu" and select a ship, and then click on "show map" the tactical map appears, but when I hit the "back" button in the tactical map, for going back to "my property" menu, it goes directly back to the game. Would it be possible that I get back in the "my property"menu?
When I want to check many ships with the "show map" button, every time I have to select the "my property" menu over and over again. Could this be fixed?

Thanks for this great mod.

Greetzzzz :D
Fixed for the next version - I mistakenly told the menu to quit out (as if you pressed delete) when the history is empty instead of returning to the previous thing. :)
Zlisten wrote:How delete thise mod?
Just delete "mej_tacticalmap" and "mej_tacmap_vanillacommands" from your extensions folder, no special uninstall process. It sticks to your save-game in case I want to add anything later that requires it, but for now you should just be able to remove it from the save XML if you really want to use the same saves.

Zlisten
Posts: 3
Joined: Sat, 7. Oct 17, 12:05

Post by Zlisten » Sun, 8. Oct 17, 15:07

MegaJohnny wrote: Just delete "mej_tacticalmap" and "mej_tacmap_vanillacommands" from your extensions folder, no special uninstall process. It sticks to your save-game in case I want to add anything later that requires it, but for now you should just be able to remove it from the save XML if you really want to use the same saves.
I tried to just delete the mod, but after removing them, I can not load my game because the version does not fit.

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

Post by Informer » Sun, 8. Oct 17, 20:21

MegaJohnny wrote:
Informer wrote:Hello MegaJohnny

When I go to the "my Property menu" and select a ship, and then click on "show map" the tactical map appears, but when I hit the "back" button in the tactical map, for going back to "my property" menu, it goes directly back to the game. Would it be possible that I get back in the "my property"menu?
When I want to check many ships with the "show map" button, every time I have to select the "my property" menu over and over again. Could this be fixed?

Thanks for this great mod.

Greetzzzz :D
Fixed for the next version - I mistakenly told the menu to quit out (as if you pressed delete) when the history is empty instead of returning to the previous thing. :)
Thanks m8. Looking forward to it. :D Any time frame when the new version will be out? :o :wink:
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
bbn
Posts: 88
Joined: Mon, 31. Jan 11, 18:30
x4

Post by bbn » Sun, 8. Oct 17, 23:25

Great mod! I love it!

Alas...

There is one feature missing that stops me from using it in my current game. Namely, the display of exploration percentage on the map. Is it something that you can add in some future update?

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

Post by MegaJohnny » Mon, 9. Oct 17, 04:22

Informer wrote:Thanks m8. Looking forward to it. :D Any time frame when the new version will be out? :o :wink:
It's released just now! Quick summary of the changes below :)
bbn wrote:Great mod! I love it!

Alas...

There is one feature missing that stops me from using it in my current game. Namely, the display of exploration percentage on the map. Is it something that you can add in some future update?
I never got round to implementing this because I never used it much myself (and on the vanilla map I thought it looked quite ugly). But I put it in a light grey and the colour helps it not draw attention away from the names of stuff. So it's in this release as well :) I've decided not to have it apply to ships, as they almost always seemed to be 0% or 100%, but if you like I can add it to ships as well.

This release has a big new feature in a multi-select/broadcast mode. The map can work just as before, where you work with a single ship, but there's a button above the ABXY buttons with a fleet icon. Click it (the hotkey is '5') and it toggles between the single-select mode and the multi-select mode.

In multi-select mode you don't select a command recipient by clicking on its row, instead their small icons are replaced by check boxes, and this is how you select/deselect them. The box that usually shows the name of the command selection now shows how many each of XL/L/M/S are selected, and when you use a right-click or grid command, it applies to all of them at once.

I don't have many ships to test this with in a real-life situation, so especially if you have a large empire let me know how well it works. ;) There's also other improvements and new stuff. As before, I recommend to delete the whole folders before installing the new ones, for times when files get removed from the mod.

Zlisten
Posts: 3
Joined: Sat, 7. Oct 17, 12:05

Post by Zlisten » Mon, 9. Oct 17, 06:48

Zlisten wrote: I tried to just delete the mod, but after removing them, I can not load my game because the version does not fit.
How can I solve my problem?

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

Post by MegaJohnny » Mon, 9. Oct 17, 11:40

Zlisten wrote:How can I solve my problem?
The general process outlined here should apply, but with the caveat that if you use save compression, you'll find the saves are in .gz format, not .xml. You'll need an archive tool like 7Zip to decompress it.

This can be used for any mod, not just this one, but if a mod adds itself to your savegame it might cause big problems to remove it just like that.

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

Post by Informer » Mon, 9. Oct 17, 15:01

I just had a little peak in the 1.2 version. (can play for real tonight :D )
but it looks great. The multi function is really handy.

I let you know if I encounter any bugs.

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

plamen
Posts: 7
Joined: Sun, 8. Sep 13, 20:24
x4

Post by plamen » Mon, 9. Oct 17, 19:27

This mod looks great! Thank you for sharing.

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

Post by Informer » Tue, 10. Oct 17, 18:39

version 1.2 works great. :D :D :D
Information is power. But like all power, there are those who want to keep it for themselves (Aaron Swartz you will live forever)

Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

Post by Shanjaq » Sun, 29. Oct 17, 02:16

can you put this on the Steam Workshop? I can't create an account on NexusMods, it only has paid options for registration :(
[ external image ]
SPACE HAS A TERRIBLE POWER

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sun, 29. Oct 17, 09:47

Try disabling the adblocker / noscript extensions in your browser. Normally when clicking on the manual download option, the download starts automatically.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

lostboron
Posts: 43
Joined: Tue, 4. Jul 17, 19:33

Post by lostboron » Sun, 29. Oct 17, 15:11

This looks like a great mod, but sadly it doesn't work on Linux. To make it work, you would need to change all the file names to lowercase (a bug in XR prevents mods from working if any file uses an uppercase character). But even after changing all the file names, I still had some issues:
- when I click on "details" for a ship and I go back, the map does not reappear and I can't issue any command, so I have to quit
- buttons on the lower row of commands (patrol, transfer, attack object) do not do anything (they don't have an orange background, but they don't seem disabled)
I hope these issues can be fixed eventually, but I don't know how you could debug them without using Linux...

There is also an issue with French: the button texts are too long, so button texts overlap - if they can't be trunctated automatically, I guess we would have to provide abbreviated translations.

User avatar
MakerLinux
Posts: 232
Joined: Tue, 14. Nov 17, 13:10
x4

Post by MakerLinux » Tue, 14. Nov 17, 13:18

lostboron wrote:This looks like a great mod, but sadly it doesn't work on Linux. To make it work, you would need to change all the file names to lowercase (a bug in XR prevents mods from working if any file uses an uppercase character). But even after changing all the file names, I still had some issues:
- when I click on "details" for a ship and I go back, the map does not reappear and I can't issue any command, so I have to quit
- buttons on the lower row of commands (patrol, transfer, attack object) do not do anything (they don't have an orange background, but they don't seem disabled)
I hope these issues can be fixed eventually, but I don't know how you could debug them without using Linux...

There is also an issue with French: the button texts are too long, so button texts overlap - if they can't be trunctated automatically, I guess we would have to provide abbreviated translations.
Thaaanks, man! I also use Linux and I didn't know why it would not work! Now I understand. Do you think this mod is worth it in Linux in its current state or it is fruitless because of the map not reappearing?

One big flaw I see on X Rebirth's regular maps is that it does not show coordinates. Roguey's X Rebirth maps have coordinates in them, how could I use them if I can't access this information? That would save me a lot of wandering around in Toride/Koroni. I even tried to get it via mod but the variable player.primaryship.position has coordinates relatives to zone, whilst roguey's are relative to the whole sector.

Update: one way to help debugging them - Linux or not - is right-clicking on X Rebirth in steam, clicking properties, launch options and adding -debug all -logfile debug.log (I also add -skipintro but that's me). Then you can check the file ~/.config/EgoSoft/X Rebirth/96679891/debug.log for messages saying what's wrong (but they are not very useful in my experience, being generic xml error messages).

update 2: thanks to your first attempt, I think I got it working. Instead of just renaming every file to lowercase, I soft-linked every file which had capital letters on it to lowercase, e.g.

Code: Select all

ln -s 0001-L049.xml 0001-l049.xml
and

Code: Select all

ln -s MEJ_TacticalMap_Menu.xml mej_tacticalmap_menu.xml
. I tested selecting a lot of objects, asking for details and getting back, and the map reappeared in every case. However, I could not get my units to attack enemies by using the attack button, I am not sure if I did not understand how I am supposed to do it, or it it's a bug. Anyway, apart from that the mod seems to be behaving perfectly, the orange buttons perform their actions.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Thu, 4. Jan 18, 16:21

Great mod!
You should upload it on Steam, so more people benefit from your work.

I also foind lots of these in my log

Code: Select all

[=ERROR=] 96573.35 Widget system error. Dimensions for button are too small. Button elements will overlap eachother. Dimensions are: width(91 px) height(21 px) - minimum dimensions for this button is 23 px
Coudl they be from your mod?

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

Post by MegaJohnny » Sat, 6. Jan 18, 13:55

Hi again - sorry for the period of absence. I don't plan on any big features in the near future, but I should definitely be making sure this still works!

The mod now has a Github repository you can use to browse the code or make comments!
MakerLinux wrote:
lostboron wrote:This looks like a great mod, but sadly it doesn't work on Linux. To make it work, you would need to change all the file names to lowercase (a bug in XR prevents mods from working if any file uses an uppercase character). But even after changing all the file names, I still had some issues:
- when I click on "details" for a ship and I go back, the map does not reappear and I can't issue any command, so I have to quit
- buttons on the lower row of commands (patrol, transfer, attack object) do not do anything (they don't have an orange background, but they don't seem disabled)
I hope these issues can be fixed eventually, but I don't know how you could debug them without using Linux...

There is also an issue with French: the button texts are too long, so button texts overlap - if they can't be trunctated automatically, I guess we would have to provide abbreviated translations.
Thaaanks, man! I also use Linux and I didn't know why it would not work! Now I understand. Do you think this mod is worth it in Linux in its current state or it is fruitless because of the map not reappearing?

One big flaw I see on X Rebirth's regular maps is that it does not show coordinates. Roguey's X Rebirth maps have coordinates in them, how could I use them if I can't access this information? That would save me a lot of wandering around in Toride/Koroni. I even tried to get it via mod but the variable player.primaryship.position has coordinates relatives to zone, whilst roguey's are relative to the whole sector.

Update: one way to help debugging them - Linux or not - is right-clicking on X Rebirth in steam, clicking properties, launch options and adding -debug all -logfile debug.log (I also add -skipintro but that's me). Then you can check the file ~/.config/EgoSoft/X Rebirth/96679891/debug.log for messages saying what's wrong (but they are not very useful in my experience, being generic xml error messages).

update 2: thanks to your first attempt, I think I got it working. Instead of just renaming every file to lowercase, I soft-linked every file which had capital letters on it to lowercase, e.g.

Code: Select all

ln -s 0001-L049.xml 0001-l049.xml
and

Code: Select all

ln -s MEJ_TacticalMap_Menu.xml mej_tacticalmap_menu.xml
. I tested selecting a lot of objects, asking for details and getting back, and the map reappeared in every case. However, I could not get my units to attack enemies by using the attack button, I am not sure if I did not understand how I am supposed to do it, or it it's a bug. Anyway, apart from that the mod seems to be behaving perfectly, the orange buttons perform their actions.
Thanks for reporting - I didn't test for Linux compatibility at all up to this point. I remember there was a handy guide for modders on the forum, but I can't seem to find it yet. Is it just those two files you had to make the symbolic links for? That idea's very clever, by the way, and it sounds like a good candidate for a Python script to do it automatically.

Any situation where a menu was supposed to open (including from another menu) but instead there's no menu and the controls are disabled, this is when the menu's code had an error and failed to open, but the game is still in a kind of menu mode. If you have the debug console bound, you can do a "RELOADUI" as a workaround.

I do see your point about the coordinates, and I'll try to fit them in over the holomap - the caveat is you can query the coordinates under the cursor (relative to the current space) but it's always something on the ecliptic plane, ie the y-coordinate is always zero.

About the attack command, the workflow generally is to select one or more friendly ships, and left click on the grid button, when the text should turn orange. Then you right-click the target ship in the holomap to issue the order. If that's what you're doing, see if you can spot any debug output or cases where it does/doesn't work, and I'll look into it.
oliverjanda wrote:Great mod!
You should upload it on Steam, so more people benefit from your work.

I also foind lots of these in my log

Code: Select all

[=ERROR=] 96573.35 Widget system error. Dimensions for button are too small. Button elements will overlap eachother. Dimensions are: width(91 px) height(21 px) - minimum dimensions for this button is 23 px
Coudl they be from your mod?
Thanks! I want to do that soonish - preferably once it's known to work on Linux out of the box, and nothing else is broken.

The debug output is almost certainly from this, as it happens to me when I switch to small HUD menus. It doesn't seem to break anything, but I think when using small HUD menus the buttons are just too small, and the UI system complains about it. I might try to do a special display mode for small HUD menu setting

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 8. Jan 18, 10:11

Thanks! I might just use the large HUD until then because I try to keep track of any errors in my log and this is causing many. :)

Is it possible to post a short example on how to add a command to the map?

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Mon, 8. Jan 18, 22:45

I found out the issue not between large and small menu but between sidemenu and hud menu

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

Post by MegaJohnny » Thu, 18. Jan 18, 17:10

What's your screen resolution? I think maybe screen resolution and UI settings both have an impact on whether you end up with this error.

For the short example, good idea, I've written something up on the Github :) hopefully it's short enough, but it's all stuff I thought worth explaining.

Post Reply

Return to “X Rebirth - Scripts and Modding”