false_chicken Posted December 1, 2014 Share Posted December 1, 2014 Hello! I have added a few objects to the game and have successfully added them to the loot table but I was wondering where the craftable object definations (Furniture) are located? I am currently trying to make a simple override to make the "Lamp On Pillar" require no batteries as lighting is a serious problem for my local group of friends. Any suggestions? If anyone can point me in the right direction I would greatly appreciate it. Thanks! Gustav 1 Link to comment Share on other sites More sharing options...
EnigmaGrey Posted December 1, 2014 Share Posted December 1, 2014 Should be in recipes.txt in ProjectZomboid\media\scripts Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 Should be in recipes.txt in ProjectZomboid\media\scriptsUnfortunately its not . That seems to only deal with the recipes to craft items in the players inventory not the furniture you can craft and place in the world. And I wouldn't be just looking for the recipe to create the object but rather where that object itself is defined (Similar to items.txt where items are defined but for furniture). Link to comment Share on other sites More sharing options...
harakka Posted December 1, 2014 Share Posted December 1, 2014 If I understood you right, what you're looking for is in media/lua/client/BuildingObjects/ISUI/ISBuildMenu.lua, search for "pillar". There are no "neat" definitions for this stuff I'm afraid. false_chicken and EnigmaGrey 2 Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 If I understood you right, what you're looking for is in media/lua/client/BuildingObjects/ISUI/ISBuildMenu.lua, search for "pillar". There are no "neat" definitions for this stuff I'm afraid.Not "neat" but with some LUA understanding not too difficult to follow. Thanks! Seems to be just what I was looking for. Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 If I understood you right, what you're looking for is in media/lua/client/BuildingObjects/ISUI/ISBuildMenu.lua, search for "pillar". There are no "neat" definitions for this stuff I'm afraid.Sorry to bring this "solved" topic back up. Technically it looks like what I was looking for but I cannot seem to achieve my goal of a powerless lamp. Here is the code I was modifying: ISBuildMenu.onPillarLamp = function(worldobjects, square, sprite, player)-- sprite, northSprite local lamp = ISLightSource:new(sprite.sprite, sprite.northSprite, getSpecificPlayer(player)); lamp.offsetX = 5; lamp.offsetY = 5; lamp.modData["need:Base.Plank"] = "2"; lamp.modData["need:Base.Rope"] = "1"; lamp.modData["need:Base.Nails"] = "4";-- lamp.modData["need:Base.Torch"] = "1"; lamp:setEastSprite(sprite.eastSprite); lamp:setSouthSprite(sprite.southSprite); lamp.fuel = "Base.Battery"; lamp.baseItem = "Base.Torch"; lamp.radius = 10; lamp.player = player getCell():setDrag(lamp, player);endI tried commenting out the lamp.fuel line and tried changing its value to an empty string (""). Both of those seem to disable interaction with the lamp. I no longer have a context menu when right clicking on it. When creating the mod I simply copied the folder structure from the PZ media folder to override the default ISBuildMenu.lua with my own with the only change being what I mentioned. I can confirm in the console that the override is happening and when I revert my changes it works fine. Any suggestions? Thanks a lot! Link to comment Share on other sites More sharing options...
EnigmaGrey Posted December 1, 2014 Share Posted December 1, 2014 Yep, looks like that can't be commented out. Hm.Somewhere there's a check being made, judging by the stacktrace, that, having crossed those two values out, returns null. (This was done with cheat = true.) Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 Yep, looks like that can't be commented out. Hm.Somewhere there's a check being made, judging by the stacktrace, that, having crossed those two values out, returns null. (This was done with cheat = true.)Ah. Thats a shame. Well I suppose I will just have to wait until some future change that will allow the modification or figure out some other way. I also was looking into maybe instead of changing the fuel required I would change the rate at which it used the fuel to zero but I cannot find a reference to any sort of consumption rate. Link to comment Share on other sites More sharing options...
Greeny Posted December 1, 2014 Share Posted December 1, 2014 What if you changed the fuel to Base.PotatoMake it run on potatoes, and start a farm Would be perfectly realistic false_chicken 1 Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 What if you changed the fuel to Base.PotatoMake it run on potatoes, and start a farm Would be perfectly realisticYeah I could but I was really looking for an infinite light source. Not RP or realism friendly I know but its something that a large majority of my friends on my server want. Link to comment Share on other sites More sharing options...
RobertJohnson Posted December 1, 2014 Share Posted December 1, 2014 I'm quite sure I added a way to do it.. Gonna take a look tomorrow false_chicken 1 Link to comment Share on other sites More sharing options...
false_chicken Posted December 1, 2014 Author Share Posted December 1, 2014 I'm quite sure I added a way to do it.. Gonna take a look tomorrow Thanks RJ! You're the man! Link to comment Share on other sites More sharing options...
false_chicken Posted December 2, 2014 Author Share Posted December 2, 2014 Yep, looks like that can't be commented out. Hm.Somewhere there's a check being made, judging by the stacktrace, that, having crossed those two values out, returns null. (This was done with cheat = true.)Oh and thanks for actually going through the work and testing that EnigmaGrey. I didn't expect that. Above and beyond good sir. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted December 2, 2014 Share Posted December 2, 2014 Yep, looks like that can't be commented out. Hm.Somewhere there's a check being made, judging by the stacktrace, that, having crossed those two values out, returns null. (This was done with cheat = true.)Oh and thanks for actually going through the work and testing that EnigmaGrey. I didn't expect that. Above and beyond good sir. Eh, had my own results to work towards, too. Behold, the levitating compost bin:I wonder if it'd be easier just to make a light source, as this does, rather than try to have a lamppost that doesn't require power? IsoWorld.instance.CurrentCell.getLamppostPositions().add(new IsoLightSource((int)owner.x, (int)owner.y, (int)owner.z, 0.8F * invAmb, 0.8F * invAmb, 0.6F * invAmb, 18, 6)); Gustav and false_chicken 2 Link to comment Share on other sites More sharing options...
false_chicken Posted December 2, 2014 Author Share Posted December 2, 2014 Yep, looks like that can't be commented out. Hm.Somewhere there's a check being made, judging by the stacktrace, that, having crossed those two values out, returns null. (This was done with cheat = true.)Oh and thanks for actually going through the work and testing that EnigmaGrey. I didn't expect that. Above and beyond good sir. Eh, had my own results to work towards, too. Behold, the levitating compost bin:I wonder if it'd be easier just to make a light source, as this does, rather than try to have a lamppost that doesn't require power? IsoWorld.instance.CurrentCell.getLamppostPositions().add(new IsoLightSource((int)owner.x, (int)owner.y, (int)owner.z, 0.8F * invAmb, 0.8F * invAmb, 0.6F * invAmb, 18, 6));That seems like a possible solution for me. I may need to read up on some more modding information. That looks like Java and I am not too bad at it but I do not have much context for that piece of code. I am also fuzzy on the connection between Java and Lua. I am not too sure how to go about calling that from Lua.EDIT: Some examples from your code would probably be infinitely helpful. EnigmaGrey 1 Link to comment Share on other sites More sharing options...
EnigmaGrey Posted December 6, 2014 Share Posted December 6, 2014 Sorry for the delay, Chicken, had a few things going on in the Real World. Will see if I have something subtle today. false_chicken 1 Link to comment Share on other sites More sharing options...
false_chicken Posted December 6, 2014 Author Share Posted December 6, 2014 Fantastic! Yeah that happens sometimes. Lol. Thanks! Link to comment Share on other sites More sharing options...
taha Posted December 6, 2014 Share Posted December 6, 2014 Just a suggestion (for false_chicken) How about remove "usedelta" from battery and torch items in items.txt? The lamp post would still use a battery and a flashlight, but they will never be exhausted (i think). EnigmaGrey and false_chicken 2 Link to comment Share on other sites More sharing options...
false_chicken Posted December 6, 2014 Author Share Posted December 6, 2014 Just a suggestion (for false_chicken) How about remove "usedelta" from battery and torch items in items.txt? The lamp post would still use a battery and a flashlight, but they will never be exhausted (i think).That is a good idea but I would prefer to have batteries and flashlights still function. Link to comment Share on other sites More sharing options...
ShuiYin Posted February 18, 2016 Share Posted February 18, 2016 Just a suggestion (for false_chicken) How about remove "usedelta" from battery and torch items in items.txt? The lamp post would still use a battery and a flashlight, but they will never be exhausted (i think).That is a good idea but I would prefer to have batteries and flashlights still function. make a new battery just for the lamp post 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