[MOD] Satellite Network v0.33

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

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

User avatar
nonnex
Posts: 366
Joined: Wed, 28. Aug 13, 12:42
x4

Re: [MOD] Satellite Network v0.30

Post by nonnex » Mon, 17. Dec 18, 10:48

Hi,

thanks for the great work done. I like your Sat Net mod a lot and using it already.

Since I have started a manual placed Sat-Net before there is some suboptimal overhead now.

First I thought: OK pickup all unnecessary sats by hand.

But, on the other hand it could be a good addition to the Sat Script to be able to check for multiple sat covers and pickup potential obsolete Sats.

Therefore I have looked into your script and I saw that you already count the sats that cover a particular object. Maybe it is possible to get further and alter that algo in a way to get matches for potentionally unnecessary sats and an option for a collecting routine?

What Do you think?

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.30

Post by morbideth » Mon, 17. Dec 18, 16:13

nonnex wrote:
Mon, 17. Dec 18, 10:48
Hi,

thanks for the great work done. I like your Sat Net mod a lot and using it already.

Since I have started a manual placed Sat-Net before there is some suboptimal overhead now.

First I thought: OK pickup all unnecessary sats by hand.

But, on the other hand it could be a good addition to the Sat Script to be able to check for multiple sat covers and pickup potential obsolete Sats.

Therefore I have looked into your script and I saw that you already count the sats that cover a particular object. Maybe it is possible to get further and alter that algo in a way to get matches for potentionally unnecessary sats and an option for a collecting routine?

What Do you think?
A collect command is next on my todo list, possibly as a separate mod.

The algorithm cannot "remove unnecessary sats" because some of the solutions will have a station covered by more than one sat. If one station is at [0,0,0], one at [30km,0,0] and another at [-30km,0,0] it might pick placing a sat between 0,0,0 and 30,0,0 then the third station gets a sat on top of it + offset, so [-15km,0,15km]. Now the first station has two sats in range, but it is a valid solution.

User avatar
nonnex
Posts: 366
Joined: Wed, 28. Aug 13, 12:42
x4

Re: [MOD] Satellite Network v0.30

Post by nonnex » Mon, 17. Dec 18, 16:56

Collect
  • Cool, glad to hear that you are working on a collect feature.

Sat Net Maintainence
  • Yeah, you are right, but this problem can be mathematically solved. This Problem also occurs if you work with "Venn Diagrams" for example.

    The question is, whether you think such a behavior would be useful or not. If you decide it would, then I probably could deliver a math solution. Just a matter of some time, thought and some script testing ;)
    A first approach could be to determine the size of the intersection area with other sats. I think if its over 50% for a particular Sat it could be an indicator that this Sat can be removed. But have to check this further, or find another solution if this thesis shows up to be wrong.

Let me know Your thoughts about it...

pflip
Posts: 32
Joined: Mon, 17. Dec 18, 12:16
x4

Re: [MOD] Satellite Network v0.20

Post by pflip » Tue, 18. Dec 18, 12:17

morbideth wrote:
Tue, 11. Dec 18, 16:50
Reaper507 wrote:
Tue, 11. Dec 18, 15:29
V 0.21 has the same issue - ReadText...
v0.22 uploaded, see if that works for you.
Hi,

first of all, thank you for a good mod. It works fine and it is is doing a splendid job.

I am using the 0.3 version and I have the "ReadText" bug.

I tried diffrent things, even changing the numbering of the ID, but nothing works. It is quite weird because I cannot see why it shouldn't work.

The mod is working, jus the menu entry are missing/messed up, so I had just to remember which entry is which and it is fine.

One little hint that I could give you in trying to debug it, is that my OS is in a different language (italian) that of the game itself (english). My guess is somethign to do with the LOCALE setting of the OS, but I am not too familiar with the X scrpting to investigate further.

Keep on the good work and don't add to many menu items , it will be hard to remember them all :lol:
________________

--- Pflip

---- Imperare sibi maximum imperium est -----

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.20

Post by morbideth » Tue, 18. Dec 18, 14:06

pflip wrote:
Tue, 18. Dec 18, 12:17
Hi,

first of all, thank you for a good mod. It works fine and it is is doing a splendid job.

I am using the 0.3 version and I have the "ReadText" bug.

I tried diffrent things, even changing the numbering of the ID, but nothing works. It is quite weird because I cannot see why it shouldn't work.

The mod is working, jus the menu entry are missing/messed up, so I had just to remember which entry is which and it is fine.

One little hint that I could give you in trying to debug it, is that my OS is in a different language (italian) that of the game itself (english). My guess is somethign to do with the LOCALE setting of the OS, but I am not too familiar with the X scrpting to investigate further.

Keep on the good work and don't add to many menu items , it will be hard to remember them all :lol:
Is the mod installed in your documents folder? If so move it to your game folder/extensions. Did you restart the game after updating? If neither of those solve your problem run your game with -logfile debuglog.txt load a save and copy the contents of debuglog.txt here (inside of spoiler tags).

If either of those DO fix your problem, let me know so I can update the OP with instructions.
nonnex wrote:
Mon, 17. Dec 18, 16:56
Sat Net Maintainence
  • Yeah, you are right, but this problem can be mathematically solved. This Problem also occurs if you work with "Venn Diagrams" for example.

    The question is, whether you think such a behavior would be useful or not. If you decide it would, then I probably could deliver a math solution. Just a matter of some time, thought and some script testing ;)
    A first approach could be to determine the size of the intersection area with other sats. I think if its over 50% for a particular Sat it could be an indicator that this Sat can be removed. But have to check this further, or find another solution if this thesis shows up to be wrong.
Let me know Your thoughts about it...
The algorithm for a 2-D circle is https://www.quora.com/What-is-an-algori ... ius-circle

It looks rather complex to try to extend to 3-D. Alternatively, I could easily extend to existing code to find the best solution simply by iterating through every possible combination of starting points. Both are possibly, but both are, also, rather more cpu intensive. I don't think people would be willing to wait while their ships sits around calculating for 15 more mins just to save 5k on a sat.

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [MOD] Satellite Network v0.30

Post by argon_emperor » Tue, 18. Dec 18, 14:16

Would it be possible to have an option to deploy sats at key points? Specifically, gates, accelerators, superhighways, trade stations, defence stations, EQ docks, wharfs, and shipyards? I find these are the places I want coverage the most for, don't quite care as much as factories.
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone

balu0
Posts: 9
Joined: Tue, 11. Dec 18, 13:15

Re: [MOD] Satellite Network v0.31

Post by balu0 » Tue, 18. Dec 18, 14:23

Sadly the "=ReadText" bug is still present for me . Hungarian language OS , game Language English.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.30

Post by morbideth » Tue, 18. Dec 18, 14:24

Minor update fixing some issues.
v0.31
  • Ships will now restock at equipment docks instead of shipyards/wharfs as equipment docks don't have the perpetually short on resources issue.
  • The order will no longer cancel itself if range is set to 0.
argon_emperor wrote:
Tue, 18. Dec 18, 14:16
Would it be possible to have an option to deploy sats at key points? Specifically, gates, accelerators, superhighways, trade stations, defence stations, EQ docks, wharfs, and shipyards? I find these are the places I want coverage the most for, don't quite care as much as factories.
That would have to wait until we can mod the UI. As it is now it would be way too messy to try to do that via the default order config.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.31

Post by morbideth » Tue, 18. Dec 18, 14:25

balu0 wrote:
Tue, 18. Dec 18, 14:23
Sadly the "=ReadText" bug is still present for me . Hungarian language OS , game Language English.
See the post 2 above yours.

Invasion
Posts: 212
Joined: Tue, 11. Dec 18, 10:14

Re: [MOD] Satellite Network v0.31

Post by Invasion » Tue, 18. Dec 18, 14:37

"To use, set the default behavior to "Deploy Satellites" and set the starting sector"

I couldn't "set the starting sector"
It asks to select a location and left/right click on empty space or a station, does not work
English 1.32 client with no other mod
<Blunt Threadslayer>
Making you sweat today, so you won't have to bleed tomorrow

balu0
Posts: 9
Joined: Tue, 11. Dec 18, 13:15

Re: [MOD] Satellite Network v0.31

Post by balu0 » Tue, 18. Dec 18, 15:05

morbideth wrote:
Tue, 18. Dec 18, 14:25
balu0 wrote:
Tue, 18. Dec 18, 14:23
Sadly the "=ReadText" bug is still present for me . Hungarian language OS , game Language English.
See the post 2 above yours.
If I put the mod in my game folder the game does not even start, it just hangs. First thing I tried, because other mods had issues as well.
This is my current mod list , everything is in the documents folder, if I move them to game folder the game wont start, same as your mod.

trade_buy_notification\
StationsSupplyBuildStorage\
StationMinerFix\
Signal_Leak_Hunter\
ScalePlate Use All\
sc42_xenon_gains\
mej_improved_explore_behaviour\
learningallthethings\
HRL_ResearchOverhaul\
gettingpayed\
fixbailchance\
FasterExplorer\
DoublePirates\
CrystalFinder\
BetterScanColors\

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.31

Post by morbideth » Tue, 18. Dec 18, 15:38

balu0 wrote:
Tue, 18. Dec 18, 15:05
morbideth wrote:
Tue, 18. Dec 18, 14:25
balu0 wrote:
Tue, 18. Dec 18, 14:23
Sadly the "=ReadText" bug is still present for me . Hungarian language OS , game Language English.
See the post 2 above yours.
If I put the mod in my game folder the game does not even start, it just hangs. First thing I tried, because other mods had issues as well.
This is my current mod list , everything is in the documents folder, if I move them to game folder the game wont start, same as your mod.

trade_buy_notification\
StationsSupplyBuildStorage\
StationMinerFix\
Signal_Leak_Hunter\
ScalePlate Use All\
sc42_xenon_gains\
mej_improved_explore_behaviour\
learningallthethings\
HRL_ResearchOverhaul\
gettingpayed\
fixbailchance\
FasterExplorer\
DoublePirates\
CrystalFinder\
BetterScanColors\
run your game with -logfile debuglog.txt load a save and copy the contents of debuglog.txt here (inside of spoiler tags).
I may have to stick it in a cat file, lets see what that says.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.31

Post by morbideth » Tue, 18. Dec 18, 15:39

Invasion wrote:
Tue, 18. Dec 18, 14:37
"To use, set the default behavior to "Deploy Satellites" and set the starting sector"

I couldn't "set the starting sector"
It asks to select a location and left/right click on empty space or a station, does not work
English 1.32 client with no other mod
You have to click on a station/space then click ok. It is working fine for me.

balu0
Posts: 9
Joined: Tue, 11. Dec 18, 13:15

Re: [MOD] Satellite Network v0.31

Post by balu0 » Tue, 18. Dec 18, 16:10

morbideth wrote:
Tue, 18. Dec 18, 15:38
balu0 wrote:
Tue, 18. Dec 18, 15:05
morbideth wrote:
Tue, 18. Dec 18, 14:25


See the post 2 above yours.
If I put the mod in my game folder the game does not even start, it just hangs. First thing I tried, because other mods had issues as well.
This is my current mod list , everything is in the documents folder, if I move them to game folder the game wont start, same as your mod.

trade_buy_notification\
StationsSupplyBuildStorage\
StationMinerFix\
Signal_Leak_Hunter\
ScalePlate Use All\
sc42_xenon_gains\
mej_improved_explore_behaviour\
learningallthethings\
HRL_ResearchOverhaul\
gettingpayed\
fixbailchance\
FasterExplorer\
DoublePirates\
CrystalFinder\
BetterScanColors\
run your game with -logfile debuglog.txt load a save and copy the contents of debuglog.txt here (inside of spoiler tags).
I may have to stick it in a cat file, lets see what that says.
Here you go, this is with your mod in the documents folder:
Spoiler
Show
[General] 31755.34 ======================================
[General] 31765.16 ======================================
[=ERROR=] 31765.16 GetTextPage() TextPageTable for page 1042 not found!
[General] 31765.16 ======================================
[General] 31765.16 ======================================
[=ERROR=] 31765.16 GetTextPage() TextPageTable for page 1042 not found!
[General] 31765.16 ======================================
[General] 31766.72 ======================================
[=ERROR=] 31766.72 GetTextPage() TextPageTable for page 1042 not found!
[General] 31766.72 ======================================
[General] 31766.72 ======================================
[=ERROR=] 31766.72 GetTextPage() TextPageTable for page 1042 not found!
[General] 31766.72 ======================================
[General] 31769.66 ======================================
[=ERROR=] 31769.66 GetTextPage() TextPageTable for page 1042 not found!
[General] 31769.66 ======================================
[General] 31769.66 ======================================
[=ERROR=] 31769.66 GetTextPage() TextPageTable for page 1042 not found!
[General] 31769.66 ======================================

pflip
Posts: 32
Joined: Mon, 17. Dec 18, 12:16
x4

Re: [MOD] Satellite Network v0.31

Post by pflip » Tue, 18. Dec 18, 16:52

balu0 wrote:
Tue, 18. Dec 18, 16:10
morbideth wrote:
Tue, 18. Dec 18, 15:38
balu0 wrote:
Tue, 18. Dec 18, 15:05


If I put the mod in my game folder the game does not even start, it just hangs. First thing I tried, because other mods had issues as well.
This is my current mod list , everything is in the documents folder, if I move them to game folder the game wont start, same as your mod.
run your game with -logfile debuglog.txt load a save and copy the contents of debuglog.txt here (inside of spoiler tags).
I may have to stick it in a cat file, lets see what that says.
Here you go, this is with your mod in the documents folder:

Exactly the same on my rig.

If put on game folder, X4 will not start.
I tried a new game, same issue
I tried a new game with only this mod, same issue
I am running 1.50 beta 2
I tried to remove most of the "t" directory, leaving only the english(44) file. same issue
I left in the "t" dir both english (44) and Italian (39), same issue
I punt in the "t" dir only a single file named simply 001.xml (no language). Same issue
I haven't tried to remove, in the content .xml, all language and leave only english, I'll try next

I am at loss as you. This thing should work I cannot understand why it doesn't

If someone withd ifferent language in OS and game has it working, please let us know.

Here's the debug output.
Spoiler
Show
Logfile started, time Tue Dec 18 16:36:33 2018
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70796.52 ======================================
[=ERROR=] 70796.52 GetTextPage() TextPageTable for page 1042 not found!
[General] 70796.52 ======================================
[/spolier]
________________

--- Pflip

---- Imperare sibi maximum imperium est -----

pflip
Posts: 32
Joined: Mon, 17. Dec 18, 12:16
x4

Re: [MOD] Satellite Network v0.31

Post by pflip » Tue, 18. Dec 18, 16:55

morbideth wrote:
Tue, 18. Dec 18, 15:39
Invasion wrote:
Tue, 18. Dec 18, 14:37
"To use, set the default behavior to "Deploy Satellites" and set the starting sector"

I couldn't "set the starting sector"
It asks to select a location and left/right click on empty space or a station, does not work
English 1.32 client with no other mod
You have to click on a station/space then click ok. It is working fine for me.
Yeah,a bit confusing, but it is the X4 interface that is confusing.

When you select the location, lokk up on the top of the menu (left side), there shoud be an "OK" button highlighted
________________

--- Pflip

---- Imperare sibi maximum imperium est -----

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.31

Post by morbideth » Tue, 18. Dec 18, 17:06

pflip wrote:
Tue, 18. Dec 18, 16:52
Exactly the same on my rig.

If put on game folder, X4 will not start.
I tried a new game, same issue
I tried a new game with only this mod, same issue
I am running 1.50 beta 2
I tried to remove most of the "t" directory, leaving only the english(44) file. same issue
I left in the "t" dir both english (44) and Italian (39), same issue
I punt in the "t" dir only a single file named simply 001.xml (no language). Same issue
I haven't tried to remove, in the content .xml, all language and leave only english, I'll try next

I am at loss as you. This thing should work I cannot understand why it doesn't

If someone withd ifferent language in OS and game has it working, please let us know.

Here's the debug output.
Spoiler
Show
Logfile started, time Tue Dec 18 16:36:33 2018
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70792.33 ======================================
[=ERROR=] 70792.33 GetTextPage() TextPageTable for page 1042 not found!
[General] 70792.33 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70793.53 ======================================
[=ERROR=] 70793.53 GetTextPage() TextPageTable for page 1042 not found!
[General] 70793.53 ======================================
[General] 70796.52 ======================================
[=ERROR=] 70796.52 GetTextPage() TextPageTable for page 1042 not found!
[General] 70796.52 ======================================
[/spolier]
I'll try putting the files in a cat file, according to others that worked for other assets.

pflip
Posts: 32
Joined: Mon, 17. Dec 18, 12:16
x4

Re: [MOD] Satellite Network v0.31

Post by pflip » Tue, 18. Dec 18, 17:17

morbideth wrote:
Tue, 18. Dec 18, 17:06
pflip wrote:
Tue, 18. Dec 18, 16:52
Exactly the same on my rig.

I am at loss as you. This thing should work I cannot understand why it doesn't

If someone withd ifferent language in OS and game has it working, please let us know.
I'll try putting the files in a cat file, according to others that worked for other assets.

Ok than , we will try that. I also tried with no language reference, same issue.

I also tried the 0.31.

As an added bonus, I translated the 39 file with the italian language. I put it below. You are , of course, free to use it as you see fit. Just my minimal contribution to your work
Spoiler
Show
<?xml version="1.0" encoding="UTF-8" ?>
<language>
<page id="1042">
<t id="303">Dispiega Satelliti</t>
<t id="304">Dispiega satelliti vicino alle stazioni conosciute in un settore.</t>
<t id="305">includi i Cancelli</t>
<t id="306">Usa Satelliti Avanzati</t>
<t id="307">Rifornirsi</t>
<t id="308">Ammontare del rifornimento</t>
<t id="309">Raggio di Ricerca</t>
</page>
</language>
________________

--- Pflip

---- Imperare sibi maximum imperium est -----

User avatar
nonnex
Posts: 366
Joined: Wed, 28. Aug 13, 12:42
x4

Re: [MOD] Satellite Network v0.20

Post by nonnex » Tue, 18. Dec 18, 18:09

morbideth wrote:
Tue, 18. Dec 18, 14:06
The algorithm for a 2-D circle is https://www.quora.com/What-is-an-algori ... ius-circle

It looks rather complex to try to extend to 3-D. Alternatively, I could easily extend to existing code to find the best solution simply by iterating through every possible combination of starting points. Both are possibly, but both are, also, rather more cpu intensive. I don't think people would be willing to wait while their ships sits around calculating for 15 more mins just to save 5k on a sat.
Sat Net Maintainence

Very true, the approach should keep an eye on CPU and complexity. Therefore a simple solution would be the best shot.

Thanks for the link to the article. This algo is very useful.

Gave this topic a thougt or two today @work and came to the following simple solution:

Since you have mentioned that you plan to integrate a Sat collecting functionality this (existing Sat Net maintainance) could be simply be done by having two new orders
[Collect a particular Sat] AND|OR [Collect all Sats in Sector XY]

To rearrange Sats and to throw out a clean new net a simple 2 step job queue will do the task.
[1. "Collecting all Sats in Sector" ]
[2. "Deploy Sats"] (as it exists already)

Also usefull if You may integrate a new placing algo in the future, or if you want to replace simple Sats with advanced sats in a Sector...


Observations and Bugs on current Version 1.3

1: I have seen that the algo places sats on inactive Jumpgates atm (if the gates option is enabled). Don't know if this is intended.
2: Some Stations that are far from the +0- Y-Axis will not be covered. Sat placing on the Y Axis dont work well



Best regards...
Last edited by nonnex on Tue, 18. Dec 18, 18:38, edited 1 time in total.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Satellite Network v0.31

Post by morbideth » Tue, 18. Dec 18, 18:34

pflip wrote:
Tue, 18. Dec 18, 17:17
Ok than , we will try that. I also tried with no language reference, same issue.

I also tried the 0.31.

As an added bonus, I translated the 39 file with the italian language. I put it below. You are , of course, free to use it as you see fit. Just my minimal contribution to your work
Uploaded 0.32 as a cat version with your translation included, give it a shot.
nonnex wrote:
Tue, 18. Dec 18, 18:09
Observations and Bugs on current Version 1.3

1: I have seen that the algo places sats on inactive Jumpgates atm (if the gates option is enabled). Don't know if this is intended.
2: Some Stations that are far from the +0- Y-Axis will not be covered. Sat placing on the Y Axis dont work well

Best regards...
Inactive jumpgate coverage is a known issue. They count as a gates as far as the game is concerned, so I don't plan on doing anything about it. I figure they will be used for DLC or something at some point.

There shouldn't be any reason for it not to cover things in any y-direction. The ships is moving to the correct spot in all 3 coords before dropping the sat. Are you sure the station isn't covered? Are the trades decaying? It might just be a visual problem with the map.

Post Reply

Return to “X4: Foundations - Scripts and Modding”