[TUTORIAL] How to make a truck appears in its own slot

Modding school: Learn it from the masters
Roudou
Posts: 96
Joined: 23 Jan 2014 02:15

07 Feb 2016 12:12

First of all thank you SCS to show us the solution with ATS, and yes it works with ETS2. I don't know if this topic is realy helpfull, i suppose most of you know how to do. In this new way, all modded trucks can have its own slot. Good news are: you will allways have enough place in a dealer, and keep original slots for locked mods.

How to do ? First, i suppose you know how a truck mod is done, and how to edit it. This is realy simple, just need to edit def files here.

Step 1 - Go to the game main directory and extract the def.scs. Go to def/vehicle/truck_dealer, copy the brand you want the truck mod to appear, "daf.sii" if you want it to appear in DAF dealers, "scania.sii" for Scania dealers, etc...

Step 2 - Extract the truck mod you want to edit. Go to truck mod/def/vehicle/truck_dealer, paste the "brand.sii" you've choosen.

Step 3 - Rename the "brand.sii" in "brand.modname.sii".

Exemple: Let's say you want a Kenworth K100 to appear in DAF dealers, you can rename it "daf.kenk100.sii". The only thing matters is you must keep the brand where the truck is suppose to be ("daf.xxx" "man.xxx" "iveco.xxx" etc...).

Step 4 - Edit this "brand.modname.sii", i advise to edit it with WordPad. Make it looks like this:

Code: Select all

SiiNunit
{

truck_dealer_sortiment: .tdealer.sortiment
{
	brand: "@@brand_scania/daf/iveco (the one you've choosen)@@"

	showcase_vehicles[0]: .tdealer.modname
}

@include "brand/modname.sii"

}
Some explanations

brand: it is the line telling to the game in wich manufacturer you're truck must appear.
showcase_vehicles[0]: Slot number, allways starts by 0, then 1, 2, 3 etc...
.tdealer.modname is the name of the slot itself
@include "brand/modname.sii" is the path of the slot. "brand" is the truck dealer where the truck will show up. The brand name must allways be an existing brand in the game, don't write kenworth or kamaz.

Here is an exemple still with Kenworth K100 in daf dealer

Code: Select all

SiiNunit
{

truck_dealer_sortiment: .tdealer.sortiment
{
	brand: "@@brand_daf@@"

	showcase_vehicles[0]: .tdealer.ken.k100
}

@include "daf/ken.k100.sii"

}
Step 5 - Still in truck mod/def/vehicle/truck_dealer, depending on which dealer you want the truck to apper rename the "brand" folder. In my exemple i want the K100 to be in a DAF dealer, the folder must be "daf". When all is ok open this folder.

Step 6 - You should see a "brand_x.sii" file, in my exemple it was maybe "daf_2.sii" (don't remember it was a long time ago). Rename it by your modname (the name you specified after @include "brand/),in my exemple it is "ken.k100.sii". Once done, open it, i strongly advise WordPad.

Step 7 - The more boring step, those who allready modified truck def files knows what i mean :D and they certainly know what to do in this step. For people who never did this before, you should think: "What a mess !!!" Let's do it.

The first line should look like this:

vehicle: .tdealer.brand_x
If you're still with me (i'm not sure about it) you must replace "brand_x" by your modname. For my exemple it's .tdealer.ken.k100

And now just about luck. If you are not lucky, you must change all the accessories names. All trucks must have different accessories names, otherwise there is a conflict, and it's a crash to desktop.

You must change accessories names If they look like:
".brandx.yyy" (x is a number between 0 and 7 or 0 and 10 for Mercedes)(yyy is the accessory itself, chassis for exemple)
or
"_nameless.yyyy.yyyy"

I suggest to replace "brandx" or "_nameless" by your mod name, and all should be clear. Don't forget the accessories are in two parts, first is a list, and second is pathes.

Take a look and compare with the Kenworth K100, it should be clearer than my explanations

Code: Select all

vehicle: .tdealer.ken.k100
{
 fuel_relative: &3f000000
 user_mirror_rot: 4
 user_mirror_rot[0]: (1; 0, 0, 0)
 user_mirror_rot[1]: (1; 0, 0, 0)
 user_mirror_rot[2]: (1; 0, 0, 0)
 user_mirror_rot[3]: (1; 0, 0, 0)
 accessories: 17
 accessories[0]: .kenk100.data
 accessories[1]: .kenk100.chassis
 accessories[2]: .kenk100.cabin
 accessories[3]: .kenk100.interior
 accessories[4]: .kenk100.engine
 accessories[5]: .kenk100.trans
 accessories[6]: .kenk100.soundi
 accessories[7]: .kenk100.sounde
 accessories[8]: .kenk100.light
 accessories[9]: .kenk100.fwheel
 accessories[10]: .kenk100.rwheel
 accessories[11]: .kenk100.paint
 accessories[12]: .kenk100.mirror
 accessories[13]: .kenk100.sunshld
 accessories[14]: .kenk100.fender1
 accessories[15]: .kenk100.bumper1
 accessories[16]: .kenk100.rwheel2
 odometer: 0
 odometer_float_part: &39c5ab71
}

vehicle_accessory : .kenk100.data {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/data.sii"
}

vehicle_accessory : .kenk100.chassis {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/chassis/6x4a.sii"
}

vehicle_accessory : .kenk100.cabin {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/cabin/standart.sii"
}

vehicle_accessory : .kenk100.interior {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/interior/standart.sii"
}

vehicle_accessory : .kenk100.engine {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/engine/cat3406c_350.sii"
}

vehicle_accessory : .kenk100.trans {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/transmission/10_speed.sii"
}

vehicle_sound_accessory : .kenk100.soundi {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/sound/interior_350.sii"
}

vehicle_sound_accessory : .kenk100.sounde {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/sound/exterior_350.sii"
}

vehicle_accessory : .kenk100.light {
 wear: 0
 data_path: "/def/vehicle/truck/mercedes.actros/head_light/standard.sii"
}

vehicle_wheel_accessory : .kenk100.fwheel {
 offset: 0
 wear: 0
 data_path: "/def/vehicle/f_wheel/america.sii"
}

vehicle_wheel_accessory : .kenk100.rwheel {
 offset: 0
 wear: 0
 data_path: "/def/vehicle/r_wheel/america.sii"
}

vehicle_paint_job_accessory : .kenk100.paint {
 mask_r_color: (1, 0, 0)
 mask_g_color: (0, 1, 0)
 mask_b_color: (0, 0, 1)
 base_color: (&3eef7660, &3c535a86, &3c902de0)
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/paint_job/color4.sii"
}

vehicle_addon_accessory : .kenk100.mirror {
 slot_name: 0
 slot_hookup: 0
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/accessory/mirror/kenworth.sii"
}

vehicle_addon_accessory : .kenk100.sunshld {
 slot_name: 0
 slot_hookup: 0
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/accessory/sunshld/shape2.sii"
}

vehicle_addon_accessory : .kenk100.fender1 {
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/accessory/fender/shape3.sii"
}

vehicle_addon_accessory : .kenk100.bumper1 {
 slot_name: 0
 slot_hookup: 0
 wear: 0
 data_path: "/def/vehicle/truck/kenworth.k100/accessory/bumper/shape1.sii"
}

vehicle_wheel_accessory : .kenk100.rwheel2 {
 offset: 2
 wear: 0
 data_path: "/def/vehicle/r_wheel/america.sii"
}
Step 8 - Repack the truck mod in a zip or scs archive, and don't forget to activate it.

All is done, i don't realy know how much trucks you can have in a dealer, currently i have 23 trucks (11 by scs) in Mercedes continental dealers. Be aware of trucks can still be in conflicts by other ways. Like 3d models, sounds, how the modder made his mods, etc...

I know i allready post this on SCS forum, if moderators think it shouldn't be here, or my explanations are not understandable, they can delete this post.

User avatar
ETS2-User
Developer
Posts: 2960
Joined: 06 Aug 2014 22:34
Location: Oberösterreich

07 Feb 2016 14:53

Moved to the Academy and added tutorial tag.
Developer for Austria and Svalbard
Creator of the Radiator Springs mod for ATS
Mods by ETS2-User: Facebook page

Image

Roudou
Posts: 96
Joined: 23 Jan 2014 02:15

12 Feb 2016 15:42

Hello everyone ! Tell me guys, is this tutorial is helpfull and understandable ? I would appreciate some feedbacks as it is my first tutorial. Or just everybody knows how to do before i shared it.

Railwayz
Posts: 1
Joined: 19 Jan 2016 06:09
Donation rank:

13 Feb 2016 04:48

Thanks for the explanation. I'm a newb at modding anything in ETS2 so it's a big help.

User avatar
Loki7007
Posts: 18
Joined: 14 Feb 2016 17:14
Donation rank:
Location: the southern barbarian wilds...

18 Feb 2016 12:29

Hello Roudou

Yesterday I tried everything to make your solution work but I think that was my own error as tried to solve with the logic of a guy who has no solid notion about modding besides using them...

First of all I tried to find the text you used in step 4. Fatal error on my side I think. Secondly I tried to open the scs file with wordpad and or the Win editor. Big fail also as both program worked themselves to a slow death...visually spoken... :lol: I tried it then with wordpad++. This worked and most of all it was really fast. But that didn'T solve my problem (I am relating to my first sentence). I could unpack the scs with 7zip but I think I this could be the wrong programm as can't repack it to scs.

Yesterday I found the ETS 2 studio and there I can get directly into the files and folders you mentioned in your tutorial. Is this the correct prog to use? My Kaspersky stumbled over an odd security thing also...He found three files in this prog which he quaranined immediatelly. The files were all called "Magick.NET-x86.dll". All catagorized as trojans.

After my antivirus-Prog did it's due the prog run surprisingly.

So now to my question.

When I am opening the def file containg the truck dealer the first few lines look like this:

vehicle: .tdealer.mercedes_7

{
fuel_relative: &3f000000
user_mirror_rot: 4

user_mirror_rot[0]: (1; 0, 0, 0)

user_mirror_rot[1]: (1; 0, 0, 0)

user_mirror_rot[2]: (1; 0, 0, 0)

user_mirror_rot[3]: (1; 0, 0, 0)


accessories[]: .mercedes.atron.data

accessories[]: .mercedes.atron.chassis

accessories[]: .mercedes.atron.cabin


Should I then write your solution above these lines?

Any help would be much appreciated. Many thanks in advance.

juizzysquirt
Posts: 16
Joined: 18 Feb 2016 08:54
Donation rank:

18 Feb 2016 14:29

You should replace "mercedes_7" with some unique name, there already are files from mercedes_0.sii to mercedes_10.sii.

I've found it works best when using same naming scheme SCS does (like "somename_1" or "example_5"). I think there are some limits, as explained under Sii-format "Data Structure"-part here: http://forum.scssoft.com/viewtopic.php?f=172&t=189533

You can use 7zip to create.scs-files, just create normal zip-file, then rename .zip to .scs. If there are any .ogg-audio in archive, set compression method to "store", otherwise the game won't load them.
I like big trucks and I can not lie

User avatar
Loki7007
Posts: 18
Joined: 14 Feb 2016 17:14
Donation rank:
Location: the southern barbarian wilds...

19 Feb 2016 00:59

Thank you juizzysquirt for the reply ;-).

I have to give a big shout to Roudou.

Shortly after I did my first post here he wrote me an pn and helped me sort out my problems until deep in the night.

Roudou thank you very much for your help. It is much appreciated. Not only did you make everything easy for me with your explanations but I am quite sure that your great help will conjure a big grin on my sons face tomorrow in the afternoon. thank you very much!!! Thumbs up.

toffee
Posts: 13
Joined: 27 Dec 2014 18:52
Donation rank:

19 Feb 2016 01:58

Hi roudou, great topic for someone who enjoys text editing(like me), i hope i have followed everything correctly(have done 12 so far) i will find out tomorrow, but i have a question (thinking i may have done something irrelevant) some trucks have a "def\vehicle\truck_company" folder with a .sii file, does this become obsolete with this new method, as i have renamed the .sii file in this folder to the same as the renamed truck, should i delete this folder?
I know i should have done 1 and tested (enjoy editing :D , but not CTD :cry: ) but have been driving ats to boredom and whilst waiting for promods update thought would organise/streamline my mod folder.
And notepad++ is reccommened to use replace all.
Thanks for topic and any advice.

Roudou
Posts: 96
Joined: 23 Jan 2014 02:15

19 Feb 2016 14:16

If you renamed the sii file in "truck_dealer" and after that delete it, the truck will not appear anymore in any showroom. Or i did not understand what you explained.

In the case of a sii file is allready present in "truck_dealer" folder, the edition of the truck is not realy necessary, it depends of what you want. For exemple, if you want the truck mod appears to a different dealer than the one specified, you can edit it.

To be honest the only truck mod i have with a sii file allready presents in "truck_dealer" folder was the pack of Magnum (AE, Integral, Legend). I've edited it because the slots created will probably be the same than those use by SCS when the Renault T will come out.

I know my english could be barrier to understand explainations. Hope this is not the case here.

juizzysquirt
Posts: 16
Joined: 18 Feb 2016 08:54
Donation rank:

19 Feb 2016 21:47

You shouldn't need to edit anything in "truck_company"-folder, I believe they are meant for quick jobs? The steps shown here only modify "truck_dealer", as in which showroom the truck is going to show up.

You could even make the original trucks to appear elsewhere, as I have done by grouping Volvo/Renault/Mack/UD Trucks (AB Volvo) and Peterbilt/Kenworth with DAF (PACCAR), etc. I've made over a dozen of these patches for most Peterbilts, Kenworths, Macks and Volvo VNL:s. Just a small fix to load after each truck and they all coexist nicely. Well, almost. There are few that that doesn't work even by themselves like K100_Edit_by_Henki73_v1.3(1.20.x).scs with latest 1.22.2.8s. All I'm getting is CTD upon clicking showroom.

Also the "custom351.scs" doesn't work with original "Peterbilt_351_JAWA_Smith_Stas556_3.0.scs" as they share same but edited parts. They can work separately, but not together.

I might release these patches as a mod, if anyone is interested? Oh yeah, and kudos for Roudou of this tutorial, this opens up many possibilities! 8-)
I like big trucks and I can not lie



Post Reply

Return to “ProMods Academy”

  • Information
  • Who is online

    Users browsing this forum: Andu and 1 guest