Belt quality

by Anitone

Quality now affect belts speed

Tweaks
27 days ago
2.0
1.17K
Logistics

g More Quality Scaling

a month ago
(updated a month ago)

I recently added belt scaling as an option in my mod "More Quality Scaling" (https://mods.factorio.com/mod/more-quality-scaling).

It seem like you are replacing the belt items inside the player inventory, and are using an area tool to upgrade placed entities. My approach is to make no changes to items, and replace the entities when they are built.

My method works well for ghost building/blueprinting, but currently has issues with drag-building belts from the inventory and placing down underground belts from the item (instead of q-selecting the "qualitized" entity), while your method seems much more straightforward for early game building, but less convenient for late game blueprinting (and less "elegant" due to the necessity for shortcuts).

Perhaps we should a) document the differences between our mods, and b) implement some sort of compatibility - using the same entities (preferably mine, since I already add "placeable_by" properties, and optionally make quality undergrounds longer) would probably already result in pretty good overall compatibility - physical characters could work with your placement items, while remote players or blueprints could use my replace-on-build/placeable_by system...

a month ago

Hi! I know that problem that you are described with drag building. In early stage of mine mod i've used it too, but it was very unstable(constantly appearing underground belts blueprints, unable to copy and paste entities, also unable to quick pick item), so i decided to go conversion way. I didn't really tested the remote build capability of my mod, but i guess it won't work well because 1) my mod has no event handler when bot tries to mine quality belt 2) belts from my mod and belts from vanilla are separate and trying to place quality build via remote view will led to errors such as bot net cant find needed items in storage or you need to place vanilla belts first and then convert it to modded ones. So you suggesting to make semi-build system? Where when player takes belts it will be converted, but if bot tries to build it, it will build vanilla belt that will be converted at place? Sounds good to me. If you got any ideas how to make decent compatibility write it here(my timezone is weird).

30 days ago
(updated 30 days ago)

I think the easiest way to make our mods compatible would be for you to check if the belts option of my mod is active ( if settings["mqs-belt-changes"] and settings["mqs-belt-changes"].value), and if so, skip adding your entities and point your items to mine (the naming scheme for my entities is currently qualitiy_name.."-"..original_name). My entities would still mine to vanilla items, but if a player picks those up, your script would replace them with your items.

I'm also working on a system to solve the drag build issue from another angle (delay replacement of belts for around a second), but even if that works out, there will probably still be cases where your approach is more convenient.

30 days ago

I found a few bugs with two mods enabled at one time. But first of all i fixed mine, so ow it doesn't crash when you try to mine belts from your mod. First bug is when your mod replaces underground belt(instantly), player may found condusing that underground belts lost visual linkages to each other, so players will need to memorize underground belts length. Second bug(very fun XD) when you try to place vanilla'ish belt it converts to belt from your mod and multiplies speed, and then when i try to convert belt from your mod to belt from my mod via tool, guess what? it multiplies speed XD. So you got legendaty conveyor belt with speed of 92.5 items/s.

30 days ago

So i need to disable entity creation if your mod loaded? Why i need to convert mined items to my mod if your mod is active?

30 days ago

Yeah, I'm aware of the underground issue - copy/paste placement or using pipette selected ghosts works fine, but directly placing the items isn't fun at all.

The second "bug" is just what you should expect when you apply 2 different quality based buffs to an entity :D

You'd need to disable entity creation, and set your items to place my entities. Since these entities will drop the vanilla items when mined, if these enter the character inventory, your mod would then replace them with your items for easier placement.

One other thing I just thought of - I don't know if it's a vanilla shortcut or from a mod, but I often use the "alt+scroll" control to switch the item in hand between quality levels. Do you already switch out the item in the cursor when the selected quality is changed (rare-transport-belt:epic -> epic-transport-belt)? If not, this would be a useful feature ...

30 days ago

I don't know why, but i cant register on_player_mined_entity event while these options are active. Anyways now when both mods active my mod doesn't create new entities, only items with different names, but when you mine belt from your mod game returns vanilla belt. I can make it so game will convert it on pickup. But then it would convert all belts in inventory.

30 days ago

Ill upload fixed version of mod for now, it works, but whatever i do on_player_mined_entity not calling, also i cant insert my items in inventory. The version i ma going to post just not going to crash when both mods used at same time.

29 days ago
(updated 29 days ago)

I don't think you need to register on_player_mined_entity - your on_player_main_inventory_changed handler should suffice for the item replacement.

edit: why did you even have an on_player_mined_entity handler in the first place?

29 days ago
(updated 29 days ago)

There were a bug when player mined a belt game returned vanilla belt without quality. So on mined entity should take care of it.

New response