Jump to content

RAINBOW

Member
  • Posts

    103
  • Joined

  • Last visited

Everything posted by RAINBOW

  1. I've reached a point in modding, where I need to learn what this function: ISTimedActionQueue Does. What I have learned from delving into PZ modding, is that lua calls require knowing what is going on here. I'm assuming this is the handler for all the action "bar" related things that go on in PZ. Such as eating a "Ham" item in my example. ("Jambon" if you are Robert Johnson ) so booleans like "Finished" and "Started" are all there in the documentation (as you would expect). My example pertains to the following piece of code I have copied out of the lua file which deals extensively with the inventory panel (You can find the example files in "Steam/SteamApps/Media/lua" incidentally!) -- alot of stuff here before -- Then eat it. ISTimedActionQueue.add(ISEatFoodAction:new(player, item, 240)); I decided to debug with a few print statements before I got stuck into it- Heres what I did to debug, basically just see what printed in console: -- Then eat it. ISTimedActionQueue.add(ISEatFoodAction:new(player, item, 240));--debugprint(getItemText(item:getName()));print(item);print(player, item);print(item:getName());The answer, quizzically, was none of the print statements worked! Interesting isn't it! The method defined "item" here: "ISInventoryPaneContextMenu.eatItem = function(item, player)" My suspicions lie entirely with the ActionQueue functions. Does anyone know what is going on here?
  2. YAY! We got there in the end! "steam/steamApps/common/Project Zomboid/media/lua" This has EVERYTHING I will need! With regards to IDE, I've been using Notepad++ to write my code, don't think anyone has made a plugin for PZ with it yet (I had a brief look for one)... Is IntelliJIdea free? Eclipse is free I believe- or at least it is a reasonable price. I remember it being very similiar to Netbeans. I'll probably switch to Eclipse- But I am just too excited to start modding for PZ that I wanted to start coding right away so I am using Notepad++ ! I'm going to get stuck right into your "Quest" methods, and dissect the "Last Stand" map, and see what the possibility is for a persistent world in Project Zomboid. Multiplayer questing? Yes please! Thanks for the help, feel free to consider this thread closed, I really appreciate the support you guys have for the modding community. I'm migrating my old friends from Neverwinter Nights here because I have alot of faith in java but also the game is simply looking superb.
  3. I found a whole tonne of .lua examples from the ISUI! Thanks a load for that- But where can they be found in terms of the windows folder system? For example, In my "C:/User/Zomboid/" folder, I have a media/lua folder, but it is empty!
  4. Ah! yes, I'm 100 percent with you- my problem for the example you gave, is -where- would I find the "InventoryPaneContextMenu.lua". the problem I have is navigation
  5. Yes! the solution then is to override the "ISEatFoodAction.lua"? I think my real question is, and probably a few other people- "How do I know where to look for this method?" or in other words "Where can I find this method?" To repeat myself a wee bit- The only resource I have as a modder is this documentation here: http://theindiestone.com/zomboidjavadocs/ I'm not an idiot tho, its early alpha and I'm expecting the modding community here to be huge, so I know there will be floods of modding tutorials coming soon! (I'm utterly utterly eager, and love this game!) calling that java code : " player:HasTrait("your_trait_id")" makes a lot more sense than using an if statement in lua too! thanks for noticing that one!
  6. I've created two lua files. One simply called "EatMeat.lua" and The other is a working "Custom Trait", the creation of a custom trait seems to be the best documented example of lua modding in PZ, and so I've decided to start here for my modded server. I've a background in java, the problem i'm having is surfing the documentation for the correct methods to call! The custom trait code works fine, but I'll post it here at the end of the forum post anyway, in case someone is wanting to learn from it, the following piece of code "EatMeat.lua" is the troubling one! My problem is finding a method which will identify -what- has been eaten by the PC. i.e) A "GetLastEatenBy()" just doesn't exist. Can anyone help? Here's the code: -- EatMeat.lua EatMeat = {} local function EatMeat.EatFoodOrder(0) if getTrait(TraitFactory.vegetarian) == true -- do stuff hereend Events.OnGameBoot.Add(initOrder); The function EatMeat.EatFoodOrder(0) is the only method I could find, relating to eating and I simply don't know where else to look for documentation as I'm new to modding for PZ. (Note: the argument "0" is just "player 1" here) Here's the creation of a custom trait (this code is working) code chunks below for the curious: -- PlayerTraits.lua local function initTraits()TraitFactory.addTrait("vegetarian", "Vegetarian", -2, "Meat is Murder.\nEating meat causes Nausea!", false);end Events.OnGameBoot.Add(initTraits); I'm really just looking for whatever methodology a 'good' modder uses when they want to do something in PZ modding- For example I cruise this documentation for methods, but there is simply no explanations, it's pretty damn dry! http://theindiestone.com/zomboidjavadocs/ Also, I know its VERY early days here on PZ, and I can't remember being this excited about a set of modding tools since "Neverwinter Nights" came out, about 10 years ago.
  7. I have been using the java doc, http://theindiestone.com/zomboidjavadocs/ , which has an overwhelming amount of commands you can call in java from within a project zomboid mod. The lack of descriptions of what they do is shocking however. I haven't been able to do very much modding because I just have no idea what methods to call. This command factory you linked is superb, and the first thing on the agenda for my server is going to be getting a questing system up and running. I didn't even know there were Quest methods/functions in the mod originally! Anyway, cheers for pointing out this command factory list.
  8. I've successfully modded a custom trait "Vegetarian" which I intend to make the effects for later (Eating meat causes Nausea) The problem I have is simply displaying the custom Icon for a custom profession (i.e) when you create a new game, and choose the trait. I believe the problem lies in the dimensions or file format (I went with .png) of the icon. I wasn't able to find any hints in the javadoc or overview section. Thanks. Rainbow. Oh, here's the code I used, incidental really, because I just need the size/dimension of the image. -- CheaterProfession.luarequire'NPCs/MainCreationMethods';require'NPCs/ProfessionClothing'; local function initProfessions()-- Java: Create a new profession.local cheater = ProfessionFactory.addProfession("vegetarian", "Vegetarian", "Prof_rm_Vegetarian"); -- Java: Add a custom trait called Undesireable (no one likes cheaters ).cheater:addFreeTrait("rm_vegetarian");-- Java: Add the vanilla trait Nightowl. cheater:addFreeTrait("Vegetarian");end local function initTraits()TraitFactory.addTrait("rm_vegetarian", "Vegetarian", -2, "Meat is Murder.\nEating meat causes Nausea!", false);end ----- Set custom spawn points for this profession.-- Modelled after spawn code by RegularX. Thanks to-- The_Real_Ai for his explanation on how to calculate-- them.--local function initSpawnPoints()local spawn; -- Create a Spawnpoint in the large Warehouse.spawn = {{worldX = 10,worldY = 6,posX = 110,posY = 8,},} -- Add our profession to the list of spawnpoints for Muldraugh.BaseGameCharacterDetails.spawnPoint.MuldraughKY.vegetarian = spawn; spawn = {{worldX = 39,worldY = 23,posX = 138,posY = 100,},} -- Add our profession to the list of spawnpoints for West Point.BaseGameCharacterDetails.spawnPoint.WestPointKY.vegetarian = spawn;end ----- Set custom clothing and clothing colors for this-- profession.--local function initClothing()local clothes = {male = {topPal = "Shirt_White",top = "Shirt",bottomPal = "Trousers_White",bottom = "Trousers",topCol = {r = 0.1,g = 0.1,b = 0.1,},bottomCol = {r = 0.1,g = 0.1,b = 0.1,},},female = {topPal = "Shirt_White",top = "Shirt",bottomPal = "Trousers_White",bottom = "Trousers",topCol = {r = 0.1,g = 0.1,b = 0.1,},bottomCol = {r = 0.1,g = 0.1,b = 0.1,},},}ProfessionClothing.vegetarian = clothes;end Events.OnGameBoot.Add(initTraits);Events.OnGameBoot.Add(initProfessions);Events.OnGameBoot.Add(initSpawnPoints);Events.OnGameBoot.Add(initClothing);
  9. Edit: This was a forum for a new roleplay, persistent world for PZ called "Sanctuary". Due to lack of interest from other coders, I've decided to abandon the project. It was very ambitious, and the mapping side would have required at least five guys, and I was the only one writing code, and thus- We've joined the "Aggressive Gaming" server, located in the US, and will be working over there instead.
  10. Suomiboi, Thanks for the deft response! I'll put the 3D modelling on the back burner, until I can safely do some work on them, no point starting if Directx or 3DS models aren't going to be able to be converted into pz format. Pretty sure they use a cel shader in Project Zomboids rendering to make things look comic stylised. I was hoping the first thing I would mod into Project Zomboid would be some rabbit animals with limited AI- But it can wait.
  11. Features of the server The game will be a Persistent server. This means when you log off, you will log back in again with all the same stuff, Death means Death... Note, an anti-cheating system will be in place, which will prevent "Twinking" which is the passing on of items from one character to another. The game will be a Hardcore Roleplay server. This means, you will be expected to stay "In character" when not using "Out of character" communication, such as In-game chat. The game will use a Time based Questing system. This means, certain quests will only be doable after a period of time passes, such as 24 hour (Real Time) quests, an example might be: "Raid on the neighbours fortress", where players will have to band together and assault an NPC controlled base. A more simple example would be an "Errand" quest, where you simply have to find an item, and give it to an NPC to collect the reward. Edit: If you are interested in learning about the modded changes to the server (Such as Custom Professions, Items, Traits and other tweaks) check us out at: www.sanctuary-pz.com
  12. Hey, I'm hoping to develop a persistent world using PZ. I can make 3D models in SoftimageXSI, 3DS max or Autodesk Maya. I've some questions: 1. Where can I find -any- tutorial on implementing custom 3D models for NPC's in PZ? (I've trawled the forum, but I'm fairly new to PZ) 2. What file format are you guys using? (i.e ".obj", ".x" etc) 3. What are some relevant 'events' to NPC creation in PZ. Thanks guys EDIT: I'm making a small forest "Testing" area, so I can start making my Animal NPC's, such as cotton tails and deer, implementing a need for red meat will be fun!
  13. Are you interested in creating a roleplaying persistent world server using "Project Zomboid"? About me: I studied videogames software development at a university in Glasgow, Scotland. I can create 3D models in Autodesk Maya, SoftImage XSI and 3DStudio max. I can also write code in Java (The language Project Zomboid is written in). I have a "Zombie Plan" that involves me heading to the local naval base, banging on the chain link fence for them to let me in, and either being shot to pieces or devoured as the infection spreads among the huge gathered crowd of which I am a part of. (At least I'm realistic!) About The Server: PVP Allowed, Hardcore Roleplay, Quest Based Adventuring Can you help?Perhaps you have some experience with the 2D map/world/building editor for Project Zomboid. Perhaps you've none! Maybe you have some experience with 3D modelling, or are just handy with photoshop. Maybe you've made some custom content for Project Zomboid already, and are looking for a server where people will be enforced to chat "In Character" and "Out of Character" where a players decisions will be able to affect the world directly... The most important thing is to be eager and have some free time to spare. Contact me here: nightsbaneadam@gmail.com
×
×
  • Create New...