Community Forum

Can I have customization options on a placeable?

Forum Overview >> Farming Simulator 17

CategoryFarming Simulator 17
Created24.01.2017 22:58

Tim Derks (timmiej93) 24.01.2017 23:01
Is it possible to have customization options on a placeable? For instance, say you created a mod that has 3 solar panels. Small, medium and large. Instead of creating three separate shop objects, you want to add the bigger sizes as customization options. Is this possible?

Note: I only care about these options upon purchase, the placeable does not have to be customizable after purchase.

Bilbo Beutlin (BBeutlin) 24.01.2017 23:43
I don't think it's possible (without a script mod). In opposite to the Vehicle.lua the Placeable.lua doesn't have any references to a kind of configuration data.

Tim Derks (timmiej93) 25.01.2017 00:47
Do you have any clue how this could be done, or do you know of any examples? I'm always up for some scripting, and I can get most stuff working, as long as I have some kind of an example.

Bilbo Beutlin (BBeutlin) 25.01.2017 11:29
I don't remember, ever seen a configurable placeable mod.

But in principle you had to write your own, customized "myPlaceable.lua", where you take the original as template and add the configuration code of the "Vehicle.lua".

Tim Derks (timmiej93) 25.01.2017 12:04
That wouldn't be too hard, but I'm afraid that the shop simply won't recognize any customization options as long as the object is labeled as a placeable. An option would probably be to create a new "vehicleType", but I'd rather have the mod be in the placeables section. We have enough shop categories as is. I'm gonna give it a try though, if you have any ideas, please let me know.

Bilbo Beutlin (BBeutlin) 25.01.2017 14:06
Of course you had to implement a new object class for a new LUA. If you use <placeableType>placeable, the standard LUA will be used.

Another possiblity was modification of the standard LUA itself with the methods of "Utils.appendedFunction(..)" or "Utils.overwrittenFunction(..)", where you need merely modify the code of some standard functions.
(Hope this is still working in FS17)

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