Default Types V1.0.3.2

DESCRIPTION

Updated for game update 1.7+ Configuration rerouting has been removed in favor of the new vanilla loading system, which does about the same as the old Default Types version did.

V1.0.3.2
Fixed an issue where the unknown fill type used as a placeholder when vehicles, etc are empty was not being created properly. This was causing a rolling error when first entering an empty vehicle.
Removed the setting because it was just over complicating things.

V1.0.3
Fixes an issue where, if another mod makes an incorrect call to a vanilla function, Default Types would crash.

V1.0.2.9
Updated to new game version (v1.7+). While the old version remains for maps that still use it, functionality is not guaranteed. The vanilla game configuration has changed, so even with the old version Default Types, it might not work quite as expected.

ChangeLog:

Switched to a more blacklist style configuration due to the base game now having a feature similar to the original Default Types rerouting feature.
Base game rerouting is mainly for fruit types (other types still use the old game first map append method).
Fill types can be switched to the new map first load method (optional).
Fixes a vanilla 88% lockup issue when a placeable meadow uses a fill type not found or supported by the target animal.
“Restricted” items (like snow) can no longer be removed. This is based on a list of items known to be hard coded into the game.

Changes in this version 1.0.1:
Configuration change, now all configured in the <thDefaultTypes> section of the map xml
Added ability to re-route densityMapHeightTypes
Added ability to re-route storeItems
Added blackList capabilities
Added backwards compatible code

Update v1.0.0.5:
Updated the way defaults are loaded, should be more efficient now
Added a check for double registered fill types
Minor bug fixes

V1.0.0.3
– Uploaded older version that still had a code type. This should now be fixed.

This mod is used, primarily by map makers, to remove vanilla items from the game to free up slots. For example, you could remove a crop along with store items that are specific to that crop to make room for a new custom one. Things of that nature.

This is done by embedding a small configuration file into your map and adding the following line to your map.xml file.

<thDefaultTypes filename=”path/to/your/thDefaultTypes.xml”/>

From there, configuration is fairly simple. Each “type” has its own section and you simply list the items you want to remove. The mod does the rest. Some things will show warnings when removing vanilla types. These warnings are addressed by removing the entries from the corresponding configuration. For example, if you remove cotton, you could also remove the store items that may show warnings about the missing cotton fill type.

Finally, the new vanilla load system was not applied to fill type loading. For this reason, there are a couple of optional keys you can add to your defaultTypes.xml file that switches that behavior.

The first, loadMapFirst=”true” will only load a vanilla fill type from the game install location if that same fill type is not defined in your map embedded fillTypes.xml file.

The second, loadDefaults=”false” will prevent the entire game install maps_fillTypes.xml file from loading in favor of your map embedded fillTypes.xml.

Setting loadDefaults=”false” automatically implies loadMapFirst=”true”, so you don’t need to use both values.

Double registrations, while not as common as in previous game versions, are still addressed with this mod. You should see a warning if this happens for some reason.

Note: I originally left the old version up for maps that were configured to use it. This was actually causing too many issues for a variety of reasons. The vanilla double registration bug was fixed in 1.7 and the load order was changed. Because of that, you only need Default Types now if you want to remove vanilla items. In that case, it is recommended to update to the new version.

If your map no longer works with this update, you may have to make a slight map.xml change. This is for maps that used this mod to fix a vanilla bug that has now been fixed. First, open your map.xml. This file may also be named something like mapUS.xml, etc. It’s usually in the maps folder of the map mod. Inside that file, find this section:

Above is the old configuration. Many maps no longer need default types, and I knew this would eventually happen when I wrote it. That’s why I made an easy way to revert. Simply copy everything inside of the <thDefaultTypes> section and paste it directly in the map.xml like this:

Remove the <thDefaultTypes> lines and done. Just make sure you don’t have multiple <fillTypes>, <fruitTypes>, <densityMapHeightTypes>, <storeItems> sections in your map.xml. If you do, the extra entries have to be removed. Now the map should work stand alone. The only issue you may run into is if vanilla items were removed. In these cases, contact me or the map author and let me/them know.

Also, if your map does not have a <thDefaultTypes> section inside the map.xml, you should be fine running without it.

That is all, have fun!

CREDITS

ThundRFS

Similar modifications
ADS BLOCKED

Please disable your AdBlocker

We detected that you're using an ad blocking extension in your browser.
Ads help us maintain and improve Modhub.us.
Please disable your ad blocker and reload this page.

COMMENTS

There are no any comments

Write a comment