Jump to content

Search the Community

Showing results for tags 'scripting'.

  • 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

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

  1. Version: 41.73 Singleplayer/Multiplayer? NA Host or dedicated? NA Mods? Yes Old or new save? NA Reproduction steps: Create a mod that adds a non-profession specific trait (like Brave) to any profession Go to the character creation screen You'll see that the trait is added to the chosen ones but it's also available to be chosen again Expected behaviour: the trait should not be duplicated and (probably) it should not be possible to remove it from the chosen ones Code example to reproduce the bug (the trait and the profession do not matter, they could be anything): Events.OnGameBoot.Add(function() local p = ProfessionFactory.getProfession("unemployed") p:addFreeTrait("Brave") end) This is what will happen: If I add also the one on the available traits: If I deselect it:
  2. https://zomboid-javadoc.com/41.65/zombie/iso/weather/ClimateManager.ClimateFloat.html#setEnableModded(boolean) The modded options `setModdedValue` and override options `setOverride` do not fucntion properly. the modded values don't work AT ALL. The override value works, but has a bug that every time other weather values change, it will be ignored! (image of other weather values) The only way to make this work "reliably" is to use `setAdminValue` ideally: the modded value would work (currently ignored 100%) the override value won't be ignored when weather settings update normally
  3. Hi, I'm trying to make a small mod of Hydrocraft to make farming/ranching a little more challenging. My idea is to make it a little more realistic and immersive, with more item sprites, more time between animals aging up, getting sick, etc. The trouble is I'm a scripting noob, so if anyone could give me some help I would really appreciate it. For example, here is one of the scripts I'm trying to mod: ItemTimeTrackerMod["HCSheepfemale"] = {}; ItemTimeTrackerMod["HCSheepfemale"]["Life"] = 120.0; ItemTimeTrackerMod["HCSheepfemale"]["TurnInto"] = "Hydrocraft.HCSheepfemalehungry"; I'd like it so that when the sheep changes states from normal to hungry, it makes a "baa" sound. I liked the idea of, like a real farm, you are woken in the morning by the animals calling for their food. Or a rooster crowing in the morning, you know. Farm stuff. How would I add a sound into the above script? How would I code it? I've looked up multiple scripting help guides but I can't find an answer. Problem #2, I'd like to alter the breeding recipes so that there is a random chance to get a male or female baby animal, or none at all. Here is the breeding recipe for pigs: recipe Breed Pigs { HCPigmale, HCPigfemale, Apple/Carrots/Cabbage/Corn/Lettuce/HCGrass/HCStraw/HCChinesecabbage/HCCornred/HCCornblue/HCCornwhite/HCCabbagered/HCCabbagewhite, Water, CanBeDoneFromFloor:true, Result:HCPigmalebaby=3, OnCreate:recipe_hcpigbreeding, Time:2000.0, NeedToBeLearn:true, Sound:oink, Category:Ranching, } recipe Breed Pigs { HCPigmale, HCPigfemale, Apple/Carrots/Cabbage/Corn/Lettuce/HCGrass/HCStraw/HCChinesecabbage/HCCornred/HCCornblue/HCCornwhite/HCCabbagered/HCCabbagewhite, Water, CanBeDoneFromFloor:true, Result:HCPigfemalebaby=3, OnCreate:recipe_hcpigbreeding, Time:2000.0, NeedToBeLearn:true, Sound:oink, Category:Ranching, } These are two different recipes. How would I alter it so it's one recipe with multiple possible results? Thank you very much for your attention and any help you could havefer would be greatly appreciated! <3
  4. Hi! Being the huge fan of zombie survival games that I am I thoroughly enjoy playing PZ. So much so that I got my own server running (176.58.126.21:64300) and started looking into customizing it right away. I know that PZ has a rich API that is accessible through Lua and wrote a trivial mod following RoboMat's instructions to get a hang of the essentials. I also know you can add items to the game. With all that what I am wondering about is how that can be possibly fed into multiplayer at this point? Here are some concrete questions: Is it possible to use Mods at all in MP?If so is there a distinction between serverside and clientside mods?serverside: Mod only needs to be installed on server and its functionality is propagated to clients. Therefore clients could connect to such a server with a vanilla installation of PZclientside: To be able to play on a server that has a certain mod installed clients would need to install that mod prior to joiningIs it possible to supplement server behaviour using Lua scripts outside of a mod? Things like location-specific chance-based triggers for certain events?Thanks in advance!
  5. Heya everyone, I'm looking for a full list of moodle script commands that lets me change moodle through items. I have found the following atm. HungerChangeUnhappyChangeBoredomChangeStressChangeFatigueChangeThirstChangeBut I can't find anyone to add happy. I thought that putting a "-" on the UnhappyChange would give happyness, but it doesn't appear to be that way. So if anyone know of anymore commands that is not on this list, please tell me Thanks in advance, Sejemus.
  6. Hello all, I'm doing a mod set in a different world to Project Zomboid, one without zombies, but where basically a long time before the game most people died instantly. As such, the world is filled with lots of smelly old bodies. What I would like to know is if it's possible to spawn zombies that are pre-dead in such a way that they are in the same places/numbers as "living" zombies would be, ie. spawned using the black and white BMP file in WorldEd? I know there's a "spawn dead zombie" function somewhere, but I want the world to be filled with thousands of dead bodies and I can't work out all the co-ordinates for them obviously, and I want the bodies to be similarly laid out as the zombies, ie. much more in towns and none in the countryside.
  7. (I apologize if this is covered elsewhere; I searched but didn't see anything. I might not be searching correctly) I read http://www.projectzomboid.com/modtools/ModdingGuide2.rtf but I'm still trying to sort out how the scripting works and was confused by calls like: The zombie.scripting.objects.Script class will actually take that line, chop it up and: - Find the zombie.scripting.commands Class whose name matches "SayIdle" - Create an instance of that command object - Look for an aliased object called "Gaurd1" (whatever object SayIdle(...) is being "called" on) - Bundle all the parameters into an array (in this case just one) - call init(object, [param1, ...]) on the command - return the command So really what you're calling is: ... except you get an instance of the command back as well. Note that the World, Tutorial and Quest commands all take objects called "World", "Tutorial" and "Quest". e.g. See zombie.scripting.commands.CommandFactory for the list of commands you can call. These are the current commands (build 25) (Notice there is a LuaCall command!)
  8. The use delta is the amount of uses that Drainable items have. The formula is 1 divided by delta number = Number of uses. Thank you 7Roses . I will make a complete and better chart at some point. Unless someone else wants to use a calculator or their head to make it for us. 1=1 .1 = 9 .2 = 5 .3 = .4 = .5 = .6 = .7 = .8 = .9 =.01 = .02 = ALOT .03 = 33 .04 = 24 .05 = 19 .06 = 16 .07 = 14 .08 = 12 .09 = 11 .10 = .11 = .12 = .13 = .14 = .15 = 6 .16 = .17 = .18 = .19 = .20 = 5 .21 = .22 = .23 = .24 = .25 = 4 .26 = .27 = .28 = .29 = .30 = .31 = .32 = .33 = .34 = .35 = .36 = .37 = .38 = .39 = .40 = .41 = .42 = .43 = .44 = .45 = .46 = .47 = .48 = .49 = .50 = .51 = .52 = .53 = .54 = .55 = .56 = .57 = .58 = .59 = .60 = .001 = .002 = .003 = .004 = .005 = .006 = .007 = .008 = .009 = .010 = .011 = .012 = .013 = .014 = .015 = .016 = .017 = .018 = .019 = .020 = .021 = .022 = .023 = .024 = .025 = .026 = .027 = .028 = .029 = .030 = .031 = .032 = .033 = .034 = .035 = .036 = .037 = .038 = .039 = .040 = .041 = .042 = .043 = .044 = .045 = .046 = .047 = .048 = .049 = .050 = .051 = .052 = .053 = .054 = .055 = .056 = .057 = .058 = .059 = .060 =
  9. Hello, I'm pretty new to Project Zomboid and as I got into the game it started to feel very lonely (not to mention overwhelming whenever I ran into a hoard!). What I was wondering is if the scripting API exposes enough functionality to have it poll a centralized server for updates instead of using an offline simulation. I haven't had the chance to look through the scripts in the Project Zomboid folder yet so I'm not really sure what's possible and what's not. I've had a look at the java docs but there wasn't much helpful info and the mods on the forums are rather simplistic and don't use much of the API. If there is no way to implement this then what about offline survivors? Am I able to use the "character creator" from Lua to generate characters on the fly and am I able to issue commands to them (speak, walk, attack, bandage, loot, etc.)? If so this could make for some very interesting gameplay while the official support is being completed. If anyone has any information on this or has any links to some more "advanced" mods I'd be happy to hear it. Thanks for your help.
×
×
  • Create New...