Jump to content

ThyHolyNoodle

Member
  • Posts

    15
  • Joined

  • Last visited

Everything posted by ThyHolyNoodle

  1. ThyHolyNoodle

    Random Vars

    Does anyone know how to create a variable that is random at the start of a new world?
  2. I need help with textures. The following picture shows the icons I made and where I stored them. All seemed to be going well until I added "Item_SPStuffing". And what I think is weird is that I made the icons from in-game icons. Spiffo's stuffing which is an icon I made from the one for plantain poultice. The following is a script I made to implement the items. I checked a billion times for typos, but sometimes the creator misses something an outsider can see easily. So I would really appreciate any help I can get. Message me if you need more info. //***************************************************************************************************************************************************************************************************************************************************// module MC { imports { Base } item myfoods1 { Weight = 0.03, Type = Food, DisplayName = Strange Concoction1, Icon = SCoco1, HungerChange = 5, UseWhileEquipped = FALSE, CantBeFrozen = TRUE, ReplaceOnUse = MortarPestle, CustomContextMenu = Take, } item myfoods2 { Weight = 0.03, Type = Food, DisplayName = Strange Concoction2, Icon = SCoco2, HungerChange = 5, UseWhileEquipped = FALSE, CantBeFrozen = TRUE, ReplaceOnUse = MortarPestle, CustomContextMenu = Take, } item myfoods3 { Weight = 0.03, Type = Food, DisplayName = Strange Concoction3, Icon = SCoco3, HungerChange = 5, UseWhileEquipped = FALSE, CantBeFrozen = TRUE, ReplaceOnUse = MortarPestle, CustomContextMenu = Take, } Item SpiffStuff { Weight = 0.1, Type = Normal, DisplayName = Stuffing, Icon = SPStuffing, Tooltip = Tooltip_Comfrey, } } } //***************************************************************************************************************************************************************************************************************************************************//
  3. I am trying to make a zombie virus cure that requires rare ingredients and a large amount of first aid skill. Here's my current code: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function Itemcool() local inv = getPlayer():getInventory(); local player = getPlayer(); it = inv:FindAndReturn("MC.myfoods"); if it then getPlayer():Say("I have the cure"); local BP; BP = player:getBodyDamage(); BP:RestoreToFullHealth(); end end end Events.OnFillInventoryObjectContextMenu.Add(Itemcool); --the line above is what I want to know more about because it makes it so the player's health is restored if you right click on anything as long as you have "MC.myfoods" in your inventory. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I am using jd-gui to decompiled the most recent files and it would be of great help if someone could either tell me what functions to use or how to find them in the decompiler. The attached picture is basically what I want help navigating. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Concept: I'm not going to leave it at fully restoring health. The effects of the cure will depend on the first-aid skill of the player who makes the concoction, and whether they have the doctor profession. The effects will range from death and permanent negative traits such as deafness to severe injuries that may or may not kill you outright but can at least be healed. Onto how the concoction is made, I want it to include rare ingredients like antibiotics (and maybe Spiffo lol) and a bunch of other randomly selected ingredients that change with every new world. And the only way to find what random ingredients they are is to sample infected blood with a disinfected syringe from a bitten player and, it into a centrifuge, use a microscope and Petri dish and do trial and error. Clues are given while you do the trial and error, and the higher your first aid-skill the better the clues are. About the centrifuge, I was thinking about copying the microwave files and changing the model, sounds, etc. In real life, it basically spins blood vials at a constant frequency so that the density of whatever is in the blood is clearly separated and then can be analyzed better. The same goes for the microscope, but maybe with a UI that let's you test how the infected player's blood reacts to different ingredients. And the aforementioned clues will be spoken by whoever is analyzing the blood at the moment.
  4. I have this lua file in the right place and am looking for functions like these function Itemcool() local inv = getPlayer():getInventory(); local player = getPlayer(); it = inv:FindAndReturn("MC.myfoods"); if it then getPlayer():Say("I have the cure"); local BP; BP = player:getBodyDamage(); BP:RestoreToFullHealth(); end end Events.OnFillInventoryObjectContextMenu.Add(invContextMenu); in something like (help pls):
  5. Wait so what exactly am I looking for? I don't understand how I can use any of this. I mean I'm sure the information is somewhere in there and it is the latest but I don't know what I am supposed to use. Right now I am trying to find what I can put after "Events." What I am currently trying to make is a cure that makes use of the largely useless skill "first aid." So far I have function Itemcool() local inv = getPlayer():getInventory(); local player = getPlayer(); it = inv:FindAndReturn("MC.myfoods"); if it then getPlayer():Say("I have the cure"); local BP; BP = player:getBodyDamage(); BP:RestoreToFullHealth(); end end Events.OnFillInventoryObjectContextMenu.Add(invContextMenu); But that last line makes it so that it restores health if you right click on anything in your inventory. So if you could help me understand my way on navigating my way around that'd be great.
  6. Thanks a million. One last thing, would you happen to know where the bitten functions are off the top of your head? Nevermind Thanks
  7. Also how do I launch jd-gui when I can't even find the “jd-gui-x.y.z.jar” file, much less the “jd-gui.exe” file. Or Better yet what are you using in that image?
  8. What files would I be decompiling exactly?
  9. ThyHolyNoodle

    Latest API?

    Hello I've been trying to mod PZ for the past week but I've been having some trouble with some of the functions such as setInf(); (might misspell some of them but they don't work) while others such as RestoreHealth(); do work. If anyone knows where I can get the latest API for the latest build (or better yet build 41), that'd be awesome.
  10. I am a beginner in modding. But I have learned how to make a basic mod that modifies things like hunger and sadness with "HungerChange" and "UnhappyChange" respectively. But I want to make a cure for bitten players but haven't found anything like the previous modifiers that work in a text file script. I found a bunch of java commands like "IsBitten" and "SetBitten" but they don't work. Am I doing something wrong? The commands I feel are relevant are here: http://projectzomboid.com/modding/zombie/characters/BodyDamage/BodyDamage.html
  11. Hello, I am a beginner in coding and wanted to know if it was possible to create a Lua script using ItemZed that adds a key to an object that cures the bitten status.
  12. Hello I am more or less a beginner to code and wanted to give modding a shot by trying to making a zombie cure that requires level 10 first aid (because the skill is largely a waste of effort) and a set of random ingredients along with constant ingredients and perhaps a vial of a player's blood. I am using ItemZed but I don't see anything that even suggests the bitten or infected status (zombie virus). I only see things for colds, flus, etc. More specifically, if I could get help with making a script to add a key for the bitten status in ItemZed, that would be great. **Edit: This is what I have so far but it doesn't seem to work. It does add a key and it does seem to have relevant boolean variables, but I really don't know what I am doing tbh. -- change local variables accordingly and run script. local objType = "item"; local itemType = "Food"; local addKey = "Zcure"; local addVal = "1"; function run() for w in DataManager.Objects do if w.ObjectType.Name==objType then if w.HasKey("Type") and w.GetFirstKey("Type").Value==itemType then w.AddKeyValuePair(addKey, addVal); end if IsBitten(Foot_L)==true then setBitten(Foot_L, false) end if IsBitten(Foot_R)==true then setBitten(Foot_R, false) end if IsBitten(ForeArm_L)==true then setBitten(ForeArm_L, false) end if IsBitten(ForeArm_R)==true then setBitten(ForeArm_R, false) end if IsBitten(Groin)==true then setBitten(Groin, false) end if IsBitten(Hand_L)==true then setBitten(Hand_L, false) end if IsBitten(Hand_R)==true then setBitten(Hand_R, false) end if IsBitten(Head)==true then setBitten(Head, false) end if IsBitten(LowerLeg_L)==true then setBitten(LowerLeg_R, false) end if IsBitten(Torso_Lower)==true then setBitten(Torso_Lower, false) end if IsBitten(Torso_Upper)==true then setBitten(Torso_Upper, false) end if IsBitten(UpperArm_L)==true then setBitten(UpperArm_L, false) end if IsBitten(UpperArm_R)==true then setBitten(UpperArm_R, false) end if IsBitten(UpperLeg_L)==true then setBitten(UpperLeg_L, false) end if IsBitten(UpperLeg_R)==true then setBitten(UpperLeg_R, false) end if IsBitten(MAX)==true then setBitten(MAX, false) end end end end
  13. I am brand new to modding and have very limited knowledge about coding. I installed ItemZed and it seems good enough for what I want, but I can't seem to find a way to make a sort of antidote for the zombie virus. **I just realized it's in the wrong subsection, how would I change that?
×
×
  • Create New...