Jump to content

Eggon

Member
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Eggon

  1. Implementation of HandWeapon:getActualWeight() bases on item script's actual weight instead of this.ActualWeight. This means that values applied with the setter will allways get overridden by the getter. This also applies to the setWeight() setter. Can you please fix it? It breaks one of my mods and it does not seem to be a good practice to make setters ineffectual. If too problematic then could you provide an implementation for setWeaponPartWeightModifier()? It potentially could allow a workaround of the problem by creating a fictious weapon part. Not very elegant, but should work.
  2. @EnigmaGreyI'm not sure if that is indeed what happened as he provided the log of the error and it says: It clearly points to incorrect folder. He also said he did have the file , but in the actual saves folder. What other way would you suggest? I switched to getSandboxOptions():load() Should it behave better?
  3. I am trying to setup a server via the in-game setup. The server is purely for testing purposes. Where should I register the mods in the server's settings? In the Steam Workshop section or the Mods section? They seem to be doing the exact same thing? I have added my mod to both the sections (and reset the world), but it does not seem to be working. In particular, the mod's Sandbox settings do not get displayed. What can be the problem here? In the past I was somehow able to add mods to my test server (adding them to "Mods" section), but it didn't work this time. I'm confused, can anyone help pls? I tried to look for the answer in various guides, but didn't find any helpful information.
  4. @EnigmaGreyI noticed that modified Sandbox settings are not accessible in the early stages of mod files loading (the actual loading of files, prior to events like onGameBoot) - the SandboxVars.myModName will contain default settings, not current ones(!). The current ones are loaded at some later point, but this is too late for conditionally tweaking item/vehicle scripts. As a solution I found this method getSandboxOptions():loadCurrentGameBinFile() in PZ lua scripts. It did refresh the SandboxVars even for the early stages of loading. However people using version 41.73 complained that this line throws the error I mentioned above. It worked for me in 41.71. That's why I submitted this bug report. I do see though there's also a load() method on the SandboxOptions. Is it better suited for the purpose? It seems to be refreshing the values too. At least in 41.71.
  5. getSandboxOptions():loadCurrentGameBinFile() is looking for map_sand.bin file in Saves\Sandbox\ instead of the actual save folder, so it doesn't find it and error results.
  6. Oh, ok, thank you! That worked, I can see most of the images now. Is there a way to see the actual sprite names as later used by objects in their respective sprite properties? When I hover over the images only "GID xxxxx" appears. Clicking on the image does nothig either.
  7. What folder is the "Tiles folder that I downloaded"? Is that some folder of the game? Which one? The only "2x" folders in PZ's folder are subfolders of some "fonts" folders which I expect are something different. TileZed does not have any "Tiles" or "2x" subfolders either.
  8. I'd just like to browse vanilla textures (need to use their names), not the actual maps. I found in the TileZed the sub-app for .tiles files and I tried to open them, but I get this mess: How can I make them open properly?
  9. So how exactly do you open game's assets with this app? In the I don't find any .tmx files, tried to open some .bin (worldmap.xml.in) - that didn't work either. I would like to browse textures of objects (not items).
  10. @lordixiThis is just an example of how to add items to vanilla distribution procedures. Do you know how to properly register a custom procedure?
  11. Not axactly a hotkey for the fanny pack, but I did implement hotkeys for pain killers and beta blockers in my Eggon's Hotkeys mod if anyone is interested. As for bandages that's probably doable, but the question is how should it work, as bandages are applied to a particular wound. There might be many wounds. There's also the question of disinfection if it should be auto-applied.
  12. Guys, I'd like to keep track of versions of my mods. I was thinking about using GIT for this, but I'm concerned that the git files will get uploaded to Steam with the mod when the mod is published. Obviously I'd like to avoid that. Do you have any experience with using GIT with Zomboid? Will the GIT files be uploaded? How to set up GIT to avoid it? I'm not an experienced GIT user. As an alternative to GIT (just for sharing across machines, not versioning) I was thinking about placing the Workshop folder on a Dropbox drive. Does anyone know how to change the default Workshop folder? I mean the Workshop upload folder ("C:\Users\[UserName]\Zomboid\Workshop"), not the one with downloaded mods (in Steam Library). I haven't found it in neither the game's option nor the Steam's properties.
  13. I'm working on my mod inside the C:\Users\UserName\Zomboid\Workshop folder. I have this particular path displayed when I check which mod is enabled in the game's Mods section. However, despite this it is clear to me that the game uses the old version downloaded from Steam. Is this a bug? The only solution I found to force the game to use the 'dev' version is to change mod ID (which makes 2 instances of the mod appear in the Mods menu), but I don't want to do it, as if i forget to change it back I might create new instance on Steam. Has anyone else had this problem and found a better solution? PS. I'm pretty sure that in the past the game used 'worshop' version of the mod.
  14. I'd like to loop through items in inventory to perform a certain check on each of the items. I have this code (which doesn't work as expected) : local player = getPlayer() local inventory = player:getInventory() local items = inventory:getItems() print(items) for i, v in ipairs(items) do print("i: ", i) print("v: ", v) end Printing "items" results in a following entry in the console: First strange thing about it is that it looks like a mix of 'body containers' and actual items? And the other is that it's enclosed in square brackets, which is not a Lua data type according to my limited knowledge of Lua. ipairing 'items' doesn't throw an error, but it doesn't access the objects either. How can I access items in invntory in form of a iterable table? And what is this strange list in [] that gets logged to the console?
  15. @EnigmaGrey Thank you for explanation. If that is the case could you please recommend how to access all spawned items of a given type on on any of the loading events? I'd loop through them and perform a modification function on all of them that would reinstate the lost values based on values I'd save in getModData().
  16. @EnigmaGreyI'm sorry but your answer is a bit ambiguous - what "it" pulls data from scripts on load? What's the purpose of setTexture / Tooltip if its not permanent? Other setters do update properties permanently, so it is inconsistent.
  17. The setTexture() method allows to set new icon to an item in inventory, but that icon is substituted on game reload with "default" icon specifed in scripts/.txt files. The same applies to tooltip text. Expected behavior is to have the icon and tooltip text preserved on the particular item. Example code: local player = getPlayer() local inventory = player:getInventory() local item = inventory:getFirstTypeRecurse(itemType) local texture = getTexture(texturePath) item:setTexture(texture) item:setTooltip(toolTipText)
  18. Eggon

    Worthwile cars

    Hi! Let me present you my first mod - Worthwile Cars. I'm curious of your opinions and hope you'll like it! It modifies cars in three ways: 1) Trunk's capacity does not decrease when damaged. 2) Trunks' capacity increase proportionally to car size ranging from 25 (Chavalier Dart) to 300 (Chevalier Step Van). 3) Car loundess increases with car size (type has an effect too) from 50 (Chavalier Dart) to 110 (Chevalier Step Van). Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2268384089 Justification for the changes the mod offers: I find the capacity decrease mechanic absurd, frustrating, non realistic (can't damage empty space!) and grindy. I also felt like there is no justification in the game for using large cars, as they don't offer that much more capacity (if at all!) , but are significantly louder. I wanted to encourage the player to build a fleet of cars each of which is optimal for a particular task.
  19. I expect the tags should be loaded in the workshop.txt file, however mod loader does not show them in the "tags" window. I have added to the file a line like this: tags= cars, trunks I have found topic 'more tags mod' which suggests the tags list is restricted? Is it?
  20. New fog looks very nice, but there should be some zone around the character which would decrease the denseness of the fog. Now if you step into a dense chunk of fog you still see nothing around you.
  21. @ProjectSkythanks a lot! That worked for an item! Do you know how to access vehicles definitions in a similar way? I'm looking at the docs for the ScriptManager: https://projectzomboid.com/modding/zombie/scripting/ScriptManager.html , but there's no "getVehicle()" method and I guess vehicles are not items? the only "getVehicle()" I found on this forum related to player object and the car the player is in. I didnt find anything pn the global object either.
  22. Hi, is it possible to modify via a mod particular properties of standard in-game items without having to copy the whole object definition? Eg, if this is standard Stone item definiton: item Stone { Type = Normal, DisplayName = Stone, Icon = TZ_Stone, Weight = 1.5, } And I simply want to change the Weight property to 2.0, can I do it without overwriting the whole definition? Something like this: Stone.Weight = 2.0 Is it possible? How to achieve it? I haven't seen anything on this in the basic tutorials.
  23. @GoodOldLeonThanks mate! It worked! You've just made one survivor really happy!!
×
×
  • Create New...