Jump to content

Hugo Qwerty

Member
  • Posts

    318
  • Joined

  • Last visited

Posts posted by Hugo Qwerty

  1. A common issue with Hydrocraft is that there are several versions of the mod, and they all use the same mod id, as a result if someone has more than 1 version of Hydrocraft installed then PZ can get confused.  If they have 2 or more versions installed that might be the problem, to fix just remove the all Hydrocraft versions except the one being used on the server.

  2. An example from a mod I made:

     

    function SpawnPoints()
    	return
    	{
    		unemployed = 
    		{
    			{worldX = 33, worldY = 22, posX = 282, posY = 164},
    		},
    	}
    end

     

    unemployed is the profession that can spawn at the location.  Any profession not specified will default to unemployed, so this example location works for all professions.

     

     

  3. One thing I think would help is if rotten food was set to despawn after a few weeks as the default.

     

    The last time I tested it, rotten mayonnaise actually adds *more* calories to a salad than fresh mayonnaise does.  I think this happens because when it rots it loses hunger reduction but not calories, so it still has 3000 calories but less uses meaning each use adds more calores.

     

    The only down side to rotten food despawning is that it takes the container with it - so I've modded my game to swap sacks of food for empty sacks in the loot tables, as the sacks are more valuable to me than the food anyway.  I expect this problem goes away in B42, as we know we can craft more bowls & I expect we'll be able to craft anything else we might want as well (pots, pans, sacks, etc).

  4. An example from a mod I made.

    Item definition:
     

    	item HowToUseGenerators
    	{
    		DisplayCategory = SkillBook,
    		Weight = 0.1,
    		Type = Normal,
    		DisplayName = How to Use Generators,
    		Icon = MagazineElectronics02,
    		StaticModel = Magazine,
    		WorldStaticModel = MagazineElec4Ground,
    		Tooltip = Tooltip_TooComplicated,
    	}

     

    \media\lua\shared\Translate\EN\Tooltip_EN.txt:

    Tooltip_EN = {
    	Tooltip_TooComplicated = "This is too complicated for me, I don't understand what any of this means."
    }


    The above file should be created within your mod - so you don't need to touch the vanilla file.

     

  5. I can't see anything wrong with the code, but I only just woke so I might have missed something obvious.

    You have set the OnCreate value in the recipe, right?

     

    The random calls will only happen once per load, so you may want to move them inside the function.

     

    Indie Stone code uses ZombRand, rather than math.random, but I don't see why that would be an issue.

     

    Maybe try sticking a few print calls in there to see which of the code is actually running?

     

    You may also want to check out the The PZ modding community discord:  https://discord.com/invite/SReMnbV4V7

  6. Try this:
     

    require "RenameContainers/ISInventoryPage"
    local original_onRenameContainerClick = ISInventoryPage.onRenameContainerClick
    function ISInventoryPage:onRenameContainerClick(button, inventory)
        original_onRenameContainerClick(self, button, inventory)
    
        -- Any code here never runs.
    end

     

    The require will make sure the mod's file loads before your mod, which may or may not be the issue.

     

×
×
  • Create New...