Krastorio 2 Wind Turbine deprecated


[DEPRECATED] Use https://mods.factorio.com/mod/k2-wind-turbine-zars-fork

Content
3 months ago
1.1 - 2.0
7.51K
Power

g Update offer

3 months 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.)

3 months 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?

3 months ago
(updated 3 months 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.

3 months 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

3 months ago

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

3 months 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.

3 months ago

I have accepted the invitation!

3 months ago

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

3 months ago

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

3 months 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.

3 months 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

3 months ago
(updated 3 months 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.

3 months 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!

3 months 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?

3 months ago
(updated 3 months 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.

3 months ago

If it is all right with you, I would like to also update the mod info page, for the sake of consistency.

3 months ago

Ready to upload v0.1.1, in which power output of the turbine correlates with solar intensity of the surface it is built on. This should be quite realistic, and it also seems balanced to me.

3 months ago

I'm not against changing the description, it is made quite poorly from my side.

I'm not sure about solar intensity change, I don't like how it sounds

3 months ago

Okay, thanks. I will make a backup copy of the description on my end before replacing it.

As for adapting to solar intensity: Although it is much more realistic and balanced in my view, it is admittedly a highly significant change, so I understand if you don't feel too sure about it.

Just to clarify: I am not talking about variation throughout the day, but merely ensuring parity between solar and wind power on all planets, 1) for the sake of balance, and 2) because they realistically rely on the same energy source (sunlight, and virtually nothing else). The potential of wind power is slightly negatively correlated with that of solar power, so just making them directly proportional seems sensible to me.

I might be able to make it an optional feature, though! There are some finicky details with the runtime stage, but I think it should be doable.

3 months ago

It solely depends on how you gonna implement this. If "wind power" is simply a factor of solar activity say almost insignificant sun on Aquillo makes wind power insignificant either. then I don't like this change. I'd prefer opposite relation - the less power you can get from sun the more you can get from wind

3 months ago
(updated 3 months ago)

Yeah, it makes sense that you would want the wind power to be generally complementary and expand the player's options, and not be restricted in almost the same way as solar power on extremely cold planets. But it just isn't realistic, especially not an opposite relationship. I, for one, don't mind that challenge on Aquilo. Making wind power vary daily in a way somewhat opposite to solar power is actually reasonable, but that is a different topic...

I have already considered another idea, which is to create a compromise where the contribution of energy from the planet's core to its weather is always assumed to be large (even though the core of a planet may be cold...), so that wind power would in practice never fall under a certain threshold, say, 10%, even on the coldest planets. (This could likely be made configurable too, by the way.)

Thank you for discussing the topic with me, and let me know if you need a break from my suggestions!

3 months ago

Just uploaded a new version (0.1.1) by the way! It does not correct for surface solar power, but contains various other fixes/improvements.

3 months ago

Ready to upload v0.1.2 with a fix for the entity remnant graphics, as well as the English and Russian locales. I could include the Brazilian-Portuguese translation while I am at it!

3 months ago

Yes, please. BR translation was supplied in neighbor topic

3 months ago

Done! Fixed an omission and made a small addition as well (carefully, using DeepL), to fit the latest version.

2 months ago

Hi again. Here, have a lengthy post!

I would like to make another push for at least the option to make wind power directly correlate with the "solar power" attribute of a planet. It's a simple change that fits well with the intended balance and progression of the game, and it's realistic. The wind turbines are already valuable, because they are an easy-to-make, uninterruptible source of power, unlike solar panels. I don't think they need to be anything more than that (and they weren't, before Space Age). As an upside, they would perform really well on Vulcanus.

Regarding realism:

  • Solar irradiance: As mentioned before, wind on a planet's surface almost exclusively derives from the sunlight it receives, so it makes sense for solar and wind power to be highly correlated with each other.
  • Core heat: If there is any contribution of heat energy from radioactive decay in a planet's core to its surface weather, it will be negligible. On Earth (which has a molten core), it is about 0.03%!
  • Greenhouse effect: Even if a planet with lower solar irradiance happens to have a stronger greenhouse effect (this could reasonably be assumed for Gleba with its lush environments), the potential of wind power would remain low, because of the much more uniform distribution of heat from the equator to the poles. Lower temperature differential = less wind = less power conversion.

I would go even further and argue that the wind turbines should not be usable on Aquilo at all:

  • Freezing: Since the wind turbines are mechanical structures, they should freeze over on Aquilo according to the game's own logic, since the heating requirement would plausibly be much greater than the power generated from them. (Real life turbines freeze over at about -30°C.)

...but pushing such a change feels less important to me. I just wanted to mention it.

So anyway, I believe that wind and solar should be proportional to each other. I hope you will think it over! (At least the option for it...)

2 months ago

Hello,

Please publish this mod under your account, I will deprecate this one and attribute a link to your version which you could develop and fill with functions and tweak to your soul liking.

Current version does not feel like "simple extraction" by no means and does not meet my initial vision

2 months ago

Ah, ok. Thank you for making the suggestion, I suppose I wouldn't mind creating a fork of the mod. But really, I didn't have any new features in mind per se, I just wanted to refine the mod, rather than add another one to the Portal and "compete" with yours. I am sorry if I have caused you trouble!

2 months ago

It won't be a competitor, I'm going to deprecate this mod.

You do not have any new ideas YET and then what? When you hit another one you're going to seek my approval again? I see that modding is your passion and you actually did quite a research to convince me in something that I didn't like initially so I guess it's going to happen again and again, so no harm for me simply giving this mod to you and freeing myself from arguments or judgments on new features.

2 months ago

... Yeah, that's a good point, it has quickly ended up like that. Fine, I am going to fork it and change it as my heart directs me to! Thank you for being cool about it, and I am grateful for the trust you showed in letting me contribute to your mod. Cheers!

2 months ago

Ah, I see you have already deprecated the mod. Anyway, thank you for linking to my version of it.

New response