StrangeLoopGames / EcoIssues

131 stars 21 forks source link

[Client] Deleted roles or election processes cause major issues with linked objects. #25004

Closed RHAtHome closed 3 months ago

RHAtHome commented 3 months ago

Version: beta 0.10.2.4 OS: Win 10

The problem occurs when a settlement table that holds (for example) either an election process, title or constitution becomes disabled. A timer starts and eventually all the things it was holding are deleted. I have no idea why devs chose to delete, because it gives a lot of issues.

When something gets deleted, it remains in the game forever as a deleted object. You can see it exists, but there is no way to interact with it. In any object with a reference to this deleted object, the deleted object's reference gets renamed and totally bugs the game. So clearly it is not actually deleted, but merely marked as deleted, then why can't i restore it?

For example: It started when i accidentally disabled my government office. The mayor title got deleted, which destroyed the constitution and the election process and all titles i had created at the registrar since i set the mayor to be the manager of these titles instead of my player name. When you then re-enable everything, the game gives you the default stuff everywhere. I managed to modifiy the mayor title, the election process and even the new constitution to the version they used to be, but the titles are gone, since i am somehow no longer the manager. I am still the mayor, but i can't access or see any of the titles i have created. Probably because the game renamed the original mayor title to something like "Mayor 2 revised (deleted)" and now the titles' manager references to a deleted mayor title object.

So far i have multiple ghosting election processes i can not reach from anywhere and 2 constitutions marked as invalid. I never created these constitutions, the game did when the election process became invalid, because the mayor role became deleted.

It would be SO nice if this timer would not delete the object, but mark it as detached. So that i can replace the table, reattach the object and everything just works again as if nothing happened.

This is a very frustrating and disappointing issue. After spending weeks on a town, i end up with lots of weirdly named election processes, constitutions and roles and a lot of roles from the registrar that i am literally incapable of seeing or interact with.

D3nnis3n commented 3 months ago

This works as intended, and as such is not a bug. When objects get disabled contained and related civics become invalid and get deleted after a grace time, ensuring that the invalid state doesn't persist eternally and / or can be abused. Civics only get orphaned ("detached") when you pick up a table on purpose for moving them.

Detaching a constitution for example isn't possible as it is a key part of a settlement and works differently, as such when objects mentioned in the constitution are invalid and wouldn't get deleted, the constitution would stay in a unusable state forever and the constitution never reset so it can be used again.

The system for completely disabled settlements due to invalidity has been changed in Update 11 to instead of deleting the whole settlement only disable all laws and the settlement influence - it just used the same system, but there was no necessity for that.

RHAtHome commented 3 months ago

I understand detaching a constitution is indeed not possible. But if this is the solution to something that could be abused, I would advise you to reconsider this solution. The warning system is faulty, it does not always give a warning and if it does, it gives you just a single one at the start. If you didn't get the warning or forget about it, the consequesnces are in my opinion way too destructive for the settlement. I was forced to use admin commands to delete all of the roles that nobody could acces anymore and then readded them. I hardly believe this is part of your intended behaviour.

The ghost objects I keep seeing and the weird renaming are just an eyesore, they don't break the game. The inaccessible titles do. It can not be intended behaviour to force a user to use admin commands.

D3nnis3n commented 3 months ago

We're not aware of any ghost objects, can you provide a screenshot of what you mean, I have a hard time to imagine what you mean.

Deleted civics get renamed and are purposefully no longer accessible - they need to be replaced by new versions and laws with references be updated. Likewise, if access to titles was lost due to the only manager being such a removed demographic or elected title, new ones need to be created. You are not supposed to in any way manipulate the deleted ones, you can break your save by doing that. There is technical reasons why it's handled like that.

There is no need to delete old titles that are inaccessible, they do no harm. Neither do the saved renamed old civics, they don't appear anywhere relevant without admin intervention and can be ignored. On big servers there is tons of these for a variety of reasons - that works as intended.

I understand you feel that is inconvenient, but it is not a bug. That doesn't exclude the possibility for the functionality to be changed at a later point, but there is no current plans to do so. Your request for that was already tracked, though.

You also have the option to disable the timer for civics in Civics.eco by setting it to a high enough timeframe - that would stop any civics from being deleted due to being invalid.

RHAtHome commented 3 months ago
image_02

image_01

image_03

Image_01 shows all the invalid constitutions. They show up, marked as invalid. I can't do anything with any of them -> ghost objects.

Image_02 shows all the inaccessible titles (BB ). These were not removed, so not renamed, so not possible to re-use the original names. Which means I had to come up with new names for them, which is very much not preferable. These titles were used for many things and I wanted to keep the old names. There were properties that were owned by one of these titles, that ended up unmanaged. The only way I could find to get this done, was to delete them as admin and then readd them with the old name, update all the references in laws etc, seize property as admin. A lot of work... For the elected titles, I am not sure if I saw these show up anywhere else, so it could be that the only way I got to see those was with an admin command, as you said is intended. These are part of what I was referring to as ghost objects.

If something is invalid/deleted and there is no way the user can restore it or interact with it in any way (or as you call it "no longer accessible"), why is it shown? I understand these can't simply be deleted due to existing references, deleting them would probably crash the game.

For the renaming, our election process and constitution are currently named " 3", so something with the renaming before the removal didn't works that well here. I can not rename it to not have the 3, because that one already exists somewhere (probably as deleted and not renamed). This can be seen in image_03.

Thank you for your time and the mention of the Civics.eco file, i was not aware and will look into this.

D3nnis3n commented 3 months ago

Picture 1 (which I guess is what you declared as Picture 2) is intended behaviour, the /titles list command is a development command - they are supposed to show everything. We only lock such commands away when they are dangerous (like /meteor impact), which is not the case here. The command isn't really suitable for anything but internal purposes either, as on a big server you will see a few hundred entries there. These are not ghost objects in any case (not even from a technical standpoint, as they do exist and are required to exist, but are removed from UI view), they shouldn't be displayed inside any actual user facing UI if not specifically refered to like in chat. I'm quite surprised you are using that command at all, which is why I had no idea what you refer to.

Registrar titles are not civic titles, they cannot become invalid - as such they aren't removed. The issue you faced can also happen naturally though, for example when the only manager of a title quits playing or you purposefully delete the manager title, instead of losing it by accident - this simply requires attention to what a user is doing. If everything fails there is a simple admin command to fix this issue and is safe to use, but you can also use the /edit command to bring up the dev menu - important: Any change you make in that menu is valid immediately, even if you didn't press submit. But that isn't necessary as you can just create a new title with a new name - I understand it might be a bit annoying to choose a different name, but titles aren't settlement bound and as such are required to be unique, so anyone could "steal" the titles that you want to use anyway.

If that is too inconvenient for you, there's the admin commands to fix it, just delete the old title or rename it so you can name the new one correctly. That is too minor of a potential problem to implement complicated logic that prevents players from deleting a civic when there is a title using it - especially as people could want and have the power to delete that civic but at the same time have no access to the title referred to. We'd not want to block people and we also cannot automatically detect if you are the same person that held the title before it was deleted to give it back to you or if that is even intended - as typically when a title is managed by a specific elected title when that is deleted, it is intended by the players that this title can no longer be used, as its manager does no longer exist. This is a case of where users just need to pay attention to change respective titles before they delete access givers and keep an eye on their settlements being valid. Otherwise there's admins to help.

Picture 2 (which is Picture 1 for you) shows a known issue when the constitution is automatically reset and is already tracked.

In Picture 3 I assume you are refering to the constitution number, as mentioned before constitutions don't work the same as other civics and do not get renamed - there is no way for a constitution to ever change without amendments, you cannot normally get a new one, it is permanent. The only way for a constitution to be reset is the rescue mechanism that kicked in to reset your constitution after a core title was deleted and it would otherwise have been unusable. This is also the cause for the bug in Picture 2 - the system is not made for the idea of multiple constitutions to have existed and the rescue mechanism is pretty new and didn't exist before Update 10.1 I think. You should not be able to select normal civics anywhere that were removed. This will issue will be addressed together with the one above, but they are low priority as their impact is only visual and the amount of times they appear to begin with is very limited.

In the end the rescue system did what it was supposed to do - ensure that the worst chain of issues that could happen did not leave you with a broken settlement. I'll look into how we can improve the notifications to users - I guess it was overlooked in this case, but for normal civics invalidity there is in opposite to settlement invalidity no persistent messages. This also only could happen as a title referenced directly in the constitution broke - if normal civics would break, the constitution wouldn't be deleted. This happens extremely rarely.

RHAtHome commented 3 months ago

Picture 1 and 2 indeed got swapped.

The reason I used the /titles command is that I went to the registrar, saw 0 titles and wanted to know what the hell was wrong. At this moment I was unaware of any invalid structures, processes or titles. It seemed like the intended way to show all known titles, which gave me the exact information that I wanted. I was not aware of titles not being settlement bound. It makes a lot more sense it works the way it does knowing that (the registrar is crafted at the settlement crafting table I believe, so I assumed it was settlement bound).

I understand your explanation about the title and how it can and should become inaccessible. I agree on this reasoning. You also basically say that you rely on people to pay attention before/when they do something like this. The thing is, this was an accidentally triggered process that nobody was aware of, with a lot of "collateral" damage. Nobody wanted anything to be deleted. Not being able to restore it when this does happen is well... inconvenient. No checks were done, because nobody knew. If something can have this much of an effect and you, as a developer, rely on people to pay attention, make (and keep!) them aware of the threat and risks. If you expect a player to keep an eye on their settlement being valid, notify them when it isn't. Giving a single 60 minute notification at the start is in my opinion not enough. It seems that you understood my point in this already though.

As for picture 3, i was also referring to the name of the election process which is visible here. Same issue, same story.

And yes, what happened here was a broken election process, which broke the mayor title, which broke the constitution and removed access to all titles. A single building became invalid and caused a snowball. Your system did indeed prevent it from falling apart entirely and it was theoretically possible to restore things without admin commands. We would just have ended up with unmanaged titles (which is intended behavior) and had to create new ones.

Maybe a solution could be to orphan everything that can be orphaned instead of deleting it. This prevents the snowball.

I'm glad at least I found something that happens extremely rarely. =)

D3nnis3n commented 3 months ago

Yeh, it is fully fine to use that command - it's not harmful. It is intended for what you think - but that information is typically only relevant for development purposes. On a normal server there can be hundreds of titles as every single player can create them freely. Users are supposed to always interact with the UI's and when something isn't visible in the UI we did that on purpose (like with removed civics that are of no relevance to a user anymore). I'm not sure where the use of seeing a list of all titles is for a user - the ones they made themselves (and have access to) are in their own registrar. Titles typically aren't necessary to be beknown to others, other than maybe for cooperation in civics creation, but then there typically is talking about the civic (like in parliament).

I fully understand the frustration as well, don't get me wrong. It is generally important to take good care of settlements and when working with civics - it also requires a high amount of trust as a builder that you authorize on your city halls can in malicious ways remove your laws given they are bound to objects and not "ethereal" - you can coup a settlement by destroying its tables. When working with civics it's always important to keep that in mind - as such typically this, if at all, only happens once. Civics can do much worse things, a simple mistake in coding could stop everyone on the server from doing anything in a federation - these mechanics are extremely powerful, but they also require in-depth responsibility.

The problem with invalidity hints is that it is problematic to determine who to notify to begin with. We had a lot of complaints in the past that the notifications for invalidity of settlement objects are very annoying to people as they always happen when you move an object or just pick it up for building something as well. (Given you could forget to put them down again, but when objects aren't placed we can't detect them anymore - as such we cannot send repeat notifications, that only works when a in-world civic is invalid) As such we tuned them down and only send them to people that have access to the plot the civics are on and could do something - priorly we sent them to all settlement members so they could inform someone as well -, as when people think it's too much they also do no longer care about them when they pop up. This is something where I don't know immediately how to get the attention of people but without annoying them. We haven't found the right way yet, and I doubt we'll soon. Most people ignore notifications, no matter how intensive we make them - or rather even, they ignore them more the more intensive we make them. That is a sad reality that we can't really change - and given the rarity of such an issue it's not resource efficient to put a lot of development time into a problem that in the end will never satisfy everyone and needs constant readjusting (as it had already gotten) when we could use the time to work on a new feature. Feel free to let me know if you have the idea :)

Orphaning is a system that specifically holds civics in "limbo" when their objects were picked up and they are hence no longer in-world. It would also not have been able to prevent the issue - a constitution cannot ever be "out-world", in that case the settlement would need to cease to exist as it depends on having a constitution. As such, when the election process would have gotten orphaned and in chain reaction also the mayoral title, the constitution would no longer have a valid title defined and would still become invalid and as such the settlement unusable - as such it would reset to prevent unusability and the same problem occurs. The only thing different is, that you could restore the orphaned laws faster with the orphaned objects. (Though I'm not sure if they would actually show, given the constitution reset could make them unlinked from the settlement, that only a developer could answer). We could depend on players restoring the orphaned objects to make the constitution usable again (and not reset it), but that is a high ask to make and requires players to again take care to restore their settlement instead of it happening automatically - which is again not a optimal solution. It could also prevent the rescue mechanism to kick in in unknown circumstances that can cause a invalid constitution without a way for users to restore it, e.g. a potential yet unknown bug. I'll see if we can do anything.

RHAtHome commented 3 months ago

I might have a decent idea to not annoy people, but still make them aware. Make the notification noticable, but don't spam the entire screen. You often get a full screen spam of messages when you invalidate something. Those messages could be combined to a single notification that tells the user(s) something in their settlement became invalid. The moment something becomes invalid, you can display above mentioned notification (basically what you do now, but more general). In addition, you display a timer that counts down the 1 hour period. When the user hovers the timer, it shows the exact objects that are invalid. This way you keep the user aware in a subtle, but noticable way and remove the stress where they have no idea how much of the 1h is left (this always stresses me out). The user can then choose to see more detailed information. A user who does not care will only have the timer displayed (and possibly can even hide it). The moment the settlement is valid again (or the timer expires), the timer will stop and a notification will be given (possibly only to those who did not hide the timer) (basically what you do now). It's not like anyone actually reads the spam of notifications the way it is now. "Yes game, I'm busy, l know I broke it, it will be fine, leave me alone. I can't see shit".

I think sending notifications only to people who have access to the plot is a good decision. And honestly, people actively ignoring notifications is not really your problem. Though passively ignoring them because they get too many is in my opinion.

About the orphaning system. As far as I have noticed, a detached object is still valid and references to it remain active and valid. (example in my second last paragraph). So when you orphan instead of delete, no snowball. So an orphaned election process will not trigger a chain reaction towards the mayoral title or constitution. This excludes the constitution ofcource, as you mentioned before, it is special. I don't see why they would not show, as they normally show the moment you place an object that can hold them as well (seems like they are linked to the settlement). Same for when you place the object that holds elected titles for the first time. The mayoral title is in detached state since the start of the settlement until you place that object. It could always be referenced to, just not edited. There will not even be a need to restore, since all references remained valid. Nothing else was affected. As an exploit, this might enable players to make infinite amounts of titles, laws, election processes with a single object, by just detaching everything until they need to edit it. This can easily be prevented by disallowing the creation of a new one while there are still detached ones. As mentioned before, the constitution is an exception. It should not be detached, but removed as it is now and the rescue mechanism should do its thing when needed. So basically, you link the titles, election processes, etc to the settlement and use the objects to hold them just for CRUD. The ideas in this paragraph and the first should probably be treated as seperate ideas. I did not mean to combine them (also not saying they shouldn't be), just sharing some thoughts.

Yesterday I had a strange issue... Some time ago, I removed the object that holds elected tiltes (can't think of the name right now) and missed the notification. The timer passed and the mayor title got deleted. Yesterday, we had 3 elected titles in the object. I destroyed the object, which detached the items (as intended). Then I replaced the object on a different claim and was unable to link all 3 titles. It gave a message like not being able to link titles from different settlements. I could link either the mayor title or the two others. I chose to link the two others, which kept the mayor title detached. Up until now it still is, but everything works fine, no constitution or elections processes or anything were affected. Now I wonder why the first time it was unable to survive in "limbo" and now the game is just fine keeping it there.

Though this is exactly what I mean how I think it should work. I don't see a problem with a detached mayoral title that remains valid. Or a detached election process or whatsoever (except for the constitution!). It makes the game so much more user friendly. Implementing this could possibly totally remove the warning/timer system, since there is no threat. Possibly a notification that you detached an object, but I honestly doubt that is possible. Players know.