Page 3 of 5

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sat Aug 29, 2015 12:28 am
by Ranakastrasz
In the latest version, Accumulators refuse to feed each other, regardless of any priority thinggies I tested.
I am using a modified laser turret to consume power myself.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sat Aug 29, 2015 12:44 am
by Fatmice
Accus is hard coded to be tertiary in priority. Nothing you do will change that. It's recorded in the release notes.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sun Aug 30, 2015 2:02 am
by ZombieMooose
awesome idea, good job

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sun Dec 06, 2015 11:31 pm
by CodeRedAlert
Few issues, placed a Forcefield Emitter and got this. Error while running the event handler: __Force Fields__/control.lua:862: attempt to compare nil with number.
Also this one when I use a Force Field Tool on a Force Field Emitter. Error while running the event handler: __Force Fields__/control.lua:1395: LuaGameScript doesn't contain key get_localised_entity_name.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Mon Dec 07, 2015 9:36 am
by Rseding91
CodeRedAlert wrote:Few issues, placed a Forcefield Emitter and got this. Error while running the event handler: __Force Fields__/control.lua:862: attempt to compare nil with number.
Also this one when I use a Force Field Tool on a Force Field Emitter. Error while running the event handler: __Force Fields__/control.lua:1395: LuaGameScript doesn't contain key get_localised_entity_name.
I'll take a look at them and get them fixed :)

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Mon Dec 07, 2015 11:08 pm
by Ranakastrasz
You can use a dummy-laser to drain power without running into priority issues. Suppress it's attack in whichever way you want, set it's capacity really high, and remove the passive drain. I have one in my Modular Armor Revamp mod, which works that way.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Thu Dec 17, 2015 9:51 am
by AartBluestoke
CodeRedAlert wrote:Few issues, placed a Forcefield Emitter and got this. Error while running the event handler: __Force Fields__/control.lua:862: attempt to compare nil with number.
Also this one when I use a Force Field Tool on a Force Field Emitter. Error while running the event handler: __Force Fields__/control.lua:1395: LuaGameScript doesn't contain key get_localised_entity_name.
I'm also seeing this. (running the shadowMegaModpack, latest version), factorio is default english translation

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Fri Dec 18, 2015 9:04 pm
by Rseding91
AartBluestoke wrote:
CodeRedAlert wrote:Few issues, placed a Forcefield Emitter and got this. Error while running the event handler: __Force Fields__/control.lua:862: attempt to compare nil with number.
Also this one when I use a Force Field Tool on a Force Field Emitter. Error while running the event handler: __Force Fields__/control.lua:1395: LuaGameScript doesn't contain key get_localised_entity_name.
I'm also seeing this. (running the shadowMegaModpack, latest version), factorio is default english translation
I should have a fix out this weekend. I've had finals this past week so I haven't been able to put time towards this.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Wed Dec 30, 2015 9:16 am
by Rseding91
Ok, I fixed the error. Let me know if you have any other problems.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sun Jan 24, 2016 5:25 am
by aRatNamedSammy
got a bug , running 12.22, game started on 12.20.
bug force field.png
bug force field.png (441.79 KiB) Viewed 8536 times
mods used
factorio mods.JPG
factorio mods.JPG (54.83 KiB) Viewed 8536 times
Factorio mods.zip
(22.93 MiB) Downloaded 286 times
easy to repeat, just try to change anything on the forcefield, or remove it, it crash the game
Sammy-1220-mods2.zip
(32.8 MiB) Downloaded 323 times

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sun Jan 24, 2016 4:07 pm
by Shegar
aRatNamedSammy wrote:got a bug , running 12.22, game started on 12.20.
easy to repeat, just try to change anything on the forcefield, or remove it, it crash the game
Just fix it by youself, in "control.lua" (s.862) just wrap that compare in two checks:

Code: Select all

if field.health ~= nil then
	if forcefieldTypes[field.name]["maxHealth"] ~= nil then
		if field.health >= forcefieldTypes[field.name]["maxHealth"] then
			  table.remove(emitterTable["generating-fields"], k)
		end
	end
end
There is another bug - purple field will throw an exception when destroyed, but it can be fixed by removing

Code: Select all

deathEntity = "forcefield-death-damage"
in beginning of the same file. That removes main feature of purple fields, but prevent further exceptions.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Mon Jan 25, 2016 3:01 pm
by Rseding91
Shegar wrote:Just fix it by youself, in "control.lua" (s.862) just wrap that compare in two checks:

Code: Select all

if field.health ~= nil then
	if forcefieldTypes[field.name]["maxHealth"] ~= nil then
		if field.health >= forcefieldTypes[field.name]["maxHealth"] then
			  table.remove(emitterTable["generating-fields"], k)
		end
	end
end
That won't fix the real bug. That just suppresses it.
Shegar wrote: There is another bug - purple field will throw an exception when destroyed, but it can be fixed by removing

Code: Select all

deathEntity = "forcefield-death-damage"
in beginning of the same file. That removes main feature of purple fields, but prevent further exceptions.
I'll look into both of these and get them fixed hopefully tonight.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sat Feb 13, 2016 1:35 am
by Fundevin
Hey guys, since the author hasn't responded yet, I figured out what was causing the simple crashes. He forgot to include the max health value in the tables.

Here is a quick fix version.

Force Fields_1.0.4 crashfix

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Sat Feb 13, 2016 5:51 am
by Rseding91
Fundevin wrote:Hey guys, since the author hasn't responded yet, I figured out what was causing the simple crashes. He forgot to include the max health value in the tables.

Here is a quick fix version.

Force Fields_1.0.4 crashfix
They're meant to get populated automatically from the in-game values for those entities. Sorry about not updating this yet - I've been super busy recently.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Fri Feb 26, 2016 1:47 am
by Rseding91
Sorry about the long no-update. I fixed all of the outstanding issues.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Mon Mar 07, 2016 2:15 am
by vedrit
I'm getting an error in control.lua on line 788, attempting to index a nil value. I'm not entirely sure what's causing this to trigger in-game, as sometimes it'll happen as soon as I put down an emitter, sometime it won't happen for a few minutes afterwards.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Thu Mar 10, 2016 4:54 am
by douglasg14b
vedrit wrote:I'm getting an error in control.lua on line 788, attempting to index a nil value. I'm not entirely sure what's causing this to trigger in-game, as sometimes it'll happen as soon as I put down an emitter, sometime it won't happen for a few minutes afterwards.
Same, I'm also noticing that the original post has not been updated since 2014, has the file in the download link been updated?

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Thu Mar 10, 2016 7:06 am
by Rseding91
douglasg14b wrote:
vedrit wrote:I'm getting an error in control.lua on line 788, attempting to index a nil value. I'm not entirely sure what's causing this to trigger in-game, as sometimes it'll happen as soon as I put down an emitter, sometime it won't happen for a few minutes afterwards.
Same, I'm also noticing that the original post has not been updated since 2014, has the file in the download link been updated?
It has, I'm not sure why it doesn't show the correct edit date...

I believe I've fixed the error above and I've updated the download and version again.

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Thu Mar 10, 2016 9:05 am
by Yinan
Try changing some text in the first post as well (just add a space or something) in addition to changing the attachment. That should change it to the right date...

Re: [MOD 0.12.x] Force Fields - energy powered walls

Posted: Thu Mar 10, 2016 12:41 pm
by daniel34
Rseding91 wrote:I'm not sure why it doesn't show the correct edit date...
As moderator the edit date is only updated when you also add an edit reason. If you don't want a reason to be displayed, edit the post again and remove the reason.