Page 1 of 1

Lua Scripting: Modifying "maxMass" value of a trailer

Posted: Sat Sep 23, 2023 5:13 pm
by Bogy12
Hi guys,

for some reason I have an issue posting this on Giants Developer Network (GDN) so I will try my luck here.

Basically, Im trying to modify mod trailer "maxMass" value during the loading of the game (by using the .lua mod script). You can download any mod trailer from modhub, open the XML file and search for the "maxMass".

Example from one of the mods:
Image

I managed to fetch all items with .lua script by using the "g_storeManager:getItems();" method call. Now I'm iterating through all items and once I hit the trailer mod for which I want to modify max mass, I'm stuck:

Image

Any help would be appreciated (I am aware of the fact that I can just edit mod XML file, but that's not what I want to do here - i want to use .lua script for learning purposes primarily).

Thank you.