Jump to content

Search the Community

Showing results for tags 'mod.info'.

  • 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 1 result

  1. Howdy, Here's a description of how to add your mod in PZ. First, the folder tree : zomboidFolder |-- mods |-- MyMod/ |-- poster.png |-- mod.info |-- media/ |-- lua/ |-- lua1.lua |-- UI/ |-- myUI.lua |-- sounds/ |-- myCustomSound.ogg |-- textures/ |-- Item_customItem.png |-- Prof_customProfession.png |-- ui/ |-- Traits/ |-- trait_customtrait.png |-- scripts/ |-- myCustomItems.txtLet's explain now 1. The very important mighty mod.info The mod.info file will contains a full description of your mod, along with other great stuf, here's an example : name=My custom mod v1.7id=RJCustomModposter=poster.pngdescription=Here's a description of my awesome custom mod.require=Utility, CustomMod2url=http://theindiestone.com/forums/index.phpname = the name displayed in the mod selector. id = an unique ID you need to find, it'll be used for the require stuff for example. poster = the .png image which be displayed when someone click on your mod in the mod selector. description = a full description of your mod. require = you can add a list (separated by ",") of id of mods which are required for your mod to works, for example if you want to add an Utility mod you use, or if you just want to make change on another mod, etc. url = the url of your mod (indiestone forum, xeno-mods or pz-mods only), it'll be displayed as a button under the poster, click on it will open your default browser to this url. The only essential tag is "name". All the others are optional and can be left out. Here come my über paint skillz to show you how it look like in game : Please don't be shy, you can compliment me on my paint skillz, I know I pwn everything. 1.1 A bit more stuff about the require. The require work recursively, for example if you have 3 mods, mod A require mod B, mod B require mod C. If you don't have the mod C, you couldn't activate the mod A, a red cross will be displayed if you miss some of the mods required : Here, my test1 mod need the test2, I have it, but the test2 require exampleMod, which I don't have, so I can't use the test1 mod. If now I have all my mod (A,B and C), and I double click on the mod A, the mod B and C will also be activated. And then if I disable the mod B, the mod A will also be disabled, because it require the mod B to work. Then, the require mod is also used to load your mod in a certain order, for example if mod A require mod B, then mod B will be loaded in the game before mod A. Remember, you have to use the ID of the mod, not the name or the folder's name. 2. The lua files. The lua files are loaded after the vanilla lua files, which mean you can override the existing lua file (example, I make a new UI/ISLabel.lua file). All the .lua extension file will be loaded, even if they're inside folders. 3. Customize your items.txt ! You can add custom items for your mods, you just have to place them inside /scripts/ folder. You can override existing items or make new one. Here's an example : module custom { item myNewItem { HungerChange = -10, Weight = 0.1, Type = Food, DangerousUncooked = TRUE, DaysTotallyRotten = 21, DisplayName = Egg, Icon = customEgg, DaysFresh = 14, }} Here I created a new item (please note I used the module custom, but I could use the module Base if I wanted to). Now I want to override existing item, if you make a file named items.txt, it'll override the existing items.txt, it mean we gonna load YOUR items.txt and not the vanilla one, so be carefull to do it, use this only if you want to replace EVERY ITEM or a bunch of them. If you want to modify only some items, here's the solution : You make a file named as you want (except items.txt), like customItems.txt, and inside it, do that : module Base{item Egg { HungerChange = -50, Weight = 5, Type = Food, DangerousUncooked = TRUE, DaysTotallyRotten = 21, DisplayName = Egg, Icon = customEgg, DaysFresh = 14, }} Here I overrided the Egg, by setting the module Base (which is the one in items.txt). Now the egg will weight 5 and give 50 hunger reduction. 3. The custom textures In the /textures/ folder, you can add your custom textures. You can add textures for items, trait and profession. 3.1 The custom item icon To add a custom item icon, you just need to add the image in the textures/ folder, named like that : Item_iconname.pngHere's an example of my item : item myNewItem { HungerChange = -10, Weight = 0.1, Type = Food, DangerousUncooked = TRUE, DaysTotallyRotten = 21, DisplayName = Egg, Icon = customEgg, DaysFresh = 14, } So my item icon will be textures/Item_customEgg.png. You also can override items icon, for example just place a textures/Item_Axe.png file, and this one will be taken instead of the vanilla one. 3.2 The custom trait icon To add a custom trait icon, you have to add your image in the ui/Traits/ folder like this : ui/Traits/trait_yourtraitid.pngThe trait ID is the first parameter when you add a trait, it need to be in lower case, example : TraitFactory.addTrait("Athletic", getText("UI_trait_athletic"), 6, getText("UI_trait_athleticdesc"), false);To add an icon for this trait, I need to add a ui/Traits//trait_athletic.png image, the name is Athletic, but as I said, the name of the image have to be in lower case. You can also override the existing one, for example just put in your mod folder an new ui/Traits/trait_brave.png, and there you go, the brave trait will now take your image instead of the vanilla one. 3.3 The custom profession icon It's almost the same as the trait, in your textures/ folder, you image have to start by "Prof_", example : Prof_professionIcon.pngThe icon of the profession is the last parameter (no need to be lower case on this one) : ProfessionFactory.addProfession("fireofficer", getText("UI_prof_fireoff"), "Prof_FireFighter");In this case,my .png file will be : textures/Prof_FireFighter.png. You can add new one and override existing one. And here you go for now Please, don't hesitate to suggest new stuff for the mod.info or the mod loader, and tell me if there's any bugs Oh also, everything will be in for the next steam version only.
×
×
  • Create New...