Copying colors from locomotive to wagon

Place to get help with not working mods / modding interface.
Lazarus_Octern
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Feb 10, 2023 8:45 pm
Contact:

Copying colors from locomotive to wagon

Post by Lazarus_Octern »

I have been working on creating a mod for more powerful and electric versions of angels trains and wagons.
I am pretty much done but I am having trouble getting the coloring/tinting of the wagons to work.
I can copy the color of my trains and paste it to angels original one but not to my wagons.
If I copy from the angel wagon i can paste to both the locomotive and wagons.
Image
Red are my modded trains, orange is angels.

I suspect its something with the groups since i dont get the "copy bounding box" when i try to copy to my own wagons.


Which is strange since i copy most of the train and wagon info over and only change names, inventory size and so on...

Code: Select all

local smelting_3 = table.deepcopy(data.raw['locomotive']['smelting-locomotive-1']) --get angel smelting recipe
	smelting_3.name = "emt-loco-smelting-3"
	smelting_3.minable.result = "emt-loco-smelting-3"
	smelting_3.max_speed = smelting_3.max_speed * 2.4
	smelting_3.max_power = "1800KW"
	smelting_3.reversing_power_modifier = t3_reverse
	smelting_3.braking_force = t3_braking
	smelting_3.friction_force = t3_friction
	smelting_3.air_resistance = t3_air_res
	smelting_3.equipment_grid = grid_size
	smelting_3.burner = { fuel_inventory_size = 0 }

	data:extend({ smelting_1, smelting_2, smelting_3, smelting_tender_1, smelting_tender_2, smelting_tender_3 })
	
	.
	.
	.
	
	local smelt_2 = table.deepcopy(data.raw['cargo-wagon']['smelting-wagon-1'])
	smelt_2.max_speed = smelt_2.max_speed * t2_speed_multi
	smelt_2.inventory_size = smelt_2.inventory_size * t2_size_multi
	smelt_2.name = "emt-wagon-smelting-2"
	smelt_2.minable.result = smelt_2.name
	
	data:extend({ crawl_2, crawl_3, smelt_2, smelt_3 }) 
If anybody has any idea on why that is happening i would love to hear it.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Copying colors from locomotive to wagon

Post by darkfrei »

Lazarus_Octern wrote: Fri Feb 10, 2023 9:19 pm
If anybody has any idea on why that is happening i would love to hear it.
Are you sure that you have a mask while the prototype copying?
2023-02-28T14_24_10-D__Factorio_1.1_factorio-current-01.log - Notepad++.png
2023-02-28T14_24_10-D__Factorio_1.1_factorio-current-01.log - Notepad++.png (46.25 KiB) Viewed 861 times
Post Reply

Return to “Modding help”