Name: Hand Crank Generator
Description: Adds a small manual generator to the starting items.
License: CC-BY-NC-SA 4.0 (Factorio license applies to factorio assets)
Version: 16.12.01
Release: 2016-07-12
Tested-With-Factorio-Version: 0.16.12
Category: SimpleExtension
Tags: Hotkey, Localization, Example Mod
Languages: English, Deutsch, 日本語
Github: https://github.com/lossycrypt/HandCrankGenerator
Modportal: https://mods.factorio.com/mods/eradicat ... kGenerator
Download-Url:
- HandCrankGenerator_16.12.01.zip
- (412.72 KiB) Downloaded 201 times
License
License
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
https://creativecommons.org/licenses/by-nc-sa/4.0/
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
I cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
https://creativecommons.org/licenses/by-nc-sa/4.0/
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
I cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
NonCommercial — You may not use the material for commercial purposes.
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
Long description
Long description
This is a quick mod i made after a joke on the IRC channel and while i work on my bigger mod project.
It adds a small generator that you can manually charge by cranking (pressing the hotkey) while hovering the mouse over it (same as rotating objects works).
You only get one at the start of each map and it can only be placed down once.
This might be useful for low-tech modpacks or the similarly spirited.
By default it takes 15 seconds to fully crank and then provids 20kW of power for 5 minutes, but these values can easily be changed in the config (Update: Thanks to changes in factorios modding API all settings can now be changed in-game via options->mods).
This mod is also intended as a small example for new modders who wish to know how hotkeys and their localization works. For this purpose the source files have more comments than usual .
The HCG can also be connected to circuit networks. For example to use it as a manual count-down timer.
This is a quick mod i made after a joke on the IRC channel and while i work on my bigger mod project.
It adds a small generator that you can manually charge by cranking (pressing the hotkey) while hovering the mouse over it (same as rotating objects works).
You only get one at the start of each map and it can only be placed down once.
This might be useful for low-tech modpacks or the similarly spirited.
By default it takes 15 seconds to fully crank and then provids 20kW of power for 5 minutes, but these values can easily be changed in the config (Update: Thanks to changes in factorios modding API all settings can now be changed in-game via options->mods).
This mod is also intended as a small example for new modders who wish to know how hotkeys and their localization works. For this purpose the source files have more comments than usual .
The HCG can also be connected to circuit networks. For example to use it as a manual count-down timer.
Pictures
Pictures
I'm not an artist so this only includes a small quick-and-dirty model. I'm open to contributions by anyone who can do better.
I'm not an artist so this only includes a small quick-and-dirty model. I'm open to contributions by anyone who can do better.
- hcg.gif (78.59 KiB) Viewed 7565 times
Version history
Version history
16.12.01 (2018-01-02):
Added icon_size required by 0.16.x.
Updated info.json to 0.16.12.
15.33.04 (2017-08-16):
Fixed and renamed "Prefer generator in quickbar on startup." option to actually work.
For compatibility with other mods it defaults to off.
15.33.02 (2017-08-10):
Ported to Factorio version 0.15.33.
Ported settings from config.lua to settings.lua and made them in-game editable and updated localization accordingly.
Added setting to enable normal or easy crafting recipe.
Changed version numbering scheme to reflect compatible factorio versions closer.
1.0.4 (2016-07-14):
Fixed crash when attempting to crank entities without unit_number (ore, trees).
Some minor adjustments to hcg detection logic.
1.0.3 (2016-07-12):
The HCG can now be connected to circuits.
Slight tweaks to the localization.
Crank delay is now per generator.
1.0.2 (2016-07-12):
Fixed wrong version in info.json
1.0.1 (2016-07-12):
Updated some comments. No actual code changes.
1.0.0 (2016-07-12):
Initial feature complete totally bugfree release. YARLY.
16.12.01 (2018-01-02):
Added icon_size required by 0.16.x.
Updated info.json to 0.16.12.
15.33.04 (2017-08-16):
Fixed and renamed "Prefer generator in quickbar on startup." option to actually work.
For compatibility with other mods it defaults to off.
15.33.02 (2017-08-10):
Ported to Factorio version 0.15.33.
Ported settings from config.lua to settings.lua and made them in-game editable and updated localization accordingly.
Added setting to enable normal or easy crafting recipe.
Changed version numbering scheme to reflect compatible factorio versions closer.
1.0.4 (2016-07-14):
Fixed crash when attempting to crank entities without unit_number (ore, trees).
Some minor adjustments to hcg detection logic.
1.0.3 (2016-07-12):
The HCG can now be connected to circuits.
Slight tweaks to the localization.
Crank delay is now per generator.
1.0.2 (2016-07-12):
Fixed wrong version in info.json
1.0.1 (2016-07-12):
Updated some comments. No actual code changes.
1.0.0 (2016-07-12):
Initial feature complete totally bugfree release. YARLY.
Old Versions
Old Versions
- HandCrankGenerator_15.33.02.zip
- (412.12 KiB) Downloaded 208 times
- HandCrankGenerator_1.0.4.zip
- (410.91 KiB) Downloaded 247 times
- HandCrankGenerator_1.0.3.zip
- (410.61 KiB) Downloaded 224 times
- HandCrankGenerator_1.0.2.zip
- (490.59 KiB) Downloaded 215 times
- HandCrankGenerator_1.0.1.zip
- (490.6 KiB) Downloaded 198 times
- HandCrankGenerator_1.0.0.zip
- (490.33 KiB) Downloaded 218 times
Config
If you have any comments/suggests/opinions about any part of the mod or the default config feel free to post them.Default Config
run_time_in_seconds = 300 --how long it runs when fully cranked
run_time_per_crank_in_seconds = 10
crank_delay_in_ticks = 20 --how often you can crank it
power_output_in_watts = 20000
start_with_item_in_quickbar = true --if it should be in the quickbar or inventory
can_pick_up = false --if you want to move it again
game_speed = 1 --for people who don't play at default game.speed
run_time_in_seconds = 300 --how long it runs when fully cranked
run_time_per_crank_in_seconds = 10
crank_delay_in_ticks = 20 --how often you can crank it
power_output_in_watts = 20000
start_with_item_in_quickbar = true --if it should be in the quickbar or inventory
can_pick_up = false --if you want to move it again
game_speed = 1 --for people who don't play at default game.speed