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

Topics and discussion about specific mods
Shegar
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Jan 25, 2015 11:30 am
Contact:

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

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Fundevin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue May 13, 2014 10:41 pm
Contact:

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

Post 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
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Sorry about the long no-update. I fixed all of the outstanding issues.
If you want to get ahold of me I'm almost always on Discord.
vedrit
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Aug 03, 2014 2:25 am
Contact:

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

Post 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.
douglasg14b
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 05, 2016 8:41 am
Contact:

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

Post 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?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Yinan
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sun Feb 14, 2016 2:40 pm
Contact:

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

Post 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...
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

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

Post 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.
quick links: log file | graphical issues | wiki
Yinan
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sun Feb 14, 2016 2:40 pm
Contact:

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

Post by Yinan »

Does the power usage increase/decrease depending on the settings of the emitter?
i.e. does a larger wall consume more energy than a smaller wall?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Yinan wrote:Does the power usage increase/decrease depending on the settings of the emitter?
i.e. does a larger wall consume more energy than a smaller wall?
Only in that more walls are build. The % cost per wall is the same.
If you want to get ahold of me I'm almost always on Discord.
Requia
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Thu Mar 24, 2016 12:24 am
Contact:

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

Post by Requia »

I request the ability t emit curved sections of walls. Straight walls either leave a section that's out of range or the turrets, or segments that are in range of spitters, who will then ignore the walls in favor of attacking the turrets, making the walls rather pointless.
User avatar
JoneKone
Inserter
Inserter
Posts: 24
Joined: Tue Apr 12, 2016 10:56 pm
Contact:

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

Post by JoneKone »

Hi this is kinda unrelated to the mod it self.. i just would like to know how to get that FPS/UPS info from my factorio game to the screen as indicated in the Screenshot :)
Me be singing all away.
Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

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

Post by Supercheese »

JoneKone wrote:Hi this is kinda unrelated to the mod it self.. i just would like to know how to get that FPS/UPS info from my factorio game to the screen as indicated in the Screenshot :)
Press F4 -> "Always" tab -> Show FPS

(https://wiki.factorio.com/index.php?title=Debug_mode)
User avatar
Devious Null
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 22, 2016 9:06 pm
Contact:

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

Post by Devious Null »

Firstly, thank you for your work on this mod.

I'd like to include your mod in a modpack I'm working on, but I can't seem to find a licence anywhere. Would you mind clarifying whether I have permission to redistribute (and possibly modify) this mod?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Devious Null wrote:Firstly, thank you for your work on this mod.

I'd like to include your mod in a modpack I'm working on, but I can't seem to find a licence anywhere. Would you mind clarifying whether I have permission to redistribute (and possibly modify) this mod?
That's fine.
If you want to get ahold of me I'm almost always on Discord.
pyroinfernia
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Apr 12, 2016 6:35 am
Contact:

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

Post by pyroinfernia »

First I'd like to thank you for this mod. It is absolutely brilliant!
I did want to mention one bug I just found that crashed my game though.

When using the deconstruction planner to remove the Forcefield Emitter, I get:
Error while running the event handler: __Force Fields__/control.lua:261: LuaEntity API call when LuaEntity was invalid.

I did some testing with it, and more specifically it seems to occur when there is not enough room on the ground to drop the
advanced circuit/processing unit entities on the ground. I was able to reproduce the error on another forcefield emitter by
simply putting down 2 tiles thick of belt around the emitter and then using the deconstruction planner. I hope that information helps out!
Rseding91
Factorio Staff
Factorio Staff
Posts: 14341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

pyroinfernia wrote:First I'd like to thank you for this mod. It is absolutely brilliant!
I did want to mention one bug I just found that crashed my game though.

When using the deconstruction planner to remove the Forcefield Emitter, I get:
Error while running the event handler: __Force Fields__/control.lua:261: LuaEntity API call when LuaEntity was invalid.

I did some testing with it, and more specifically it seems to occur when there is not enough room on the ground to drop the
advanced circuit/processing unit entities on the ground. I was able to reproduce the error on another forcefield emitter by
simply putting down 2 tiles thick of belt around the emitter and then using the deconstruction planner. I hope that information helps out!
Ah I know what's happening :) it puts the item down but then the belt sucks up the item and it's no longer valid after being put down. It normally marks the item for deconstruction after putting it down. I'll fix it.
If you want to get ahold of me I'm almost always on Discord.
crazykid33
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Apr 05, 2016 1:41 am
Contact:

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

Post by crazykid33 »

Whenever I try to remove a forcefield (not touching it with my player) I die almost instantly and then my game crashes after that.
Heres a log file when it happened:

0.001 2016-04-27 17:36:01; Factorio 0.12.29 (Build 17931, win64, steam)
0.001 Operating system: Windows 10
0.001 Program arguments: "C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe"
0.001 Read data path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/data
0.001 Write data path: C:/Users/Luke/AppData/Roaming/Factorio
0.001 Binaries path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/bin
0.012 Graphics options: [FullScreen: true] [VSync: true] [UIScale: 100%] [MultiSampling: OFF] [Graphics quality: normal] [Video memory usage: high] [Light scale: 100%] [Screen: 255]
0.014 Available display adapters: 2
0.014 [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 770 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
0.014 [1]: \\.\DISPLAY2 - NVIDIA GeForce GTX 770 {0x01, [1920,0], 1440x900, 32bit, 60Hz}
0.014 Create display on adapter 0. Size 1280x720 at position [310, 162].
0.069 Initialised Direct3D:[0] NVIDIA GeForce GTX 770; driver: nvd3dumx.dll 10.18.13.6472
0.097 Desktop composition is active.
0.131 Loading mod core 0.0.0 (data.lua)
0.133 Loading mod base 0.12.29 (data.lua)
0.185 Loading mod AfraidOfTheDark 1.0.1 (data.lua)
0.304 Loading mod BetterIcons 1.0.0 (data.lua)
0.354 Loading mod Better_Beacon 1.0.0 (data.lua)
0.387 Loading mod Electric Furnaces 1.3.3 (data.lua)
0.424 Loading mod Electricity_XyLe 1.0.0 (data.lua)
0.523 Loading mod Force Fields 1.0.6 (data.lua)
0.560 Loading mod KS_Power 0.1.1 (data.lua)
0.598 Loading mod Larger Inventory 1.0.0 (data.lua)
0.643 Loading mod MiningTools 1.0.6 (data.lua)
0.743 Loading mod WallCraft 0.0.2 (data.lua)
0.787 Loading mod Warehousing 0.0.8 (data.lua)
0.844 Loading mod rso-mod 1.5.1 (data-updates.lua)
1.395 Initial atlas bitmap size is 16384
1.397 Created atlas bitmap 16384x5816
19.041 Sprites loaded
19.261 Loading sounds...
22.252 Factorio initialised
86.936 Info Scenario.cpp:124: Map version 0.12.29-0
113.316 Info Scenario.cpp:124: Map version 0.12.29-0
898.313 Info Scenario.cpp:124: Map version 0.12.29-0
1961.499 Loading map C:/Users\Luke\AppData\Roaming\Factorio\saves\_autosave3.zip
1961.518 Info Scenario.cpp:124: Map version 0.12.29-0
2018.857 Error CrashHandler.cpp:105: Exception Code: c0000005, Address: 00007FF701A10419
2018.857 Error CrashHandler.cpp:115: Exception Context:
rax=0000000000000000, rbx=0000024d6d1ad730, rcx=0000000000000001,
rdx=0000000000000000, rsi=0000000000000002, rdi=0000024d6d1ad730,
rip=00007ff701a10419, rsp=0000008b2760efd0, rbp=0000008b2760f060,
r8=000000000000001b, r9=0000024d292c8c90, r10=0000000000000406,
r11=00000000000036d7, r12=000000000000ee49, r13=0000008b2639f240,
r14=0000024d6d1ad730, r15=0000024d6d1ad859
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-vbn8ul\libraries\stackwalker\stackwalker.cpp (923): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-vbn8ul\src\util\logger.cpp (306): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-vbn8ul\src\util\logger.cpp (360): Logger::logStacktrace
c:\cygwin64\tmp\factorio-vbn8ul\src\util\crashhandler.cpp (84): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-vbn8ul\src\util\crashhandler.cpp (125): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF34AE7E1E)
00007FFF34AE7E1E (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF383DD998)
00007FFF383DD998 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF383C5B26)
00007FFF383C5B26 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF383D9AED)
00007FFF383D9AED (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF38364FE9)
00007FFF38364FE9 (ntdll): (filename not available): RtlImageNtHeaderEx
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF383D8BFA)
00007FFF383D8BFA (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-vbn8ul\src\entity\entitywithforce.cpp (32): EntityWithForce::forceReRegistration
c:\cygwin64\tmp\factorio-vbn8ul\src\entity\character.cpp (1966): Character::changePosition
c:\cygwin64\tmp\factorio-vbn8ul\src\entity\character.cpp (492): Character::update
c:\cygwin64\tmp\factorio-vbn8ul\src\surface\chunk.cpp (441): Chunk::update
c:\cygwin64\tmp\factorio-vbn8ul\src\surface\surface.cpp (826): Surface::update
c:\cygwin64\tmp\factorio-vbn8ul\src\map\map.cpp (919): Map::update
c:\cygwin64\tmp\factorio-vbn8ul\src\game.cpp (144): Game::update
c:\cygwin64\tmp\factorio-vbn8ul\src\scenario\scenario.cpp (721): Scenario::update
c:\cygwin64\tmp\factorio-vbn8ul\src\mainloop.cpp (263): MainLoop::gameUpdateStep
c:\cygwin64\tmp\factorio-vbn8ul\src\mainloop.cpp (369): MainLoop::updateLoop
c:\boost_1_58_0\boost\function\function_template.hpp (160): boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,void (__cdecl*)(ThreadBarrier * __ptr64,boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64,boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64,bool * __ptr64,bool),boost::_bi::list5<boost::_bi::value<ThreadBarrier * __ptr64>,boost::_bi::value<boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64>,boost::_bi::value<boost::chrono::time_point<boost::chrono::steady_clock,boost::chrono::duration<__int64,boost::ratio<1,1000000000> > > * __ptr64>,boost::_bi::value<bool * __ptr64>,boost::_bi::value<bool> > >,void>::invoke
c:\cygwin64\tmp\factorio-vbn8ul\src\util\thread.cpp (34): Thread::loop
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FF7016AF883)
00007FF7016AF883 (Factorio): (filename not available): boost::`anonymous namespace'::thread_start_function
f:\dd\vctools\crt\crtw32\startup\threadex.c (376): _
Post Reply

Return to “Mods”