Page 3 of 4

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Fri Apr 10, 2015 6:09 pm
by aRatNamedSammy
kovarex wrote:I stick it, just because I thing this is super useful and something we would eventually want to have even in the vanilla.
:mrgreen: woohoo :D

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Fri Apr 10, 2015 6:15 pm
by aRatNamedSammy
opps..got a bug
on a fresh start

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Fri Apr 10, 2015 9:19 pm
by MasterBuilder
aRatNamedSammy wrote:opps..got a bug
on a fresh start
Just do a find & replace in control.lua
Replace:

Code: Select all

.getitemstack(1)
With:

Code: Select all

[1]
This has bee known about for quite a while and there are numerous posts about it in the thread already.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sat Apr 11, 2015 1:42 am
by JamesOFarrell
MasterBuilder wrote: Just do a find & replace in control.lua
This change has been made and the first post updated.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sat Apr 11, 2015 12:47 pm
by quinor
What bug is causing desync in MP while using pocket bots? Is it factorio bug or rather mod one?

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sat Apr 11, 2015 1:15 pm
by FishSandwich
psorek wrote:What bug is causing desync in MP while using pocket bots? Is it factorio bug or rather mod one?
Desync's are always factorio bug.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sun Apr 12, 2015 1:45 am
by Rseding91
FishSandwich wrote:
psorek wrote:What bug is causing desync in MP while using pocket bots? Is it factorio bug or rather mod one?
Desync's are always factorio bug.
Not always, it's very easy to use local variables and cause desyncs with a mod.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sun Apr 12, 2015 10:03 am
by FishSandwich
Yeah.. And if the factorio client handled it correctly it wouldn't desync right?

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Mon Apr 13, 2015 12:13 am
by Degraine
You overestimate the ability of the game to deal with modders' bad code.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Mon Apr 13, 2015 12:50 am
by SHiRKiT
Degraine wrote:You overestimate the ability of the game to deal with modders' bad code.
You can't ask the game to not desync when you are trying to break things.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Wed Apr 15, 2015 12:58 am
by Ohz
Sounds like an awesome way to harvest trees. The auto repair feature seems also amazing !

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Apr 16, 2015 5:08 am
by JamesOFarrell
psorek wrote:What bug is causing desync in MP while using pocket bots? Is it factorio bug or rather mod one?
Definitely a bug in the mods code. This code was written when non-indexed LUA list loading were non-deterministic so I added a bunch of hacks to work around this, these hacks cause the desync. That was as close as I could get it to work in MP as every list I use is non-indexed. Since this mod release the Factorio devs have changed the LUA code to make make the loading of non-indexed lists to be deterministic (At least i think they have) so it should work without the hacks I put in place but I have not gone back to fix my mod. I am not willing to fix MP bugs until it officially goes stable as I wasted hours every weekend to keep up with the experimental updates only to have the whole thing to break again in strange ways for the next patch.
Degraine wrote:You overestimate the ability of the game to deal with modders' bad code.
While my code is bad it was written this way to work around MP bugs from an very early versions of 0.11.x so you could say that the bugs in Factorio caused some (NOT all) of the bad code. That said it is my understanding that they have fixed most of these bugs but I have not fixed the mod since then. Testing MP desync issues took all the fun out of modding Factorio for me so I stopped doing it. If you want to patch PocketBots to work with MP I'll update the first post with your version

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Apr 16, 2015 10:07 pm
by ssilk
Things you won't to know: what do we learn is, that a workaround for bugs in other software should be programmed so, that it can be thrown away without loosing anything, if the bug is fixed.
:)

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Fri Apr 17, 2015 12:07 am
by JamesOFarrell
ssilk wrote:Things you won't to know: what do we learn is, that a workaround for bugs in other software should be programmed so, that it can be thrown away without loosing anything, if the bug is fixed.
:)
Sadly I am a systems administrator, I just throw lines of code at a problem until they go away. I doubt it will be to hard to remove the dodgy code and once we get a stable 0.11 release I'll start work on it. I'll also go back and get all my other mods working in MP and release the new version of FatController that I've had for a few months unreleased

Edit: I went to update this today to fix the desync on auto-save issue and apparently it doesn't happen anymore. They did synchronize game saving in a previous update, that was probably when it got fixed. I've updated the first post to reflect this.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Sun Apr 26, 2015 4:35 pm
by linshuboy
If possible, I hope to add a button, you can switch the building space or may not be connected to other roboport

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Jul 09, 2015 7:48 pm
by cpw
Hey dude. Love your mod.

Here's a very small patch so you can use bob's improved bots with the pocket bots pocket roboport. Hope you don't mind.

Thanks!

Code: Select all

--- /a/control.lua
+++ /b/control.lua
@@ -743,7 +743,7 @@
 					--if diff < -50 then diff = -50 end
 						--debugLog("repair-pack")
 					applyChangeToInventory(entityGroup["roboport-pocket"].getinventory(2), itemName, diff)
-				elseif itemName == "construction-robot" then
+				elseif string.find(itemName, "construction-robot",1,true) then
 					
 					--if diff > 50 then diff = 50 end
 					--if diff < -50 then diff = -50 end


Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Jul 09, 2015 8:48 pm
by kiba
cpw wrote:Hey dude. Love your mod.

Here's a very small patch so you can use bob's improved bots with the pocket bots pocket roboport. Hope you don't mind.

Thanks!
Isn't the patch pointless with the advent of the personal roboport?

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Jul 09, 2015 10:32 pm
by cpw
kiba wrote:
cpw wrote:Hey dude. Love your mod.

Here's a very small patch so you can use bob's improved bots with the pocket bots pocket roboport. Hope you don't mind.

Thanks!
Isn't the patch pointless with the advent of the personal roboport?
Why? It's not like that'll be back ported to 0.11.. If someone is playing bobs mods and pocket bots together, this is a nice to have, surely?

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Thu Jul 09, 2015 10:45 pm
by JamesOFarrell
cpw wrote:Why? It's not like that'll be back ported to 0.11.. If someone is playing bobs mods and pocket bots together, this is a nice to have, surely?
0.12 will be pretty unstable for a while so this is probably not a bad idea. I'll put it in this weekend and fix the annoying player is treated as something to repair bug that is driving me crazy.

Re: [MOD 0.11.x] Pocket Bots. Construction bots for your pocket.

Posted: Fri Jul 10, 2015 3:10 am
by cpw
JamesOFarrell wrote:
cpw wrote:Why? It's not like that'll be back ported to 0.11.. If someone is playing bobs mods and pocket bots together, this is a nice to have, surely?
0.12 will be pretty unstable for a while so this is probably not a bad idea. I'll put it in this weekend and fix the annoying player is treated as something to repair bug that is driving me crazy.
Very true, and thanks!