Jump to content

Changes in lua files doesn't work in-game


enik

Recommended Posts

What I do is go to components>locomotor and change Wilson speed here: 

local LocoMotor = Class(function(self, inst)    self.inst = inst    self.dest = nil    self.atdestfn = nil    self.bufferedaction = nil    self.arrive_step_dist = ARRIVE_STEP    self.arrive_dist = ARRIVE_STEP    self.walkspeed = 12 -- 4	    self.runspeed = 18 -- 6    self.bonusspeed = 0    self.throttle = 1	self.creep_check_timeout = 0	self.slowmultiplier = 0.6	self.fastmultiplier = 1.3		self.groundspeedmultiplier = 1.0    self.enablegroundspeedmultiplier = true	self.isrunning = false		self.wasoncreep = false	self.triggerscreep = trueend)
Link to comment
Share on other sites

You should generally not manipulate game files directly. Either override them with a mod (have the modified version in the mod), or use PostInit functions. In this case, you can very well do the latter (read throught modutil.lua for further reference).

Link to comment
Share on other sites

alright. so you are just trying to change the default movement speed for wilson ingame? if you are just doing this to increase speed, it might not work because of a tuning file. where it used to say this: 

self.walkspeed = TUNING.WILSON_WALK_SPEED -- 4

try putting this instead of changing the number:

 self.walkspeed = TUNING.WILSON_WALK_SPEED*3 -- 4

if this doesnt work, then i can give you a temporary solution every time you load the world.

Link to comment
Share on other sites

try putting this instead of changing the number:

 self.walkspeed = TUNING.WILSON_WALK_SPEED*3 -- 4

This didn't work either.

 

You should generally not manipulate game files directly. Either override them with a mod (have the modified version in the mod), or use PostInit functions. In this case, you can very well do the latter (read throught modutil.lua for further reference).

I will try those. Thanks for the replies guys.

Link to comment
Share on other sites

Ok it worked after some shenanigans. I just created a "components" folder in an already existing mod folder and put there changed "locomotor" file. it's so satisfying to finally see the result in game :) Now I can start learning modding by messing around with everything the game will allow me to hehe.

Link to comment
Share on other sites

glad to hear. btw, if you want to mess with the speed numbers, there is an ingame console command that allows you to set the movement speed (tip: 40 can allow you to clip into oceans).

 


glad to hear. btw, if you want to mess with the speed numbers, there is an ingame console command that allows you to set the movement speed (tip: 40 can allow you to clip into oceans).

 

Link to comment
Share on other sites

My initial goal was to create a craftable object which stops daytime time around it within a certain range, so you can put one at your home place, sort invertory, cook some food, prepare for the next adventures and hang out around campfire with out time pressure. I'm guessing it won't be as easy as changing Willson runspeed hue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...