First of all, Tiamo, thanks for your suggestion. Idea of moving eveything to root location is really great for its simplicity, but unfortunately won't fully work for holds and cabins.
I was thinking about it for some time and Seko's idea really looks like the best possibility. If implemented correctly it won't cause problems with any kind of building/vehicle. So it solves all the problems perfectly.
There I'll describe general concept of how I see it:
Let's say all
buildings are first
destroyed to become
ruins, while
ruins and
vehicles are
disassembled to get back part of resources used for a building/vehicle.
Ruins are assumed as technically being stationary vehicles.
1. destroying buildings
1.1 It's possible to start destruction project for every building in the game, no matter how many extensions and how much stuff/people is inside. Cost (in days) of destruction is a thing to be discussed later, but it will be based on construction time of building and all its extensions.
1.2 When destruction project is finished it's always successful.
- Building type is changed to ruins of adequate type. (for example: cottage -> ruins of cottage). The same happens for all extensions. Vehicles (which means just steel cages and ships in harbour) are not affected.
- All fixed objects are removed without any compensation.
- All ongoing projects are removed. I'm unsure how to compensate them, but they must be compensated. Otherwise it'll be possible to create lots of projects just before destruction of building to make used resources disappear. This way even staff wouldn't have an easy way to give them back. Best idea would be to use normal project canceler code.
- All movable objects and people stay inside.
- It's possible to attack people in ruins in the same way as when they are in vehicles.
- As a result it's possible to kill people inside even when capacity is exceeded and get bodies outside with staff's help.
1.3 Building locks are destroyed, because they are fixed objects. Vehicle locks should be impossible to build in the ruins. (it'll require a code fix)
1.4 It's impossible to prohibit building all machines in ruins if they can be built in vehicles. For example it'll be possible to build a smoker inside and I think it's acceptable.
1.5 It's impossible to build any new extensions. All existing extensions are ruins, cages or ships.
1.6 It's assumed that destruction of building can be peaceful way of getting rid of buildings, getting resources or a way to defeat enemies who are hiding inside during the battle. That's why it's not necessary to make any actions inside of a building and it's not possible to stop the process/make project fail.
2 disassembling ruins, land vehicles and ships (later called
vehicles)
2.1 you can start disassembling vehicle when it's completely empty (no objects, no projects, no people inside, no extensions)*
2.2 disassembling project can be successful or unsuccessful. It's unsuccessful if vehicle upon project finish isn't completely empty. It also may be unsuccessful if there'd be not enough space for raws got from disassembling. If it's unsuccessful then you must try again.
2.2 disassembling project for ruins is usually quite short. For normal vehicles its based on construction time.
2.3 land vehicles which can be built using resources or vehicle parts will always yield parts (surprisingly, it will require some work to make it possible, but certainly it is)
2.4 point 2.2 implies that disassembling can be only peaceful, there's no use in doing it during battle and enemies can easily make your disassembling project unsuccessful. You must have complete control over the location to make successful disassembling.
* For some time there will still be some objects which are impossible to disassemble, so it'll be possible to ask staff to remove it magically. But I hope at least radios, furniture and sails will be made able to be disassembled before that. It'll leave a list of about 15 "special" object types which still won't be possible to disassemble. But it won't be much.
Ok, I think it's enough to say this idea is a really nice solution. It can be implemented in two separate steps, where I think 1. is more important, because it can deal with barricading exploit.
It may look strange there will be like two different systems to destroy things, but buildings and vehicles are not the same, they have different properties and characteristics so they'll require two systems in any complete solutions. And it's absolutely amazing it's possible to merge two-step building destruction with one-step vehicle destruction to require just two-step system.
Do you see any possible new exploits going with this implementation? Do you have any ideas how to improve it? I think the core functionality should work as said above, but details may change.
‘Never! Run before you walk! Fly before you crawl! Keep moving forward! You think we should try to get a decent mail service in the city. I think we should try to send letters anywhere in the world! Because if we fail, I’d rather fail really hugely’