Jump to content

Recommended Posts

Hey, so basically anything I change in lua files has no effect in-game, even if I delete some of these and I can't figure out what I do wrong. I've tried to do the same as in this video http://www.youtube.com/watch?v=YTxLWfph_sc but it didn't work for me. I save files and restart the game everytime. Sorry for the lame question :p

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)

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).

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.

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.

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.

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).

 

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...