Space Engineers

Space Engineers

216 个评价
[SCAM] Simple Concurrent Adaptive Min3r
5
6
3
2
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
205.698 KB
2021 年 8 月 11 日 上午 7:37
4 月 28 日 上午 8:51
11 项改动说明 ( 查看 )

订阅以下载
[SCAM] Simple Concurrent Adaptive Min3r

描述
The idea
I designed this autominig solution to suit my approach to mining automation in vanilla game. The main goal was to make a system that would allow extremely early mining automation in survival with great scalability later on. At this moment it's tuned to mine spherical/saucer vanilla ore deposits in space and on planets.
Check out the sample to see if it's your thing before diving further.
Distinctive features:
  • Send to new mining spot with exactly one command (by positioning drone or doing camera raycast)
  • Scale number of drones easily with no added set up actions
  • All drones mine the single spot (called mining task) together with exclusive blocking shared path segments to avoid collisions (HOPEFULLY), hence the Concurrent word
  • Drones are recalled with a single command and dock to moving carrier automatically
  • Drones try to ignore stone layer, adjust max mining depth based on ore gain analysis, so it's kinda Adaptive
Current limitations:
  • Current mining pattern and concurrency approach requires all acting drones to have the same size
  • Drones have to be vertical miners (drills facing down, going downwards)
  • Base docking area has to be top open, docking drones descend vertically
  • Probably have quite an amount of bugs and hikkups - while I used them A LOT during my survival playthrough, I might've missed lots of test cases because of my playstyle, also recently the code undergone a huge rework
Usage
  1. Watch the quickstart video guide or read this guide
  2. Get the min3r of choice or build your own
  3. Copy the code to drones' blueprint, make sure Dispatcher and all Agents run the same version

Advanced features
Adaptive mining is a feature that allows dynamic change of mining plan based on ore income. If enabled on agent, it would constantly check what content gets into drills and do several adjustments:
- change skip-depth (distance from the mining area surface where drills block incoming ore, to eliminate stone input)
- change depth-limit
- send direction-banning messages to Dispatcher.

direction-banning would cancel out planned shafts in a small cone (going from the mining plans' center). This represents areas that are considered not worth expanding to.

Adaptive mining should be toggled on Agents (toggle:adaptive-mining in CustomData or run arg). If it is enabled on Dispatcher, it would enforce this setting on all drones in active group during task creation.

It is disabled by default to avoid confusion

Any ore input except Stone is considered valuable.

Tested workhorses

Moved here.

Custom Data boot commands for base and drones
Those commands are executed immediately on start/recompile. During runtime they can be fed to PB via run argument.
Base or Carrier (Dispatcher role)
command:set-role:Dispatcher command:add-logger:scam-log-panel command:add-panel:scam-gui-panel // for GUI mode on the 'scam-gui-panel' tagged screen command:add-gui-controller:scam-controller toggle:log-message command:set-value:max-generations:8 command:set-value:getAbove-altitude:5 command:set-value:skip-depth:0 command:set-value:depth-limit:50
Small drone - all Min3r 69R line (Agent role)
command:set-role:Agent command:set-value:circular-pattern-shaft-radius:3.6 command:set-value:preferred-container:Large Cargo Container x command:add-panel:feed-panel // uncomment below to enable adaptive mode //toggle:adaptive-mining
Large drone - gravity driven variants (Agent role)
command:set-role:Agent command:set-value:circular-pattern-shaft-radius:7.9 command:set-value:preferred-container:Large Cargo Container x command:add-panel:feed-panel // uncomment below to enable adaptive mode //toggle:adaptive-mining

Script argument reference

Too big to be included here, see script arguments reference discussion.

Troubleshooting and advice on how to avoid shooting yourself in a leg
  • Do not copy-paste drones in creative during their activity. If you have to, use clear-storage-state command and then copy
  • The orientation of connectors matters, both on base and on drone. While autopillock should handle any cases, drone pathing currently optimized for stock drones - vertical mining, vertical landing.
  • If you add/remove any blocks during operation, you need to recompile everything
  • When drone docks, it switches all batteries in recharge mode. After recent update, this might block a drone forever until you switch batteries manually. If you experience this, toggle base connectors' Power Transfer Override ON.
  • Use command:clear-storage-state on every PB to reset all internal state, if you see some weird behavior. You can use command:global:command:clear-storage-state on Dispatcher to broadcast it to every linked drone
  • Getting exception "Not enough thrust to compensate for gravity" - you drone struggled to overcome gravity. Can happen to weak ion min3r when in G environment and fully loaded.
  • If you have issues with drones not docking, make sure nothing is messing up with connector Custom Data. The script uses it to claim connectors for drones.
  • In case of deadlocks when drones seem to wait for each other and do nothing, try Purge Locks command as a last resort.
  • Don't use on asteroids in planetary gravity field. This would be considered planetary mining and won't go as you expected.

If you have issues
Please tell about them in the bug reports discussion .
Before that, make sure dispatcher and drones run the same script version (shown in the PB run printout).
Check script logs from dispatcher and drone - if you did not add specific LCD for logging, log can be found inside PB screen. Often you can get what went wrong right from the log.

If you have issues with drone docking process
Please prepare to answer these questions before asking or posting bug report:

1. Does the dispatcher PB show those drones as "ID awaits docking" in PB info printout (where runtime info, version, etc shows up)?

2. Do those free connectors you expect drones to dock to have something in their Custom Data (should be empty or having THAT drone ID)?

3. What lock ownership does the GUI show for those stuck drones ("general", "force-finish", etc)

4. Does the "Purge Locks" GUI button solve the issue?
热门讨论 查看全部(5)
375
10 月 30 日 下午 1:08
置顶: Bug reports, feature suggestions
cheerkin
36
2
9 月 5 日 上午 5:50
置顶: Set-up guide
cheerkin
27
8 月 31 日 下午 3:47
置顶: Script argument reference
cheerkin
553 条留言
Allucination 11 月 12 日 下午 12:54 
Check Code keeps throwing up errors lots of Program [1126,105]: Warning: Field Program etc....
About 11 of them
Anyone have any idea.
cheerkin  [作者] 11 月 6 日 上午 2:54 
Not sure what you intend to change though, there is no explicit checks in the code which forbid that kind of connector facing. It's just not advised to do it like that because of how routing/docking works.
cheerkin  [作者] 11 月 6 日 上午 2:44 
Sure it is, but I'm not going to help with that, it goes against the tech design here and would produce more issues than benefits.
Ferrin 11 月 5 日 下午 11:18 
Is it possible to edit the code for connectors facing in the opposite direction of the drills? I've gotten it to work a few times through random chance but it's never been consistent.
Nefertum 10 月 29 日 上午 8:14 
gona move this to bugs , as im apperently to dumb to fix it xD
cheerkin  [作者] 10 月 29 日 上午 3:34 
NP! The main thing is when you ask on that thread, people who might have had this issue can help you as well (many are still subscribed to comments there).
Nefertum 10 月 28 日 上午 11:05 
i kinda feel bad now to keep asking here so thx anyways :steamthumbsup:
cheerkin  [作者] 10 月 27 日 下午 3:09 
So you are saying you are aware that issues are posted in the dedicated discussion and you still post it here, I wonder what are the mechanics behind your life decision making. Anyways, maybe try clearing the state, looks like the miner is stuck in a docking attempt which is no longer relevant.
Nefertum 10 月 26 日 下午 3:12 
so been trying for hours so im kinda frustrated atm but i had the thruster issue which i resolved now i have this -- 0.00: Assigned role: Agent
0.00: subset: 62
4.93: CommandAutoPillock: command:create-wp:Name=DynamicDock.echelon,Ng=Forward,AimNormal=0.512127289511435;-0.345951921186113;-0.786157050191187,TransformChannel=docking:-6.82121026329696E-13:9.31144050753119E-13:-28.2500000000073:command:pillock-mode:DockingFinal
4.93: Added DynamicDock.echelon, total: 1
4.93: Standby -> CwpTask
4.95: HC EPIC FAIL
NTV:docking
Behavior:Deserialized Behavior
System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at Program.<>c__DisplayClass83_1.<lj>b__13(Vector3D ë)
at Program.à.I(Int32 H, Action`1 F, ƻ D)

insted of playing i was troubleshooting this and didnt get far xD
i know wrong section but i coud really use some help :D
murdockwan 10 月 13 日 上午 4:57 
@cheerkin
The features look impressive. Thank you for developing and sharing.
Like the previous poster @Bockda I too look forward to the source code release.