Jump to content

Sejemus

Member
  • Posts

    22
  • Joined

  • Last visited

  1. So, it's been a while. ... Oh look at that, a new update >.>
  2. Well, I'm still learning. Lua is quite new to me and I'm not all in on the pz classes. But I'll mark it as solved, as I apparently did have it right in the first place. I'll just have to mess around with it some more. Thanks to everyone
  3. Well, I tried to put UnhappyChange on a food item which did give unhappyness. But when I put a negative number on UnhappyChange, nothing happens. EDIT: I'm trying to mess around with it in Lua. But I keep getting a stack trace saying I'm doing it wrong. What is the correct syntax? This is what I tried: "getSpecificPlayer(0):getStats():setUnhappyChange(50.0);"
  4. With UnhappyChange. Just use negative numbers for positive effects. This applies to probably all of those values. eg. hunger change positive numbers make you more hungry and negative fills you up. I tried that, but it didn't work. So I have to change it in Lua for it to work properly? I just modified a food item to change the stats.
  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. I would assume it only counts activate mods, otherwise having to swap out mods just to play MP would be tedious. That's it You can have mods in MP only if the server have enabled them, if not they are not loaded, so you won't have trouble by having some mods in SP, and switching to MP, I mean you won't have to remove all the mods and stuff, they'll won't be in the checksum. Cool, that's what I was hoping for
  7. So, about the "if the client has more files than the server = connection dropped" thing, I assume it doesn't count files in the mods folder? To extend the question. Does it count disabled mods or does it count active mods or both?
  8. Has anyone started working on a mod like this yet? If not, I might make it Just for practice :3 -Sejemus
  9. Heya fellow survivors. In this thread I will write a tutorial series describing everything I know about moding for Build25+ so far. Please note that some of the information I supply is what I think and might not be 100% correct. I want to make this series as I want to get all the information in one place, and because I found it diffacoult to find all the information myself when I started. Part one: Folder Structure. This is the folder structure as of Build 25 through 26.mymod: mod.info file, poster.png and all the icons your mod items use goes here. (NOTE: All icons MUST start with "Item_" like so: Item_iconname.png. Note the capital I, it's important)mymod/media/lua/client: Lua files in here are executed client side.mymod/media/lua/server: Lua files in here are executed server side. (NOTE: You ARE starting a server when you start a new sp world, so world gen stuff goes here EVEN ON SINGLEPLAYER!)mymod/media/lua/shared: I don't know the exact purpose of this folder, but I have noticed that it loads before the client and server files are loaded.mymod/media/scripts: Item and recipe scripts goes in here, just plain .txt files. That's what I know about the new folder structure so far. If you have changes or want me to add stuff, feel free to post below and let me know. Part two: mod.info The mod.info file is the most important file of any mod as it is the way to get the modloader to know it's a mod.The mod.info file contains this information:name=Name you will see in the mod listposter=poster.png (This is the image shown in the mod list)id=yourmodid (This is the id which the modloader reads when it is looking for mods that may requre this mod)require=mod1id, mod2id, etc. (This tells the modloader that this mod requires mod1 and mod2 where mod1id is the id of mod1 and alike with mod2)description=A description of your mod, what does it do?url=When you make your pzmods page for your mod you can add the link here. You can then access this link from the mod within the mod loading screen. That's about it for the mod.info. It may seem simple, and it is pretty simple. But it is also the most important file of your mod, so don't forget about it. Part three: Simple Recipe Mod. Next up, I will teach you how to make your own recipes in your mod.It very simple, at least the way I do it. For this tutorial we will be adding two recipes.1. Dry towel2. Dry bathtowel All you have to do here is the following:1. Find the "mymod/media/scripts" directory.2. Find/make a new file called "yourmod_recipes.txt", or a better name if you are creative, and open it in your favorite text editor.3. Now for the "coding" part (Well, as the folder suggests, it's more scripting than actual coding here ) Start by adding the module (this is basicly the id of the recipes, if you ever need to include them. In another mod maybe.)module yourmod_recipes (or a better name){ <-- Remember these, those are most important! "Recipes goes here"}Now, import the items we will be working with, as we are using items from the base game, we will include the module "base". If you use moded items, you need to requre the mods items module here.module yourmod_recipes{ imports { <-- Again. remember these! Base } "recipes goes here"}Now we are adding the actual recipes. Don't worry, it'll be over very soon.module yourmod_recipes{ imports { Base } recipe Dry Towel <-- Recipe name, this will apear in the inventory when we rightclick a wet towel. { <-- And once again. remember these for each recipe DishClothWet, <-- Requires a wet towel, you can check the "Steam\SteamApps\common\ProjectZomboid\media\scripts" for item files in which the items are listed. Result:DishCloth = 1, <-- As you might have guessed, this is what the recipe will give you once it is done. Time:120.0, <-- And here is the time of the recipe (How long it will take in in-game seconds) } recipe Dry Bath Towel <-- Here I have added the same recipe, but for bath towels. { BathTowelWet, Result:BathTowel = 1, Time:120.0, }}NOTE: REMEMBER the "," after each line! And that's it for the recipes! Yes, you are done. Part four soon to follow! So stay tuned for that. We'll take items next! ---- Update: It's been a while, sorry about that. Honestly.. School have taken a lot of my time this year because I'll be graduating this summer, so I really wanted to give it everything I got. Anyway, enough of the boring blabbering.. I'll continue this guide in January and then see how much I can work on it from then. I'll also see if there has been any large changes in my other examples as I go. TL;DR: School, busy, continuing in January. ---- -Sejemus
  10. Heya fellow survivors! I bring to you, a blueprint mod! What is this?! This mod simply adds blueprints to the game. Now you can make your own hammers, axes, pistols and more! But it's not free of cause. Most importantly, you have to find the item you want to create a blueprint for first, then grab a piece of paper and a pen or pencil and start drawing the item on the paper You also need to find metal and sticks in order to craft the tools and such. Recipes Recipes are as follows: Blueprints: Items: So.. Where do I find this metal and sticks? Good question. Sticks are commonly found in bins and metal are mostly found in crates, sheds and metal shelves. Metal Fragments are the most common, then Metal Bars and Lastly Metal Sheets being the most rare. I have a suggestion for a change, balance or other? Alright then, let me hear! If you feel anything is overpowered, too common, too rare. Let me know. Got an idea for a item you should be able to craft? Let me know! Download: PZ Mods BitBucket (Direct link) Last Updated: Jan. 24 - 2016 Changelog:
  11. Alright, the problem has been solved! Here's how it works: This piece of code is working for build 25: require "server/Items/SuburbsDistributions";NameofItemModule = {}table.insert(SuburbsDistributions["all"]["fridge"].items, "ItemModule.ItemName");table.insert(SuburbsDistributions["all"]["fridge"].items, 10); -- I think the higher the number, the higher chance of a spawn.It has to be in: "yourmodhere/media/lua/server/yourdistributionsfilehere.lua" Thanks to Suomiboi for helping me figure it out!
  12. Oh, Alright, I'll check it out. Thanks! Do you know where I should place the file when moding for build 25+? Should I have the file in client and server, or should it be in shared? Again, thanks EDIT: I can't get it to work. When I add require "Items/SuburbsDistributions";Items = {} -- Items is the name of the module that have the items.table.insert(SuburbsDistributions["shed"]["counter"].items, "Items.Item1");table.insert(SuburbsDistributions["shed"]["counter"].items, 10);table.insert(SuburbsDistributions["shed"]["counter"].items, "Items.Item2");table.insert(SuburbsDistributions["shed"]["counter"].items, 1);table.insert(SuburbsDistributions["shed"]["counter"].items, "Items.Item3");table.insert(SuburbsDistributions["shed"]["counter"].items, 3);I get a error saying "Attempted index: shed of non-table: null" What am I doing wrong?
  13. Hello fellow survivors, I'm seeking some assistance on how to spawn items in world from a mod. So far I've read that it's the SuburbsDistribution module which spawn stuff. So I made a script in my mods/media/scripts folder with the module below. module Extra_SuburbsDistribution{ imports { SuburbsDistribution, ModItemsModule } containeritemdistribution { Room = shed, Containers = counter, ModItem = 2, }}The problem I am facing is that the item does not seem to spawn. I have not yet found any of if. So I have a few questions. First: What does the number to the right of the item mean? Second: Is this the correct way to add items to the spawning of items in world? Thanks in advance. -Sejemus
×
×
  • Create New...