Jump to content
  • 0

[Suggestion/Prototype] Planting System


L3G0

Question

Dear Forum Members,
 
as we all know, there is not any sort of Planting System mission in Epoch. Because of this i designed a Suggestion how to Implement such a System and wrote a tiny prototype. The following post ist split into two parts,  in the first part i explain the idea and in the second i show my Question.
 
News

  • expanted Harvesting Script (see Screenshots)

Explanation
The planting system bases on the Idea, that the plant needs an server restart to grow.
To grow the plant you need an ItemWaterbottle. Watering the Plant adds an Variable isWatered = True and changes the classname in the database to the next Stage.
After Server restart the grown Plant will Spawn and can be watered or harvested.

  • First you find a Seed, Fertilizer and ItemWaterbottle.
  • With this you Craft a Plant, which you can plant.
  • When you plant the plant it has the Variable isWatered = True and connot be watered
  • Server Restart -> isWatered = Nil, Plant can be Watered
  • If the last Stage is reached, you can harvest the Plant, if DZE_PlantingreUsePlant = true the plan will become first stage, else it will be deleted.

Question

  • My first prototype showed, that using an attached action via "addAction" works for large plants like the Hemp (fiberplant) but not for Pumpkin (MAP_pumpkin). Any Idea how to Resolve this? - I could you use action menu of the item, but i wanted to water a plant via action menu.

Screenshots
Current planting stages of Hemp, Pumpkins and Poppy.
Harvesting Messages Harvesting Success and Harvesting Failed.
 
Working Features

  • Craft the Plant using an Fertilizer from Seed
  • Build the Plant
  • Grow up the Plant (works again but you can water a plant directy after you planted it)
  • Harvesting of multiple Plants with multiple OutputItems
  • Deleting/Downgrading an harvested Plant
  • added two Plant classes (Poppy and Wheat) including the new Items
Edited by L3G0
Link to comment
Share on other sites

Recommended Posts

  • 0

This is something sorely missing in Epoch. In a real global emergency after survivors have got somewhere safe their first priorities would be securing a fresh water supply and stable food supply, so farming would be the next natural step.

 

Perhaps some form of interaction and remodeling of the greenhouses you see around. The ability with some scrap metal, glass and seeds (all which already exist in game) you can craft yourself a greenhouse that so long as you water it every X hrs for X days produces some form of food.

 

Just what I was thinking anyway, but totally agree we need farming.

 

Pity there's no way to interact with the animals and farm them. 

Link to comment
Share on other sites

  • 0

Well if you were doing things properly fresh food would be a serious commodity.

 

I run a Overpoch server and I've specifically changes the whole economic system around this fact. Guns are near worthless, when the world ends and 80%+ of the worlds populace dies there's going to be a lot of guns left laying around and they don't wear out that fast, you can get 100,000 rounds out of a good assault rifle before it needs major components replaced.

 

What will be rare is the things that aren't being manufactured any more, ammo, medical supplies, fuel, fresh food and clean water.

 

With that in mind per backpack slot (remember a gun takes up 10 slots in a backpack) ammo is worth twice as much if not more per slot to pickup as loot. Fresh food, sunflower seeds, pumpkins, fish are all worth a lot more and if you kill a cow, man that's just over half a briefcase in steak right there once it's cooked, an hour fishing will net you more money than an hour raiding barracks and far less risky. The places where pumpkins and sunflower seeds grow on the map are among some of the most risky on the map. Same with hospitals and anywhere else med supplies spawn. I've made fuel trucks more expensive and also not put in the service point mod, so no free refueling unless you do it the old fashioned Epoch way, take a jerry and a generator and put your arse on the line refueling at a service station. It's also quite the money maker to buy empty fuel barrels from the wholesaler, fill them at a tank somewhere and take them to the normal traders to sell, the trader cities always want to buy more fuel. And clean water sells pretty well also, I've set it so you can buy empty waterbottles from the wholesaler, then you just have to boil the water and take it to a trader city to sell it.

 

I'd really love to have farming in, some way to make animals follow you, feed them and farm them, put a fence around it to protect your herd, grow plants, make wells important assets on the map with some form of bonus to farming within a certain range of them (essentially irrigation bonus).

Link to comment
Share on other sites

  • 0

The places where pumpkins and sunflower seeds grow on the map are among some of the most risky on the map. Same with hospitals and anywhere else med supplies spawn. I've made fuel trucks more expensive and also not put in the service point mod, so no free refueling unless you do it the old fashioned Epoch way, take a jerry and a generator and put your arse on the line refueling at a service station.

This is the effect i would like achieve when i finished my work, i realy like your philosophy :)

 

Currently i am using to spawn the Objects. To craft the Items i use a modified Version of the original crafting script.

In the current Version i introtudced some Variables, to keep the code flexible:

DZE_PlantingreUsePlant = true;
DZE_PlantingUpgradeWaterlevel = 5;
DZE_PlantingUpgradeDistance = 5;
DZE_PlantingFertilizer = "FoodCanUnlabeled";

DZE_PlantingPumpkinSeed = "ItemBook3";
DZE_PlantingPumpkinPlant = "ItemEmerald";
DZE_PlantingPumpkinObjects = ["Grave","MAP_pumpkin2","MAP_pumpkin"];

DZE_PlantingHempSeed = "ItemBook4";
DZE_PlantingHempPlant = "ItemAmethyst";
DZE_PlantingHempObjects = ["MAP_c_fern","MAP_p_heracleum","fiberplant"];

At the Moment it is possible to combine "DZE_PlantingPumpkinSeed" or "DZE_PlantingHempSeed" with "DZE_PlantingFertilizer" to gain a Plant.

This Plant can be planted and is already watered. After the Serverrestart it can be watered and changes its class in Database. After the Restart it will grow and can be watered again...

 

The Stages are configured in "DZE_PlantingPumpkinObjects" and "DZE_PlantingHempObjects" which need at least two objects and can be extended with other objects.

 

What does not work is to harvest these Plants, but this Feature will be working during the next days.

 

As this is the first prototype, the Code needs to get optimized and is far from being relased, but i will add it to my public server for testing. ... :)

Link to comment
Share on other sites

  • 0

Thank you, we will see if it will be that great as i imagine - on my testserver it is a lot of fun - specialy all this hemp in my TestBase (see Screenshots) :D

 

To test if someone try to build the plants inside a building is easy... in the final Version i also want to limit, that it can only be planted on meadows, maybe i will find a way to realize this :)

Link to comment
Share on other sites

  • 0

did you managed to edit the config.cpp/bin  and include it throught epoch?  because i tried with custom mod and have resec.sqf not found... really annoying

actually to prevent users from the need to download the overlay, i used a config.cpp included in the description.ext which you can access via missionConfigFile

did you use the full path to "z\addons\dayz_code\system\REsec.sqf"?

Link to comment
Share on other sites

  • 0

i modified directly the config.ccp in the dayz_code.pbo and then binarized it again so i think something always went wrong when i binarize , how do you included it in description.ext ? a copy of the config.cpp in a custom folder or something like that ?

 

yes i use the full path

Link to comment
Share on other sites

  • 0

if you are running local test server and just want to play around with dayz_code, you don't need to binarize it, secondly make sure that pboprefix is set properly. If using PBO manager to pbo your folder, click the gear menu and make sure prefix is "prefix" and not "pboprefix". To rename it automatically, rename $PBOPREFIX$ file inside root to $PREFIX$, this way your path to "z\addons\dayz_code\" will work again. All PBO tools seem to work differently from each other, quite annoying, but at least you'll know what causes them "file not found" errors

You should not change your live/main dayz_code.pbo ofcourse, otherwise you won't be able to join servers that uses verifySignatures

Link to comment
Share on other sites

  • 0

yeah i know , i made my own mod of dayzepoch , so it's a separate folder because i'm adding new vehicle,weapons , changing epoch texture and vehicule texture etc... will change PBOPREFIX to PREFIX and will see if that work

good man, same here (sorta), can't wait to see what you come up with.

Link to comment
Share on other sites

  • 0

it's not a txt file, in fact it's just a file without an extension. See if this screenshot helps you understand what I meant:

https://www.dropbox.com/s/iqm8bdv6ikfupeu/shot_140817_072726.png

 

I used PBO Manager to make a pbo, too. Sometimes when working with mod I'd use BinPBO, sometimes CPBO... they all does the work, however each one of them seem to read this file differently for whatever reason. PBO manager is also nice tool to check if Property and Value fields are set up properly (by pressing blue cogwheel icon as seen in screenshot)

Link to comment
Share on other sites

  • 0

Got it, you are not using P drive, lol. See the path to folder in my screenshot?

 

Don't worry about it tho, you can still add these manually inside PBO manager properties window, just doubleclick on blank fields in Property and Values and add them yourself, no biggie

Link to comment
Share on other sites

  • 0

News

  • added two Plant classes (Poppy and Wheat) including the new Items
  • added first test of Harvesting Plants
  • with Poppy you will be able to craft Morphine :)
  • i accidently detroyed the possibility to eat an pumpkin... maybe i will change that you get seeds aber eating an pumpkin.
Link to comment
Share on other sites

  • 0

if you need help with your farming system let me know.

 

@raymix :

so now i don't have any error message but the object i added don't show ingame 

i added a skin in the cfgvehicle and also in the variable.sqf  but when i try to use this skin on a player it show me again the survivor skin.

 

what could i do wrong? upload it on server too maybe? i don't know...

Link to comment
Share on other sites

  • 0

@raymix :

so now i don't have any error message but the object i added don't show ingame 

i added a skin in the cfgvehicle and also in the variable.sqf  but when i try to use this skin on a player it show me again the survivor skin.

 

what could i do wrong? upload it on server too maybe? i don't know...

Bah, it's still to do with variables.sqf probably taken that skin actually works in SP game.

I haven't got a chance to work with skins myself yet, don't know exactly what could cause this

 

Keep in mind that server is also loading variables.sqf to find out about illegal objects on server and delete them. When Adding my own objects I run custom variables.sqf both server and client side (either mission file or extra pbo file)

Link to comment
Share on other sites

  • 0

Bah, it's still to do with variables.sqf probably taken that skin actually works in SP game.

I haven't got a chance to work with skins myself yet, don't know exactly what could cause this

 

Keep in mind that server is also loading variables.sqf to find out about illegal objects on server and delete them. When Adding my own objects I run custom variables.sqf both server and client side (either mission file or extra pbo file)

i think i find out the problem .. it wa smuch easier to implement skins 1 year ago -_-'

 

i'm also working on a planting script and chloroform script , also some other stuff will post what i do when it's functionnal

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...