[MOD 0.12.19] PersonalRoboportFix (0.3.2)

Topics and discussion about specific mods
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

[MOD 0.12.19] PersonalRoboportFix (0.3.2)

Post by SHiRKiT »

Mod-Info-Header
  • Name: PersonalRoboportFix
  • Version: 0.3.2
  • Factorio-Version: 0.12.19
  • Description: Removes the annoying behaviour of having the personal robots having priority over the network's construction robots.
  • License: WTF Public License Image
  • Release: 2015-12.01
  • Download-Url: Download
  • Website: https://github.com/Shirkit/PersonalRoboportFix
  • Dependencies: None.
  • Category: Helper, Fix
  • Tags: Robots, Construction Robots, Roboports
License
Long description
Pictures
Version history
Last edited by SHiRKiT on Tue Dec 01, 2015 1:11 pm, edited 8 times in total.
User avatar
Ralord89
Inserter
Inserter
Posts: 26
Joined: Sat Jul 25, 2015 6:06 am
Contact:

Re: [0.12.3] PersonalRoboportFix - Auto disable inside network

Post by Ralord89 »

Oh god finally. It was actually becoming a big pain constantly adding and removing the ports when leaving my base. thanks for this, this is a massive help
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [0.12] PersonalRoboportFix (0.2.0) - Disable inside network

Post by SHiRKiT »

Version 0.2.0 released, fixed crash when removing armor and added support for multiple personal roboports. If everything goes right, I'll be able to easily support modded Roboports and Personal Roboports.
User avatar
Ralord89
Inserter
Inserter
Posts: 26
Joined: Sat Jul 25, 2015 6:06 am
Contact:

Re: [0.12] PersonalRoboportFix (0.2.0) - Disable inside network

Post by Ralord89 »

I placed down a Roboport and got this error

Code: Select all

Error while running the event handler: __PersonalRoboportFix__/control.lua:77: attempt to index field '?' (a boolean value)
SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [0.12] PersonalRoboportFix (0.2.0) - Disable inside network

Post by SirRichie »

So what happens if I place more than (personal roboports) * 10 construction robots into my inventory?
You say that mod will fail. Does that mean the game will crash or does that mean the personal roboport will then be enabled?

I am asking, because I really like the idea of the mod, but usually I do bulk loading of construction robots (~ 30) into roboports.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [0.12] PersonalRoboportFix (0.2.0) - Disable inside network

Post by SHiRKiT »

Ralord89 wrote:I placed down a Roboport and got this error

Code: Select all

Error while running the event handler: __PersonalRoboportFix__/control.lua:77: attempt to index field '?' (a boolean value)
Sorry, this was likely caused due migration from 0.1.0 to 0.2.0 I released a fix for 0.2.1 for you, but next versions I'll have to be more careful when upgrading versions. Sorry
SirRichie wrote:So what happens if I place more than (personal roboports) * 10 construction robots into my inventory?
You say that mod will fail. Does that mean the game will crash or does that mean the personal roboport will then be enabled?

I am asking, because I really like the idea of the mod, but usually I do bulk loading of construction robots (~ 30) into roboports.
No, it won't crash, it just won't work correctly. The way I detect if the personal robots are out if there's less than ( 10 * personal roboport count ) in the player's inventory, if you have 5 personal roboports and you have 100 construction bots on your inventory, I'll never be able to detect anything, and your personal roboports will be always active.
sadris
Inserter
Inserter
Posts: 29
Joined: Thu Oct 02, 2014 5:55 pm
Contact:

Re: [MOD 0.12] PersonalRoboportFix (0.2.1) - Disable inside net

Post by sadris »

Code: Select all

__PersonalRoboportFix__/control.lua:153: god-controller doesn't have an inventory with index(5)
Occurs when I activate god mode with Test Mode.
SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [MOD 0.12] PersonalRoboportFix (0.2.1) - Disable inside net

Post by SirRichie »

PersonalRoboportFix crashes in multiplayer on line 95 (forgot to capture the error, sorry) when a player dies.

We were way before getting a modular amor, so noone had a roboport (but the mod was active). Whenever a player died, the game reported an error in PersonalRoboportFix and then shut down.
User avatar
XyLe
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Oct 31, 2014 10:45 am
Contact:

Re: [MOD 0.12] PersonalRoboportFix (0.2.1) - Disable inside net

Post by XyLe »

This mod is really cool, i like it a lot. But actually sometimes i want my personal robots to have the first priority too, even when inside the network. I always felt like there should be a button to turn personal robots on and off, coz otherwise they just fly after a train somewhere and never come back :D

Also this mod says that you can't have more robots than your personal roboports can support. That problem would go away if you could simply have an "on/off" button. consider changing your mod that way please.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.12] PersonalRoboportFix (0.2.1) - Disable inside net

Post by SHiRKiT »

New version! 0.3.0 is out now!

Code: Select all

Fixed crash when using the Test Mode mod in God Mode.
Fixed crash in multiplayer when a player dies.
Added support for modded robots, modded roboports and modded personal roboports.
Fixed behaviour that would not allow palyers to have more than the limit of robots in their inventories.
sadris wrote:

Code: Select all

__PersonalRoboportFix__/control.lua:153: god-controller doesn't have an inventory with index(5)
Occurs when I activate god mode with Test Mode.
Thanks for the report. Should be fixed
SirRichie wrote:PersonalRoboportFix crashes in multiplayer on line 95 (forgot to capture the error, sorry) when a player dies.

We were way before getting a modular amor, so noone had a roboport (but the mod was active). Whenever a player died, the game reported an error in PersonalRoboportFix and then shut down.
Thanks for the report. Should be fixed by fixing the previous bug!
XyLe wrote:This mod is really cool, i like it a lot. But actually sometimes i want my personal robots to have the first priority too, even when inside the network. I always felt like there should be a button to turn personal robots on and off, coz otherwise they just fly after a train somewhere and never come back :D

Also this mod says that you can't have more robots than your personal roboports can support. That problem would go away if you could simply have an "on/off" button. consider changing your mod that way please.
1. I'm still considering in putting a on/off button. I actually wanted it to be a hotkey, I'll study this in the future. But for now, it should be stable.
2. The limit problem is now fixed!
MakiabelMFE
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat May 16, 2015 6:30 am
Contact:

Re: [MOD 0.12.5] PersonalRoboportFix (0.3.0)

Post by MakiabelMFE »

Hey it seems that the mod is broken in 0.12.11, from what I understand just have to change game. to script. however that didn't fully fixed it since it keeps calling an error in line 15 with the on_load event calling game.players
That's as far as I got, don't really know what to do past that so I'll just leave it reported here :D.
User avatar
Steejo
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Oct 08, 2015 12:00 pm
Contact:

Re: [MOD 0.12.5] PersonalRoboportFix (0.3.0)

Post by Steejo »

Yeah, on_load no longer gives access to game. so it's needing changing.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.12.16] PersonalRoboportFix (0.3.1)

Post by SHiRKiT »

Opps guys, sorry for the delay. I haven't play Factorio in ages =] It's fixed now, thanks for the report, specially antisocialian for creating the issue at github who sent me an email =]

As a note, I have set this thread to email me whenever something is posted here, so I never miss a reply. Sorry for leaving it unupdated for so long, I imagine some of you prolly figured out the fix by removing on_load altogether.

0.3.1 is released with a fix
antisocialian
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue Jan 20, 2015 6:54 pm
Contact:

Re: [MOD 0.12.16] PersonalRoboportFix (0.3.1)

Post by antisocialian »

:D I've noticed that the thread subscriptions don't last forever on this forum. I'm not sure if it's something the admins can change or not. I've seen other forums only allow thread subscriptions for 2 weeks.

Thanx for the update :)
Segundo
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Nov 15, 2015 2:39 pm
Contact:

Re: [MOD 0.12.16] PersonalRoboportFix (0.3.1)

Post by Segundo »

The PersonalRoboportFix (0.3.1) does not work anymore in Factorio version 0.12.18 and 0.12.19 in multiplayer mode.

Factorio gives an "Player:Connected" error with the PersonalRoboportFix mod (0.3.1) and quits back to the main menu when loading an map created in multiplayer.

One loads the saved multiplayer map then others can connect to it, it gives an error about the not (yet) connected players.

Can the mod be updated to work with the latest versions of Factorio?

Thanks for this handy mod.

From the change log of Factorio 0.12.18:

Scripting
Reading or writing LuaPlayer::character will now fail if the LuaPlayer isn't connected (see LuaPlayer::connected).
Lua API documentation is included in release packages (directory doc-html)
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.12.16] PersonalRoboportFix (0.3.1)

Post by SHiRKiT »

Segundo wrote:The PersonalRoboportFix (0.3.1) does not work anymore in Factorio version 0.12.18 and 0.12.19 in multiplayer mode.

Factorio gives an "Player:Connected" error with the PersonalRoboportFix mod (0.3.1) and quits back to the main menu when loading an map created in multiplayer.

One loads the saved multiplayer map then others can connect to it, it gives an error about the not (yet) connected players.

Can the mod be updated to work with the latest versions of Factorio?

Thanks for this handy mod.

From the change log of Factorio 0.12.18:

Scripting
Reading or writing LuaPlayer::character will now fail if the LuaPlayer isn't connected (see LuaPlayer::connected).
Lua API documentation is included in release packages (directory doc-html)
Thank you very much for the report! It was so specific that the fix was trivial. The new 0.3.2 is now released in Github. Thanks Segundo!
antisocialian
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue Jan 20, 2015 6:54 pm
Contact:

Re: [MOD 0.12.19] PersonalRoboportFix (0.3.2)

Post by antisocialian »

I'm having a problem with the mod. I am currently running factorio version 0.12.20 and version 0.3.2 of your mod and I am on a save that at one time had been a multiplayer(2 players) and now it's just me.

When I put on my suit of armour that has roboports in it, or when I add roboports to a suit of armour I'm wearing, I get this:
Image

Clicking OK then sends me directly back to the main menu. I had been wearing the armour just a few minutes prior to this(within the same game session, still all solo) so I'm confused as to whats happening, tho I have a limited understanding of most mod's inner workings.

Edit: I am currently within me logistics network, but when I'm outside it there are no issues with putting on the armour.
Edit2: I have tried using the command

Code: Select all

/c game.remove_offline_players()
and that did something, but then this mod and another(TheFATController, which is also having issues when ever I open the train listing) both gave errors(the error for this mod being the same). Is there another way to make the game be a singleplayer only game? or am I screwed until I start a new one?
Urbs
Inserter
Inserter
Posts: 34
Joined: Sat Nov 01, 2014 1:10 pm
Contact:

Re: [MOD 0.12.19] PersonalRoboportFix (0.3.2)

Post by Urbs »

Anti,

what mod is that showing all that data at the top left of your screen? Some kind of res monitor?
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.12.19] PersonalRoboportFix (0.3.2)

Post by SHiRKiT »

Sorry for the delay, it's holiday times and I've been doing nothing but relaxing with family and friends this week.

antisocialian, I can't trace down your issue to what's causing this bug, could you kindly share your Mod folder and your savegame so I can fix this?

I don't understand why would need to remove offline players since I do a check

Code: Select all

if player.connected and player.controller_type == defines.controllers.character then
So it shouldn't be checking for offline players and shouldn't try to peek on unavailable information on line 82. Only if something went wrong in saving the data, so only by checking the savegame I can try to fix.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [MOD 0.12.19] PersonalRoboportFix (0.3.2)

Post by SHiRKiT »

I really needed that savegame+mods_folder to track down the issue that caused this =\
Post Reply

Return to “Mods”