Search the Community

Showing results for tags 'override'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • News
  • Project Zomboid
    • PZ Updates
    • General Discussions
    • Bug Reports
    • PZ Support
    • PZ Multiplayer
    • PZ Community & Creativity
    • PZ Suggestions
  • PZ Modding
    • Tutorials & Resources
    • Mods
    • Items
    • Mapping
    • Mod Ideas and Requests
  • General Games Development
    • Indie Scene
  • Other Discussions
    • General Discussion
    • Forum Games & Activities
    • Pen & Paper / Community RPGs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Twitter


Interests

Found 4 results

  1. First of all, I have everything working pretty much, so please don't think I want someone to do the work for me. I'm only a beginner in Lua, so please bear with me if I ask some stupid things or use incorrect terms. I have searched beforehand for a couple of days, but have to ask you anyway. So, I have a mod, that modifies 'media\lua\client\TimedActions\ISScavengeAction.lua' file. The mod is basically done by a copy of existing with a small change. Example: ISScavengeAction = ISBaseTimedAction:derive("ISScavengeAction") [.. snipped ..] function ISScavengeAction:perform() -- x5 increase from 20 actions to 100 per 'fatigue day' self.character:getStats():setFatigue(self.character:getStats():getFatigue() + 0.01) -- needed to remove from queue / start next. ISBaseTimedAction.perform(self) end As I understand, if I create and load another mod that has the same file overridden, the mods will be incompatible (because of how modloader works). Is there a way to do something similar to Java's 'extend' for the function? I presume that's what the 'derive' keyword is for. What's the best approach here? Remove everything standard except the changed functions and definitions from the mod and use 'derive'? Will everything work? Or is there something else I should know? Ideally I'd like to go as low as changing only 1 variable in a function so that cross-mod compatibility is the highest. Any advice from experience is welcome! Thank you.
  2. Snakeman

    Help "Obsolete:true" RecipeFeature

    Well i get Build 36.4 and try to Overrides or make a recipe Obsolete but not working... i want some help to make it work. I want to make this base game recipes obsolete and make it another two with some variations. But this script not delete the base recipe. module Base { recipe Slice Bread { keep KitchenKnife/ButterKnife/HuntingKnife, Bread, Result:BreadSlices=3, Sound:PZ_SliceBread, Time:40.0, Category:Cooking, OnGiveXP:Give3CookingXP, Obsolete:true, } recipe Slice Bread { keep KitchenKnife/ButterKnife/HuntingKnife, BreadDough, Result:BreadSlices=3, Sound:PZ_SliceBread, Time:40.0, Category:Cooking, OnTest:SliceBreadDough_TestIsValid, OnGiveXP:Give3CookingXP, Obsolete:true, } }
  3. blindcoder

    Overriding a base item does not work

    Hello. I'm trying to change Bleach into an item with a usedelta like this: [08:33:18][blindcoder@flora:~/Zomboid/mods/dirtyWater/media/scripts]$ cat dirtyWaterItems.txtmodule Base{ item Bleach { UnhappyChange = 66, Weight = 0.3, Type = Food, ThirstChange = -60, DisplayName = Bleach, Icon = Bleach, Poison = true, DisplayCategory = Item, PoisonDetectionLevel = 7, PoisonPower = 40, UseForPoison = 15, UseDelta = 0.04, CustomContextMenu = Drink, CustomEatSound = PZ_DrinkingFromBottle }}I've changed the UnhappyChange to 66 to see if this file is loaded at all, but it still is 99 in-game and :getUseDelta() returns nil. Where am I going wrong here?
  4. blindcoder

    Can I override LUA functions?

    Hello. I want to change some behaviour in the current trapping system. For that, I want to override ISTrap:addBait and ISTrap:removeBait. Is that possible by just creating a media/lua/server/Traps/ISTrap.lua and re-defining those two functions? Or is there some more magic to do so?