Schall Tank Platoon


Adds different classes and tiers of tanks in-par with power armors, having vehicle equipment grid. Aims to fill the gaps the vanilla game should have. Not overhaul nor OP. Vanilla oriented and balanced. (Locale: English, Deutsch, 正體中文, 简体中文, Русский, Português Brasileiro, Español)

Content
6 months ago
0.16 - 1.1
32.1K
Transportation Combat

i [Pending] Auto-refill vehicle generators

3 years ago
(updated 3 years ago)

Using tank platoon with armoured trains

If you place a generator into a fluid wagon, inserters are unable to put fuel into the generators, thus making impossible to automatically recharge the generator (as it would with locomotives). And the problem gets worse with cargo wagons, since it would be difficult to know whether you want to insert fuel as cargo or as fuel.

Maybe you could make power shared by the whole train, so one could just put generators in the locomotive (which would justify the very high power output of 4x4 generator).
Maybe some rebalancing would be needed, eg. reduce equipment size of wagons

3 years ago
(updated 3 years ago)

It is not a trivial request indeed.
As the game does not allow insert fuel to generator equipment directly (of fluid wagon), I have no way to do this. The only alternative method in my mind is to load the fuel from inventory of the whole train (all carriages).
I could do something like my another mod Schall Gun Pod, which will reload all "pod" equipment on its carriages when a train reaches a station. Each pod equipment has a specific ammo (which is specified by its recipe), so my script knows easily what ammo item to look for.
When it comes to generator equipment, it is more tricky. For example, my "Fuel cells" can use wood, coal, solid fuel, rocket fuel, nuclear fuel, and any other modded fuel (e.g., the oil barrels with my another mod Schall Oil Fuel). Different players may prefer different fuel priorities:
- On fuel value order, I would prefer to put the fuel with least value (fuel value per item) to the generators, starting from wood, coal, solid fuel, etc. (As generators do not benefit from any speed bonus, I prefer those "better" fuel for locomotives and tanks.)
- On economic aspect, I would like to exclude coal (or at least lower priority than other fuels) as it can be used for liquefaction in refineries.
- With Schall Oil Fuel, I would prefer heavy oil barrel, light oil barrel, PG barrel, crude oil barrel, then the vanilla fuel. Oil barrels are preferred because oil never depletes in principle.
- With other fuel mods available, users may prefer (not) to use them for generators... And I cannot possibly know and arrange the priority order for all of them.
And to make the situation even more complex, my "Portable nuclear reactor" equipment also takes fuel, but from the nuclear fuel category (like vanilla uranium fuel cell). With my another mod Schall Alien Tech, I have introduced the particle fuel cell that has speed bonus but less fuel value (which is for nuclear locomotives and tanks MK3, definitely not for power generation). If following the "simplest" fuel value logic (wood, coal, solid fuel, ...), the equipment will consumes particle fuel cell first where I want to avoid. Again, not to say, there are other nuclear fuel from other mods (thorium fuel, MOX-fuel, ...).
I do not have a good solution to fulfill all of these... Perhaps it ends up I have to make a new GUI interface for users to hand-sort the auto fuel insertion priority order. Such solution would take much more time, so I would only consider it after the coming 1.0 release and all my 48 (!) mods update for that...

PS: Yes, I know fuel insertion is a headache. In my games, I only applied the non-fuel generators (portable fusion generators) on cargo and fluid wagons, and avoid putting personal laser defence on them. I put my gun pods (from Schall Gun Pod) on them instead.

Power sharing among carriages is doable but tricky. The best I can do is to transfer the energy between batteries of different carriages, and it requires presence of at least one battery in a carriage.
Maybe it also requires making a battery equipment into source/receiving variants. The source-variant battery is installed only on grid with power generators. The receiving-variant batteries will only take energy from the former of other carriages. Such splitting of variants is required, to prevent recursive energy transfer between batteries.
(Both variants works like their original battery, if not involving the sharing feature.)

If I can only work with one at a time, which of the above do you prefer first? Auto fuel insertion or power sharing?

Adjusting grid size is also tricky. As I prefer the grid size to be relative to that of its corresponding power armours. The armoured cargo and fluid wagons have -2, -2 to their reference.
The basic armoured cargo and fluid wagons have grid size 3×2, which are already very small.

3 years ago
(updated 3 years ago)

If I can only work with one at a time, which of the above do you prefer first? Auto fuel insertion or power sharing?

Well, thanks a lot for such consideration <3
You are the mod author so I suppose the choice is yours, you're already doing much!

Here is my preferred solution here: transfer equipment.

I believe that you could achieve all goals at once with the transfer equipments. And since they would be brand new items, you could explain everything with the tooltips, and maybe add several tiers of transfer equipments. You would need new graphics of course..
The way I see it,
- producers (take current from generator and transfer it to "local network") would have moderate current input and small to no current output (you should not use them as storage), large capacity (5x same tier battery, after all this power will not be used here) and size 2x2
- consumers should have zero current input and low current output (this way you would still need local batteries), large battery capacity (no need to run the script too often, and the limiting factor is troughput, not capacity) , size 1x1
- transfer script would transfer all available power evenly from all producers to all recievers. You could add efficiency to justify several tiers. It would be very acceptable (for balance and folklore) that efficiency is as low as 40%
- user should use only one producer unless they expect very high consumption.
- user should add more actual generators and consumers to scale the system

PROs:
- easy to understand (via tooltips)
- nice new mechanism, both fun and efficient
- vanilla and mod friendly
- full control to the user without too much hassle
- easy scripting, just needs some balancing
CONs:
- the user still needs to craft and insert equipments manually. This is manageable :)
- need new icons

3 years ago

I believe tat fuel insertion is indeed a headache, both to newcomers and to automation. A few ideas to overcome this (I don't know much about what the API actually allows)

(A1) Either consume power directly from the locomotive (if possible from the API), or just auto-transfer fuel from the locomotive to the generator, using the same priority as the locomotive (this way if a mod wants to change priority, the logic would be transferred).

(A2) Another way around would be: the generator inherits battery, with a script that removes fuel from the train to charge the battery (whenever battery power is low). That would need a battery with dynamic size of 2 fuel units.

PROS: ease of use, automation/inserters, more story-friendly (think of just a hybrid car)
CON: no way to use power fuel for the train and wood for the generator, no way to use nuclear for one and chemical for the other

(B) The load directly from the train cargo would be interesting, but to be user friendly, you should add a few filter slots in the cargo, with generic filter (burnable, or nuclear in/out, if teh API allow it), add/remove the filters whenever the equipment changes, manage the conflicts with other filters (or maybe count the filtered slots as on top of the wagon capacity). And add tooltips so that people understand what those damn filters are. And then the user would have to use circuitry or more filters to prevent loading too much fuel and unloading fuel instead of cargo. Sounds like a headache

PROS: elegant, newbie-friendly, automatable
CONS: extra circuits needed. Also, I imagine you during debug session!

(C) transfer equipment, see above post

(D1) Another option would be to change the locomotive and wagons directy, add "whenever both have batteries, transfer power every second from loco to wagons, or balance evenly).
PRO: simple usage, works straight out of the blueprint
CON: hard to explain that nothing works wihout batteries (see D2), break compatibility with lots of other mods, wagons could

(D2) Maybe you could add one free battery to every train item. As in: add an extra property "stored/shared energy" to vehicle class (and associated display). Then script all vehicles to share evenly the total with other attached vehicles.
That would change the game though

PRO: works out of the box
CON: would break other mods, need to rebalance this capacity (taking all possible tiers from all mods into account), not sure it would be easy to transfer power to/from it without heavy scripting

3 years ago

I have to thank you for the idea too. These would certainly be useful and helpful features, basically changing the train carriage management in a good way. I myself will find it very helpful too.
Say, we can have some "power car" that have all the generators and energy source equipment in the middle of a train (which is better protected); while saving up some precious grid space in the front locomotives/wagons, to put extra power-hungry energy shields. That would be a killer armoured train!

I am interested in both features, so eventually I will implement both. I guess I will implement power sharing first.
However, that will give way to the 1.0 release, as updating all my mods for coming 1.0 version is the utmost priority.

Now let us discuss the details.
For the energy source/provider and receiver/requester equipment:
I prefer not to create totally new items, but just detect-clone-modify existing battery equipment to the two variants.
PROs:
- No need to design new items.
- No need to balance the new items. (As they can be too underpowered/overpowered when coming to other mods.)
- No need to make new graphics. (Maybe just add a subicon to corner, and changing the background of equipment, to indicate its role/variant.)
- Auto-balanced and support to vanilla and most (if not all) mods.
- Easy to use. (As the users do not need to learn new terms or mechanics, if they already know how the vanilla logistic chests work.)

For the producer equipment you have mentioned, from your text I assume you mean them to be generator equipment, right?
Unfortunately, I do not see how I can transfer its power directly to whatever equipment, at least from my modding experience or the current equipment API. The equipment energy property does NOT exist in generator equipment. The vanilla game transfer the energy from them (say portable fusion reactor) directly to other equipment, but modders have no way to access it.
The best I can do is to "steal" energy from battery equipment, just like what I did to Schall Recharging Weapon. Such approach leads me to the above "energy source/provider and receiver/requester equipment" concept.

For the auto fuel insertion:
As mentioned by previous post, I want to separate locomotive fuel source from power generator fuel source, as they have fairly different preference in the fuel quality.
A1/ So is not an option for me. I do not want my vehicle fuel cells to be taking away the precious rocket fuel. Coal or solid fuel is well enough for them.
A2/ Same as A1.
B/ Somewhat close to what I like. But requiring users to set filter slots in train cargo inventory is troublesome, and bad for automation or game with lots of trains. See my below proposal E...
C/ As mentioned above, direct energy extraction from generator equipment is not possible.
D1, D2/ Sounds like what the above "energy source/provider and receiver/requester equipment" concept is already proposing?
E/ Here is my new proposal. Maybe I can make a small GUI for each category of fuel. (Say, "chemical" for my vehicle fuel cells, or "nuclear" for my portable nuclear reactor equipment.) This allow users to adjust the priority order of fuel to feed into these generator equipment. Then I can implement the "fuel insert" code as mentioned in the last post, just like what I did to Schall Gun Pod.

3 years ago
(updated 3 years ago)

Ooops sorry if I haven't been clear! I was keeping your idea of using batteries as a way of transferring between wagons

For the producer equipment you have mentioned, from your text I assume you mean them to be generator equipment, right?

By "producer" I meant the battery/transmitter equipment that stores energy from the wagon/loco with generator and transfers it to the "local network" or more specifically to the "consumer" (battery that receives electric energy from the train network).
I just realized you already called them source/receiving variants
In other words, power goes : generator (in loco) -> producer/source (inherits battery) -> script -> consumer/receiving(s) (inherit battery) (in wagons) -> shields/laser-defense/...

  • No need to balance the new items. (As they can be too underpowered/overpowered when coming to other mods.)

I believe you should at least prevent the source/producer battery (first equipment you add with energy transfer mod) from reinjecting power like normal batteries do, it would make it overpowered compared to normal batteries (even if more expensive).
I also like the idea of having some energy lost in the transfer process (using energy transfer would save space but waste power).
Other tweaks are less important (see 3rd post), but could also be applied relatively to base battery; to keep compatible with whatever changes the game/mods call in. example: (pseudocode)

foreach AllBatteriesFromBaseAndOtherMods as battery
  producer = battery.deepcopy()
  producer.outputRate = 0
  producer.capacity = battery.capacity * 5
  ...
  consumer = battery.deepcopy()
  consumer.outputRate = battery.outputRate / 4
  ...
  data.extend({producer, consumer})
endfor
  • No need to make new graphics. (Maybe just add a subicon to corner, and changing the background of equipment, to indicate its role/variant.)

I originally thought of just changing the color of the battery; but this would be very unfriendly to other mods. So:
- If they still function as battery (ie. if you don't implement the changes above), a battery with an arrow symbol up or down would do the trick
- If they don't provide the basic function of the battery (store energy for later), then it really should use another icon, or the player would be confused.

As for the different propositions:

A1 and A2 (eat fuel from the loco itself) are out

B (take it directly from the inventory):
- Problem: locomotives have no inventory. You probably wouldn't want to add one just for that (there would be lots of issues)
- If you use filters in the inventory for fuel, the user should not need to set them by hand. Instead the mod should add/remove/order them (within the inventory or as extra slots) when you add/remove equipments. Also I don't know if the game API would allow you to create filters for "any kind of burnable fuel"
- There is still the problem of loading too much fuel and filling the useful inventory slots with fuel

C is the "transferring battery to battery" above, with two new versions of battery added by the mod, that I (misleadingly) called producer and consumer

D1 and D2 were the same idea of transferring between wagons, but without adding new battery-like items, but instead by modifying the locomotive and wagon prototypes (you're already doing this by adding an equipment grid)
- D1: whenever train has batteries in more than one wagon, automagically level charge between batteries
- D2: add a sored-energy property directly to the wagon and loco prototypes, and auto-level them. This would more or less count as a free battery (that takes no slot in the grid). As I understand your last post, the API does not permit that

E (adding a priority GUI): Where would you put the GUI: a button on each fuel-generator? as a small button in topleft screen corner? Would all generators use the same priority? You're entering a lot of usability questions here, and it would add a lot of complexity: I'm no big fan of this solution

F (new idea, maybe foolish): what if you added an entity rolling just in front of wagons/locos that would represent the generator equipment(s), that you could fill with separate inserters? These would use the "free space" between wagons
Of course, there would be lots of graphical/integration work, but that would solve all selection and automation issues, and I don't know of any mods that would break.
A small schema below to be clear: inserters would insert random cargo (.) into cargo wagons, rocket fuel (r) into the loco and coal (c) in generator entities

(W Wagon, L Loco, - empty rail, ^ inserter)
Vanilla train :

----WWWWWW-WWWWWW-LLLLLL-----
    ^^^^^^ ^^^^^^  ^
    ...... ......  r

Modded train, with generators in every wagon/loco grid, g is the Generator entity:

----WWWWWWgWWWWWWgLLLLLLg----
    ^^^^^^^^^^^^^^ ^    ^ 
    ......c......c r    c

So, in a general:
- I like a lot the idea of specific batteries that transfer between wagons, but you should be careful to not make them overpowered. This could make a standalone mod, not necessarily related to your trains mod (other mods also do this)
- Auto filling the fuel generators is a must, and no good solution found yet, need further thinking

New response