SephVII Posted April 16, 2017 Share Posted April 16, 2017 Evening DST community, i have a little question and help request. I know that there alot of stuff out to look up and i also can just look on the vanilla files, but until i figured it out im probably 20 years older :P. So im asking kindly if somehow willing to quick help. I want simply edit the durability of the compass for me and my friends in a small seperate mod.I assume that i probably need to just change an singel entry but from previous long ago experience it never worked out how i imaged when i tried to edit stuff in the DST code. Best Regards. Link to comment Share on other sites More sharing options...
SephVII Posted April 19, 2017 Author Share Posted April 19, 2017 No one . -. ? Link to comment Share on other sites More sharing options...
Lumina Posted April 19, 2017 Share Posted April 19, 2017 The line is : COMPASS_FUEL = day_time * 4, Maybe you could simply set an higher number for this line in a modmain.lua and see if it works ? Link to comment Share on other sites More sharing options...
SephVII Posted April 19, 2017 Author Share Posted April 19, 2017 19 minutes ago, Lumina said: The line is : COMPASS_FUEL = day_time * 4, Maybe you could simply set an higher number for this line in a modmain.lua and see if it works ? Sure will test it out thank u Lumina =) Link to comment Share on other sites More sharing options...
SephVII Posted April 19, 2017 Author Share Posted April 19, 2017 2 hours ago, Lumina said: The line is : COMPASS_FUEL = day_time * 4, Maybe you could simply set an higher number for this line in a modmain.lua and see if it works ? Seems to crash for me when i try Link to comment Share on other sites More sharing options...
Lumina Posted April 19, 2017 Share Posted April 19, 2017 See there how to obtain a log and post it. There is probably something missing, maybe a local or a global or something like this, but it will help to have the log in any case. Link to comment Share on other sites More sharing options...
SephVII Posted April 19, 2017 Author Share Posted April 19, 2017 (edited) 23 minutes ago, Lumina said: See there how to obtain a log and post it. There is probably something missing, maybe a local or a global or something like this, but it will help to have the log in any case. Well apparently it wasnt a crash in usally way it was just a CTD without any logs or crash info, when i tried to pick a charackter. Edited April 19, 2017 by Deathlord Avon Link to comment Share on other sites More sharing options...
. . . Posted April 20, 2017 Share Posted April 20, 2017 Here this will make the compass have double the durability, if you want more or less than that then change "2" inside the modmain.lua of the mod, hjaeve fun ! durable compass.zip Link to comment Share on other sites More sharing options...
SephVII Posted April 20, 2017 Author Share Posted April 20, 2017 1 hour ago, SuperDavid said: Here this will make the compass have double the durability, if you want more or less than that then change "2" inside the modmain.lua of the mod, hjaeve fun ! durable compass.zip Oh my m8 ur a lifesaver when Lumina send me code above i was diggin more into compass and wasnt sure if i should use that line or not but apparently it was right and u proved it. Will testing it in a bit but im sure it will work tho Thanks already Best Regards Link to comment Share on other sites More sharing options...
SephVII Posted April 21, 2017 Author Share Posted April 21, 2017 (edited) On 20.4.2017 at 2:31 PM, SuperDavid said: Here this will make the compass have double the durability, if you want more or less than that then change "2" inside the modmain.lua of the mod, hjaeve fun ! durable compass.zip @SuperDavid Suddenly it crashes when i play with more people, playing alone works totally fine but as soon i spawn a compass when 1 more is with me it crashes out wasnt able to read the crash yet to fast faded away, but and rough ideas ? Will reproduce the error later when my friend is up tho.EDIT : i rechecked now and it seems as soon as i add Caves to the world it crashes me out with this error suddenly. Best Regards Edited April 21, 2017 by Deathlord Avon Link to comment Share on other sites More sharing options...
. . . Posted April 21, 2017 Share Posted April 21, 2017 Sorry, but I don't know how to fix that crash ... Hopefully someone else can help you fix this . Link to comment Share on other sites More sharing options...
SephVII Posted April 21, 2017 Author Share Posted April 21, 2017 hope so too atleast u solved the problem on the base Link to comment Share on other sites More sharing options...
DarkXero Posted April 21, 2017 Share Posted April 21, 2017 The mod is "all_clients_require_mod = true", so the compass function runs on clients (people joining cave servers). The fueled component doesn't exist on clients, and you end up indexing a nil of a table. Either turn the client requirement to false, or add a check AddPrefabPostInit("compass", function(inst) if inst.components.fueled then -- do fueled thing end end) to verify that the component exists. Link to comment Share on other sites More sharing options...
SephVII Posted April 22, 2017 Author Share Posted April 22, 2017 1 hour ago, DarkXero said: The mod is "all_clients_require_mod = true", so the compass function runs on clients (people joining cave servers). The fueled component doesn't exist on clients, and you end up indexing a nil of a table. Either turn the client requirement to false, or add a check AddPrefabPostInit("compass", function(inst) if inst.components.fueled then -- do fueled thing end end) to verify that the component exists. That clears alot up thank u Hero Best regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now