Krastorio 2 Wind Turbine


This is simple extraction of the wind turbine from Krastorio 2 (https://mods.factorio.com/mod/Krastorio2). All credits go to original mod developers and maintainers: raiguard, Krastor and Linver. Thank you guys for this beautiful mod in general and this tiny cute turbine in particular. Added settings for power generation level

Content
12 hours ago
1.1 - 2.0
6.68K
Power

g Update offer

19 hours ago

Greetings, your madness! I have been working on an update for this mod, which fixes various issues, while also providing some minor changes to balance. Would you like a copy of it? (Please say yes.)

18 hours ago

Hello,

I don't quite understand which issues such simple and straightforward mod could have. Could you please give more details about what you considered issues and which fixes you offer?

18 hours ago
(updated 18 hours ago)

Sure! This is my changelog as it currently looks (with an exclamation mark in front of the most important ones):


Version: 0.1.0
Date: 2025-01-09
Changes:
- Added Space Age DLC as optional dependency.
- Slightly reduced size of collision box for entity, making it easier to squeak through.
- Added impact category for entity.
Minor features:
- (!) Now uses floating point numbers as input in settings to allow for finer control of power
output (default: 20kW, range: 1-1000kW).
Balancing:
- (!) Added a condition for surface pressure so the turbine can't be built in space.
- Reduced mining time for entity (0.25 -> 0.15).
- Reduced production time for recipe (5 -> 3).
- Set weight of item to exactly 20kg, just in case recipe is ever changed.
Graphics:
- (!) Fixed code to once again use the high resolution graphics!
- Added dying explosion effect.
- Set same render priority for all graphics.
Gui:
- Entity tooltip now displays the entire object (won't work for ghosts).
- (!) Found a way to remove unneeded entry for power buffer content in entity tooltip.
Sounds:
- (!) Removed the high-pitched, rattling sound effect variation.
- Reduced volume and audible distance for the remaining sound effect.
- (!) Fixed issue with idle sound not working (removed "persistent" property).
- Simplified sound property structure and sound scaling method.
Info:
- Updated info.json and locales.
- Updated changelog to be readable in-game, with small additions and changes.
Internal:
- Rearranged code.


[Edit]: Corrected some errors.

18 hours ago

These changes look solid. Thank you for your work! I invited you into this mod as a collaborator. Not sure how it works, but I guess it's exactly for cases like this. Please accept an invitation and I will give you a permission if needed

18 hours ago

"Mod collaborators can edit the mod, publish releases, and moderate the discussion section" - this how it reads

18 hours ago

Thank you, I have not tried being a collaborator before, but I would be happy to accept that invitation! I am pretty sure that permissions can be given and taken back as needed. If you are okay with it, I will publish my release (probably the only thing I can do), so you can review it and change it as needed.

18 hours ago

I have accepted the invitation!

17 hours ago

All right, I have finished up my work and I am ready to publish the new version!

12 hours ago

Please feel free to update the mod. It should catch actual release notes from changelog automatically

12 hours ago

I have uploaded v1.1.0!

By the way, I discovered two more important issues, which I have addressed as well: There are some peculiar limitations with the "electric-energy-interface" prototype used for the wind turbine, which mean that the power output won't actually change according to settings for entities that have already been built, or according to their quality level. I could resolve this through runtime scripts, which should have no performance impact worth mentioning.

9 hours ago

To be honest I wouldn't change that. I'm a little afraid that there are already too many changes into this mod to be considered as "simple extraction" from K2. Let's not forget this is completely... ehem... borrowed stuff and I want to keep it as close to the original as possible

8 hours ago
(updated 8 hours ago)

Ah, I suppose, maybe. I think... you might be worrying about a non-issue. I am currently reading their license carefully in order to get an idea about, what the authors seem to be okay with. But this particular license honestly feels unusually obtuse to me. I will get back to you and share my opinion about that soon...

But I do want to point out that, in order for the mod to be configurable without error, and to work with the new feature of quality, I just don't think there is any way around increasing complexity by adding scripts to it. I find them more or less essential to the mods proper function. And honestly, the only thing you are truly "copying" are the graphics and sound assets. The rest can be easily recreated through very common patterns and really can't fairly be subjected to a license, in my humble opinion.

I promise to get back to it soon. You should feel comfortable with the mod that you maintain, and I want to respect that.

7 hours ago

Okay. This is what I have gathered from reading the GNU LGPL v3 license and explanations of it:

  • The license document itself must not be modified. (Check, I think.)
  • A clear reference to the original code must be made. (Check.)
  • Any software incorporating their software must make at least that part available under the same license. (Check.)
  • The extracted part may be modified as desired, if it falls within the scope of the license. (It all does, so check.)
  • Proprietary software (software that uses its own license) should include the original code as a distinct "library" that can be clearly identified for proper licensing. If mixed together, a perfect copy of the original code must also be supplied. (None of this is relevant, so check.)
  • "Combined works" sharing the same license only need to include the license, as well as make clear reference to the original software, and doesn't need to specify every part of the original code within the mod itself. (Check).

So I believe that you don't need to worry about "departing" too much from the source code with the current version of the mod. It seems very clear to me that the license allows it!

7 hours ago

I see. Okay, I guess that will do.

Also I checked the code, so in general, if I understand right, you check each particular turbine when it is placed and assign custom output power depending on its quality?

6 hours ago
(updated 6 hours ago)

All right!

As for the code, yes, that is correct. The electric energy interface prototype is kind of a cheat entity that can be configured through a gui with sliders (which has been mostly hidden) to supply or store any amount of energy. This means that the energy parameters defined in data.lua are merely treated as a default setting for the gui; the entity has whatever energy parameters the gui has currently been set to. Quality therefore cannot apply to said parameters, except through trickery that makes the calculations based on the default value and then changes those hidden sliders.

New response