Games/ETS2/Modding guides/1.9

From SCS Modding Wiki
< Games‎ | ETS2/Modding guides
Revision as of 10:08, 11 February 2016 by 50keda (talk | contribs) (Changes in fonts)

Jump to navigation Jump to search

Recommendations

When adding new objects to files which support multi-file approach (e.g. road_look.sii) it is HIGHLY RECOMMENDED to use suffix or prefix in the name to avoid conflicts with new objects we are adding in patches. Otherwise you might have to use the batch renaming functionality (see <a href="#Batch renaming">Batch renaming</a>) to fix the conflicts when new patch appears.

Some new models utilizing the "sc" suffix or prefix are still work in progress and it is likely that they might change significantly in some next patch. For this reason it is recommended that you avoid using them in your mods at this time.

How to convert map

  • If you have any objects which use prefix not matching the type (e.g. it is not "sign.<name>" for signs), fix them. The game assumes that the prefix is fixed (see #Unit name checks).</name>
  • If you modified the signs, set the distance_type attribute and drop the obsolete ones (see #Changes in Signs)
  • If you modified the road looks, update the ai_speed_type and lane_count_* attributes and drop the obsolete ones (see #Changes in road looks)
  • If you modified the road materials, convert them to the new format (see #Changes in road materials)
  • If you modified the terrain materials, convert them to the new format (see #Changes in terrain materials)
  • If you added any custom fonts, you need to update the format (see #Changes in fonts)
  • Load the map in the editor. If the load fails, examine the log and fix the errors. The -unlimitedlog command line parameter might be useful during that if you have many old prefabs.
  • Use the find tool in editor to locate road items reported as "Bad road item (X)". Most likely you are connecting a UK roads with non-UK ones here.
  • Use the find tool in editor to locate prefabs which were reported in the log as "<error> Incorrect origin node detected, but not corrected!" when the editor converts the map to the new format and recreate them if necessary.</error>
  • Ensure that the log does not contain ANY errors related to missing signs. (see #Unit name checks">Unit name checks)
  • If you added new road material or terrain material for use in a new sectors, you might want to rename them to add prefix or suffix to the name to avoid conflicts with the materials we added (see #Batch renaming).
  • Use the replacement dialog (F3, "Prefab node correction") to add to map nodes which we added to the prefabs (see #Changes in prefabs).
  • Save and reload the map or do rebuild (F8)

Changes

Changes in paintjobs

The trucks now have a additional third uv coordinates with improved layout and some paintjobs were updated to take advantage of that. The paintjobs can opt in to using this uv coordinate using a new alternate_uvset parameter in the paintjob definition. Please note that it is error when paintjob requires coordinate which the model does not have and the resulting behavior is undefined. This might happen if you modded a standard truck and the player I using one from the paintjobs which we updated. In that case you might want to include a older version of the paintjob definitions and textures in your mod.

Changes in fonts

The font files now contain information about the sizes of underlying textures. You need to update all image definition lines to include the size.

For example:

image:/font/big_0.mat

If the texture associated with /font/big_0.mat would have dimensions of 256x512 the new line should be.

image:/font/big_0.mat, 256, 512