Community Forum

One last question.. >.<

Forum Overview >> Scripting

Created24.01.2019 18:15

Antt Mountain (Unknown) 24.01.2019 18:15
So i have been guided towards using a custom spec to make my mod use different settings to the original mixerwagon, i have made a start to this, but of course there isnt a full spec available from Giants yet.

Is there a way i can use the original game files and then inject that it uses just one or two alterations, i am new to this and i dont know if it is even possible to JUST load my changes over the original files when using my vehicle, leaving them intact when using the original vehicle.

Im sorry if im asking really silly questions but i am very new to this and learning as fast as possible..
i know i can write a full spec out and have my vehicle use that, but im unsure if i can just add my own code into it when using this vehicle..
I dont want to effect the original coding for the vehicle im altering. I believe my need is to replace 2 functions, only when using my mod, still using all the base game files for everything else.

An explanation would be great but a yes or no will still help!

Bilbo Beutlin (BBeutlin) 25.01.2019 23:43
Basically you have two ways to implement the spec:

1. Modifying the orig. spec
Then you overwrite the function/s which need to be changed with "Utils.overwrittenFunction()".
At your function entry you may check for a specific vehicle and branch to orig. code or your custom code.

2. Creating a new spec
Here you need the complete basic structure of a spec. For unchanged functions you can call simply the orig. function.

A little easier to implement is the first way.
The second way is more safe for the case another mod changes also certain functions.

Antt Mountain (Unknown) 09.02.2019 01:08
Thanks for the reply. I apologise for being very bad at this, learning!

Antt Mountain (Unknown) 12.02.2019 12:06
I have received advice on which functions to append, and which to overwrite, this was my issue.
My script is now past this stage! :)

Note: Log in to post. Create a new account here.