Jump to content

Simple modding questions / help


hrot

Recommended Posts

I would like to change things like how many time it's take to have grown up plants.

Changing times to perform task as choppings trees, craft carious things from carpentry.

Changing materials in various recipes.

 

Also i would like to change size of visibility bubble around character if this is possible.

 

Can someone explain how makes those little changes?

I don't want add anything or make something complicated but i didn't find anything in forum.

 

Thanks in advance

Link to comment
Share on other sites

You'd probably get more answers in the modding help section. You can ask a moderator to move a topic if you like. Most of what you want can be found by looking at the projectzomboid/media/scripts -folder and the files there. They're pretty self explanatory. You can change anything in there or create a mod. There are some good tutorials around if you just use the search bar on the top right. :)

 

Also, what the rainbow doge said.

EDIT: also not all "little" changes are so little. There are some that work simply by changing numbers and others that require more tinkering.

Link to comment
Share on other sites

A lot of what you are asking is not "little", if for no other reason than it is spread all over the place in code.

I'll give you a starting point. You want to change how long actions take, so do a search in your Project Zomboid directory for "*action.lua". That will give you quite a few of the actions. (Probably "C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid" or something similar.)

For instance, "ISChopTreeAction.lua" sets the time for how long it takes in "ISChopTreeAction:start()".

Link to comment
Share on other sites

The list of files is what is in your directories. What files there are can and will change between versions of Project Zomboid.

The game is still under development. Until the development is final, I do not expect to see any kind of an API for modding. This is to be expected.

Ultimately, we have to learn for ourselves and study what other modders have done. Like a lot of programming, getting a mod to work will generally involve hunting down the answers you need. In this case, it's partially about hunting through the provided code.

Link to comment
Share on other sites

I would like to change things like how many time it's take to have grown up plants.

Changing times to perform task as choppings trees, craft carious things from carpentry.

Changing materials in various recipes.

 

Also i would like to change size of visibility bubble around character if this is possible.

 

Can someone explain how makes those little changes?

I don't want add anything or make something complicated but i didn't find anything in forum.

 

Thanks in advance

Plants? gamedir\media\lua\server\Farming\farming_vegetableconf has time of growth

Timed Actions? gamedir\media\lua\client\TimedActions\ISChopTreeAction.lua - For chopping trees

Default recipes are hard to mod. You'd have to mod the gamedir\media\scripts\recipes.txt all Recipes are there. It's easier to create your own. Recipes lack IDs so it's hard to mod the defaults.

Visibility is hardcoded, unfortunately, you need to look at javadocs, can't help with that.

The .lua stuff I listed contains code for time it takes for stuff to happen.

If you need further help PM me or reply to this post and I will try to help as best I can with my limited abilities.

Edit: Modding those in the game dir will likely block you from MP, if you need help creating a mod, let me know.

Link to comment
Share on other sites

Thanks for reply.

I read basic tutorial by RoboMat so i know how to create a proper mod to load in game(i hope :D).

I want to change some recipes like carpentry ones so i don't need to add anything.

 

Also if is it possible to change for example bag of potato seed to just potato? and potato seed to potato too.

 

I try to learn how to do basic things right now.

Link to comment
Share on other sites

Thanks for reply.

I read basic tutorial by RoboMat so i know how to create a proper mod to load in game(i hope :D).

I want to change some recipes like carpentry ones so i don't need to add anything.

 

Also if is it possible to change for example bag of potato seed to just potato? and potato seed to potato too.

 

I try to learn how to do basic things right now.

I was just asking :P

What do you mean by not add anything? Because even changing the required number of nails can be a pain :P If you're looking to change amount of, say, planks required to build a wall then you will need to look at. gamedir\media\lua\client\ISBuildMenu.lua

As for recipes. Example

 

module farming{ imports  { base }recipe Open Potato Seed Packet	{        PotatoBagSeed,        Result:PotatoSeed=50,        Time:20.0,	}}

That would give you 50 Potatoes when opening a Potato Seed Packet.

Link to comment
Share on other sites

What do you mean by not add anything? Because even changing the required number of nails can be a pain :P If you're looking to change amount of, say, planks required to build a wall then you will need to look at. gamedir\media\lua\client\ISBuildMenu.lua

As for recipes. Example

 

module farming{ imports  { base }recipe Open Potato Seed Packet	{        PotatoBagSeed,        Result:PotatoSeed=50,        Time:20.0,	}}

That would give you 50 Potatoes when opening a Potato Seed Packet.

 

 

I just want to change various stuff in game. I don't want add anything new like: plants, recipes, items etc.

Will it give me 50 potatoes in this code or "result" line should be changed to "Potato" instead?

 

I checked farming_vegetableconf.lua file but i don't know what line edit to change time to growth.

I only see comments about time of growth but in code i don't see it.

Link to comment
Share on other sites

 

What do you mean by not add anything? Because even changing the required number of nails can be a pain :P If you're looking to change amount of, say, planks required to build a wall then you will need to look at. gamedir\media\lua\client\ISBuildMenu.lua

As for recipes. Example

 

module farming{ imports  { base }recipe Open Potato Seed Packet	{        PotatoBagSeed,        Result:PotatoSeed=50,        Time:20.0,	}}

That would give you 50 Potatoes when opening a Potato Seed Packet.

 

 

I just want to change various stuff in game. I don't want add anything new like: plants, recipes, items etc.

Will it give me 50 potatoes in this code or "result" line should be changed to "Potato" instead?

 

I checked farming_vegetableconf.lua file but i don't know what line edit to change time to growth.

I only see comments about time of growth but in code i don't see it.

 

If you find that line in gamedir\media\scripts\farming.txt and directly edit\save it then yes, it will give you potatoes. As far as making a mod that edits default recipes, I never tried it and seeing how recipes work I doubt it would work.

"farming_vegetableconf.props["Tomato"].timeToGrow = ZombRand(89, 103);" line like this is responsible for time to grow Experiment with the numbers, Also, there is code there that slows it down if the plant has a desease but I don't get it :S

Link to comment
Share on other sites

 

-- Carrots (12 to 16 weeks to grow)

farming_vegetableconf.props["Carrots"] = {};

farming_vegetableconf.props["Carrots"].seedsRequired = 12;

farming_vegetableconf.props["Carrots"].texture = "tileThuztorFarming1_carrotsMature";

farming_vegetableconf.props["Carrots"].waterLvl = 35;

farming_vegetableconf.props["Carrots"].waterLvlMax = 85;

farming_vegetableconf.props["Carrots"].timeToGrow = ZombRand(50,55);

farming_vegetableconf.props["Carrots"].minVeg = 3;

farming_vegetableconf.props["Carrots"].maxVeg = 6;

farming_vegetableconf.props["Carrots"].minVegAutorized = 10;

farming_vegetableconf.props["Carrots"].maxVegAutorized = 15;

farming_vegetableconf.props["Carrots"].vegetableName = "Base.Carrots";

farming_vegetableconf.props["Carrots"].seedName = "farming.CarrotSeed";

farming_vegetableconf.props["Carrots"].seedPerVeg = 3;

 

....

 

-- Carrots

-- Need 12 seeds

-- Need 80 water at phase 1, minimum 70 at 2, then between 35 and 65

-- Grow in 17 days (68h per phase)

 

I'm confused.. :D

All that modding ..Well it would be a lot harder than i though.

Also those numbers.. could be hard to decode.

Link to comment
Share on other sites

The visibility bubble is just a png graphic that you find in media/mask_circledithernew.png I didn't change the size but I did shift it so its centered on the character better and I made a new dither pattern for it that I think is just a tiny bit better.

 

https://www.mediafire.com/?if434cbv2oo5u99

 

Just backup the original mask_circledithernew.png and put that one in if you want to try it. You can definitely change the size of it.

Link to comment
Share on other sites

Thanks a lot. I knew that it would be somewhere i just couldn't find it anywhere.

Do you know is it possible to replace it with mod? So the original one would be still there and when you turn on mod then it will change to edited one.

Link to comment
Share on other sites

Well I don't know exactly haven't done that yet but I think it's just whatever's in the info file and then set up the folders to correspond with the PZ folders, so maybe look at some other mods to see how they did it.

Link to comment
Share on other sites

Hmm i created a mod with changed mask_circledithernew.png but in game it doesn't work.

I tried to edit this file in photoshop and paint and it ended with huge black square or there was no visibility bubble around character at all.

What i did wrong?

Link to comment
Share on other sites

the most failure i would say are:

- wrong data-type (the most are .png in PZ i think)

- forgotten transparency

- wrong data-name (for itemtextures you would write "Item_MyPicture.png")

- any failure inside your code :P

Link to comment
Share on other sites

Everything from your list i did correctly but i'm not sure about transparency..

When i edited this file in Photshop there is transparency but when i open it with paint after editing there is strange square like shape not circle so i don't know how to edit it properly :/

 

Edit:

 

circle.jpg

Same file and left one is when i open it with photoshop, right one when i open it with paint.

That's some real wizardry right there xD

Link to comment
Share on other sites

When you open in Photoshop you should see the circle with the dithered edges. It should be in RGB mode, 8 bits/channel, no alpha channels, pixels in the image can only be solid black or 100% transparent. When you save try using "Save" and not save as or save for web, don't change the layer name or add or remove layers or flatten the image. It should work unless I'm forgetting something...

 

If your original file got corrupted then just delete it and go to Steam, verify game files and it will download a fresh new one for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...