Popular Post Forerunner Posted February 11, 2020 Popular Post Report Posted February 11, 2020 Local only accessories were banned from use on TruckersMP a long time ago, however local only addon hookups were little-known; and as the rules now state, they are allowed. However local-only addon hook-ups have never been explained to the public, until now. This guide will show you how to make and use a local only mod. This is a guide for experienced save editors and/or modders; if you are new to modding, I recommend you do not try this as your first mod. This guide will NOT teach how to make 3d models – only how to make them work in this context. This guide will expect a basic understanding of how the game works and how Blender is used for ETS2/ATS. During this tutorial, I will be modifying this Iveco Stralis: Spoiler Into this: Spoiler What you will need: Blender (Latest version recommended, though I will be using 2.78a) Latest SCS Blender tools & Conversion tools (As with my Blender version, I will be using an older version however it won’t change the guide) SCS Save Decryption tool (Such as ‘SII_Decrypt.exe’) Text editing tool (I recommend, and will be using, Notepad++) Converter_PIX Converter_PIX_Wrapper (Optional, I will be using it) or extracted base.scs Part 1: Blender preparation If your custom model is just a custom light, horn or similar; you can skip to Part 4. For models such as custom lightbars, sideskirts and similar, you need to change the position of the model origin. Normally a custom bullbar would attach to the “f_grill” locator on a truck, however in this case the best place to attach it is to a slot on the “b_grill”, meaning that the model will need to be re-positioned. You will need to import two models, these are: The truck that your part will be attached to The accessory that your part will attach to Step 1: Import truck model Import the truck as normal and then hide all objects except the root. Step 2: Show correct variant With the truck root selected, use the “SCS Variants” part of the object menu to unhide parts related to the variant you are using. For example, unhide the “chs_4x2” variant if you are making an addon for a 4x2. Do this for cabin and chassis variant. Step 3: Hide unnecessary objects Using the SCS Tools tab on the toolbar, hide all except “model objects” and “model locators”. It should look something like this: Spoiler Step 4: Position 3D cursor To speed up the process of importing the accessory, select the appropriate locator (b_grill for example) and, using the 3D view side bar (Opened with the “n” key by default) copy its Location coordinates to the 3D Cursor coordinates, as below (b_grill is selected in this case): Spoiler Step 5: Import accessory model Import the accessory model as you normally would, because we re-positioned the 3D Cursor, it will be automatically placed on the locator as it would be in-game. (“Optional”) Step 5a: Rotate accessory model In some cases, the accessory locator on the truck may be rotated (blue arrow not pointing forward and/or not pointing level). In these cases, set the locator’s Rotation Mode to “XYZ Euler” (on the same sidebar as the 3D Cursor position earlier) and copy its values to the root object of the accessory. Check visually that it matches what you usually see in-game. Step 6: Hide unnecessary objects Using the SCS Tools tab on the toolbar, hide all except “model objects” and “model locators”. Same as Step 3. It should look something like this: Spoiler Part 2: Your custom part For this section it is assumed that you already have your custom part ready for use in ETS2/ATS. I will NOT be covering materials or similar in this guide – I am only showing how to make them usable in TruckersMP. This is the model I am using, it is a fake extra axle, with the wheels in a lifted position – the intention being to mimic a long frame 6x2: Spoiler Step 1: Import your custom part If your custom part is not already in blender, now is the time to import/open it. Position it as it is meant to be in-game. If you are converting an f_grill, position to the f_grill locator. Step 2: Making the new root The easiest way to make the new root is to instead change an existing locator to the be the root. Select one of the slot locators on the accessory, it should be named “slot_##” where # is a number (may only be 1 digit) and scroll to the bottom of the objects tab in the properties area. You need to change the Object Type to be “Root Object”. Shown below is before and after: Spoiler Before: After: !Make a note of the name of the slot, for example “slot_0” as you will need it later! (“Optional”) Step 2a: configuring your new root If your new part has multiple variants and/or looks, edit the settings of this new root to match the existing one. Everything shown below should be the same between your existing root and your new root (it may not match mine, but both of yours should match): Spoiler Step 3: Moving everything to the new root Select all the models and locators which make up your new part, do not select any others, and then lastly select the new root – all must be visible in the 3D window. In the 3D window, press “ctrl + p” and select “Object (Keep Transform)”. If done right, there should be no visual change however if you now check the hierarchy, you will see that the models/locators for your part are now linked to the new root. Step 4: Exporting your new part I recommend renaming the new root object from its original slot name to something that you will be able to recognise, in case you ever want to change it again. The part should be exported to the correct folder this being within “/home”. I will be exporting my model to “<scs_project_path>/home/local_mods/fake_axle_iveco” and it will be named “fake_axle.pim” Once you have exported it from blender to that folder, you can then run the conversion helper to convert the part to the game format. I recommend not exporting to your mod folder. Part 3: File structure and edits Now that you have exported your part, you need to not only copy/move the files to the correct location. Step 1: The model files (.pmg and .pmd) For the model files, you need to copy/move them and edit them. Go to your exported mod, and copy the files to your “Documents\Euro Truck Simulator 2” (“Documents\American Truck Simulator” for ATS) folder. In my case the paths change as such: Move: “<exported_mod>/home/local_mods” To: “Documents/Euro Truck Simulator 2/local_mods” The *.pmd file also needs to be edited, as it is likely that it will require materials which are not included in the base game, as such the materials will also need to be in “/home” somewhere, which means the paths in the *.pmd need to be altered. The easiest way I find to do this is to open the *.pmd in either a Hex Editor or Notepad++ and do a find/replace to find “/automat/” and replace it with “/home/am/”. This works as they are the same number of characters, if the file changes size, then you will need to change more which is outside the scope of this guide. Step 2: The material files (.mat) These files only need to be moved, if you are following Step 1 of this part, all you need to do is make a new folder “am” in “Documents\Euro Truck Simulator 2” (“Documents\American Truck Simulator” for ATS) folder and paste all the sub-folders in there. In my case the paths change as such: Move sub-folders from: “<exported_mod>/automat” To: “Documents/Euro Truck Simulator 2/am” Part 4: Editing your save Addon hook-ups are different o accessories in that they are not loaded via a file path, meaning simply putting them as a vehicle_accessory or similar will not work, instead you need to get a new unit into the game and then reference it on the correct vehicle_addon_accessory. There are multiple ways you could get a new unit into the save, but many would cause a crash for you either every time or sometimes. Ensure that your save format is set to “2” before doing this. Step 1: Finding a unit to parent the new units from The units in the game save are in a hierarchy, all leading back to the ‘economy’ unit at the top of the save. In order for a unit to load, it must be within this hierarchy or the save will not load. You need to re-purpose an existing value in order to make these mods work. My preferred unit to edit is the ‘mail_ctrl’ which is used for the in-game mail system – this system is used initially for the bank messages and similar but rarely after. If the game needs to use it after the mods are installed, you can either a) edit the save to mark it as read and ignore it or b) uninstall the mods and then reinstall them after reading the message. Entering the mail menu with mods installed this way will cause your game to crash. There is only one of this unit per save, so simply searching “mail_ctrl” will find it. Mine shows like this, yours should look similar: Spoiler Step 2: Modifying this unit In order to add your custom parts, you need to parent them from this unit. The reason this unit works for this is the “inbox” array, which we can add our mods to. I recommend naming your units something memorable and it is vital they do NOT start with “.” or “_nameless”. I will be adding two custom parts, the custom model seen throughout this guide but also a hookup which will add the “bonfire” beacon onto a roofbar, to show that existing models can be used. After initial editing, mine looks like this: Spoiler Note that there is a maximum of 12 characters per token in unit names, which are the parts separated by “.” – the last and first parts have the same limit which is why I have “spec_beac” instead of “special_beacon” as the latter is too long. Step 3: Adding the new unit(s) This step is rather easy, and involves only adding new units to the save. In most cases, they will be “accessory_hookup_data” however for custom air horns (no other sounds can be done) they will be “accessory_horn_hookup_data” with accompanying “sound_data” units (see existing horn hookups to show how they are set up) In most cases, all you need to do is add a value for “model” however some models you make may need “variant” and “look” to be defined also. “electric_type” may also be of use for lights however most, beacons included, use aux_light as the value for it. Below are how the two custom parts for this truck are defined: Spoiler Note that the unit names match what we put in the “mail_ctrl” unit, and that the “custom” beacon instead is using the model of a default part – for those wanting local LEDs to put under lights, this is how it is done. Putting a name, icon and similar is also possible however these units will not be loaded into the menu so will never be seen. Step 4: Add the new part(s) to your truck Most save editors will be familiar with this. Simply add a new “slot_name” and “slot_hookup” to the correct “vehicle_addon_accessory” unit and you are done. The “slot_name” value should be the locator name noted earlier (should be “slot_” and then a number) and the “slot_hookup” value should be the unit name of your custom part. Below are the accessory units for this truck: Spoiler And… that’s it! If you did everything correctly, you should now see the truck with the custom parts installed. Useful Information: If you are using custom textures and *.tobj files, these must be located in the "/home" subfolder of the SCS project folder and then copied the same as models. Custom "paintjobs" can be made by having a custom model which "wraps" around the original This can be done with owned trailers too, using the rear bumper side light slots Please leave a comment with any feedback you have about the guide. If you have any questions about this guide specifically then ask below, any questions regarding general save editing or Blender should be asked elsewhere. 19 13 3 1 3 1
Beep Boop Coming Through Posted February 12, 2020 Report Posted February 12, 2020 Thanks for this guide would you be able to put links to where you get the tools needed please?
Forerunner Posted February 12, 2020 Author Report Posted February 12, 2020 @Beep Boop Coming Through the tools can all be found via a quick google search for each one. As said, this guide is meant for those who have prior experience and therefore most have the tools already
Ady Man Posted February 12, 2020 Report Posted February 12, 2020 Hey Congratulations on this topic I really liked how you explained Forerunner 10+
Beater Opressor Posted February 13, 2020 Report Posted February 13, 2020 Wow, it looks like somebody put in a lot of effort, nice job. 2
Roccovax Posted February 14, 2020 Report Posted February 14, 2020 Very nice guide, Thanks. But as I've never really used blender/SCS modding tools before it's a little bit much work for me for something that's only client side. I did wonder if it would be possible to have a local mod steering wheel that actually visibly turns? Also you could use the "entries" in "bus_job_log" to place the new units in, and that shouldn't mess anything up as that does not seem to be used by the game currently. And that way the email still works. Spoiler
callecamping Posted February 15, 2020 Report Posted February 15, 2020 realy nice work . thx for informtion
Forerunner Posted February 16, 2020 Author Report Posted February 16, 2020 Thanks everyone for the feedback On 2/14/2020 at 1:50 AM, Roccovax said: I did wonder if it would be possible to have a local mod steering wheel that actually visibly turns It is possible, you would need to make a local hookup that would attach to the standard steering wheel using the slots made for the steering wheel knobs, and make sure the new model either hid the old one, or use "r_steering_wheel 0" in the console to stop the steering wheel from rendering. On 2/14/2020 at 1:50 AM, Roccovax said: Also you could use the "entries" in "bus_job_log" to place the new units in, and that shouldn't mess anything up as that does not seem to be used by the game currently I did some tests with this and found that at some points, could not find out why, it did actually cause a crash upon the profile loading - crashed just before you see the truck in the background. It would not happen all the time, but was able to happen which is why i prefer to use the mail_ctrl, as at least then I can avoid a crash
King_TMP Posted February 17, 2020 Report Posted February 17, 2020 Hello, @Forerunner Thanks for making the guide it helps me out alot.
[PRS-TW] TLExpress Posted February 19, 2020 Report Posted February 19, 2020 Is paint job still banned now?
Forerunner Posted February 20, 2020 Author Report Posted February 20, 2020 14 hours ago, [PRS-TW] TLExpress said: Is paint job still banned now? Local paintjobs as they used to be are still banned
ThePredatorFromDenmark Posted March 22, 2020 Report Posted March 22, 2020 Would it also work with something like the Garmin front camera and vabis steering wheel? And if so do I need to follow the steps above also?
legobrammetje Posted March 22, 2020 Report Posted March 22, 2020 I see it's time for me to fire blender up once again.
[KIT] El Richi [MX] Posted May 3, 2020 Report Posted May 3, 2020 Hi, I need help, I have tried to make local mods with 3d models, but they do not come out. [19:22] my question is, if the model should be made for the truck that I am editing?
Highland_Hitman Posted May 12, 2020 Report Posted May 12, 2020 So how much would this guide differentiate if I were to use an already existing sound mod. I'm guessing the basic principles stated still apply, however I'm guessing something would be different ???
[KIT] El Richi [MX] Posted May 13, 2020 Report Posted May 13, 2020 Hi, I need a little help with local mods, I just want to see what the hierarchy of objects looks like when maintaining the transformation.
Booster_240sx Posted May 21, 2020 Report Posted May 21, 2020 Can you use some part of this for taking sound files from a sound mod and putting them into a local hookup?
xtrastrange Posted June 8, 2020 Report Posted June 8, 2020 On 2/17/2020 at 2:06 AM, Forerunner said: It is possible, you would need to make a local hookup that would attach to the standard steering wheel using the slots made for the steering wheel knobs, and make sure the new model either hid the old one, or use "r_steering_wheel 0" in the console to stop the steering wheel from rendering. Thanks for the guide. Is it possible to make a dashboard computer mod using this method too?
xtrastrange Posted June 16, 2020 Report Posted June 16, 2020 Maybe OP died in a crash or something so I'll post this in case others is wondering. You can't change the dashboard computer using this method
MakeMe Posted July 10, 2020 Report Posted July 10, 2020 I cant edit pmg and pmd files with notepad++ or any other, appears random characters, is there a tool? I've searched but didn't find any.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now