removing mass traffic mod?

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

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

Falcrack
Posts: 4994
Joined: Wed, 29. Jul 09, 00:46
x4

removing mass traffic mod?

Post by Falcrack » Mon, 11. Feb 19, 01:59

Does anyone know if the mass traffic (the little ships flying in a continuous pattern around and sometimes between adjacent stations) actually do anything? As far as I can tell, they are purely aesthetic. But, I don't like them. Is there any way they could be modded out?

arknor1981
Posts: 62
Joined: Sat, 16. Nov 13, 23:05

Re: removing mass traffic mod?

Post by arknor1981 » Mon, 11. Feb 19, 04:49

config.xml in the games mydocuments folder
<trafficdensity>0.50</trafficdensity>

set to 0.00

Falcrack
Posts: 4994
Joined: Wed, 29. Jul 09, 00:46
x4

Re: removing mass traffic mod?

Post by Falcrack » Mon, 11. Feb 19, 16:06

Thanks, that worked!

User avatar
Matterom
Posts: 423
Joined: Thu, 20. Aug 09, 08:17
x4

Re: removing mass traffic mod?

Post by Matterom » Mon, 11. Feb 19, 17:11

Mass traffic move resources between nearby stations, spawn police/criminals, drop loot, and add a sort of artificial life to stations.

Xenon Defense station masstraffic drones are a good source to farm mod/crafting parts. Especially the seta stuff.
My Mods:
Sector Administration: A Tax Mod

Mindstrip
Posts: 8
Joined: Sat, 5. Jan 19, 20:28
xr

Re: removing mass traffic mod?

Post by Mindstrip » Tue, 12. Feb 19, 21:09

Do mass traffic actually move resources between stations or even within a complex or is it just a visual?

More often than not on the rare occasion i target a random mass transporter they are shown as being empty and such.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: removing mass traffic mod?

Post by Misunderstood Wookie » Fri, 22. Feb 19, 23:40

interested in this too, personally might be able to save a few frames if we halve set mass traffic too 0.25 (1/2) then we don't miss out on any potential gameplay aspects but we also don't get as many spawning leaving more room for actual ships.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Falcrack
Posts: 4994
Joined: Wed, 29. Jul 09, 00:46
x4

Re: removing mass traffic mod?

Post by Falcrack » Sat, 23. Feb 19, 18:45

ledhead900 wrote:
Fri, 22. Feb 19, 23:40
interested in this too, personally might be able to save a few frames if we halve set mass traffic too 0.25 (1/2) then we don't miss out on any potential gameplay aspects but we also don't get as many spawning leaving more room for actual ships.
I've had it set to 0 for a while now, and have not noticed any gameplay aspects.

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: removing mass traffic mod?

Post by Cg089 » Sat, 23. Feb 19, 21:00

Hey, not sure if mass traffic does transfer cargo (if it doesn't, it qualifies as a bug imo), but I'm almost positive it is supposed to, at least for close stations. I swear I saw a dev post on the forums that said as much, but I can't find it. I've seen lots of people say either way, but if you read below, you'll see why I think it is definitely intended.

I was hoping to find a way to decrease mass traffic (e.g. from 50% to 10%) and simultaneously multiply their capacity by 5, so that the total capacity is the same, but less lag. So I did some digging.

Some interesting files (unpacked from the .dats):
aiscripts/trade.station.xml seems to include the logic for what to trade. Whether it actually gets triggered, I haven't figured out yet.
Other logic for mass traffic drones etc is in aiscripts/masstraffic.blahblahblah.xml
assets/units/size_xs has all of the models and macros and stuff.

However, I can't seem to find where, if anywhere, the cargo capacity is set. I'm going to dig into it more at some point; I hope people find this info useful/interesting.

Honestly, given how broken parts of the economy are, and given most stations are spread pretty far apart, I'm not surprised you haven't noticed any gameplay affects. But, at least in theory, they should trade between stations (I've seen this happen a few places, but I haven't verified if cargo is being transferred since it's between NPC stations).

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: removing mass traffic mod?

Post by UniTrader » Sun, 24. Feb 19, 07:47

i think i clarified it earlier that the Civil Ships on the Mass Traffic Network dont carry any Cargo (or would you fill your Car up with Crap daily to carry around stuff for your employer?), but the Cargo Drones can in addition to loading and unloading big ships also use the MTN to transfer Wares between Stations in a short distance (within the same Zone if the mechanic is the same as XR)

PS no inside knowledge here, i just experimented a bit with that feature in XR and this was part of my findings
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 ;)

Falcrack
Posts: 4994
Joined: Wed, 29. Jul 09, 00:46
x4

Re: removing mass traffic mod?

Post by Falcrack » Sun, 24. Feb 19, 08:45

Were I designing stuff, I would have X4 set up so that the food and medicine is located in a central trade station for each sector. All the little civilian mass traffic ship would originate from the factories, head on over to the trade stations, and pick up food and medicine there, instead of freighters delivering food and medicine to the factories directly. So the civilian would pay for the food and medicine, although to balance it, you would be paying them wages to work at your factories. The civilian traffic actually would be serving a purpose, beyond just a purely cosmetic aspect. Maybe some of them would also go to hidden pirate bases in distant corners of the sector, picking up space fuel, space weed, and maja dust to bring back to the factories. If they brought it to the factories, the factories would then suffer a production efficiency penalty, so it would be in your interest to keep the illegal stuff away from your own factories.

There would also be civilian wares besides food and medicine located in trade stations, and civilian ships would go there to pick up stuff for the factory. As long as they are supplied with the goods they need, they are happy, but if they start to starve or not get the goods they need, the workforce would begin to grow unhappy and start to leave the station for better conditions elsewhere.

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: removing mass traffic mod?

Post by Cg089 » Sun, 24. Feb 19, 18:44

UniTrader wrote:
Sun, 24. Feb 19, 07:47
i think i clarified it earlier that the Civil Ships on the Mass Traffic Network dont carry any Cargo (or would you fill your Car up with Crap daily to carry around stuff for your employer?), but the Cargo Drones can in addition to loading and unloading big ships also use the MTN to transfer Wares between Stations in a short distance (within the same Zone if the mechanic is the same as XR)

PS no inside knowledge here, i just experimented a bit with that feature in XR and this was part of my findings
That makes sense and fits with what I know; it also explains why I've seen so much info in both directions; the mass traffic doesn't, but cargo drones using the mass traffic network do, thus making it easy to think it's the mass traffic.
In aiscripts/trade.station.xml:

Code: Select all

      <do_if value="not this.station.availableunits.{unitcategory.transport}.count">
        <set_value name="$cannottrade"/>
        <set_value name="$waitduration" min="30min" max="1h"/>
        <debug_text text="'no cargolifters available. cannot trade. waiting for %s minutes.'.[$waitduration/60s]" chance="$debugchance"/>
      </do_if>
      <do_elseif value="$cannottrade?">
        <remove_value name="$cannottrade"/>
      </do_elseif>
After quite a bit of digging, yes, unitcategory.transport is cargo drones. For any curious, since I had a hard time finding it, the unitcategory appears to be defined using libraries/loadoutrules.xml. And the normal mass traffic doesn't do anything transport wise, it's just the cargo drones (which navigate via the mass traffic network).

I guess the only remaining question I have is does the mass transit network exist without the other traffic? I'm guessing yes?

Additionally, it looks like the zone mechanic is still around, but having skipped XR, I don't know what a zone "looks like" so to speak. I've definitely seen it happen at least once, but I have no clue what the conditions for stations forming a zone are; is it that outer box when creating a plot overlapping?

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: removing mass traffic mod?

Post by UniTrader » Sun, 24. Feb 19, 18:54

A Zone is a Space of roughly 100*100*100km size maximum (iirc), but effective size is reduced by nearby other zones possibly. There are pre-defined Zones in the Map, and a new one is created dynamically when an object leaves aforementoined boundary, centered around itself (if there is no other Zone it could switch to before). Also objects will switch to a closer Zone if one is available. Basically its some kind of Instancing / grouping of Objects in the same Sector. (it used to be the Map Level after Sector, but while technically still present it has disappeared from the Player presentation)

therefore cannot say more than Close by, and that you should look for Masstraffic Ships to see if Stations can transfer Wares directly. the Network itself still exists without Civil Ships, but there is no way to visualize it, so no way to tell definietly wheter Stations can transfer wares without them.
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 ;)

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: removing mass traffic mod?

Post by Cg089 » Sun, 24. Feb 19, 19:01

UniTrader wrote:
Sun, 24. Feb 19, 18:54
A Zone is a Space of roughly 100*100*100km size maximum (iirc), but effective size is reduced by nearby other zones possibly. There are pre-defined Zones in the Map, and a new one is created dynamically when an object leaves aforementoined boundary, centered around itself (if there is no other Zone it could switch to before). Also objects will switch to a closer Zone if one is available. Basically its some kind of Instancing / grouping of Objects in the same Sector. (it used to be the Map Level after Sector, but while technically still present it has disappeared from the Player presentation)

therefore cannot say more than Close by, and that you should look for Masstraffic Ships to see if Stations can transfer Wares directly. the Network itself still exists without Civil Ships, but there is no way to visualize it, so no way to tell definietly wheter Stations can transfer wares without them.
Sounds like a UI mod could maybe add it, but it'd be a pain. Thanks a ton, that answers my questions... I'll be turning off mass traffic myself now that I have enough info to be sure it won't mess things up.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: removing mass traffic mod?

Post by Misunderstood Wookie » Mon, 25. Feb 19, 00:11

Guess I am going to have to go digging around, I mean what is stopping us from digging around for the cargo ships which use the mass traffic routes.
Turn off mass traffic and or at least figure out where the density of civil ships get spawned into mass traffic lanes and then mod that script so civil ships are no longer generated into mass traffic, can we not do the old trick I have seen in XR?


Whereby we replace the fake mass traffic with real traffic by changing some lines to make the normal ships also use the mass traffic routes when close to a station but remove the mass traffic ships from being generated.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: removing mass traffic mod?

Post by Cg089 » Mon, 25. Feb 19, 23:13

The old trick still works fine, and won't cause any problems - I just saw lots of confusion about mass traffic and whether turning it off causes problems, so I was trying to clarify how it works and why there was so much confusion. I then put together what I found so that anyone else wondering about the confusion wouldn't have to redo my research.

As far as I can tell, the config setting controls the civilian traffic and nothing else. Cargo Drones are what transport cargo. But, they use the same routes as the civilian traffic, so it looks like mass (civilian) traffic is transporting the cargo, even though in actuality, the Cargo Drones are separate from the mass transit system. So in other words, there's nothing to worry about. Changing trafficdensity>0.50</trafficdensity> to <trafficdensity>0.00</trafficdensity> will not have any effect besides the visual & performance impact, as far as I know.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: removing mass traffic mod?

Post by UniTrader » Mon, 25. Feb 19, 23:43

if your computer is not struggling already the performance impact of masstraffic should be neglible though. all Ships there practically move on rails, and dont do any pathing themselves (except when they are forced out of their route by an attack)
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 ;)

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: removing mass traffic mod?

Post by Cg089 » Mon, 25. Feb 19, 23:58

I'm not sure if this has changed since XR (skipped XR personally), but I think rendering wise they are significant, though obviously less so if your computer isn't already struggling. In my case, my GPU is the bottleneck. In particular, I'm unfortunately on a 2GB graphics card and it's a laptop - hoping to get an eGPU soon. So, for me, every megabyte of of video memory counts. But granted, they are generally lightweight, though even at lod=3 they appear to have a light effect on them, which adds up.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: removing mass traffic mod?

Post by Misunderstood Wookie » Tue, 26. Feb 19, 11:13

UniTrader wrote:
Mon, 25. Feb 19, 23:43
if your computer is not struggling already the performance impact of masstraffic should be neglible though. all Ships there practically move on rails, and dont do any pathing themselves (except when they are forced out of their route by an attack)
Indeed is why I want mass traffic gone, it's a fake system which does nothing for the game except create more to render X4 is bad enough on the CPU that less overhead in threads is less overhead to me.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: removing mass traffic mod?

Post by UniTrader » Tue, 26. Feb 19, 11:45

it's less fake than traffic in GTA because the ships don't circle around randomly but they all have a destination where they want to go to, and they will use the shortest path on the network to get there.


on further thought you can use the fake argument against any feature in any game and keep removing stuff till there is nothing left. That's why I consider the fake argument to be a fake argument itself.
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 ;)

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: removing mass traffic mod?

Post by Misunderstood Wookie » Tue, 26. Feb 19, 11:50

Fair Point, however I would prefer the ships to be real ships not just for looks, and then in that case lower the value of mass traffic.
do you know how to do that?
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Post Reply

Return to “X4: Foundations - Scripts and Modding”