Removing buildings that cannot be sold

TurboJ
Posts: 89
Joined: Wed Dec 04, 2019 12:42 pm

Removing buildings that cannot be sold

Post by TurboJ » Fri Aug 07, 2020 1:23 am

I'm hoping someone has experience on this. When playing a map that doesn't allow you to sell farm buildings, but there are some buildings you simply need to remove for whatever reason.

Have you used the Giants Editor this way? Is it a feasible thing to do or is the hassle too much assuming no prior experience on the software?

Do you happen to have a link to a guide for this particular job?

And finally, if what you're removing is more than a static object - say, an animal pen, for example. When the object has fill triggers, animal paths and whatever, such an operation is sure to become more complicated. How big a job are we talking about?

mike33s
Posts: 39
Joined: Thu Aug 27, 2015 2:59 am

Re: Removing buildings that cannot be sold

Post by mike33s » Fri Aug 07, 2020 6:45 am

The steps are relatively easy. I do this often to customize maps to my play style, remove trees to make joining fields easier, removing buildings and cleaning up things I don't like or want. Two things to keep in mind:
1 - This only works if you are on PC.
2 - Just because you edited a map, doesn't mean you created it. Please don't try to re-upload or publish a map you've edited as your own creation.


Steps:
1 - Download Giants editor software
2 - Save a copy of the map that you are editing in a folder that IS NOT your game folder or mods folder.
3 - Unzip the map
4 - Locate the i3d file for the map. I've found they are usually labeled ModMap.i3d
5 - Open it up
6 - Learn the controls of game editor. They take some getting used to.
7 - There is a tree of all the items on the map that is visible in the game editor.
8 - Find the object you are looking to remove, click on it. Double check that you aren't in a sub section of the item. Delete it.
9 - You may have to clean some stuff up if things were not inside the item. ie: if lights were attached to the structure or if the author had put in some decorative items around it.
10 - Save your changes
11 - Grab all of the files, re-zip them. Save it under the same name and put it in your mods folder.

Check on Youtube there are multiple "FS17 Editing maps videos" and the theory and tools are essentially the same as FS19.

dbump
Posts: 24
Joined: Sat Apr 25, 2020 4:07 am

Re: Removing buildings that cannot be sold

Post by dbump » Mon Aug 10, 2020 3:54 pm

Adding on to the excellent points above:
Sometimes you will find a building in the game that's not in the map in Giants Editor. Those are generally found in defaultItems.xml in the map mod (and then in items.xml in your savegame after you first save a game on that map). You can edit the defaultItems.xml to mark them as sellable and displayed, or you could just comment them/delete them from the items.xml in your savegame (a backup is recommended!). Depending on the map, some buildings will also have an associated trigger, so you may have to delete a set of objects in Giants Editor and also remove the trigger via xml edits (I've seen this with bunker silos more than anything).

TurboJ
Posts: 89
Joined: Wed Dec 04, 2019 12:42 pm

Re: Removing buildings that cannot be sold

Post by TurboJ » Mon Aug 10, 2020 4:40 pm

Thank you both for your detailed information!

Eische
Posts: 2342
Joined: Thu Oct 18, 2018 5:17 pm

Re: Removing buildings that cannot be sold

Post by Eische » Mon Aug 10, 2020 5:02 pm

I would be careful with just deleting stuff. It can mess up all the follow-up node references, which will cause several errors.
If you don't know exactly what you are doing, just move the stuff you want to get rid off below the map surface.
Usually it is the Y axis. So translating the object 50m downwards the Y axis should be sufficient so that it not interferes with AI or anything else.
Playing on PC - Win10 - AMD only
How to post log file
How to upload pictures

dbump
Posts: 24
Joined: Sat Apr 25, 2020 4:07 am

Re: Removing buildings that cannot be sold

Post by dbump » Tue Aug 11, 2020 1:30 am

Eische wrote:
Mon Aug 10, 2020 5:02 pm
It can mess up all the follow-up node references, which will cause several errors.
I've definitely moved stuff down well below ground in cases where I wasn't sure if I might want it again in the future, but tell me more about the follow-up node reference? I've deleted a raft of things without seeing errors in the log, but that could just be dumb luck.

Eische
Posts: 2342
Joined: Thu Oct 18, 2018 5:17 pm

Re: Removing buildings that cannot be sold

Post by Eische » Tue Aug 11, 2020 10:39 am

dbump wrote:
Tue Aug 11, 2020 1:30 am
Eische wrote:
Mon Aug 10, 2020 5:02 pm
It can mess up all the follow-up node references, which will cause several errors.
I've definitely moved stuff down well below ground in cases where I wasn't sure if I might want it again in the future, but tell me more about the follow-up node reference? I've deleted a raft of things without seeing errors in the log, but that could just be dumb luck.
It depends on how the structure of the map looks like.
Think about objects with a built-in light for example. If they all are placed in the same transform group, respectively the same structure tree level, deleting one of them will mess up the nodes for the following ones. The nodes will be renumbered automatically. If you load the map in the game, there will be an error show up telling you that the last light node can't be found. In the xml there are still lets say 10 lights defined, while in the map.i3d file only 9 are there.

This is not a critical thing but acts as an example for more bad things that can happen.
Playing on PC - Win10 - AMD only
How to post log file
How to upload pictures

Post Reply