Bugs and problems

New energy types, decorations, electric train, new types of belts and inserters, bigger inventory and many more stuff.

Moderators: odin_spain, McGuten

bitteeins
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Mar 23, 2016 12:33 am
Contact:

Re: Bugs and problems

Post by bitteeins »

McGuten wrote:
bitteeins wrote:hmm i seem to have this problem after using the electric trains... and using my autosaves... any idears ? i updated to the lasted version 3.0.0 Image

What are you doing when show error?
well i was experimenting with the rail electric trains and i kinda foolish drove my self over with the electric train gg BUT then i tried to reload a autosave but no dice didnt work gave me the error it showed on the SS.... so i havent fiddled with anything, after this error happend i upgraded to version 3.0.0. and it still didnt help so i had to disable the 5dim trains mod and re-enable it but not using the electric trains then.
bitteeins
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Mar 23, 2016 12:33 am
Contact:

Re: Bugs and problems

Post by bitteeins »

hmm i seem have a new slight problem since i updated to 3.0.0 hmm the galena ore stopped producing nickel ore hmm is this a bug or is there new means to get nickel ore ? cant seem to find it anywhere same with cobaltite ore. Thanks otherwise for the mod having fun ^^
godzillaxd
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Nov 01, 2014 6:23 pm
Contact:

Re: Bugs and problems

Post by godzillaxd »

I don't know why but spitters in my game are doing enormous damage. Small spitter is hitting for 50 damage. After looking into config he should do 5 damage so i don't know what is happening. Mods installed: http://pastebin.com/raw/ZdKdmnCG
Zolidus
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Mar 26, 2016 3:30 pm
Contact:

Re: Bugs and problems

Post by Zolidus »

bitteeins wrote:hmm i seem to have this problem after using the electric trains... and using my autosaves... any idears ? i updated to the lasted version 3.0.0 Image


My was woring fine i saved and quited the game with no issues, and the next day i also got this message out of nowhere (where running 2.2 before and tried with 3.0.0 without luck)


just to let the mod-dev know, found 2 errors in code.

In control.lua for trainmod.

line 734 is commented out when i guess it should have been 733.
and
(not sure) but the word "wadonData" is pressent when it should be "wagonData"

I changed these and my save now works again,

i'm sry for editing the file, but i wanted to play :) (Have no skills with lua just went for the line stated and had a look)

Be sure to correct me if i have destroyed anything with this.

-- And for ppl reading this. DON'T do this without Dev's input --
Fredyx2000
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Mar 12, 2016 2:35 am
Contact:

Re: Bugs and problems

Post by Fredyx2000 »

Hey, i have a problem with the transport module, i dont have the mk2 and mk3 liquid pipes, i have investigated them and they dont appear in for craft, but if i try to solicit it to the logistic robotos they appear
http://prntscr.com/akvgvb
Kostas
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Mar 28, 2016 4:42 pm
Contact:

Re: Bugs and problems

Post by Kostas »

Zolidus wrote:
bitteeins wrote:hmm i seem to have this problem after using the electric trains... and using my autosaves... any idears ? i updated to the lasted version 3.0.0


My was woring fine i saved and quited the game with no issues, and the next day i also got this message out of nowhere (where running 2.2 before and tried with 3.0.0 without luck)


just to let the mod-dev know, found 2 errors in code.

In control.lua for trainmod.

line 734 is commented out when i guess it should have been 733.
and
(not sure) but the word "wadonData" is pressent when it should be "wagonData"

I changed these and my save now works again,

i'm sry for editing the file, but i wanted to play :) (Have no skills with lua just went for the line stated and had a look)

Be sure to correct me if i have destroyed anything with this.

-- And for ppl reading this. DON'T do this without Dev's input --
I got the same error when I tried to load my save file after I updated the 5dimm mods.

I changed the wadonData to wagonData but I can't understand the first thing you said.

What do you mean the 734 line is commented out? What do I have to change to make it work?

I really need a temp fix as well so I can play :)
User avatar
BoltzY
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Mar 30, 2016 12:37 pm

Re: Bugs and problems

Post by BoltzY »

I get this Error Pop up

Saying "No loader Found for "Straight rail" "
I have the Whole 5Dim Modpack

I had Bobs Mods on but then i tried again with Bobs mods Off still same error.
Last edited by Koub on Wed Mar 30, 2016 6:27 pm, edited 1 time in total.
Reason: Removed sig, because really too big.
diosmio
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Mar 30, 2016 8:17 pm
Contact:

Re: Bugs and problems

Post by diosmio »

Hi.
Iam using the latest full 5dim pack along with other mods.
core 3.0.0
trains 3.0.0

1. The requester carriage loses its configuration after driving with the train.
2. After picking up a requester wagon, the invisible requester chest stays. Tried it again: no invisible chest. Dont know why

edit:

I just found this post regarding problem 1
Rens2Sea wrote:There seems to be a bug in the requester wagon, when i set some logistics on the invisible requester chest and then move the train, the logistics are removed when the train stops again.

Apparently at line 523 in control.lua there are 3 lines disabled that actually fill the requester slots, why are these lines commented out? It works fine when i bring them back.

Code: Select all

function setRequestSlots(proxy, requestSlots)
	if isRequester(proxy)then
		--debugLog("Requester")
		local i = 0
		local slots = {}
		while i < 10 do
			i = i + 1
			local slot = requestSlots[i]
			if slot ~= nil and slot.name ~= nil then
				--if game.item_prototypes[slot.name] ~= nil then 
					--proxy.setrequestslot(slot, i)
				--end
			end
		end
	end
end
After looking into the control.lua, these lines are still commented out.
I tried to remove the comments, but then i get an error ingame as soon as the train stops.

Code: Select all

Error while running the event handler:
 __5dim_trains__/control.lua:524: LuaBootstrap doesn't contain key item_prototypes.
edit2:

I did a quick fix. Seems to work.
I checked the factorio lua api site and fixed the discrepancies.

Orignal:

Code: Select all

function setRequestSlots(proxy, requestSlots)
   if isRequester(proxy)then
      --debugLog("Requester")
      local i = 0
      local slots = {}
      while i < 10 do
         i = i + 1
         local slot = requestSlots[i]
         if slot ~= nil and slot.name ~= nil then
            --if script.item_prototypes[slot.name] ~= nil then 
               --proxy.setrequestslot(slot, i)
            --end
         end
      end
   end
end
Changed:

Code: Select all

function setRequestSlots(proxy, requestSlots)
   if isRequester(proxy)then
      --debugLog("Requester")
      local i = 0
      local slots = {}
      while i < 10 do
         i = i + 1
         local slot = requestSlots[i]
         if slot ~= nil and slot.name ~= nil then
            if game.item_prototypes[slot.name] ~= nil then 
            	proxy.set_request_slot(slot, i)
            end
         end
      end
   end
end
Last edited by diosmio on Thu Mar 31, 2016 4:25 pm, edited 2 times in total.
IG2
Inserter
Inserter
Posts: 22
Joined: Wed Mar 30, 2016 11:53 pm
Contact:

Re: Bugs and problems

Post by IG2 »

First of alll: Thaks for those greate Mods!

Now my Problem:

I just startet using the Bob-Modpack and I am not able to build a standard Masher because of some small Tinplate incompatibility.
I have Tin plates marked as "bobplates" but it seems like my Masher doesnt want those plates. I can also find the Tin plates from 5dim_ores. Is it possible to "convert" those or to get rid of the incompatibility?

Edit: Deactivation of 5dim_ores made it possible to craft the Masher but i couldnt mash Tin anymore. After reactivating it, o hade two different types of Tin Plates.

PS: The "How to: Play 5dim mod with ores from bobores " dinkt help, bacause the last value was already "true".

Thanks in advance!


Edit2: It seems I solved the bug by replacing every "5d_tin_plate" inside the Mods folder by "tin_plate" like it is used in Bobmods.
Sastas
Inserter
Inserter
Posts: 26
Joined: Sat May 30, 2015 8:02 pm
Contact:

Re: Bugs and problems

Post by Sastas »

I ran into the same problem. I added 1 masher, and the plate what you made with the masher, I use just for more mashers and MK2 electrical furnices.
If you need a hungarian translator/interpretor, contact me. Here or on youtube. Or anywhere :)

youtube.com/sastas
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: Bugs and problems

Post by MPeti1 »

Hi!
5dim removes some of Factorio Basics's items? (blue ammo,mk2 tank,etc) If yes,how can i turn off removing these items?
Attachments
Technology list
Technology list
2016-04-12 (3).png (1.29 MiB) Viewed 11388 times
Factorio Basics's item page
Factorio Basics's item page
2016-04-12.png (2.38 MiB) Viewed 11388 times
Sastas
Inserter
Inserter
Posts: 26
Joined: Sat May 30, 2015 8:02 pm
Contact:

Re: Bugs and problems

Post by Sastas »

MPeti1 wrote:Hi!
5dim removes some of Factorio Basics's items? (blue ammo,mk2 tank,etc) If yes,how can i turn off removing these items?
They shouldn't just place them under other tabs. Some mods change recipes, and give new stuffs, but everything in vanilla factorio is still madeable, just sometimes need to find them again, because they looks like different(with the same name)
If you need a hungarian translator/interpretor, contact me. Here or on youtube. Or anywhere :)

youtube.com/sastas
EmperorZelos
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat Mar 05, 2016 5:44 am
Contact:

Re: Bugs and problems

Post by EmperorZelos »

The energy one causes massive lag on my factorio when I have expanded the fields of solarpower a great deal
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: Bugs and problems

Post by MPeti1 »

Sastas wrote:
MPeti1 wrote:Hi!
5dim removes some of Factorio Basics's items? (blue ammo,mk2 tank,etc) If yes,how can i turn off removing these items?
They shouldn't just place them under other tabs. Some mods change recipes, and give new stuffs, but everything in vanilla factorio is still madeable, just sometimes need to find them again, because they looks like different(with the same name)
Hi Sastas!
When you are who i think (Professzor Doktor Docens úr :D ),you can write in hungarian language.
What item i have a problem isn't a vanilla item,it's an item added by Factorio Basics mod.I can't find this item in any of the tabs,and i need this mod's tank because i can't fight the aliens with loe hp tanks :/

Az mk2-es tank amiről beszéltem nem vanilla item,hanem a Factorio Basics mod adja hozzá a játékhoz.Am óta hozzáadtam a 5dim néhány modját,nem találom meg egyik gyártási fül alatt sem a Factorio Basics néhény item-jét (például a kék lőszer,és az mk2 tank).Ha szükséges,küldök egy listát arról hogy melyik modok vannak bent
User avatar
Devious Null
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 22, 2016 9:06 pm
Contact:

Re: Bugs and problems

Post by Devious Null »

I have fixed three bugs in 5dim_trains version 3.0.0, and want to provide these fixes so that everyone can benefit from them.

The first is that powered rails often don't create invisible power poles when they are placed. I fixed this by adding a check for the specific rail entity types and fixing a typo in an entity name.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:13:13.285036300 -0500
@@ -127,7 +127,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	
-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")
@@ -160,7 +160,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	
-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")
@@ -406,7 +406,7 @@
 		elseif entity.name == "straight-power-rail" then
 			positions[1] = {"electric-pole-rail", entity.position}
 
-		elseif entity.name == "5d-5d-curved-power-rail-water" then
+		elseif entity.name == "5d-curved-power-rail-water" then
 			if entity.direction < 2 or (entity.direction > 3 and entity.direction < 6) then
 				positions[1] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y + 2}}
 				positions[2] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y - 2}}
The second is that curved-water rails can only be placed on water, but straight-power rails can be placed on both land and water. I fixed this by changing both the curved-water rail and the curved-energy-water rail prototypes to use the same collision mask as their straight versions.

Code: Select all

diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-03-08 06:33:43.936808600 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-04-19 21:21:50.631221300 -0500
@@ -39,10 +39,10 @@
     collision_box = {{-0.75, -0.65}, {0.75, 1.7}},
     secondary_collision_box = {{-0.85, -2.6}, {0.85, 2.6}},
     selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
-	collision_mask = {"ground-tile"},
     bending_type = "turn",
     rail_category = "regular",
     pictures = railpictureswaterenergy({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-	order = "za",
+    collision_mask = {"not-colliding-with-itself"},
+    order = "z",
   },
 })
\ No newline at end of file
diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-03-08 06:33:34.352475500 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-04-24 18:38:51.779033100 -0500
@@ -40,6 +40,6 @@
 		bending_type = "turn",
 		rail_category = "regular",
 		pictures = railpictureswater({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-		collision_mask = {"ground-tile"}
+		collision_mask = {"not-colliding-with-itself"}
 	},
 })
\ No newline at end of file
The third is that, when using the electric locomotive and the Fat Controller mod (viewtopic.php?f=92&t=4504), the Fat Controller will repeatedly report electric locomotives as being out of fuel. I fixed this by making the electric locomotives add more fuel when they have only one item remaining, rather than when they run out completely.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:17:39.620269800 -0500
@@ -948,10 +948,7 @@
 					--debugLog("electric-locomotive energy " .. wagonData.wagon.energy)
 					
 					--inventory.clear()
-					local needsFuel = true
-					for name,count in pairs(inventory.get_contents()) do
-						needsFuel = false
-					end
+					local needsFuel = inventory.get_item_count() < 2
 					
 					--clearInventory(wagonData.wagon, 1)
 					if proxy.energy > 0 and needsFuel then
diff -ru source/5dim_trains_3.0.0/prototypes/locomotive.lua modified/5dim_trains_3.0.0/prototypes/locomotive.lua
--- source/5dim_trains_3.0.0/prototypes/locomotive.lua	2015-09-26 14:34:46.886165100 -0500
+++ modified/5dim_trains_3.0.0/prototypes/locomotive.lua	2016-04-24 18:15:59.331533600 -0500
@@ -17,7 +17,7 @@
     icon = "__5dim_trains__/graphics/micoal.png",
     dark_background_icon = "__base__/graphics/icons/coal-dark-background.png",
     flags = {"goes-to-main-inventory"},
-    fuel_value = "0.2MJ",
+    fuel_value = "0.1MJ",
     subgroup = "raw-material",
     order = "b[coal]",
     stack_size = 500
If you have any questions about these patches, please feel free to ask.
McGuten
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue Jun 24, 2014 3:06 pm
Contact:

Re: Bugs and problems

Post by McGuten »

Devious Null wrote:I have fixed three bugs in 5dim_trains version 3.0.0, and want to provide these fixes so that everyone can benefit from them.

The first is that powered rails often don't create invisible power poles when they are placed. I fixed this by adding a check for the specific rail entity types and fixing a typo in an entity name.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:13:13.285036300 -0500
@@ -127,7 +127,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	
-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")
@@ -160,7 +160,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	
-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")
@@ -406,7 +406,7 @@
 		elseif entity.name == "straight-power-rail" then
 			positions[1] = {"electric-pole-rail", entity.position}
 
-		elseif entity.name == "5d-5d-curved-power-rail-water" then
+		elseif entity.name == "5d-curved-power-rail-water" then
 			if entity.direction < 2 or (entity.direction > 3 and entity.direction < 6) then
 				positions[1] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y + 2}}
 				positions[2] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y - 2}}
The second is that curved-water rails can only be placed on water, but straight-power rails can be placed on both land and water. I fixed this by changing both the curved-water rail and the curved-energy-water rail prototypes to use the same collision mask as their straight versions.

Code: Select all

diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-03-08 06:33:43.936808600 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-04-19 21:21:50.631221300 -0500
@@ -39,10 +39,10 @@
     collision_box = {{-0.75, -0.65}, {0.75, 1.7}},
     secondary_collision_box = {{-0.85, -2.6}, {0.85, 2.6}},
     selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
-	collision_mask = {"ground-tile"},
     bending_type = "turn",
     rail_category = "regular",
     pictures = railpictureswaterenergy({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-	order = "za",
+    collision_mask = {"not-colliding-with-itself"},
+    order = "z",
   },
 })
\ No newline at end of file
diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-03-08 06:33:34.352475500 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-04-24 18:38:51.779033100 -0500
@@ -40,6 +40,6 @@
 		bending_type = "turn",
 		rail_category = "regular",
 		pictures = railpictureswater({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-		collision_mask = {"ground-tile"}
+		collision_mask = {"not-colliding-with-itself"}
 	},
 })
\ No newline at end of file
The third is that, when using the electric locomotive and the Fat Controller mod (viewtopic.php?f=92&t=4504), the Fat Controller will repeatedly report electric locomotives as being out of fuel. I fixed this by making the electric locomotives add more fuel when they have only one item remaining, rather than when they run out completely.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:17:39.620269800 -0500
@@ -948,10 +948,7 @@
 					--debugLog("electric-locomotive energy " .. wagonData.wagon.energy)
 					
 					--inventory.clear()
-					local needsFuel = true
-					for name,count in pairs(inventory.get_contents()) do
-						needsFuel = false
-					end
+					local needsFuel = inventory.get_item_count() < 2
 					
 					--clearInventory(wagonData.wagon, 1)
 					if proxy.energy > 0 and needsFuel then
diff -ru source/5dim_trains_3.0.0/prototypes/locomotive.lua modified/5dim_trains_3.0.0/prototypes/locomotive.lua
--- source/5dim_trains_3.0.0/prototypes/locomotive.lua	2015-09-26 14:34:46.886165100 -0500
+++ modified/5dim_trains_3.0.0/prototypes/locomotive.lua	2016-04-24 18:15:59.331533600 -0500
@@ -17,7 +17,7 @@
     icon = "__5dim_trains__/graphics/micoal.png",
     dark_background_icon = "__base__/graphics/icons/coal-dark-background.png",
     flags = {"goes-to-main-inventory"},
-    fuel_value = "0.2MJ",
+    fuel_value = "0.1MJ",
     subgroup = "raw-material",
     order = "b[coal]",
     stack_size = 500
If you have any questions about these patches, please feel free to ask.
Big thanks to you guy
I will upload the mod today (i hope it) and i will add the new code, thanks you so much
Image
Bocator
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jan 04, 2015 12:37 am
Contact:

Re: Bugs and problems

Post by Bocator »

Getting an error when loading my save since I started using electric locomotives / power rails :
Error while running the event handler:
__5dim_trains___/control.lua:743: attempt to index field '?' (a nil value)
Preventing me from playing my game since I have no save before using electric trains.

EDIT :
Zolidus wrote:
bitteeins wrote:hmm i seem to have this problem after using the electric trains... and using my autosaves... any idears ? i updated to the lasted version 3.0.0


My was woring fine i saved and quited the game with no issues, and the next day i also got this message out of nowhere (where running 2.2 before and tried with 3.0.0 without luck)


just to let the mod-dev know, found 2 errors in code.

In control.lua for trainmod.

line 734 is commented out when i guess it should have been 733.
and
(not sure) but the word "wadonData" is pressent when it should be "wagonData"

I changed these and my save now works again,

i'm sry for editing the file, but i wanted to play :) (Have no skills with lua just went for the line stated and had a look)

Be sure to correct me if i have destroyed anything with this.

-- And for ppl reading this. DON'T do this without Dev's input --
Exact same situation, and what you did worked for me too, thanks !
Hundreds hours of Factorio experience
Bocator
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jan 04, 2015 12:37 am
Contact:

Re: Bugs and problems

Post by Bocator »

Devious Null wrote:I have fixed three bugs in 5dim_trains version 3.0.0, and want to provide these fixes so that everyone can benefit from them.

The first is that powered rails often don't create invisible power poles when they are placed. I fixed this by adding a check for the specific rail entity types and fixing a typo in an entity name.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:13:13.285036300 -0500
@@ -127,7 +127,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	

-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")
@@ -160,7 +160,7 @@
 		addWagonToTable(global.wagonsData, event.created_entity)
 	end
 	
-	if event.created_entity.type == "rail" then
+	if event.created_entity.type == "rail" or event.created_entity.type == "straight-rail" or event.created_entity.type == "curved-rail" then
 		-- local hasBeenDestroyed = false
 		-- if colidesWithRail(event.created_entity.position) then
 			-- debugLog("Found other rail. shit! Remove it before we kill the save!")

@@ -406,7 +406,7 @@
 		elseif entity.name == "straight-power-rail" then
 			positions[1] = {"electric-pole-rail", entity.position}
 
-		elseif entity.name == "5d-5d-curved-power-rail-water" then
+		elseif entity.name == "5d-curved-power-rail-water" then
 			if entity.direction < 2 or (entity.direction > 3 and entity.direction < 6) then
 				positions[1] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y + 2}}
 				positions[2] = {"electric-pole-large-rail", {x=entity.position.x, y=entity.position.y - 2}}
The second is that curved-water rails can only be placed on water, but straight-power rails can be placed on both land and water. I fixed this by changing both the curved-water rail and the curved-energy-water rail prototypes to use the same collision mask as their straight versions.

Code: Select all

diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-03-08 06:33:43.936808600 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-energy-water.lua	2016-04-19 21:21:50.631221300 -0500
@@ -39,10 +39,10 @@
     collision_box = {{-0.75, -0.65}, {0.75, 1.7}},
     secondary_collision_box = {{-0.85, -2.6}, {0.85, 2.6}},
     selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
-	collision_mask = {"ground-tile"},
     bending_type = "turn",
     rail_category = "regular",
     pictures = railpictureswaterenergy({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-	order = "za",
+    collision_mask = {"not-colliding-with-itself"},
+    order = "z",
   },
 })
\ No newline at end of file
diff -ru source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua
--- source/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-03-08 06:33:34.352475500 -0600
+++ modified/5dim_trains_3.0.0/prototypes/rails-curve-water.lua	2016-04-24 18:38:51.779033100 -0500
@@ -40,6 +40,6 @@
 		bending_type = "turn",
 		rail_category = "regular",
 		pictures = railpictureswater({{"metals", "metals"}, {"backplates", "backplates"}, {"ties", "ties"}, {"stone_path", "stone-path"}}),
-		collision_mask = {"ground-tile"}
+		collision_mask = {"not-colliding-with-itself"}
 	},
 })
\ No newline at end of file
The third is that, when using the electric locomotive and the Fat Controller mod (viewtopic.php?f=92&t=4504), the Fat Controller will repeatedly report electric locomotives as being out of fuel. I fixed this by making the electric locomotives add more fuel when they have only one item remaining, rather than when they run out completely.

Code: Select all

diff -ru source/5dim_trains_3.0.0/control.lua modified/5dim_trains_3.0.0/control.lua
--- source/5dim_trains_3.0.0/control.lua	2016-02-17 04:08:39.718891000 -0600
+++ modified/5dim_trains_3.0.0/control.lua	2016-04-24 18:17:39.620269800 -0500
@@ -948,10 +948,7 @@
 					--debugLog("electric-locomotive energy " .. wagonData.wagon.energy)
 					
 					--inventory.clear()
-					local needsFuel = true
-					for name,count in pairs(inventory.get_contents()) do
-						needsFuel = false
-					end
+					local needsFuel = inventory.get_item_count() < 2
 					
 					--clearInventory(wagonData.wagon, 1)
 					if proxy.energy > 0 and needsFuel then
diff -ru source/5dim_trains_3.0.0/prototypes/locomotive.lua modified/5dim_trains_3.0.0/prototypes/locomotive.lua
--- source/5dim_trains_3.0.0/prototypes/locomotive.lua	2015-09-26 14:34:46.886165100 -0500
+++ modified/5dim_trains_3.0.0/prototypes/locomotive.lua	2016-04-24 18:15:59.331533600 -0500
@@ -17,7 +17,7 @@
     icon = "__5dim_trains__/graphics/micoal.png",
     dark_background_icon = "__base__/graphics/icons/coal-dark-background.png",
     flags = {"goes-to-main-inventory"},
-    fuel_value = "0.2MJ",
+    fuel_value = "0.1MJ",
     subgroup = "raw-material",
     order = "b[coal]",
     stack_size = 500
If you have any questions about these patches, please feel free to ask.
I edited my files as you have indicated, power rails are now working and so are electric trains. One thing though, it seems they are killing my fps. Since I replaced all my network with electric trains, I've been running 2 trains at all-time, and up to 7 at the same time, running 2 trains is ok and barely noticeable, but when more are running, I have stuttering and fps drop making the game annoying to play.
By using the debug mode and checking show_time_used_percent, I noticed that in the 'Script update' stats, whatever these numbers mean, 'mod-5dim_trains' was by far the one with the biggest update value, while most mods have < 0.02, 5dim_trains has usually between 1.5 and 4 while running 2 trains, and easily above 5 when running 7 trains, which causes stuttering and fps drops ; one time the mod reached a value of 150, I was litteraly having 3fps instead of 60, and the value was only going up indefinitely, I kind of got rid of the problem by loading my oldest autosave.

I also noticed that the 'Electric network' can get to high values, which I supposed is caused by the fact that electric trains keep wiring themselves to rails while moving. But then why 5dim_trains use so much resources ? Is it because it keeps creating fuel for the locomotive ? Or some update on each tick for each train that is just too heavy ?

Did any of you guys ran into this problem ? I'm considering going back to vanilla trains and it won't be fun to replace all my rails :|
screenshots
Hundreds hours of Factorio experience
User avatar
Devious Null
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 22, 2016 9:06 pm
Contact:

Re: Bugs and problems

Post by Devious Null »

Bocator wrote:I edited my files as you have indicated, power rails are now working and so are electric trains. One thing though, it seems they are killing my fps. Since I replaced all my network with electric trains, I've been running 2 trains at all-time, and up to 7 at the same time, running 2 trains is ok and barely noticeable, but when more are running, I have stuttering and fps drop making the game annoying to play.
By using the debug mode and checking show_time_used_percent, I noticed that in the 'Script update' stats, whatever these numbers mean, 'mod-5dim_trains' was by far the one with the biggest update value, while most mods have < 0.02, 5dim_trains has usually between 1.5 and 4 while running 2 trains, and easily above 5 when running 7 trains, which causes stuttering and fps drops ; one time the mod reached a value of 150, I was litteraly having 3fps instead of 60, and the value was only going up indefinitely, I kind of got rid of the problem by loading my oldest autosave.

I also noticed that the 'Electric network' can get to high values, which I supposed is caused by the fact that electric trains keep wiring themselves to rails while moving. But then why 5dim_trains use so much resources ? Is it because it keeps creating fuel for the locomotive ? Or some update on each tick for each train that is just too heavy ?

Did any of you guys ran into this problem ? I'm considering going back to vanilla trains and it won't be fun to replace all my rails :|
I didn't notice that in my game, but I can look into it. Could you please provide me with a zip'd copy of a save where the problem exists, your mods folder, and answers to the following questions:

What Factorio version are you running?
Were any 5dim mods added/removed/updated since the save was created (including the patches from my previous post)? What was changed?
User avatar
Redstylt
Fast Inserter
Fast Inserter
Posts: 154
Joined: Sun Mar 27, 2016 3:19 pm
Contact:

Re: Bugs and problems

Post by Redstylt »

Hi,

1*
I'm the admin of a server...

When i arrived at the end of the map we start to have a lots of desync (sometimes the all server is in desync loop)
So i start to look for wich objet makes desync and i think it was when we placed Rocket launcher (+productivity modules ?)

Can you try to find why this desync troubles? (very annoying :/ )

2*
This error :
bug5dims.png
bug5dims.png (1.08 MiB) Viewed 11059 times
Thanks
Just a big fan of Factorio and all its mods
Post Reply

Return to “5dim's mod”