[MOD] Civilian Fleets: Mimicry Extension (v6.04)

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

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

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets (v3.00)

Post by Vectorial1024 » Mon, 25. May 20, 18:16

shovelmonkey wrote:
Mon, 25. May 20, 18:01
...

On a side note, a page or so back I had asked you about automated renaming of fleet to correlate with their activity and anchor space. At that point, with multiple hundreds of hours into the game, I had never noticed the "Rename Fleet" option...so the derp is strong in me as well! :doh:
I remember someone asking about fleet names with warebaskets, but I can't remember who asked ... *awkward face* I'm not very good with this kind of memory, you see...

And just a few moments ago, someone asked on GitHub about only adding the anchor space. I think adding only the anchor space is more doable than adding the warebasket:

https://github.com/Vectorial1024/v1024_ ... /issues/30

And yes... real life leaks into here... no use pretending that it doesn't. Face it. Real life is affecting the development of this mod by lethal levels, and I have absolutely no stake, control, or choice in it.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

shovelmonkey
Posts: 152
Joined: Wed, 29. Feb 12, 17:34
x4

Re: [MOD] Civilian Fleets (v3.00)

Post by shovelmonkey » Mon, 25. May 20, 18:24

Vectorial1024 wrote:
Mon, 25. May 20, 18:16
shovelmonkey wrote:
Mon, 25. May 20, 18:01
...

On a side note, a page or so back I had asked you about automated renaming of fleet to correlate with their activity and anchor space. At that point, with multiple hundreds of hours into the game, I had never noticed the "Rename Fleet" option...so the derp is strong in me as well! :doh:
I remember someone asking about fleet names with warebaskets, but I can't remember who asked ... *awkward face* I'm not very good with this kind of memory, you see...

And just a few moments ago, someone asked on GitHub about only adding the anchor space. I think adding only the anchor space is more doable than adding the warebasket:

https://github.com/Vectorial1024/v1024_ ... /issues/30

And yes... real life leaks into here... no use pretending that it doesn't. Face it. Real life is affecting the development of this mod by lethal levels, and I have absolutely no stake, control, or choice in it.
Well the only reason I had requested the feature is because I was simply not aware of the fact you could rename your fleets manually. Since I've learned that I really have no need for an automated renaming as I have the current function turned off anyways in extension options. My ADD is as such that I am super finicky with my naming conventions for fleets and ships so I'd just end up renaming them anyways.
“Not even once has life or the weather complained about a human being.”
― Mokokoma Mokhonoana

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

Re: [MOD] Civilian Fleets (v3.00)

Post by BoostHungry » Wed, 27. May 20, 02:42

*EDIT* Hiding this post as I found the issue. The complete game lock-up I experienced seems to be caused by the Faction Rebalance Mods (as reported in that mod's forum thread). I will leave the original post hidden as I do still see the error message below so I have instead modified my local files to remove the failing if check since I know my current state and I know I want to execute that line.

Original Post:
Spoiler
Show
Updated to 3.2 Beta 2 and I'm getting this error in the logs right before a complete game lock up without recovery:

Code: Select all

[=ERROR=] 155729.02 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:eae7c>: Property lookup failed: global.$v1024_flags_hasRightClickAPI
* Expression: not global.$v1024_flags_hasRightClickAPI
* Action: <do_if>, line 249
[General] 155729.02 ======================================
[General] 155729.14 ======================================
[=ERROR=] 155729.14 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:eae88>: Property lookup failed: global.$v1024_flags_hasRightClickAPI
* Expression: not global.$v1024_flags_hasRightClickAPI
* Action: <do_if>, line 249
This is reproducible three times in a row about 2-3 minutes after loading my save. I have not looked at the logs before this situation so I do not know if this log message is normal.

I'm running Civilian Fleets 3.0 obtained from NexusMods. I have SirNukes Mod Support API (from GitHub) but I do not have the Right Click API (which isn't needed as per description of this mod).

*Edit:* I notice that someone else posted about this on new game start but sounds like their game did not crash. So maybe this isn't the cause? Or still possibly? Dunno.

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets (v3.00)

Post by Vectorial1024 » Wed, 27. May 20, 11:14

BoostHungry wrote:
Wed, 27. May 20, 02:42
*EDIT* Hiding this post as I found the issue. The complete game lock-up I experienced seems to be caused by the Faction Rebalance Mods (as reported in that mod's forum thread). I will leave the original post hidden as I do still see the error message below so I have instead modified my local files to remove the failing if check since I know my current state and I know I want to execute that line.

Original Post:
Spoiler
Show
Updated to 3.2 Beta 2 and I'm getting this error in the logs right before a complete game lock up without recovery:

Code: Select all

[=ERROR=] 155729.02 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:eae7c>: Property lookup failed: global.$v1024_flags_hasRightClickAPI
* Expression: not global.$v1024_flags_hasRightClickAPI
* Action: <do_if>, line 249
[General] 155729.02 ======================================
[General] 155729.14 ======================================
[=ERROR=] 155729.14 Error in MD cue md.CivilianFleets_Signals.Signal_SyncOrders<inst:eae88>: Property lookup failed: global.$v1024_flags_hasRightClickAPI
* Expression: not global.$v1024_flags_hasRightClickAPI
* Action: <do_if>, line 249
This is reproducible three times in a row about 2-3 minutes after loading my save. I have not looked at the logs before this situation so I do not know if this log message is normal.

I'm running Civilian Fleets 3.0 obtained from NexusMods. I have SirNukes Mod Support API (from GitHub) but I do not have the Right Click API (which isn't needed as per description of this mod).

*Edit:* I notice that someone else posted about this on new game start but sounds like their game did not crash. So maybe this isn't the cause? Or still possibly? Dunno.
Ah, actually, upon closer inspection, the v1024_flags_hasRightClickAPI global variable should not be used in my mod anymore... it gotta be replaced by something else, or straight up be removed.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

noblejms
Posts: 37
Joined: Sun, 9. Aug 20, 11:59

Re: [MOD] Civilian Fleets (v3.03)

Post by noblejms » Wed, 12. Aug 20, 10:13

Hello, this looks like a really great mod and exactly what I need at the moment. However I have some questions:

1. When I select a miner and right-click on another miner, I did see the "Mine for commander" option. However after the subordinate got assigned to the commander, the subordinate's behavior just shows "Escort" only and there's no mining order queue up for the subordinate. I'm not sure why, is it because I installed the "Mod Support API" incorrectly? When I installed the "Mod Support API", I downloaded the zip file and just unzip the folder into the game's "Extension" folder, in the same folder as this mod. Did I do it correctly?

2. What happens if your commander is set to Expert Automine, but its subordinate only is a 1-star captain and supposedly can only do Sector Automine? Does the civilian fleet needs to be composed of ships commanded by captains of the same tier (like everyone in the fleet can do Expert Automine)?

3. If I assign military ships to escort the commander of a civilian fleet, do those military ships only escort the commander or will be assigned to the subordinates as well?

Thanks a lot in advance!

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets (v3.03)

Post by Vectorial1024 » Sat, 15. Aug 20, 15:31

noblejms wrote:
Wed, 12. Aug 20, 10:13
1. When I select a miner and right-click on another miner, I did see the "Mine for commander" option. However after the subordinate got assigned to the commander, the subordinate's behavior just shows "Escort" only and there's no mining order queue up for the subordinate. I'm not sure why, is it because I installed the "Mod Support API" incorrectly? When I installed the "Mod Support API", I downloaded the zip file and just unzip the folder into the game's "Extension" folder, in the same folder as this mod. Did I do it correctly?
You did all correctly, it is a known issue on our side. Basically, EgoSoft patched some ambiguous code, and previously I exploited that ambiguity to make this mod work. Now I will need a new workaround (WIP) to recreate that kind of ambiguity.
noblejms wrote:
Wed, 12. Aug 20, 10:13
2. What happens if your commander is set to Expert Automine, but its subordinate only is a 1-star captain and supposedly can only do Sector Automine? Does the civilian fleet needs to be composed of ships commanded by captains of the same tier (like everyone in the fleet can do Expert Automine)?
Technically speaking all the three mining variants (i.e. Sector, Advanced, and Expoert) will use the same underlying script (let's call it "Generic") to mine stuff, so how I approached it was that the subordinate will always get the normally-impossible "Generic" variant (except when commander is using Expert; the subordinates will use Expert instead of "Generic" when the range settings are higher than what the "Generic" variant would allow).

But to avoid skillful commanders "uplifting" the less skillful subordinates, I've made it such that mining subordinates will perform at the efficiency level that they themselves are supposed to perform, with one exception: commanders whose skills are less than some of their subordinates will cause those subordinates to work less efficiently than when they operate alone by themselves. (Think of it as some confused subordinates sitting there listening to the strange orders from the commander.)
noblejms wrote:
Wed, 12. Aug 20, 10:13
3. If I assign military ships to escort the commander of a civilian fleet, do those military ships only escort the commander or will be assigned to the subordinates as well?
That is the selling point, we read the assignment value at script-level, so if you really want them to be escorts, they really become escorts. We dont mix them up. (Currently not working for miners because miners now cannot be given assignment value = mining; this is the EgoSoft ambiguity patch I was talking about.)
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

geoguy
Posts: 2
Joined: Sat, 16. Nov 13, 11:06
x3ap

Re: [MOD] Civilian Fleets (v3.03)

Post by geoguy » Thu, 20. Aug 20, 12:57

Been checking the github repo, appreciate your efforts to get mining fleets sorted out!

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets (v3.03)

Post by Vectorial1024 » Fri, 21. Aug 20, 14:15

geoguy wrote:
Thu, 20. Aug 20, 12:57
Been checking the github repo, appreciate your efforts to get mining fleets sorted out!
Thanks man, it ain't easy to stay on track these days.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

Re: [MOD] Civilian Fleets (v4.10)

Post by Baldamundo » Mon, 15. Mar 21, 01:52

Does this work in 4.0?

daBeschi
Posts: 76
Joined: Mon, 28. Jan 19, 14:04
x4

Re: [MOD] Civilian Fleets (v4.10)

Post by daBeschi » Thu, 25. Mar 21, 17:49

Hello,

I got directly a CTD after setting up a trading fleet. Maybe there is a problem if requirements are not met with subordinates. Maybe for now the mimic-command could be the go to solution ...

Greetings

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets (v4.10)

Post by Vectorial1024 » Wed, 21. Apr 21, 12:36

Baldamundo wrote:
Mon, 15. Mar 21, 01:52
Does this work in 4.0?
Well, now it does work in v4.0.
daBeschi wrote:
Thu, 25. Mar 21, 17:49
Hello,

I got directly a CTD after setting up a trading fleet. Maybe there is a problem if requirements are not met with subordinates. Maybe for now the mimic-command could be the go to solution ...

Greetings
You may want to try again. I have updated this mod to accept the Mimic assignment instead of the custom-hack Trader/Miner assignment to manage civilian fleets.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

daBeschi
Posts: 76
Joined: Mon, 28. Jan 19, 14:04
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by daBeschi » Wed, 21. Apr 21, 18:06

Hello,

I'm curious to know what benefit we have by using civilian fleets over the mimic command? At the moment I only see automatic renaming the fleet. Don't understand me wrong. I will give it a try later today.

Greetings

Edit: It seems there is a bit more QOL in it. The most obvious part, which I had to discover after 1 min playing today, is the "they remember what they do" which isn't implemented in the "mimicry command". My fleet leader died do to pirate attack and the "replacement" hat still mimic order active but doesn't show the command options and therefore I had no changes of adjusting. With civilian fleets all subordinates show the command options.
Long story short: I keep the MOD and say "thank you very much!"

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by Vectorial1024 » Fri, 23. Apr 21, 17:35

daBeschi wrote:
Wed, 21. Apr 21, 18:06
Hello,

I'm curious to know what benefit we have by using civilian fleets over the mimic command? At the moment I only see automatic renaming the fleet. Don't understand me wrong. I will give it a try later today.

Greetings

Edit: It seems there is a bit more QOL in it. The most obvious part, which I had to discover after 1 min playing today, is the "they remember what they do" which isn't implemented in the "mimicry command". My fleet leader died do to pirate attack and the "replacement" hat still mimic order active but doesn't show the command options and therefore I had no changes of adjusting. With civilian fleets all subordinates show the command options.
Long story short: I keep the MOD and say "thank you very much!"
Yes, at one point during pre-4.0 I was quite worried the Mimic Behavior would totally replace this mod (but hey if that is true then I can finally retire so that is a plus), but after I get my hands on X4 v4.0, I opened up the Mimic default behavior XML, and then I said "bruh, what if the fleet leader died while subordinates are still trying to mimic. One of the subordinates will replace the leader but the entire fleet will mimic nothing. There is still a market." And have come up with this update.

But still, this update is unclean and confusing and quite some users on Steam have complained about the older "trading fleet" and "mining fleet" buttons having been disappeared. I am thinking to restore those feature so everybody (especially those that started using this mod early) can still enjoy the mod. (Or somehow make it work like it should have been on day one.)
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by Mycu » Fri, 23. Apr 21, 18:16

Vectorial1024 wrote:
Fri, 23. Apr 21, 17:35
I am thinking to restore those feature so everybody (especially those that started using this mod early) can still enjoy the mod.
Maybe with some possibility (via extension options or xml var) to hide those commands in case it will just clone mimic functionality to aviod menu cluttering?
With Urgent Orders mod this menu gets quite hanbdful of commands.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by Vectorial1024 » Sat, 24. Apr 21, 21:02

Mycu wrote:
Fri, 23. Apr 21, 18:16
Vectorial1024 wrote:
Fri, 23. Apr 21, 17:35
I am thinking to restore those feature so everybody (especially those that started using this mod early) can still enjoy the mod.
Maybe with some possibility (via extension options or xml var) to hide those commands in case it will just clone mimic functionality to aviod menu cluttering?
With Urgent Orders mod this menu gets quite hanbdful of commands.
A quick visit to SirNukes Mod Support API reveals something interesting: I should be able to restore some "legacy control" buttons (of course I will just redirect them to the Mimic under the hood) but at the same time be able to read flags from their Extension Options to eg hide them buttons, should be a good balance between what I want and what ppl want.

Not sure if anyone already did the SirNukes + extension options + UI modification combo yet
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Cedric_FP
Posts: 189
Joined: Thu, 13. Apr 06, 17:56
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by Cedric_FP » Mon, 26. Apr 21, 09:36

Vectorial1024 wrote:
Sat, 24. Apr 21, 21:02
Mycu wrote:
Fri, 23. Apr 21, 18:16
Vectorial1024 wrote:
Fri, 23. Apr 21, 17:35
I am thinking to restore those feature so everybody (especially those that started using this mod early) can still enjoy the mod.
Maybe with some possibility (via extension options or xml var) to hide those commands in case it will just clone mimic functionality to aviod menu cluttering?
With Urgent Orders mod this menu gets quite hanbdful of commands.
A quick visit to SirNukes Mod Support API reveals something interesting: I should be able to restore some "legacy control" buttons (of course I will just redirect them to the Mimic under the hood) but at the same time be able to read flags from their Extension Options to eg hide them buttons, should be a good balance between what I want and what ppl want.

Not sure if anyone already did the SirNukes + extension options + UI modification combo yet
I currently have SirNukes + extension options + kuertee's UI if that's the one you meant. However I found this newest update completely fine and actually prefer the simplicity of mimic commander and then everything happening automagically wrt trade or mine under the hood. I have set up multiple tater trade and autominer fleets using your script and think it works fine and is perfectly intuitive to me *shrugs* Been using your mod for a while, too, since my last play through with SV. Since I run a bunch of war enhancing mods, having the fleet not grind to a halt when the leader dies is great functionality.

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.01)

Post by Vectorial1024 » Sat, 1. May 21, 19:01

Cedric_FP wrote:
Mon, 26. Apr 21, 09:36
Vectorial1024 wrote:
Sat, 24. Apr 21, 21:02
Mycu wrote:
Fri, 23. Apr 21, 18:16


Maybe with some possibility (via extension options or xml var) to hide those commands in case it will just clone mimic functionality to aviod menu cluttering?
With Urgent Orders mod this menu gets quite hanbdful of commands.
A quick visit to SirNukes Mod Support API reveals something interesting: I should be able to restore some "legacy control" buttons (of course I will just redirect them to the Mimic under the hood) but at the same time be able to read flags from their Extension Options to eg hide them buttons, should be a good balance between what I want and what ppl want.

Not sure if anyone already did the SirNukes + extension options + UI modification combo yet
I currently have SirNukes + extension options + kuertee's UI if that's the one you meant. However I found this newest update completely fine and actually prefer the simplicity of mimic commander and then everything happening automagically wrt trade or mine under the hood. I have set up multiple tater trade and autominer fleets using your script and think it works fine and is perfectly intuitive to me *shrugs* Been using your mod for a while, too, since my last play through with SV. Since I run a bunch of war enhancing mods, having the fleet not grind to a halt when the leader dies is great functionality.
Simplicity is nice, but the execution of the update was imo horrible. I dropped support of the legacy buttons but did not leave behind a convenient way for ppl to migrate to Mimic, and so things broke down.

Mainly the problem was that I wrongly thought I could "set the fleet group at order sync" (this is not doable) and there was not enough testing at that time and so the final product was flawed. Fleet group was never changed, and the warning message of "using the old endpoint" kept spamming the screen. (Originally expected that message to appear for a few moments after the mod update but it obviously got out of control.)

Now, to let ppl migrate smoothly, I will just restore the legacy buttons, but when ppl want to use the legacy buttons they will get notified with a simple message that CivFleet will change the fleet to use Mimic, and I under-the-hood change the fleet group to Mimic to use the new logic.

It is a compromise to add back the legacy buttons as a means of smooth transition.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

Midnitewolf
Posts: 564
Joined: Tue, 23. Mar 21, 06:18

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.03)

Post by Midnitewolf » Sat, 8. May 21, 22:12

Probably not a big deal then the grand scheme of things but Civilian Fleets doesn't play well with the Star Wars Interwars mod. I had to remove it because my combat fleets subordinates would end up all getting the mimic command despite what group I assigned to them such as attack, defend, intercept. Also once they got the mimic order, they just stopped responding to fleet orders. Soon as I removed this mod all was fixed.

I suspect this has something to do with the fact that all Vanilla ships were removed and Star Wars only ships were added.

In any case, I know that the Star Wars Interworlds mod is pretty popular so I thought I would mention it here to let anyone know who is looking to use this mod with the Star Wars mod that they don't play well together.

Vectorial1024
Posts: 222
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.03)

Post by Vectorial1024 » Sun, 9. May 21, 08:25

Midnitewolf wrote:
Sat, 8. May 21, 22:12
Probably not a big deal then the grand scheme of things but Civilian Fleets doesn't play well with the Star Wars Interwars mod. I had to remove it because my combat fleets subordinates would end up all getting the mimic command despite what group I assigned to them such as attack, defend, intercept. Also once they got the mimic order, they just stopped responding to fleet orders. Soon as I removed this mod all was fixed.

I suspect this has something to do with the fact that all Vanilla ships were removed and Star Wars only ships were added.

In any case, I know that the Star Wars Interworlds mod is pretty popular so I thought I would mention it here to let anyone know who is looking to use this mod with the Star Wars mod that they don't play well together.
Nah this mod does not care about what ships you use.

However I do notice this bug when testing myself with a cheat mod and some vanilla carriers and provided a fix in mod version v5.03. The way I see this is that I tried to rush things for v5.00-v5.02 by copying code without checking carefully and shot myself in the foot and ended up having to redo about half of the mod.

Please try and see if v5.03 fixes this.
The future awaits.

X4 Foundations mods:
Civilian Fleets: Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Scrap Delivery Coordination: No more starving scrap processors.

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: [MOD] Civilian Fleets: Mimicry Extension (v5.03)

Post by wanderer » Sun, 16. May 21, 09:36

Some questions regarding filters:
Are they recognized by the mod? Meaning - If I use a filter for trade ONLY with myself.
Same for sectors. Can I use a filter for sector travel (eg. only my own sectors, not allowed sectors, ...).
I use quite some filters to only fly, mine and trade/distribute in my own sectors.

Post Reply

Return to “X4: Foundations - Scripts and Modding”