[REQUEST] Mining Improvements - L class miner

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

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

Post Reply
timmmmmy
Posts: 24
Joined: Mon, 19. Jan 09, 23:53
x3tc

[REQUEST] Mining Improvements - L class miner

Post by timmmmmy » Fri, 7. Dec 18, 22:17

I noticed that most people seem to skip the S miner and never commit to the L miner and so generally focus on large fleets of M miners. I'm looking to bring some diversity into the mix and will probably balance the S and M classes based on cost/harvest rate but wanted to do something more interesting with the L miner. Has anyone identified yet how to accomplish any of the following:

Increase the range of the L miner.
As the turrets are shared with the M I was wondering is there a way to apply a range bonus to equipped turrets to the chassis itself. Would probably also need to restrict the turrets to mining only to prevent it accidentally becoming an artillery ship....

Increase the # of drones, their deployment range and speed and reduce their docking and undocking times.
I've noticed the ship appears to stall once its drones are filled so a simple solution to this is to increase the # drones it can carry. To prevent the formation of conga lines this could be balanced with faster docking and undocking speeds. Ideally the ship would sail along gleefully obliterating asteroids without stopping while its drones operated tirelessly around it.

Prevent asteroid fields from replenishing.
Not directly related to the above but something I think would add greatly to the mining experience as mining operations in safer sectors start to dry up.

jmattspartacus2
Posts: 73
Joined: Wed, 5. Dec 18, 07:04

Re: [REQUEST] Mining Improvements - L class miner

Post by jmattspartacus2 » Fri, 7. Dec 18, 22:39

The first two are fairly easy to accomplish using a chassis mod and a mod to the turret itself iirc.

Alternatively, you can add a flat bonus to the number of drones units have by going to a file like

%your_extensionsdirectory%\assets\units\size_l\macros\%shipnamemacro.xml

and editing <storage %other tags% unit="10" /> to have something like <storage %other tags% unit="whatever number of drones you want" />

As far as the dock/undock speeds, it's probably not an easy edit, but I will try to look into it.
Honestly I prefer the higher number of drones as a base value because it's easier to work with for me, rather than creating a new ware for the mod and licenses and stuff behind that.

timmmmmy
Posts: 24
Joined: Mon, 19. Jan 09, 23:53
x3tc

Re: [REQUEST] Mining Improvements - L class miner

Post by timmmmmy » Sat, 8. Dec 18, 00:53

Thanks jmattspartacus2. I'm trying to avoid modifying the turret as it is shared with the M miner but will do a bit of digging to see what I can do with the chassis. Regarding the drones, what I managed to dig out myself if it's of any use:

drone.pickup.xml
I think there may be a few opportunities to improve drone responsiveness here by reducing the wait for animation timers but I'll need to balance it against some potentially quirky animations:

Code: Select all

 <!-- start pickup animation on drone -->
      <set_object_active object="this.ship" activate="true"/>

      <!-- wait for activate animation to finish -->
      <wait exact="4s" />

mining.collect.ship.capital.xml
I believe this hides the secrets to the core to experience I'm looking, that is, to have the ship blasting asteroids as it drifts happily along without stopping every few seconds. However I'm having some difficulty understanding the method as it appears to target a close best asteroid and then retargets out to 55km. On the other hand, to your point, simply increasing number of drones looks like it will go a long way to achieving what I'm after as I would interpret the following means the ship doesn't stop until all drones are filled:

Code: Select all

<!-- Move/Stop -->
        <do_if value="$pickup.count ge this.ship.availableunits.collect.{$checkware}.count">
          <!-- enough targets in range, stop moving -->
          <set_value name="$moving" exact="false"/>
mining.collect.drone.xml
Seems to be the spot to increase the range for the drones to gather within. However do you have any insight as to what the following is referring to:

Code: Select all

<set_value name="$gatherlocations" exact="3" comment="the number of locations required to gather a resource (no target)"/> 

Diggz
Posts: 38
Joined: Fri, 2. Apr 10, 21:57
x4

Re: [REQUEST] Mining Improvements - L class miner

Post by Diggz » Sat, 8. Dec 18, 01:17

Since you can modify the drones themselves, why not increase the number of rocks/bits a drone can carry?


Some rocks hold 1 silicon, some hold 200. It's a random distribution afaik of the yield of the asteroid.


If 1 drone could carry two rocks, it would be able to do the work of 2 drones. Thus cutting down dock/undock times and congestion, while improving throughput.
I have yet to figure out the non-terran equivalent of a Point Singularity Projector...

timmmmmy
Posts: 24
Joined: Mon, 19. Jan 09, 23:53
x3tc

Re: [REQUEST] Mining Improvements - L class miner

Post by timmmmmy » Sat, 8. Dec 18, 02:41

Hmm jmattspartacus2, I increased <storage %other tags% unit="10" /> to 50 but it didn't increase the number of drones. Might be that I'm simply activating the mod incorrectly so if you have a working version can you share it?

Diggz, that would make sense. If you've identified a way to have the drones store multiple rocks at the same time I'd appreciate some insight on it? I didn't see anything referencing this but it's very possible I just missed it.

jmattspartacus2
Posts: 73
Joined: Wed, 5. Dec 18, 07:04

Re: [REQUEST] Mining Improvements - L class miner

Post by jmattspartacus2 » Sat, 8. Dec 18, 04:29

I think you have to patch it in for the changes to take effect, I'm experiencing a similar problem with one of the mods I made that worked once but I couldn't replicate it's intended purpose after testing it once. Care to post the code you changed in a spoiler or something? I could probably help with that part, if it helps any, this is how I made changing the storage in a cargo container work in the increased L cargo mod

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: nick (192.168.3.52) at 18.11.2018_17-03-39-->
<!-- <macros>
  <macro name="storage_arg_l_miner_liquid_01_a_macro" class="storage">
    <component ref="generic_storage" />
    <properties>
      <identification makerrace="argon" />
      <cargo max="210000" tags="liquid" />
      <hull integrated="1" />
    </properties>
  </macro>
</macros> -->

<diff>
	<replace sel="/macros/macro/properties/cargo/@max">210000</replace>
</diff>
If it's not patched in a similar method, the game ignores it and uses the default from the dat/cat files the way I understand. I should've clarified that earlier, I was about to go take a final exam and wasn't thinking all of my comment through. I'm still learning the patching system, but for any macros this type of patch should work.

For scripts, I'm not yet sure how to do patching, that's actually the reason another mod that I posted was broken, I managed to get it to work once and thought that I had it, so I posted it but wasn't able to replicate it's function when I tested it after the most recent set of updates.

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [REQUEST] Mining Improvements - L class miner

Post by Halpog » Fri, 16. Apr 21, 19:33

Diggz wrote:
Sat, 8. Dec 18, 01:17
Since you can modify the drones themselves, why not increase the number of rocks/bits a drone can carry?


Some rocks hold 1 silicon, some hold 200. It's a random distribution afaik of the yield of the asteroid.


If 1 drone could carry two rocks, it would be able to do the work of 2 drones. Thus cutting down dock/undock times and congestion, while improving throughput.
sorry for resurecting this post, but anyone got any idea what he is talking about ?
i mean the drones to edit ok, but where tio find this entries ?

Post Reply

Return to “X4: Foundations - Scripts and Modding”