Page 1 of 1

[0.12.x] Craft Faster

Posted: Mon Jul 27, 2015 2:47 pm
by MagicLegend
Airat9000 wrote:0.12 not work
I just made the Craft Faster mod 0.12 compatible. I wanted to use it (great reason, I know).

I'll poke somebody on this forum to move the topic to 0.12 compatible mods.

For now, DL:
http://bit.ly/GetCraftFaster (version 0.0.3)

Small changelog:
  • Updated the mod to 0.12 (duuh)
  • Added my name to the info.json for updating the mod
  • Added my name to the info.json to be the one to contact for 0.12+ support
  • Changed the version name to 0.0.3
Disclaimer:
I was not the one who made this mod. I have only updated the mod to 0.12+, without modifying the workings of the mod.
(Almost ;)) all the credit should go the the original author of the mod.


The port has been tested, and I can confirm it works.

If the author/forummods have questions, please send me an PM, and we'll figure it out :)

~ML

Re: [0.12.x] Craft Faster

Posted: Tue Aug 25, 2015 6:02 pm
by provet
Craft faster manually or with machines?

Re: [0.12.x] Craft Faster

Posted: Wed Aug 26, 2015 10:10 am
by MagicLegend
Manually.

Re: [0.12.x] Craft Faster

Posted: Mon Oct 19, 2015 3:06 am
by bushbaby1234
Hello. i just updated all of my mods and got this error upon loading my old world

__craftfaster__/control.lua:25: attempt to index global 'game' (a nil value)

i can include a copy of the world if you want/need

Re: [0.12.x] Craft Faster

Posted: Wed Nov 04, 2015 9:40 pm
by Grandirus
Hi.
I have got this to work (0.12.16) changed the "control.lua" to this:

Code: Select all

require("defines")

local ontick=defines.events.on_tick

function UpdateSpeeds()
	for _,f in pairs(game.forces) do
		if f.technologies["faster-crafting-5"].researched then
			f.manual_crafting_speed_modifier = 2
		elseif f.technologies["faster-crafting-4"].researched then
			f.manual_crafting_speed_modifier = 1.4
		elseif f.technologies["faster-crafting-3"].researched then
			f.manual_crafting_speed_modifier = 0.9
		elseif f.technologies["faster-crafting-2"].researched then
			f.manual_crafting_speed_modifier = 0.5
		elseif f.technologies["faster-crafting-1"].researched then
			f.manual_crafting_speed_modifier = 0.2
		else
			f.manual_crafting_speed_modifier = 0
		end
		--game.players[1].print(f.name..f.manual_crafting_speed_modifier)
	end
	script.on_event(ontick,nil)
end

script.on_init(UpdateSpeeds)
script.on_load(UpdateSpeeds)

function ticked()
	UpdateSpeeds()
end

script.on_event(defines.events.on_research_finished, function(event)
	script.on_event(ontick, ticked)
end)
I played the game, saved and quit. On load, the game give me an error (......(a nil value).....) on line 6. ( for _,f in pairs(game.forces) do)

Re: [0.12.x] Craft Faster

Posted: Fri Nov 06, 2015 8:08 am
by MagicLegend
Grandirus wrote:Hi.
I have got this to work (0.12.16) changed the "control.lua" to this:

Code: Select all

require("defines")

local ontick=defines.events.on_tick

function UpdateSpeeds()
	for _,f in pairs(game.forces) do
		if f.technologies["faster-crafting-5"].researched then
			f.manual_crafting_speed_modifier = 2
		elseif f.technologies["faster-crafting-4"].researched then
			f.manual_crafting_speed_modifier = 1.4
		elseif f.technologies["faster-crafting-3"].researched then
			f.manual_crafting_speed_modifier = 0.9
		elseif f.technologies["faster-crafting-2"].researched then
			f.manual_crafting_speed_modifier = 0.5
		elseif f.technologies["faster-crafting-1"].researched then
			f.manual_crafting_speed_modifier = 0.2
		else
			f.manual_crafting_speed_modifier = 0
		end
		--game.players[1].print(f.name..f.manual_crafting_speed_modifier)
	end
	script.on_event(ontick,nil)
end

script.on_init(UpdateSpeeds)
script.on_load(UpdateSpeeds)

function ticked()
	UpdateSpeeds()
end

script.on_event(defines.events.on_research_finished, function(event)
	script.on_event(ontick, ticked)
end)
I played the game, saved and quit. On load, the game give me an error (......(a nil value).....) on line 6. ( for _,f in pairs(game.forces) do)
Correct. I've made an github for this mod, so I can work more easily on it.

Re: [0.12.x] Craft Faster

Posted: Fri Nov 06, 2015 8:22 pm
by Grandirus
MagicLegend wrote:
Grandirus wrote:Hi.
I have got this to work (0.12.16) changed the "control.lua" to this:

Code: Select all

require("defines")

local ontick=defines.events.on_tick

function UpdateSpeeds()
	for _,f in pairs(game.forces) do
		if f.technologies["faster-crafting-5"].researched then
			f.manual_crafting_speed_modifier = 2
		elseif f.technologies["faster-crafting-4"].researched then
			f.manual_crafting_speed_modifier = 1.4
		elseif f.technologies["faster-crafting-3"].researched then
			f.manual_crafting_speed_modifier = 0.9
		elseif f.technologies["faster-crafting-2"].researched then
			f.manual_crafting_speed_modifier = 0.5
		elseif f.technologies["faster-crafting-1"].researched then
			f.manual_crafting_speed_modifier = 0.2
		else
			f.manual_crafting_speed_modifier = 0
		end
		--game.players[1].print(f.name..f.manual_crafting_speed_modifier)
	end
	script.on_event(ontick,nil)
end

script.on_init(UpdateSpeeds)
script.on_load(UpdateSpeeds)

function ticked()
	UpdateSpeeds()
end

script.on_event(defines.events.on_research_finished, function(event)
	script.on_event(ontick, ticked)
end)
I played the game, saved and quit. On load, the game give me an error (......(a nil value).....) on line 6. ( for _,f in pairs(game.forces) do)
Correct. I've made an github for this mod, so I can work more easily on it.
So, there is some repair to the Load issue?
I really liked this mod.

Re: [0.12.x] Craft Faster

Posted: Fri Nov 06, 2015 10:35 pm
by Klonan
Grandirus wrote:
MagicLegend wrote:
Grandirus wrote:Hi.
I have got this to work (0.12.16) changed the "control.lua" to this:

Code: Select all

require("defines")

local ontick=defines.events.on_tick

function UpdateSpeeds()
	for _,f in pairs(game.forces) do
		if f.technologies["faster-crafting-5"].researched then
			f.manual_crafting_speed_modifier = 2
		elseif f.technologies["faster-crafting-4"].researched then
			f.manual_crafting_speed_modifier = 1.4
		elseif f.technologies["faster-crafting-3"].researched then
			f.manual_crafting_speed_modifier = 0.9
		elseif f.technologies["faster-crafting-2"].researched then
			f.manual_crafting_speed_modifier = 0.5
		elseif f.technologies["faster-crafting-1"].researched then
			f.manual_crafting_speed_modifier = 0.2
		else
			f.manual_crafting_speed_modifier = 0
		end
		--game.players[1].print(f.name..f.manual_crafting_speed_modifier)
	end
	script.on_event(ontick,nil)
end

script.on_init(UpdateSpeeds)
script.on_load(UpdateSpeeds)

function ticked()
	UpdateSpeeds()
end

script.on_event(defines.events.on_research_finished, function(event)
	script.on_event(ontick, ticked)
end)
I played the game, saved and quit. On load, the game give me an error (......(a nil value).....) on line 6. ( for _,f in pairs(game.forces) do)
Correct. I've made an github for this mod, so I can work more easily on it.
So, there is some repair to the Load issue?
I really liked this mod.

Another mod calledCrafting Speed Research does the same thing and works in 0.12.11+

Re: [0.12.x] Craft Faster

Posted: Sat Nov 07, 2015 3:26 am
by Grandirus
Klonan wrote:
Grandirus wrote:
MagicLegend wrote:
Grandirus wrote:Hi.
I have got this to work (0.12.16) changed the "control.lua" to this:

Code: Select all

require("defines")

local ontick=defines.events.on_tick

function UpdateSpeeds()
	for _,f in pairs(game.forces) do
		if f.technologies["faster-crafting-5"].researched then
			f.manual_crafting_speed_modifier = 2
		elseif f.technologies["faster-crafting-4"].researched then
			f.manual_crafting_speed_modifier = 1.4
		elseif f.technologies["faster-crafting-3"].researched then
			f.manual_crafting_speed_modifier = 0.9
		elseif f.technologies["faster-crafting-2"].researched then
			f.manual_crafting_speed_modifier = 0.5
		elseif f.technologies["faster-crafting-1"].researched then
			f.manual_crafting_speed_modifier = 0.2
		else
			f.manual_crafting_speed_modifier = 0
		end
		--game.players[1].print(f.name..f.manual_crafting_speed_modifier)
	end
	script.on_event(ontick,nil)
end

script.on_init(UpdateSpeeds)
script.on_load(UpdateSpeeds)

function ticked()
	UpdateSpeeds()
end

script.on_event(defines.events.on_research_finished, function(event)
	script.on_event(ontick, ticked)
end)
I played the game, saved and quit. On load, the game give me an error (......(a nil value).....) on line 6. ( for _,f in pairs(game.forces) do)
Correct. I've made an github for this mod, so I can work more easily on it.
So, there is some repair to the Load issue?
I really liked this mod.

Another mod calledCrafting Speed Research does the same thing and works in 0.12.11+
Thanks, it works.