Jump to content

Recommended Posts

The title says it all. I'm trying to make a few changes to webber and I'm new to modding this game and Lua in general. I've tried looking into the codes for Woody and WX-78 and other mods but so far nothing ive tried has worked. I managed to add grueimmunity by adding this line to his master_postinit, but I can't get the nightvision to work according to the time of the day.

inst.components.grue:AddImmunity()

The nightvision is supposed to work in caves and during the night unless it is a full moon. I'm learning as I go but after many hours of trying by myself I finally decided to ask for help lol. As of right now, all the code does is cause the game to stop at the cream colored screen after selecting webber and clicking "Go!"
image.png.bd5992a4da6814f3f979d91acdf88c3a.png

I'll appreciate any help I can get! webber.lua with my current code is attached to this post.

webber.lua

I hope you will get a solution here! I was attempting to make my version of monster maxwell form of my maxwell being able to be nocturnal and has the exact same problem you describe here

7 hours ago, NoriTheRat said:

The title says it all. I'm trying to make a few changes to webber and I'm new to modding this game and Lua in general. I've tried looking into the codes for Woody and WX-78 and other mods but so far nothing ive tried has worked. I managed to add grueimmunity by adding this line to his master_postinit, but I can't get the nightvision to work according to the time of the day.

inst.components.grue:AddImmunity()

The nightvision is supposed to work in caves and during the night unless it is a full moon. I'm learning as I go but after many hours of trying by myself I finally decided to ask for help lol. As of right now, all the code does is cause the game to stop at the cream colored screen after selecting webber and clicking "Go!"
image.png.bd5992a4da6814f3f979d91acdf88c3a.png

I'll appreciate any help I can get! webber.lua with my current code is attached to this post.

webber.lua 7.76 kB · 1 download

Most of what's been placed in common_postinit should not be there, as that function is reserved for initializing things for both server and client, usually tags. you also can't make use of any functions placed inside because they are entirely local to "common_postinit", outside that function the rest of the code doesn't know it exists.

I did some changes to your file I'll attach here, major changes with explanation can be found marked with "FIXED" in comments. I didn't test the full file itself so the non-nightvision parts may still cause an error somewhere.

webber.lua

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