Unable to get "in" and "out" working for cargo

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.
Post Reply
Zemith
Posts: 19
Joined: 03 Sep 2018 10:46

Unable to get "in" and "out" working for cargo

#1 Post by Zemith » 05 Aug 2022 09:36

I tried to create my girlfriends company within ETS2, for starters I just created a simple mod, replacing the eurogoodies logo/name and trailer, which works fine.

(Ideally I would like to have the company placed in a single city, but for now I just want the cargo types working).

I gave my mod "highest priority" but it doesn't care about the cargo "in" and "out" types that I've put, both the freight market and cargo market gives me all kinds of freight to haul.

In my mod, I have these folders and files:

modname/def/cargo/
- almond.sui
- apples.sui
- cauliflower.sui
- fresh_fish.sui
(these I copied from SCS's "def.scs" file)

modname/def/company/
- eurogoodies.sui (in here, I changed company name)

modname/def/company/eurogoodies/in/
- cauliflower.sii
- fresh_fish.sii

modname/def/company/eurogoodies/out/
- almond.sii
- apples.sii
- cauliflower.sii

But I'm still being offered to transport beef, salmon etc., so it doesn't seem to care about my cargo in/out def.


Am I missing some files?

Is it important what I define as category[] in manifest.sii? I've tried this, but didn't help:
category[]: "graphics"
category[]: "cargo_pack"
User avatar
LadenSwallow
Posts: 375
Joined: 04 Jul 2016 07:47
Location: Nuremberg, Germany
Contact:

Re: Unable to get "in" and "out" working for cargo

#2 Post by LadenSwallow » 05 Aug 2022 10:45

I see 2 things:

1. Do you have a "cargo.<yourMod>.sii" in your "def" folder?
This file must contain lines like
@include "cargo/almond.sui"
for each cargo you want to define

2. I think you have to rename your cargo defs. It is very likely that you will get errors that a cargo like "almond" already exists, and then the game will refuse to load your cargo defs.

Good luck,
LadenSwallow
User avatar
room217au
Posts: 2716
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: Unable to get "in" and "out" working for cargo

#3 Post by room217au » 05 Aug 2022 12:02

I think you'll also find that cargo names are limited to 11 characters?
If you suck at playing the trumpet, that's probably why.
Zemith
Posts: 19
Joined: 03 Sep 2018 10:46

Re: Unable to get "in" and "out" working for cargo

#4 Post by Zemith » 05 Aug 2022 12:04

@LadenSwallow thank you - that helped :D
(adding "cargo.<modname>.sii" to def folder and including.

And you're right, I canot include cargoes like "almond" since they already exist. So I just copied the files and renamed them to something else, for testing.

One followup question: Despite I only have my 2 custom cargoes placed in "in" and "out" folders for several companies, these companies still seem to both accept and produce all other kinds of cargo.

Are mods such as this, considered an "addition" to the game, instead of "overwriting"?
Meaning, is it impossible for me to make a mod that ONLY allows a specific company very specific "in" and "out" cargoes, or will whatever I put in "in" and "out" just be in addition to the SCS's default cargoes for that company?
al_batros
Posts: 175
Joined: 05 Jan 2022 16:50

Re: Unable to get "in" and "out" working for cargo

#5 Post by al_batros » 05 Aug 2022 20:57

Hi Zemith!
You might want to have a look in this thread: viewtopic.php?p=1671027. The question of the fellow trucker was a bit more complicated, but maybe it will give you some hints. Unfortunately the sample mod is gone, sharemods now wants me to register and I can't upload the .zip here.

For starters, you would need to copy the def/cargo*.sii files into your mod and comment out all other cargoes you do not want to transport.
Zemith
Posts: 19
Joined: 03 Sep 2018 10:46

Re: Unable to get "in" and "out" working for cargo

#6 Post by Zemith » 05 Aug 2022 23:01

Thank you @al_batros for your input 😊

I did read that thread earlier and yes unfortunately the sample mod is no longer available 😔

What does the other thread mean by this:

“Disable all in-game cargoes and add only your own.”

How? Is it like you also say, “comment out all other cargoes”?

So basically I need to add all basegame cargo files to the “in” and “out” of my company, but I need to comment the actual content of all the files in order to “remove” those cargoes?
User avatar
room217au
Posts: 2716
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: Unable to get "in" and "out" working for cargo

#7 Post by room217au » 06 Aug 2022 06:14

@Zemith What you're embarking on is a lot of ongoing work. If I may suggest a, somewhat, different approach?
xyzan's "Virtual Speditor" allows to create your own cargo jobs from any existing company in any city to any existing company in any other city.
If you use an owned trailer, that has its own cargo data, you can edit the cargo.fil file in Speditor with your cargo data, change a setting in Speditor's config.cfg to ignore SCS cargoes altogether, and it'll only display your cargo when creating jobs.
There are pros and cons of course. Virtual Speditor is an external app on your computer which you run before playing and it modifies your save game. Simply start the game and your cargo awaits to be picked up and delivered. You don't have to worry about editing in and out directories because you're defining that with Speditor anyway and it ignores SCS cargo.
I've been using it for years and it's fantastic. Just a thought for you is all. Here's the discussion for it if you're interested:
viewtopic.php?t=199114
If you suck at playing the trumpet, that's probably why.
al_batros
Posts: 175
Joined: 05 Jan 2022 16:50

Re: Unable to get "in" and "out" working for cargo

#8 Post by al_batros » 06 Aug 2022 07:50

Hi Zemith!

I have registered with sharemods and uploaded the mod again: https://sharemods.com/atkzkxpzh3bj/ab_m ... l.zip.html
So basically I need to add all basegame cargo files to the “in” and “out” of my company, but I need to comment the actual content of all the files in order to “remove” those cargoes?
There are two ways to do it.
- (what you said) You could add them (i.e. copy them from the game in/out directories) and replace their content with "almost nothing", or
- you could copy the "/def/cargo*.sii" files into your mod, that contain all the '@include "cargo/acetylene.sui" ' and comment them out in there -> '# @include "cargo/acetylene.sui" -> no more acetylene cargo in game, nowhere.

The same principle can be applied to cities (don't want to travel to the UK? -> '# include "city/dover.sui" ' and all the other UK cities...)
or to companies (hate the small entrance at Trameri? '# include "company/trameri.sui" '.

You might end up with tons of errors in the game log, but it still works :-)

Maybe, to answer an early question of yours, regarding adding / replacing content in the game:
- Think of glass panes that can be "painted" and are stacked.
- The lowest glass pane / layer are all the base files from the game, including the DLCs.
- Then all the mods get applied ("load order") as additional glass panes, each mod either adding files (on empty spaces on the glass pane) or replacing (=overpainting) content on lower levels.
- The whole thing is then viewed from the top. Only things that are visible from the top are active.

Which means: You can add files (like "def/cargo.mymod.sii" that has 'include "def/cargo/mycargo.sui" and all the in/out stuff you did) as you added them on "empty spaces" on the glass pane.
And also you can replace existing content from lower levels by putting in the same file with different content. (as per my example above, copying in the "/def/cargo.sii", but replacing content inside, exluding stuff to be loaded. But only the whole file can be replaced! The game then doesn't see the lower level file and its content any more.

One more info: you might want to use "g_force_economy_reset 1" in the console and then exit and reload the profile in order to see the changes in your mod.
Zemith
Posts: 19
Joined: 03 Sep 2018 10:46

Re: Unable to get "in" and "out" working for cargo

#9 Post by Zemith » 10 Aug 2022 07:29

@room217au thank you for the suggestion :) I already use trucksbook, so I guess it could be possible that way around.

@al_batros thank you so much for the sharemods link again. This sample mod is highly useful for me and the understanding, thank you :D
I will play around with disabling most of the cargoes, except what I need for in/out for my company, as well as adding some of my custom "out" cargoes as "in" for the other companies that needs my products :D So far, it seems to be working for me. I need to extract more SCS DLC's so I can comment out their cargoes as well.

I have already replaced the modded company with my own trailer skin (not an owned trailer, though) in /modname/vehicle/trailer_eu/company, I also noticed a Silo trailer appear with (some) of my renat.dds skin, it was cropped cause the silo trailer wasn't long enough to contain the entire skin though. So I'll play around and see if there's a way to do "company paint jobs" so I can have a multiple company trailers.

My only major issue right now is the cargo icons in modname/material/ui/cargo_icons, they always turn up purple. I tried almost all of the DDS save-settings in paint.net, and I tried to generate tobj files with both the TOBJEditor and Mods Studio 2. I'm not sure if it's a DDS or TOBJ issue though. I don't know if a tobj file has to be re-generated each time a DDS file is re-saved, like if the tobj file contains some "size/length" information about the DDS, or if it's just a pointer, so "once tobj is generated for xxxxx.dds, it's no longer necessary to touch the tobj".
Post Reply

Return to “Help requests”

Who is online

Users browsing this forum: No registered users and 4 guests