Search found 23 matches
- Tue Jan 02, 2024 10:41 pm
- Forum: Modding help
- Topic: [Help]Grouping Tiles and providing access to the power network for things built ontop
- Replies: 0
- Views: 304
[Help]Grouping Tiles and providing access to the power network for things built ontop
Hi, I'm looking to make my mod more UPS friendly by removing the hidden entity placed on the Tile space to provide the functionality, as you can imagine, having 1 or more entities in each space a tile occupies VERY quickly adds up and has negative effects on the UPS. Ideally I'd love to be able to h...
- Fri Jun 09, 2023 6:51 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
YES! Got it working! Thank you so much! This is how it ended up after your last reply local function swap_entities(surface, tiles) local position, newEntity, widget, force for t, tile in pairs(tiles) do position = tile.position -- check the same x/y coordinates for the existing entity on the tile Wi...
- Fri Jun 09, 2023 6:23 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
I removed the check on widget before destroying and creating the new one and it is erroring on a nil value for widget so clearly it is not finding the entities during the search Error while applying migration: Powered Floor Extended: poweredfloorextended.0.0.8.lua ...loorExtended__/migrations/powere...
- Fri Jun 09, 2023 5:26 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
I gave the entities a selection box param so I could mouse over them in-game and yes they are there still. If I remove the tiling and place it down again it will put down the new widget as expected but the existing ones have not been removed. And the the particular entity I am trying to replace does...
- Fri Jun 09, 2023 3:45 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
Yes, see edit 2 in my last post. Out of coding habit I ordered the variable definition of the surfaces to before the function, it's not an issue in languages like c# or c++ as things get defined before the code runs but it is very clear the lua needs the function to be defined before being called. T...
- Fri Jun 09, 2023 3:17 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
Currently trying to test this migration and getting this error in response. https://ibb.co/121RNZg I thought these checks would assure that the collection isn't empty? -- loop through and for each tile that is a logistics floor tile if oldSurfaceTiles and next(oldSurfaceTiles) then swap_entities(sur...
- Fri Jun 09, 2023 11:28 am
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
Usually, there will be only three forces in the game: "player", "enemy", and "neutral". But scenarios or mods may add more forces with players on them. So I guess it would be better to create the new entity for the same force the old entity belonged to. Would this need...
- Fri Jun 09, 2023 9:38 am
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
Thank you for your help. I have amended to what I think is almost complete, I just need a little more help. I'm not certain on how to delete the existing entity when/if I find it. -- get surface tiles local surface = game.surface local oldSurfaceTiles = surface.find_tiles_filtered {name = "logi...
- Sun Jun 04, 2023 8:25 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
-- get surface tiles local oldSurfaceTiles = find_tiles_filtered {name = "logistics-powered-floor-tile", force = game.forces.player} local newSurfaceTiles = find_tiles_filtered {name = "logistics-floor-tile", force = game.forces.player} -- loop through and for each tile that is ...
- Mon May 22, 2023 4:48 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
When you say "hidden entity", do you mean hidden tile? (https://lua-api.factorio.com/latest/LuaTile.html#LuaTile.hidden_tile). If so, have you tried using a JSON migration for this? (https://lua-api.factorio.com/latest/Migrations.html). It seems to me that it should apply to hidden_tile a...
- Mon May 22, 2023 3:42 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
Re: How to replace entities on tiles in a migration
I'm confused, why would I migrate in the control.lua?
I only want this to run once, when updating to this version, so surely utilizing the migration functionality is ideal?
I only want this to run once, when updating to this version, so surely utilizing the migration functionality is ideal?
- Sun May 21, 2023 8:46 pm
- Forum: Modding help
- Topic: How to replace entities on tiles in a migration
- Replies: 20
- Views: 3648
How to replace entities on tiles in a migration
Hi, I need some help with updating my mod, I am replacing the hidden entity that is placed when a particular Tile is built with a different hidden entity. I have come to the conclusion that this needs to be done via a migration script. I cannot simply do a replace all for the entity as it is used fo...
- Sat May 06, 2023 10:34 pm
- Forum: Texture Packs
- Topic: [Request] Assets for flooring & roboports
- Replies: 0
- Views: 1457
[Request] Assets for flooring & roboports
Hi, Making this mod: https://mods.factorio.com/mod/PoweredFloorExtended I have some basic graphics in place but they are pretty sad. Looking to have fresh graphics for all items included if anyone is up for it. The aim is to keep things looking clean/futuristic in style but hopefully not too out of ...
- Sat May 06, 2023 1:59 pm
- Forum: Modding help
- Topic: Need help with entity image size [Resolved]
- Replies: 2
- Views: 635
Re: Need help with entity image size
Thank you for your reply, this did indeed change the scale of the in-game image. I still don't understand how stone furnaces and accumulators can be the same size though with different image sizes. They both use the same level of scaling. I'm trying to figure this out as my next step is to make my 3...
- Sat May 06, 2023 12:53 pm
- Forum: Modding help
- Topic: Need help with entity image size [Resolved]
- Replies: 2
- Views: 635
Need help with entity image size [Resolved]
I am trying to add in my own roboport entities with their own purposes and thus they are smaller (2x2 instead of 4x4). I have adjusted the selection box and collision boxes appropriately and they render in-game as expected, however I am currently using the default graphics from vanilla and it is sti...
- Sat Mar 09, 2019 10:05 am
- Forum: Texture Packs
- Topic: Reasonable Color Tiers (HD textures for 0.15)
- Replies: 5
- Views: 7537
Re: Reasonable Color Tiers (HD textures for 0.15)
Been making my own version of essentially this (although I only touch the needed inserters and assemblers). I don't have the right software to produce good recolours of the base assemblers though, would it be alright to use your images and possible for you to provide the HR versions as well? At the ...
- Sun Jan 14, 2018 3:39 am
- Forum: News
- Topic: Friday Facts #225 - Bots versus belts (part 2)
- Replies: 1016
- Views: 417870
Re: Friday Facts #225 - Bots versus belts (part 2)
I'm not sure if this has already been suggested, there are many pages on this thread. It is probably more of an early game thing as it starts but what if you had assembly machines that had belts feed directly into them (rather than having inserters feed off the belts). There is a mod that adds this ...
- Thu Aug 17, 2017 8:19 pm
- Forum: Modding help
- Topic: Failed to load mod - Sprite position [Resolved]
- Replies: 9
- Views: 4411
Re: Failed to load mod - Sprite position
YUP. It's sorted now (>__>) Turns out it was just because I was using the base Transport-Belt (yellow) images against the Fast-Transport-Belt (red) code Thank you all once again for your many helpful messages. All that's left to do now is colour the belts and give them descriptions :) Many Thanks - ...
- Thu Aug 17, 2017 8:16 pm
- Forum: Modding help
- Topic: Failed to load mod - Sprite position [Resolved]
- Replies: 9
- Views: 4411
Re: Failed to load mod - Sprite position
Sure, it's attached. Also I managed to solve the issue with the belt images at the least. Turns out the base transport-belt image sizes are different to the fast-transport-belt sizes (which was the code I was using) now just need to fix the splitter. I get the feeling it's the same thing so if it wo...
- Thu Aug 17, 2017 6:47 pm
- Forum: Modding help
- Topic: Failed to load mod - Sprite position [Resolved]
- Replies: 9
- Views: 4411
Re: Failed to load mod - Sprite position
Just make the picture twice bigger. That did actually get the game to load without the mod crashing so that's a step forward at least. However now the animations are all screwed :/ f-issue.png The first belt line only shows the end of the lines and the other two just flicker in and out of existence...