[MOD 0.14] Filtered Deconstruction Planner 0.4.10

Topics and discussion about specific mods
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

What Choumiko said, since all those mods like the Module Insterter, Upgrade Planner and mine use a altered vanilla deconstruction planner, whenever one of those mods is used, all selected entities are basically marked for deconstruction. But in the event data of an entity being marked, the player who issued the marking is not included. Without that information we can't know, what planner item issued the marking and therefore we cannot decide what should happen next. This is the reason why all mods using the deconstruction planner as a selection tool disregard a selection if more than one player has such a tool in hand.

It wouldn't even be possible to check that every person has the same deconstruction planner item in hand (for example all using the filtered deconstruciton planner) as each player has a different configuration. Therefore, again, it is not possible to know what should happen with the selected entity exactly.

@Choumiko: that solution has one problem, as the player can move during the selection. That means in a multiplayer game Player A and B stand at [0,0] with both having the selection tool in hand. When player A then starts selecting and moves to [100,100] while doing so, half of the selected entities are nearer to Player B, because Player A moved away from the starting point. So you're still completely unclear on which player issued an entities marking...

EDIT: I bumped up the modding interface request thread for including the player in the entity_marked_for_deconstruction event as that would allow for mods to circumvent the described problem.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by Choumiko »

NearlyDutch wrote:@Choumiko: that solution has one problem, as the player can move during the selection. That means in a multiplayer game Player A and B stand at [0,0] with both having the selection tool in hand. When player A then starts selecting and moves to [100,100] while doing so, half of the selected entities are nearer to Player B, because Player A moved away from the starting point. So you're still completely unclear on which player issued an entities marking...
Oh well, you're right. Yet another solution: If there's more than one player with a deconstruction item in hand, save the entities marked, along with the items of the players, create a gui popup asking "Did you just use item x?" Once everyone answered do your stuff. Probably too much work though.
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

I'd say let's see what the devs say about the improvements to the event, because all solutions we can come up with are essentially quite "hacky" and either not really stable and unflexible or like your latest suggestion, interrupt the game for players who are nowhere near the entities in question. Just imagine you are in the middle of a biter nest, barely staying alive and all of a sudden some pop up dialog blocks your view and you die. I predict rage quits :D :D
bruteman
Inserter
Inserter
Posts: 43
Joined: Thu Jan 23, 2014 2:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by bruteman »

ok i see where your going here I take it if "multiplayer detected" unique additional "items/entities" could be added for instance player one crafts and carrys around entity deconstruction planner 1 and you tie all your player data to that entity and if player "2" crafts "deconstruction planner 2" his data is tied to that again hacky but it would solve this whole player tracking issue no?

I mean no matter how many have come and gone in my game when i open it up to public that are watching my stream to join player 1 is always Player 1 and the next to join is player 2 if player 2 isn't around tomorrow and JoeBlow player 3 joins its still player 1 and player 3 in the game with no player "2" currently may be another option to tie into?

just throwing out ideas and options here i may be just blowing air out of my ass tho :)
Image
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

Unique deconstruction planner items per player would still have the problem that you can't detect what player selected what entity with their item. All those deconstruction planner items (including the vanilla one) issue per selected entity the entity_marked_for_deconstruction event which only includes the marked entity as data. No way of knowing the player or the item used (scripts could also programmatically mark entities for deconstruction). Once in the event all uniqueness of the data is lost.

That is what we want to try to achieve. Add the issuing player to the event and you can directly check what should happen to the marked entity depending upon what item the player holds in his hand and how that item is configured. Without the issuing player, that is simply not possible.

All Choumiko and I are throwing around are very hacky workarounds on how to check which marked entity belongs to which player with an deconstruction planner item in his or her hand. But all we can come up with are solutions that won't work 100% of the time or would seriously interrupt normal playing of all players involved even those who did not issue a single entity to be marked for deconstruction.
bruteman
Inserter
Inserter
Posts: 43
Joined: Thu Jan 23, 2014 2:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by bruteman »

NearlyDutch wrote:Unique deconstruction planner items per player would still have the problem that you can't detect what player selected what entity with their item. All those deconstruction planner items (including the vanilla one) issue per selected entity the entity_marked_for_deconstruction event which only includes the marked entity as data. No way of knowing the player or the item used (scripts could also programmatically mark entities for deconstruction). Once in the event all uniqueness of the data is lost.

That is what we want to try to achieve. Add the issuing player to the event and you can directly check what should happen to the marked entity depending upon what item the player holds in his hand and how that item is configured. Without the issuing player, that is simply not possible.

All Choumiko and I are throwing around are very hacky workarounds on how to check which marked entity belongs to which player with an deconstruction planner item in his or her hand. But all we can come up with are solutions that won't work 100% of the time or would seriously interrupt normal playing of all players involved even those who did not issue a single entity to be marked for deconstruction.
and what about one global filter for the current game that any player can adjust as they want to i.e. most of the time in my games were either targeting trees or excluding trees the other thins we filter are on a unique basis for short periods if the filters were global then the restriction wouldn't be needed and it would be more like the vanilla style?

i am just looking at a few scenarios that have happened on stream over the past few weeks one time a player goes afk and had the planner sitting picked up with his cursor made it unavailable to the other players in the game until he came back 5 - 10 mins later large disruption to the game other times 2 or 3 are pushing biters they are using either exclude trees or target biter drops both are using same filters. the 3rd scenario is because of your mod it is also disrupting the vanilla deconstruct planner as well which should be a global tool and it suffers from the same issue so player 1 cant just deconstruct everything with the vanilla one either no matter what planner the modded one or the van one is in someone else hands.

Ideally for me is to not tie your mod into the vanilla planner if that was at all possible so if you cant filter deconstruct because its busy with someone else the vanilla planner would still work.
Image
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

I get what you are saying and a global filter configuration would surely solve a few of the arising issues with the current solution, but the way it works at the moment is the only way to insure that the mod is compatible with all other mods using a deconstruction planner item for their purposes (mainly upgrade planner and module inserter). Even with a configuration shared between players (and forces for that matter), you would still need to disregard all markings if anybody holds anything other but the filtered deconstruction planner in hand.

Also, a global configuration would create other issues that would disrupt the multiplayer experience. Imagine a situation where you are targeting all wooden power poles in a large area to upgrade to medium ones and in exactly the moment you release the mouse button another player switches to exclude mode. Then all of a sudden the wooden power poles would be the only thing still standing in your factory.

In regards to the disruption of the vanilla deconstruction planner: as that item's functionality is the only way for us (at the moment) to let the player select entities with a bounding box, there is no way currently to decouple the mod from the vanilla deconstruction planner functionality. Again, the addition of the player as a value in the used event would solve this issue, so hopefully we get an answer by one of the devs tomorrow.
bruteman
Inserter
Inserter
Posts: 43
Joined: Thu Jan 23, 2014 2:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by bruteman »

Okies please don't take anything i have said as criticism as the mod truly works and is superb in solo play I am trying to just blindly toss out ideas and possible options . the mod has been great and i really support it pretty much the only reason I am here trying to assist in making it succeed its my #1 solo go to along with upgrade planner etc. it just really throws a wrench into the mix when you go to MP and its sorely missed to remove the mod :)

Regards,
Brute
Image
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

Criticism is always welcome. I always want to make my mods better. And any idea is worth exploring.

I'm a relatively direct person and with English not being my first language, but German, sometimes stuff I say might sound harsher than intended. :D
User avatar
Roktaal
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Mar 26, 2016 6:42 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by Roktaal »

When using exclude mode it is not possible to deconstruct stone and concrete tiles. On normal mode it is.
exstreamrider
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 15, 2016 7:47 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by exstreamrider »

just double checking something is it a possibility to have it where the system can have an advanced setting that would allow the area of effect to be specified(based from a center point perhaps like a target.) and maybe get an auto deploy block that can deploy the filter based on any settings in the system(and make sure its red circuit compatible, cause then you can have it where if an item exceeds that of a certain # then it would be deleted) this would help some of my builds which require automatic item deployment by items AKA BAD chests
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

@Roktaal:

Yeah, I'm aware of it, but I'm currently loaded with university work and a new job, so I'm not sure, when I'll be able to fix it.

@exstreamrider:

I'm not really sure, what you are asking, sorry. An item, that you can place and in a given radius around it will mark items for deconstruction that apply to a specified filter configuration, but only as long as some circuit condition applies? Is that correct?
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by Qon »

I just want to say thank you. This is really useful. I don't understand why this isn't part of vanilla. A bit qonfusing which one of target and exclude excludes items from bueprints with the scissors (I think it's "target") and which one keeps only specific items ("exclude" of course for maximum qonfusion).
I get that it is a double negative, but there's no reason to not avoid those for clarity... :?
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

@Qon: The way I thought about it while implementing was, that it works just like if you would place the blueprint, let the bots build it, remove the designated items with the filtered deconstruction planner and generate a blueprint from that. Just all in one step. Either you target specific item's to be cut out or you exclude specific items from being cut out of the blueprint.
exstreamrider
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sun May 15, 2016 7:47 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by exstreamrider »

NearlyDutch wrote:@Roktaal:

Yeah, I'm aware of it, but I'm currently loaded with university work and a new job, so I'm not sure, when I'll be able to fix it.

@exstreamrider:

I'm not really sure, what you are asking, sorry. An item, that you can place and in a given radius around it will mark items for deconstruction that apply to a specified filter configuration, but only as long as some circuit condition applies? Is that correct?
yeah you kind of have the gist.

what i was attempting to describe is a system that will take an item and automatically destroy it in a specified area without assistance from the player.

the reason i brought up this idea is that some items cannot be placed without the removal of an object and when the object you wish to remove... simply needs to move.. it becomes difficult to deal with as you have to monitor it.

so put simply i believe removing items would be useful to allow the player to do other things while busy off building their factory.

if you need an example imagine that you end up having to go by all the time and delete your mining system and can't actually do work as you can't get enough resources thus making the player have a rough time. using the BAD chests you can place things in a specified area. my idea was use circuits to detect how much iron is there if their is less than the required amount it would then delete the system and continue upwards until it reaches another patch of the item. at which point the system would pause to collect it then move on. leaving the player free to do what is necessary.
British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by British_Petroleum »

Yessss this is exactly what i was wanting :D Hopefully the core game will have a similar feature in future.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by Choumiko »

Updated for Factorio 0.13: Filtered Deconstruction Planner 0.4.2

Should no longer have the issue in MP where it wouldn't work if a player is afk with another (filtered) deconstruction planner/module inserter etc.
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

Thanks Choumiko, I merged your code and tested everything. v0.4.2 is now available on the official GitHub repository and will be published to the mod portal asap. I just updated the icon to match the new style in 0.13.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by Choumiko »

NearlyDutch wrote:Thanks Choumiko, I merged your code and tested everything. v0.4.2 is now available on the official GitHub repository and will be published to the mod portal asap. I just updated the icon to match the new style in 0.13.
Phew, glad you're not completely MIA, got enough mods to maintain as it is :mrgreen:
NearlyDutch
Inserter
Inserter
Posts: 47
Joined: Tue Oct 20, 2015 12:56 pm
Contact:

Re: [MOD 0.12.22] Filtered Deconstruction Planner 0.4.1

Post by NearlyDutch »

Nah, exams and 0.13 started on the same day. Was planning on doing the update myself today, actually. I'd be happy to help if you need me.

Maybe it would be worth to put some of the mods and modders into a factorio modding organization on GitHub to better organize maintenance and future-proof against someone becoming MIA. In that case it would then also be nice to add multiple maintainers on the mod portal, who can edit and update the mods.
Post Reply

Return to “Mods”