Jump to content

Eggon

Member
  • Posts

    31
  • Joined

  • Last visited

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

     

     image.thumb.png.4f23bfa28b7b4643e6cc1390e2f6d2d9.png

     

    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: 

    Quote

    C:\Users\username\Zomboid\Saves\Sandbox\map_sand.bin (The system cannot find the file specified)

    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. 58 minutes ago, Ciber Ninja said:

    The link at the very top of this page that says "Tileset Images"

     

    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.

  6. 19 hours ago, RingoD123 said:

    Looks like you havnt set up the tiles properly. In Tilezed you need to click on Tools and then Tilesets and then make sure the Tiles Folder is pointed at the Tiles folder you downloaded and not the 2x folder inside of it.

    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.

  7. 11 minutes ago, RingoD123 said:

    Make sure you have downloaded and set up the tiles folder in both TileZed and WorldEd.

    If you are trying to open the vanilla map then you are out of luck. Any/all map mods need to be created from scratch.

    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:

    image.png.4dfe90d340a8f05b835c56eb52a805d8.png

     

    How can I make them open properly?

  8. On 12/3/2020 at 8:40 PM, Tibila said:

    - fanny pack hotkey: add some customizable hotkeys when other storage devices are worn. This could make things more manageable in distress situation when you need an emergency bandage or pill to be taken

    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.

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

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

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

    Quote

    [Clothing{ clothingItemName="some name"}, Clothing{...}, zombie.inventory.types.InventoryContaier@..., zombie.inventory.types.HandWeapon@....]

     

    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?

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

     

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

    Cars-legend.png

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

  15. @ProjectSkythanks a lot! That worked for an item! :D

    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.

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

×
×
  • Create New...