X4: Foundations

X4: Foundations

RandomMine
176 Comments
agog43 Feb 25 @ 11:13pm 
@OtterSwag I have stopped using both these mods ages ago for that reason. They are going to brick your game, how or why does not really matter since this problem is not going to be fixed as it wasn't even when the author was active.
QuantumArtist Jan 4 @ 5:27pm 
I'd really like an efficient trading mod that looks for several factors-

1- distance being the biggest factor and profit % being the next.Think of this as the economic version of DPS. Start with total profit in credits divided by distance in KM. Then divide this by the top travel speed of the ship. For example, your travel speed is 1300 KM/s and want to deliver 300,000 profit 12,000km away. 300,000/1200=25. Now factor in speed, 1300KM/S divided by 25creds/KM= 52 creds per second. Have the mod do a list of possible trades and rate them and chose the highest value route.

2- Remove the wait time after docking.This is a queued order that you can see listed in the behavior menu as ships trade and one of the biggest contributors to how slow traders get to payoff, especially if they're speedy S class in short runs.

These should improve trade efficiency
OtterSwag Apr 7, 2024 @ 1:23pm 
This and RandomTrade both couse periodic stutters in my games. both on 6.4 and 7.0 it runs fine 130 FPS then spikes with 1-4 FPS if any of these mods are enabled. any ideas? only me?
ThePunisher Jan 10, 2024 @ 9:03am 
I am probably a bit late, but, Stroichik and Starsong, if you read the mod you're gonna see that you assign the subordinates as "defend commander" (I suggest on something else then alpha) and then you can configure your captain how you want, check the "update subordinates" and all of them will update and copy the settings, you are not supposed to use the "mimic" command, all oh his mods work like this and I can tell you this part works, I also have the random supply on a save I am currently playing and it works.
Stroichik Aug 6, 2023 @ 12:16pm 
and gas miners have really hard time finding anything to mine on RandomMine setting
Stroichik Aug 5, 2023 @ 8:19pm 
yeah, mimic doesn't work
Starsong Aug 2, 2023 @ 8:20pm 
Doesn't seem to work with Mimic commands. Miner reports an error and simply follows the commander around, doesn't mine.
Go_Ahead.at Jul 30, 2023 @ 7:39am 
when i check homebound and select the station i want it to be assigned the ship doesn't get assigned. whats the correct process for it? how do i assign subordinates to a ship which has this command running?
ThePunisher Jun 5, 2023 @ 6:16am 
alright, thanks!
Andro  [author] Jun 4, 2023 @ 9:54pm 
ThePunisher Jun 4, 2023 @ 2:16pm 
I had to re-download all the mods, left only your version of the mods and deleted the cache and content files since it kept registering faryu's as active. After about 30-40 minutes of seta I observed that all the miners (27L Gas and 50L Mineral) are returning with full cargo and using more of the system instead of focusing on the center, this was confirmed bu looking into the mod and saw that you removed the limitation of the radius from half to whole system. Did you modify other things except the radius? I will keep using it from now on and see if there are unusual things. Thank you for the update!
ThePunisher Jun 4, 2023 @ 1:26pm 
Thanks for the update, currently having some problems downloading mods on steam, I think steam it's buggy again and conflicts your mods (yours and Faryu's) trying to solve it atm and I'll be back with the testing results and it's perfect since I upped my nr of miners :))
Andro  [author] Jun 4, 2023 @ 1:02pm 
I have released an update V 1.26, check it out. I have played with it for a couple of hours and it worked well, if you stumble across a bug which I did miss or so let me know.
ThePunisher Jun 4, 2023 @ 6:46am 
@Andro currently using RandomMine Delta from Faryu, he said he implemented kind of a cheaty way to fix that, he scans the system regardless of resource probes and it works, all miners return with full cargo. I don't mind this method, I take it as an advance AI that scans the asteroids for yield and mine until the cargo is full instead of mining 6 units with 75 millions in system.
Andro  [author] Jun 4, 2023 @ 12:43am 
Yeah this annoys me too. the thing is that this mod is old, when I coded it, the resources did not get depleted so the ship was mining until it's cargo was full. now the resource in the zone gets depleted and the mining order just stops.
I'll need to make some more code to account this behavior, I think I can do it, I will test and update soon I hope.
ThePunisher May 31, 2023 @ 9:02pm 
is there any chance that the mod makes the miners return with very low cargo? 6k capacity and it returns with 60. Factories in Venus, 57M in Asteroid Belt and 17M in Savage Spur II (took as example hydrogen). in the mod file I saw " <find_closest_resource ware="$currentWare" refobject="$sector" position="$position" minamount="750" sector="$dummy">" multiple times but it doesn't seem to work, my XML knowledge are not enough to understand the 1.6k lines :)) so I may not understand it correctly
ThePunisher May 23, 2023 @ 12:05pm 
Maybe make it a choice, a box you can check for that behavior, atm I have a fleet on that gate so my traders/miners are safe so it doesn't bother me as much now since they can go where they want. Idk how this game is being modded so idk if it's possible. It's sad that another sandbox type game that relies heavily on it's AI has a bad AI...another game that is very similar to this one is Avorion, same issue. Props to the moders tho for fixing some of the issues or scripting better alternatives, also good decision from the devs for allowing modding.
PS: another idea, if possible, option to save the config (all the boxes I check) so you can apply them easier.
Andro  [author] May 23, 2023 @ 7:40am 
yes you are actually right, but the thing is that selling from cargo is tricky, if the ship does not find any trades, it is stuck and can't do anything, so that is why it first searches for trades within the range and then if it does not find anything increases that range by 1 and searches again, and it does that 3 times iirc. So it can happen that the ship goes further than you set it up to go, if there are no suitable buy offers within that range. but I probably will change that in the near future, so your ship will get stuck with full cargo instead of going beyond allowed distance.
ThePunisher May 21, 2023 @ 5:59pm 
FYI for everyone, the most important stuff of the script, at least in my opinion, does not work. The home bound, max gate distance to sell and serve gate distance are completely ignored, my ship will travel half of the map to sell its resources, I counted 7 jumps even tho i have 3 set in the behavior. Cancelled the trade 5 times and it keeps going to the same station and the problem is that I am pretty much at the beginning so no escorts and it's going through the worst sector, Hatikvach's Choice I, already lost an L miner bcs of this and I'm gonna lose more bcs of the same reason. Unfortunately the AI is useless, the Argon is doing nothing to take control of that sector back and I have 2 M and 1 L battleship in queue for the past hour, the last part is on the game not on the mod.
Andro  [author] May 6, 2023 @ 3:01am 
so that you don't cheat :D
buy seminars, they cost under 500 credits
Sentenza May 6, 2023 @ 2:26am 
why the level requierement? :'(
Mathajas Jul 26, 2022 @ 11:19am 
Don't work with 5.10 ?
Mackcrws Apr 2, 2022 @ 3:01pm 
Hey Andro, this mod is great but I've got a problem, miners ore and gas get full inventories and won't sell it anywhere. The stay in space with a questionmark.
Seth'cor Mar 27, 2022 @ 5:30pm 
@Ronchi where you ever able to fix the problem,. trying to use this as well but having same issue.
Oorillon Feb 4, 2022 @ 2:57am 
Hello, It seems that the Miners are ignoring my Sell-Range Setting. I let them Mine in Asteroid Belt, Gate Range 1 and they try to sell at Neptune.
Andro  [author] Sep 9, 2021 @ 8:51am 
yes, ore respawns, but slowly. earlier ore was basically infinite, but since 3.0 or so not anymore
Solstice Sep 9, 2021 @ 2:48am 
Ore depletion ? i thought they respawn.

That is a bummer from egosoft side.

I will try to split the fleet and reconfigure it so it mines specific sectors, currently i have a big fleet which is allowed to mine at any sector they want, and i hoped they distribute themselves enough, but i expected too much there. :-D
Andro  [author] Sep 3, 2021 @ 10:39am 
I had that issue already, since egosoft implemented the ore depletion system, it is broken if you mine too much ore in a sector. Randomminer basically rolls a random position in a sector and then checks for any ore nearby that position, There is a number in script which it uses, but I never was able to figure out the relation between that number and the actual ore available at that position and before the depletion system it worked fine so there was no need to. But since then I have not been able to solve it, in my opinion there is a bug in the vanilla order "MiningPlayer" or was it "MiningCollect" I think I experimented with both, but it just ends the order when there is no more ore at that spot, it should continue minig until the cargo is full but it just doesn't. i was not able to solve this, the solution is to not overmine sectors.
Solstice Sep 3, 2021 @ 6:19am 
I have the strange issue that sometimes the miner does not fill up its inventory before selling.

having like 20% of the miners only filling their cargo with 10 to 100 ore instead of making them full as configured makes the fleed a bit inefficient.

also: how does the randomminer find ores ? Does he look for good concentrations ? i currently have so many that sectors are empty and i wonder if the minder proceeds to look for better opportunities elsewhere, even though some more jumps away. doesnt seem like it.
Ronchi Sep 3, 2021 @ 2:47am 
Thanks Andro, appreciate the response, let me know if you start playing again and I'll let you know if my changes work after some play testing.
Andro  [author] Sep 2, 2021 @ 12:01pm 
I think though that the assignment.trade was necessary, because assignment.mine resulted in vanilla AI taking over the ship, which was not wanted of course, but since assignment.trade worked I used it. assignment.mimic is not vanilla assignment so I can't tell anything about that.
Andro  [author] Sep 1, 2021 @ 10:09pm 
@Ronchi I don't remember exactly why I did this, but it might have something to do with the fleet management and inner fleet communication. I would have to get into the code again, but I don't play this game anymore.
@Pejman there should be no compatiblity issues from my side, I can't think of any. Mostly it is configuration issues. Maybe you selected wrong wares or wrong faction or there are blacklists configured in your game.....
Ronchi Sep 1, 2021 @ 6:48pm 
Hi Andro

I want to use civillian fleets for other purposes in the game. I use the mules for some trading functions and the Random tools for some other functions.

I think the conflict exists with the mimicry updates of civillian fleets, anything with the trade assignment is handled by that mod, but I haven't checked that code to confirm this. Just a hunch at this stage.

In saying that, is there any reason for RandomMine to reassign subordinates to the Trade assignment ?

Cheers,
[JdG] Pejman Sep 1, 2021 @ 3:10pm 
actually none of the "random" series seem to see my stations buy offers, I also have supply mules installed and this one seems to work, is it a compatibility issue ?? I'll try to remove it to see
[JdG] Pejman Sep 1, 2021 @ 11:55am 
yeah it just did that, the thing is my station DOES have a LOT of buy offers, but for some reason my ships don't "see" them (the station laso has a few ships attached to it)
Andro  [author] Sep 1, 2021 @ 10:19am 
@Ronchi, why would you want to mix my mass assignment method with civilian fleets? What are you trying to achieve?
@Pejman, supplier searches for buy offers of your stations first and then for resources. Freeminer does the opposite, it will first mine and then try to sell. But if there are no buy offers from your stations, it will be stuck same as supplier, just with full cargo instead of empty.
[JdG] Pejman Sep 1, 2021 @ 8:16am 
Setting a ship as supplier has it wait forever, but setting supplier + freeminer and restricting all factions (except player) has it go mining.

Ronchi Sep 1, 2021 @ 1:25am 
I am using your mass assignment method. The issue exists because I am using your method. When I assign a subordinate to defense it changes the subordinate assignment to trader which then conflicts with civilian fleets.

I think it is something to do with this line :

<set_object_commander object="$subordinate" commander="this.ship" assignment="assignment.trade"/>

When I change that line to this the problem no longer exists :

<set_object_commander object="$subordinate" commander="this.ship" assignment="assignment.mimic"/>
Andro  [author] Aug 31, 2021 @ 9:31am 
gratz, you are the 1000th player wanting to use this with civilian fleet :). This mod does not need civilian fleets, it has it's own fleet management, check out the description my other mod "randomsupply", "Mass assignment" section. If you want to use civilian fleet mod, ask that mod maker to implement the orders of my mods. I'm don't have anything to do with that, so please stop blaming me for that mod not working.
Ronchi Aug 30, 2021 @ 11:03pm 
There appears to be an issue with Beta 4.1 and Civilian Fleet Mod, when it goes to the trade section of the script subordinate ships are assigned to Trader and lose their orders.
Andro  [author] Jul 24, 2021 @ 12:51am 
nope
Qing Jul 23, 2021 @ 11:38pm 
Can you increase Chinese support? Thank you
Smart Bear Jun 4, 2021 @ 9:15pm 
@Xaxoon
Не царское это дело по пиндоски корябать!!!
Andro  [author] Jun 4, 2021 @ 10:31am 
Nice answer, thank you for that Xaxoon :)
🥇 Xaxoon 🥇 Jun 3, 2021 @ 10:46pm 
@Smart Bear
Ask Putin about an English course.
Smart Bear May 14, 2021 @ 2:39am 
А локализация есть?
Andro  [author] Apr 19, 2021 @ 12:28am 
I suspect there is a bug in vanilla game in the "Mine Resources" Order, it should fill the cargo, but it does not... hacking it/finding a workaround is useless this early, they might change/fix it in the near future, who knows. Maybe their resources depletion system is not yet even finished...
BBGun Apr 17, 2021 @ 4:13am 
My requirement is not to return to base empty until the ship is full, or to set up the order before returning to base with full order quantity.Now it is returning to base if the mine runs out, rather than picking another site to mine.
Manu Apr 16, 2021 @ 1:23pm 
Yeah, so i guess it was kinda good that it didn't work in that case :D
I am working on the research to port the whole station, so i will have a solution for that specific station.
The reason i wrote in the beginning still applies though. "The search for ressources" part keeps picking small mining spots in close distance even when there is nothing anymore to mine, since the sector technically would yield the ressource - it just needs to respawn.
Maybe another easy workaround for these situations would be to include a check how full the miner's cargo hold is? Just to ensure it doesn't come back with eg 36 units of a ressource?
Andro  [author] Apr 16, 2021 @ 11:16am 
Aha, I found why it ignores blacklists, but thinking about your issue I don't understand something. If you blacklist the sector where your HQ is for activities for your mining ship, then it will not supply your HQ, because it is in the blacklisted sector. That would not work if I understood you correctly.