Changes

Jump to navigation Jump to search

Games/ETS2/Modding guides/1.32

2,267 bytes added, 08:21, 3 December 2018
Flares data
{{Tip|Be aware that page is not final. Thus do not fully rely on written subjects, until this message is here!}}
 
 
= Introduction =
= How to convert map =
* Ensure that <strong>ALL</strong> map files are updated Set parameter '''instanced''' to true for all signs which have '''dynamic''' set to version compatible with 1true. Models which need this will be reported using "Non instanced dynamic road model is not supported! (sign)" error message.31 update by resaving them * If your mod defs are directly referencing spruce vegetation models (found in 1.31 version. Otherwise '''/model/vegetation/poly_vegetation/'''), you might be unable need to update the definitions to load reference the map in 1.32 editornew versions.
* Load map
* If the editor shows a warning dialog about items referencing obsolete TERRAIN ONLY road flag, you <strong>MUST</strong> remove or replace all those items in the map before saving the map. Otherwise the editor might crash when loading the resaved map.
* Run prefab node corrections (F3 - "Prefab node correction")
* Save map
* Do rebuild (F8)
* Save map
* Run shoulder check from "Map\Validate road shoulders" This will generate list of all items which could cause issues with random events (mostly Select correct looks for models clipping through). You have following options:** Adjust where the items so they do not cause issues by moving them or removing them** Mark the related road as having blocked shoulder ("Shoulder blocked" checkboxes in Road item properties) to prevent generation selection of events.** If you do not care about the issues, you can ignore the item.* Save maplooks changed
= Changes =
== Map format changes ==
TBASemaphore profiles can be overridden on prefab item level. == UI texture changes == We changed the blending of UI textures to be gamma correct. As result alpha transitions in UI textures (e.g. accessory icons, custom loading screens) and alpha values specified in UI screen definitions will yield a different result than before. When creating transparent textures, you should configure your graphics editor to use Gamma value of 1.0 to get the composition to behave in the same way as in the game.
While there is no fully automated way to modify the textures to get exactly the same result as before, the [http://download.eurotrucksimulator2.com/tga_adjust_for_gamma_1.zip attached Perl script] can be used to adjust alpha channel to keep the appearance similar based on assumption that the blend is done over middle-gray background based on expression mentioned bellow. Note that after using the script you might still need to manually adjust the images to get the appearance you want. <pre>S .. source sRGB color in UI texturea .. source alpha in UI textureD .. background sRGB color, we assume middle gray #808080b .. recomputed alpha The old blending expression: OLD =S * a + D * (1 - a) The new blending expression: NEW = Cargo generator sRGB(rgb(S) * b + rgb(D) * (1 - b)) Alpha which would result in the same final value after blend: b = (rgb(OLD) - rgb(D)) / (rgb(S) - rgb(D))</pre> == Economy system changes ==
The whole cargo generator was dramatically changed since previous versions:
=== Cargo data ===
 
Attributes '''price_coef''' (float), '''mass''' (float array, per trailer) and '''cog_height_offset''' (float array, per trailer) has been. Attribute array '''trailers''' remain only for compatibility of some cargoes.
=== Trailer def ===
 
Structure '''trailer_def''' was greatly improved and redesigned as its core of the economy. Old system with list of trailers for given cargo is used for remaining old trailers only (using cargo folder placement with filled '''trailer''' link and fake underscored trailer '''body_type'''s).
That said one can still use custom token for body type, but do not forget to define new cargo data for it. In the future updates, however, predefined list will most probably grow with new set of body types.
 
== Game data ==
 
* Added '''blinker_auto_off_trigger''' attribute defining angle below which blinker auto disable is performed previously.
== Economy data ==
* Removed '''trailer_damage_cost_factor'''.
* Removed '''brands''', game will now collect truck and trailer brands on startup from <code>/def/vehicle/truck_dealer</code> and <code>/def/vehicle/trailer_dealer</code> directories. Each directory inside that can be interpreted as token is a new brand.
 
== Game data ==
 
* Added '''blinker_auto_off_trigger''' attribute defining angle below which blinker auto disable is performed previously.
== Country data ==
}
</pre>
 
== Flares data ==
 
Flare unit (usually found as hookup defined models inside '''/unit/hookup''' directory) got new functionality of manual curve definition for flare scaling, with two new float attributes:
 
* '''scaling_start_distance''' - defines distance at which flare scaling starts.
* '''scaling_end_distance''' - defines distance at which flare scaling ends, flare scale reaches '''scale_factor'''.
 
Note that both of those attributes hold distance in meters and that they won't be used unless '''scale_factor''' is bigger then 1.0.
== Vehicles data ==
# '''trailer_defs''' - all configurations of possible trailer combinations in the new system (see [[#Cargo generator]]).
# '''trailer_owned''' - ownable trailers data defining configuration, body, paintjob and accessories (similarly as trucks), sorted in <brand.model> sub-folders.
 
Additionally '''trailer''' unit used to define freight market trailers has new pointer attribute '''trailer_definition''', which can link freight market trailer to economy by pointing to new type of '''trailer_def'''.
==== Trailer dealer data ====
Each trailer configuration of type '''trailer_configuration''' has following attributes:
* [string] '''name''' - Displayable name for this configuration in trailer configurator.
* [string] '''icon''' - Displayed icon for this configuration in trailer configurator.
* [token] '''chain_type''' - Type of the chain this configuration is using (one of chain types defined in '''/def/vehicle/trailer_chain_types/'''.
* [string array] '''chassis''' - All chassis definitions for this configuration, first chassis for first trailer in chain, second chassis for second trailer in chain etc.
* [trailer_body_set array] '''body_sets''' - Owner pointer array of compatible '''trailer_body_set'''s with this configuration. Except manually linked body sets in configuration file they are also gathered from sub-folder named same as base configuration file name (name of the file to first dot, so configuration "''single3.sii''" or "''single3.mymod.sii''" should have body sets in folder "''/def/vehicle/trailer_owned/<brand.model>/configurations/single3''").
 
===== Trailer body set =====
 
Trailer body set defines set of bodies that can be used on individual trailer configuration. Each body set is then selectable by player in trailer configurator.
 
Each trailer body set contains:
* [string] '''name''' - Displayable name for this configuration in trailer configurator.
* [string] '''icon''' - Displayed icon for this configuration in trailer configurator.
* [string arraytrailer_def pointer] '''chassistrailer_definition''' - All chassis definitions Pointer to trailer definition to be used for this configuration, first chassis for first trailer in chainbody set, second chassis for second trough which game knows what kind of cargo can be used with this trailer in chain etcconfiguration and body set.* [trailer_body_set string array] '''body_setsbody''' - Owner pointer array of compatible All body sets ('''trailer_body_set''') with definitions for this configuration. Except manually linked body sets set, first body for first trailer in configuration file they are also gathered from sub-folder named same as base configuration file name (name of the file to first dotchain, so configuration "''single3.sii''" or "''single3.mymod.sii''" should have second body sets for second trailer in folder "''/def/vehicle/trailer_owned/<brand.model>/configurations/single3''")chain etc.

Navigation menu