Mod conflict - I need help / tips about units

User avatar
Sebastian7870
Posts: 251
Joined: 24 Dec 2017 15:10
Location: Koblenz, Rheinland-Pfalz, Germany
Contact:

Mod conflict - I need help / tips about units

#1 Post by Sebastian7870 » 12 Mar 2021 09:26

Hello!

I am currently trying to mod a BDF chassis for my trailer mod, but I would like to get some tips on how to "overwrite" the "suitable_for[]" in the truck def files from SCS.

It works when I use exactly the same unit names as SCS. But there is a problem: If another mod has the same units as well (for example default edited truck mods), the game crashes.
I do not know if I should rename the units for this to work. Is that a good way? Are there better ways?

example:

I want to use the interior of the ActrosMP4 in my edited cabin.
The unit name of my new, edited cabin is: swp_giga.mercedes.actros2014.cabin

That is what the exclusive.sii looks like:

Code: Select all

SiiNunit
{
accessory_interior_data: exclusive.mercedes.actros2014.interior
{
	name: "@@exclusive@@ GigaSpace"
	price: 39720
	unlock: 12
	icon: "interior_mercedes_actros_2014_ecl"

	model: "/vehicle/truck/mercedes_actros_2014/interior/model.pmd"
	collision: "/vehicle/truck/mercedes_actros_2014/interior/model.pmc"
	animated_model: "/vehicle/truck/mercedes_actros_2014/interior/anim.pmd"
	active_mirrors_part: a_mirrors
	passive_mirrors_part: p_mirrors
	look: exclusive
	variant: exclusive

@include "animations.sui"
@include "sound.sui"

	dashboard_path: "/ui/dashboard/mercedes_actros_2014.sii"
	gps_path: "/ui/gps.sii"

	glass_panes[]: .mercedes.actros2014.pane.front
	glass_panes[]: .mercedes.actros2014.pane.left
	glass_panes[]: .mercedes.actros2014.pane.right
	glass_panes[]: .mercedes.actros2014.pane.top

        suitable_for[]: "gigaspace.mercedes.actros2014.cabin"
	suitable_for[]: "gs_8x4.mercedes.actros2014.cabin"

	ext_model: "/vehicle/truck/upgrade/ext_interior/mercedes_actros_2014/stock.pmd"
	ext_variant: cab_hi_eu
	ext_look: exclusive

	defaults[]: "/def/vehicle/truck/mercedes.actros2014/accessory/steering_w/exclusive.sii"

}
@include "glass.dat"
}
As you can see, the suitable_for[]: entries provide me using that interior for my unit (swp_giga.mercedes.actros2014.cabin) because they're missing.
So I have to "overwrite" those files OR copy this file with a new unit name and add the suitable_for[]: for my cabin:

Code: Select all

SiiNunit
{
accessory_interior_data: MY_exclusive.mercedes.actros2014.interior
{
	name: "@@exclusive@@ GigaSpace"
	price: 39720
	unlock: 12
	icon: "interior_mercedes_actros_2014_ecl"

	model: "/vehicle/truck/mercedes_actros_2014/interior/model.pmd"
	collision: "/vehicle/truck/mercedes_actros_2014/interior/model.pmc"
	animated_model: "/vehicle/truck/mercedes_actros_2014/interior/anim.pmd"
	active_mirrors_part: a_mirrors
	passive_mirrors_part: p_mirrors
	look: exclusive
	variant: exclusive

@include "animations.sui"
@include "sound.sui"

	dashboard_path: "/ui/dashboard/mercedes_actros_2014.sii"
	gps_path: "/ui/gps.sii"

	glass_panes[]: .mercedes.actros2014.pane.front
	glass_panes[]: .mercedes.actros2014.pane.left
	glass_panes[]: .mercedes.actros2014.pane.right
	glass_panes[]: .mercedes.actros2014.pane.top

        suitable_for[]: "gigaspace.mercedes.actros2014.cabin"
	suitable_for[]: "gs_8x4.mercedes.actros2014.cabin"
	suitable_for[]: "swp_giga.mercedes.actros2014.cabin"

	ext_model: "/vehicle/truck/upgrade/ext_interior/mercedes_actros_2014/stock.pmd"
	ext_variant: cab_hi_eu
	ext_look: exclusive

	defaults[]: "/def/vehicle/truck/mercedes.actros2014/accessory/steering_w/exclusive.sii"

}
@include "glass.dat"
}
But when I change the unit name (and copy the file) no modder can use "suitable_for[]: exclusive.mercedes.actros2014.interior" because my interior unit is "MY_exclusive.mercedes.actros2014.interior".
Otherwise, when I use the same unit as scs (exclusive.mercedes.actros2014.interior) and only add suitable_for[]: "swp_giga.mercedes.actros2014.cabin", it will conflict with other mods that do the same.

What is the best way to use the e.g. the SCS interior with an edited cabin (but still have no mod conflicts)?
Creator of the Swap Body Carrier System
[ external image ]
Steam | WorldOfTrucks | SCS Profile
User avatar
room217au
Posts: 2720
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: Mod conflict - I need help / tips about units

#2 Post by room217au » 12 Mar 2021 10:35

Pretty sure you can't have caps in a unit name. my_exclusive.mercedes.actros2014.interior is the acceptable one. I think.

The interior def file and the cabin def file are two separate files in two separate directories, which reference each other.

The best way, I think, is to copy the two def files and edit them to suit your unit names, then give them unique filenames too, but in the same respective folder names as the SCS ones.
You'll need to provide a workshop icon, but you can leave it the same as the scs one. It'll still work.
Give your cabin and interior versions a very low price .eg $1, even if for dev purposes, so they appear at the top of your accessories list in the upgrade shop.
In your cabin and interior def files, remove any suitable_for references to SCS ones and make sure yours is the only suitable_for in each respective file. It shouldn't show up in the default scs accessories list either. I think.

Does your interior mod use the same animations as the game does? If you've made your own animations, you'll have to ref that in the interior def file too.
If you suck at playing the trumpet, that's probably why.
User avatar
Sebastian7870
Posts: 251
Joined: 24 Dec 2017 15:10
Location: Koblenz, Rheinland-Pfalz, Germany
Contact:

Re: Mod conflict - I need help / tips about units

#3 Post by Sebastian7870 » 12 Mar 2021 10:51

Thank you!
But I have one question left: Should I use a new unit name for the new files? (Probably yes)
Creator of the Swap Body Carrier System
[ external image ]
Steam | WorldOfTrucks | SCS Profile
User avatar
room217au
Posts: 2720
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: Mod conflict - I need help / tips about units

#4 Post by room217au » 12 Mar 2021 11:00

Unit names for mods need to be unique.. unless you are changing something in the def file and you want to override the whole relevant SCS file.
Yes, because your def files 'point' to different models than scs does, if I'm reading that right.
If you suck at playing the trumpet, that's probably why.
User avatar
Sebastian7870
Posts: 251
Joined: 24 Dec 2017 15:10
Location: Koblenz, Rheinland-Pfalz, Germany
Contact:

Re: Mod conflict - I need help / tips about units

#5 Post by Sebastian7870 » 12 Mar 2021 11:46

Okay, thank you.
I am asking because I saw many other mods (like Actros MP4 edit by Alex) which uses the default unit names (and the same file names), so he overrides the default ones (that's the reason why it conflicts with many other mods).

One downside of not using the "override" unit name is, that I have to re-write each file that uses suitable_for[]: (for example the Actros tuning pack).
But I'll do it the way you told me, I do not want the game to conflict too much with mods...
Creator of the Swap Body Carrier System
[ external image ]
Steam | WorldOfTrucks | SCS Profile
User avatar
xXCARL1992Xx
Posts: 16461
Joined: 17 Aug 2016 12:18
Contact:

Re: Mod conflict - I need help / tips about units

#6 Post by xXCARL1992Xx » 12 Mar 2021 11:57

if you ad new parts ofc they need new unique unit names, if you just replace parts (only the model) you dont need new defs for it
| !!!NO SUPPORT OR REQUESTS OF ANY SORT VIA PM!!! | Screenshot Thread | Steam Workshop | World of Trucks Profil |
[ external image ]
User avatar
Sebastian7870
Posts: 251
Joined: 24 Dec 2017 15:10
Location: Koblenz, Rheinland-Pfalz, Germany
Contact:

Re: Mod conflict - I need help / tips about units

#7 Post by Sebastian7870 » 12 Mar 2021 15:16

@xXCARL1992Xx Okay, thank you very much.
The only thing is that I have a new chassis and new cabins only for this chassis. And I saw in other mods that they just overwrote the interior.sii def files (same file name and same unit name) and just added the suitable_for[]: for their cabin.
Would you recommend that way?
Creator of the Swap Body Carrier System
[ external image ]
Steam | WorldOfTrucks | SCS Profile
User avatar
Madkine
Global moderator
Posts: 12420
Joined: 08 Oct 2018 16:35
Location: Australia
Contact:

Re: Mod conflict - I need help / tips about units

#8 Post by Madkine » 12 Mar 2021 20:51

If you intend the mod to be public, then new names is much better as it prevents conflicts with other mods.
WoT Profile
ATS Workshop

"never attribute to malice that which is adequately explained by stupidity"
User avatar
Sebastian7870
Posts: 251
Joined: 24 Dec 2017 15:10
Location: Koblenz, Rheinland-Pfalz, Germany
Contact:

Re: Mod conflict - I need help / tips about units

#9 Post by Sebastian7870 » 12 Mar 2021 21:56

@Madkine Thank you! Now I am sure how to do it. :D
Creator of the Swap Body Carrier System
[ external image ]
Steam | WorldOfTrucks | SCS Profile
User avatar
room217au
Posts: 2720
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: Mod conflict - I need help / tips about units

#10 Post by room217au » 13 Mar 2021 20:00

Apologies if you already know this:
You can make a new directory called "my_exclusive_mod" (or some such) in your mod directory and copy all of your mod's relevant and correct directory/file structure to that directory. Including mod manager files in the root.
May as well test everything, right?

You don't have to keep archiving and unarchiving etc. Just overwrite existing files with the updated files directly there and you're good to go.
You only have to archive into .zip/.scs format when you want to upload.
If you suck at playing the trumpet, that's probably why.
Post Reply

Return to “Blender Tools”

Who is online

Users browsing this forum: No registered users and 7 guests