Schall Minor Tweaks


Various minor tweaks that may improve gameplay. Options including modifying colour tone for logistics requester chest, character inventory size, grid size of various armours, free circuit wires, stack size of various fuels, player chat colour, research queue availability, scale of mining drills status light, and more... (Locale: English, Deutsch, 正體中文, 简体中文, Português Brasileiro)

Tweaks
3 years ago
0.17 - 1.1
7.47K

g [Responded] Mining mod logistic chest returns steel chest (Will not implement)

3 years ago

When the "Mining Result of Logistics Chests" tweak is enabled, mining a vanilla logistic chest (LC) looses little-to-nothing. In terms of iron ore used, a vanilla LC needs 45 to make while a steel chest uses 40. However, changing the result for a mod LC could be a lot worse. For example, a logistic warehouse "chest" from the popular Warehousing mod uses 1.1k iron ore to make and requires hours to craft (from raw).

I don't see a simple way of doing the same for mod LC. IIRC, you want very generic solutions that don't require you to peek around in other mods. Ideas: Give the user fair warnings. Add an option to only return steel chests if the mined entity is vanilla. (Or check to see if the mining results of any (vanilla or mod) LC is a vanilla LC, only replacing those results.) Or you could refuse to change the mining results of any mod LC to avoid users complaining.

Actually, now that I'm thinking of it, mods can change the ingredients of the vanilla LC. If they are made more expensive, you could get users complaining there too. You could check to see if the ingredients are normal before changing the mining results. And another option would be integration with your Uncraft mod to get all the ingredients back, though that seems contrary to the whole pint of the this tweak to simply one's inventory.

All-in-all, it seems the easiest option for you would be just to warn the user. If you want make some code changes, I'd be glad to test things. The pandemic has given me more free time (unfortunately).

3 years ago

For just vanilla logistic chests, I can do the changes with just two IF statements and one FOR loop (the inner IF condition can be skipped if not needing the debug log), as I do not have to distinguish them. The code can be kept very short and simple.
If having to distinguish modded chests, the code would be significantly more complicated. (Especially complicated when having to scan the ingredients. You know what I mean if you can read my code in Schall Uncraft.) That would be beyond the scope of this mod ("minor tweaks" only), thus it would not be included here. And as I myself do not have any other logistic chests in my game, it is especially not worth the effort.

I would not consider integration with Schall Uncraft neither. If "loseless" mining is that badly needed, then I assume such users should just disable this feature totally.

The default option can be the only thing I would change in the next version, so users will get back the identical item if no settings are changed. But this alone is too minor in warranting a new update, it will have to wait for other changes to bundle with.

3 years ago

I just looked at your Uncraft code and I see what you mean.

Side Question: I really dislike Lua. It's flexibility makes it too easy for me to make mistakes while trying to program in it. Do you have any tips or suggestions for me? For example, what IDE do you use?

3 years ago

Well, most (if not all) interpreted languages are like that. There is no compilation stage, so errors will pop up at runtime instead.
In contrast, if a game is using compiling languages in mods (e.g., Rimworld modders have to build mods as C# library), I would not even bother. Some syntax errors can be reported early during compilation, but still those mod-conflicting or game conflicting errors will only pop up after loading the game. So it does not really save time, in terms of mod language. (Actually drains time, considering having to compilation time every time even for tiny updates.) If Factorio mods were also requiring C# in modding, I think I would just give up.

Many (free) text editors support Lua.
Notepad++ is the most popular, though I like using Crimson Editor more.

Honestly, I love Lua quite much. Perhaps it is because I already know quite a lot of programming languages, where I do not have any problem in picking up Lua. Nowadays I make much fewer syntax mistakes than when I first learned programming, so I do not get much frustrations from them.

3 years ago

The default option can be the only thing I would change in the next version, so users will get back the identical item if no settings are changed. But this alone is too minor in warranting a new update, it will have to wait for other changes to bundle with.

Just to notify you:
This has been implemented to new versions released today.
However, it affects NEW users only (who have not installed this mod before), as it will not reset options of current users.

3 years ago

Thanks for the update.

New response