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.
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.
hcg.gif (78.59 KiB) Viewed 7707 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.
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
If you have any comments/suggests/opinions about any part of the mod or the default config feel free to post them.
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Wed Jul 13, 2016 3:36 pm
by justarandomgeek
Can you post this to github as well for easier reference-viewing?
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Wed Jul 13, 2016 7:15 pm
by Daid
Useful if you make pumps require electricity, and thus you need to bootstrap your steam engines somehow
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Wed Jul 13, 2016 8:09 pm
by eradicator
justarandomgeek wrote:Can you post this to github as well for easier reference-viewing?
The code is now available on github.
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Thu Jun 01, 2017 6:57 pm
by ZombieMooose
Can you update for 0.15? Thanks
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Thu Jun 01, 2017 7:13 pm
by Ranakastrasz
Trivial update. Some mods, not so much. This one, just gotta fix the wrapper, declare it to be for V15.
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Thu Jun 01, 2017 7:31 pm
by ZombieMooose
Ranakastrasz wrote:Trivial update. Some mods, not so much. This one, just gotta fix the wrapper, declare it to be for V15.
Cheers
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Thu Aug 10, 2017 7:16 am
by eradicator
Hand Crank Generator has been properly updated for 15.33 including conversion to the not-so-new-anymore in-game mod settings interface. It's now easier than ever to customize it to your liking and/or needs ;)
@Ranakastrasz: Thanks for keeping things updated while i was away. (Didn't check the file tho, so hopefully you didn't secretly include w/e :P)
@diongham: Honestly didn't expect anyone to care for this anymore and haven't played in a long while.
Re: [MOD 0.13.6] Hand Crank Generator
Posted: Thu Aug 10, 2017 7:27 pm
by ZombieMooose
eradicator wrote:@diongham: Honestly didn't expect anyone to care for this anymore and haven't played in a long while.
I use AAI Industries and this gives me just enough power to get the offshore pump going for steam power.
Cheers.
Re: [MOD 0.16.12] Hand Crank Generator
Posted: Tue Jan 02, 2018 3:00 pm
by eradicator
Cranked out a 0.16 release. No new features tho (where there any requested ?)