own cargo on a owned trailer ?

Forum rules
SCS as a company do not wish to have paid mods on this forum. While we understand that not all paid mods use the Intellectual Property of other companies/people, it is very hard to moderate what is and isn't acceptable when money is involved. There are also concerns that it could look unfavorable to potential work partners going forward if SCS allow mods that may potentially use unlicensed branding.
Posting in the Mods forum (ATS and ETS2) is restricted to sharing free-to-the-public mods and providing support for mods. For more details, please check the Forum Rules.
User avatar
ryzenmaster75
Posts: 153
Joined: 10 Jun 2019 16:08
Location: Jakarta, Indonesia
Contact:

own cargo on a owned trailer ?

#1 Post by ryzenmaster75 » 09 Jan 2023 08:44

the title pretty much self explanatory :D

i have my own trailer mod and i wanted to add own cargo that i can pick from the market, ive look up a lot of example from another trailer mod but i cant seem to do it properly and ive been looking for a documentation about this and there isnt much. anybody know which part in the def files that are necessary to make own cargo on a owned trailer ?.

Thanks for any answer!
al_batros
Posts: 175
Joined: 05 Jan 2022 16:50

Re: own cargo on a owned trailer ?

#2 Post by al_batros » 10 Jan 2023 16:08

Did you have a look at JazzyCats Trailer mods?
I´ll just copy the "relevant" parts from there:
/def/cargo/banan_j1.sui:

Code: Select all

cargo_data: cargo.banan_j1
{
	body_types[]: _cont_40jr3 # links to "def/cargo/banan_j1/cont_40jr3.sii": "body_type: _cont_40jr3"
}
def/cargo/banan_j1/cont_40jr3.sii:

Code: Select all

SiiNunit
{
trailer_def : trailer_def.cont_40jr3
{
	trailer: trailer.cont_40jr3 # references the mod-trailer in "def/vehicle/trailer_storage.jazzycat.sii"
	gross_trailer_weight_limit: 26810
	chassis_mass: 6500
	body_mass: 0
	axles: 2
	volume: 100
	body_type: _cont_40jr3 # same as in /def/cargo/banan_j1.sui: body_types[]: _cont_40jr3
	mass_ratio[]: 1
}
} 
* ah, and don´t forget to add/create a "def/cargo.mymod.sii" with an "@include "cargo/banan_j1.sui". I run into this Every. Single. Time. ;-)
* And no, you are not alone. To get a mod like this working took me the better part of a night. -> You´ll be trucking by sunrise :-)
User avatar
LadenSwallow
Posts: 383
Joined: 04 Jul 2016 07:47
Location: Nuremberg, Germany
Contact:

Re: own cargo on a owned trailer ?

#3 Post by LadenSwallow » 12 Jan 2023 07:14

... and there is another thing missing:
You need matching cargo files in the "/def/company/<xyz>/in" and "/out" subfolders, or you will never get your cargo offered on the market 😏
User avatar
ryzenmaster75
Posts: 153
Joined: 10 Jun 2019 16:08
Location: Jakarta, Indonesia
Contact:

Re: own cargo on a owned trailer ?

#4 Post by ryzenmaster75 » 01 Feb 2023 09:57

al_batros wrote: 10 Jan 2023 16:08 Did you have a look at JazzyCats Trailer mods?
I´ll just copy the "relevant" parts from there
oh the cargo pack mods ? i've never really understand the def system on that mod, but i'll try again using your way, thanks!
LadenSwallow wrote: 12 Jan 2023 07:14 ... and there is another thing missing:
You need matching cargo files in the "/def/company/<xyz>/in" and "/out" subfolders, or you will never get your cargo offered on the market 😏
and i have to match it to every company available in the game ?, wow, thats a LOT :shock:
al_batros
Posts: 175
Joined: 05 Jan 2022 16:50

Re: own cargo on a owned trailer ?

#5 Post by al_batros » 01 Feb 2023 20:37

My starting ground was "Trailers and Cargo Pack by Jazzycat". Have a look and take it from there...
and i have to match it to every company available in the game ?, wow, thats a LOT :shock:
It sounds more complicated than it actually is. All you need is one file per cargo and then copy this one into the relevant companies in/out directories.
I usually create them in a def/company/__sample directory and copy them from there... busywork :D

You might as well start off with a custom cargo on a SCS trailer (i.e. try to make a "ryzensugar" from SCS-sugar), add it to the companies you want to deliver/pick it up to actually see it in game - and then move it over to your trailer with all the other bells and whistles attached that you learned from how jazzycat did it ;-)
User avatar
xXCARL1992Xx
Posts: 16524
Joined: 17 Aug 2016 12:18
Contact:

Re: own cargo on a owned trailer ?

#6 Post by xXCARL1992Xx » 01 Feb 2023 20:47

google for scripts to use via CMD/Terminal/PowerShell where you create a folder structure from a list with company names in/out that you want your cargo to appear and copy the "master" cargo file into

i somewhere have a simple script i found and modified to create something like this, where it grabs every company name from a .txt file and create said folder + in and out folder and copies files from a different folder into each in/out folder
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
User avatar
ryzenmaster75
Posts: 153
Joined: 10 Jun 2019 16:08
Location: Jakarta, Indonesia
Contact:

Re: own cargo on a owned trailer ?

#7 Post by ryzenmaster75 » 02 Feb 2023 12:06

al_batros wrote: 01 Feb 2023 20:37 It sounds more complicated than it actually is. All you need is one file per cargo and then copy this one into the relevant companies in/out directories.
I usually create them in a def/company/__sample directory and copy them from there... busywork :D
gotcha, i'll try that thanks!

xXCARL1992Xx wrote: 01 Feb 2023 20:47 google for scripts to use via CMD/Terminal/PowerShell where you create a folder structure from a list with company names in/out that you want your cargo to appear and copy the "master" cargo file into
is it like a automation thing ?, i can't even make the keyword for that soo maybe i'll stick to doing it one-by-one :D
User avatar
xXCARL1992Xx
Posts: 16524
Joined: 17 Aug 2016 12:18
Contact:

Re: own cargo on a owned trailer ?

#8 Post by xXCARL1992Xx » 02 Feb 2023 16:46

it is relatively straight forward but you need to search and test/adapt via trial/error

i use this to make it, the script has to run in a folder where you can open PowerShell by shift + right clicking into an empty space or you create a new textfile, past the code into it and name it run.ps1 where you can execute it by right clicking on it and select "execute with PowerShell" or the like

Code: Select all

$availableFolderNames = ".\list.txt"
$SourcePath =".\files"
Get-Content $availableFolderNames | Foreach {
   $DestinationPath = ".\def\company\$_\in"
   if (-not ( Test-Path $DestinationPath )){
      New-Item -ItemType Directory $DestinationPath
   }
    Copy-Item "$SourcePath\*" $DestinationPath -Recurse
	
   $DestinationPath = ".\def\company\$_\out"
   if (-not ( Test-Path $DestinationPath )){
      New-Item -ItemType Directory $DestinationPath
   }
   Copy-Item "$SourcePath\*" $DestinationPath -Recurse
}
the list.txt contains all companies where you want your cargo to be

\files is where you put your files you want to copy

so your folder will look something like this

[ external image ]

to get the list of companies you need to extract every .scs file that contains companies, so the def.scs and all map DLCs just in case, and i also think the Krone DLC for Werlte, navigate to the company folder and open a cmd/terminal (shift + right click on an empty space) there you use

Code: Select all

Dir /a:d /b *.* > list.txt
this will give you a list.txt with every company name listed as a folder, here you can now remove every company you dont want to have your cargo

if you have the list and it is in the same folder as the .ps1 file you can run it and it will create every company with in and out folder and copy your files from the /files folder into it

and this i found that somewhat works for me and tried to adapt it, even just writing this post i tested if i can make the in/out folders without having to write in/out into the .txt file and the idea i had worked :rofl:
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
User avatar
ryzenmaster75
Posts: 153
Joined: 10 Jun 2019 16:08
Location: Jakarta, Indonesia
Contact:

Re: own cargo on a owned trailer ?

#9 Post by ryzenmaster75 » 03 Feb 2023 11:22

xXCARL1992Xx wrote: 02 Feb 2023 16:46 it is relatively straight forward but you need to search and test/adapt via trial/error
so i kinda managed to do what you've told and finally integrate it to my trailer files, but now i have some problems :

the cargo on the job market is working but i dont know where can i change that 'cargo' name

[ external image ]

and i'm using this pmd from scs as a placeholder but when i haul the cargo its now showing up and the game instantly crashed

[ external image ]

any idea what i'm missing ?
Last edited by ryzenmaster75 on 03 Feb 2023 12:31, edited 2 times in total.
User avatar
xXCARL1992Xx
Posts: 16524
Joined: 17 Aug 2016 12:18
Contact:

Re: own cargo on a owned trailer ?

#10 Post by xXCARL1992Xx » 03 Feb 2023 11:32

you are missing the cargo.sii that includes the cargo into the game
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
Post Reply

Return to “Help requests”

Who is online

Users browsing this forum: octagonal_ and 4 guests