Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Current situation:
I have a large ship that runs the script, it is powerd by XPAR Modular Energy reactors and i use a managed blocks group.
When i dock a small ship powerd by stock small reactors to the large ship (managed blocks group is correct) the uranium gets swaped around in the small ship reactors but not balanced.
Happens on a survival single player map with inventory size set to realistic, in case that matters.
But i should be able to publish it if you still need it.
Balancing works on the large blocks ship without problems, the docked small blocks ship is suposed to get balanced together with the large blocks one.
Insted that happens:
small reactor 1: 10 Uranium, small reactor 2: 5 Uranium, small reactor 3: 5 Uranium
script runs
small reactor 1: 6 Uranium, small reactor 2: 10 Uranium, small reactor 3: 4 Uranium
The small blocks ship in question has 20 Reactors that get "swaped" like that, sometimes even emptying some reactors.
The large blocks ships Reactors stay perfectly balanced the whole time.
It is a testworld and i usualy have all mods active so i do not have to reload if i want to try something out.
However, the Ship itself is still a big one.
Can you install some "debugger screens" and tell me what the script writes on them?
Especially I need to know how many blocks are taken into account, and in which way the script divids them into conveyor networks and groups.
Also please tell me if you are using any conveyor sorters, because when they have filters applied, they can (but don't have to) really make a mess.
Information about number of reactors do you have and their maximum capacity also would be handy. With this I could calculate a right result.
For example if you had:
1 reactor with capacity of 8000 (large reactor on station)
10 reactors with capacity of 1000 (small reactors or XPAR reactors on station, or large reactors on small ship)
10 reactors with capacity of 125 (small reactors on small ship)
2025 of uranium in total
the final result after about 12 - 16 calls of the script should be:
843 uranium in reactor with capacity of 8000 (about 10,5% of capacity)
105 uranium in each reactor with capacity of 1000 (again about 10,5% of capacity)
13,2 uranium in each reactor with capacity of 125 (and again about 10,5% of capacity)
The map is set to survival with realistic inventory size.
Sorters should not interfere, there are none in between the reactors.
Main Ship:
Heavy XPAR Reactors: 12
Medium XPAR Reactors: 24
Small Stock Reactors: 2
Each reactor has 1000 liter inventory space and some XPARs have upgrades.
Docked via Connectors:
2 small utility ships with 4 small stock reactors each.
2 small Fighters with 22 small stock reactors each.
These small reactors have 125 liter each.
LCD Output:
Resource exchanger. Blocks managed:
Reactors: 245, refineries: 71, oxygen gen.: 8, drills: 0, turrets: 12, cargo cont.: 0
Balancing reactors. Conveyor networks found: 1
Balancing conveyor network 1 group 1 "$Reactor|Generator"...
Inv. 1 vol: 0.000000; Inv. 2 vol: 0.125000; To move: 0.062500
Move 0.0625 l. from Small Reactor Fighter 16 to Small Reactor Fighter 7
Move 1201.923077 -> success
Inv. 1 vol: 0.000000; Inv. 2 vol: 0.125000; To move: 0.062500
Move 0.0625 l. from Small Reactor Fighter 14 to Small Reactor Fighter 8
Move 1201.923077 -> success
Inv. 1 vol: 0.000000; Inv. 2 vol: 0.125000; To move: 0.062500
Move 0.0625 l. from Small Reactor Fighter 14 to Small Reactor Fighter 10
Move 1201.923077 -> success
Inv. 1 vol: 0.000000; Inv. 2 vol: 0.125000; To move: 0.062500
Move 0.0625 l. from Small Reactor Fighter 17 to Small Reactor Fighter 3
Move 1201.923077 -> success
Inv. 1 vol: 0.000000; Inv. 2 vol: 0.125000; To move: 0.062500
I also noticed that all small reactors (large and small grid) don't get properly balanced.
The line "Reactors: 245, refineries: 71, oxygen gen.: 8, drills: 0, turrets: 12, cargo cont.: 0" shows how many blocks are really taken into account having regard to managed blocks group.
There should be exactly 90 reactors (12 + 24 + 2 + 2 * 4 + 2 * 22).
Can you write how you have set up managed blocks group in the script?
It's 10th line of the script. By default it's
"public const string MANAGED_BLOCKS_GROUP = null;"
And one more thing: are you sure about that there is only one instance of the script that affects the grid? Maybe you have another PB with TB on another connected ship?
Yes i am 100% certain that there is only one instance, the docked ships dont't even have PBs or TBs.
245 reactors on the outher hand sounds off to me, there are only the 90 reactors i wrote earlier.
Could XPARs upgrade system somehow cause that false readout?
Edit:
There could be deeper problems with that ship, i just copy/pasted it into a creative world to shrink the amount of mods.
Now the PB is telling me "Failed to compare two elements in the array"
I'm using duck typing to detect if a block is a reactor or not, so I can say that:
The script sees 245 blocks, each of which:
- belongs to group "Exchanger"
- implements IMyReactor interface
- is functional (complete and not damaged)
- uses conveyor system (has "Use conveyor system" enabled)
- has at least one inventory
Maybe try to disconnect some blocks and observe how the number of reactors varies? Using this method you should be able to detect which blocks are counted toward reactors. Only keep in mind that switching blocks on and off makes no difference, you have to switch "Use Conveyor System" to off in order to exclude a reactor without disassembling it.
Now it randomly fails on top of the balancing issues.
Please try to load my published map, i shrinked the modlist by a lot (hopefully enough).
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=462150205