This is a very simple "script", which makes you able to harvest weed and get something in return for that.
I put "script" between quotes because I can barely call this a script because it's like 10 lines or something.
Basically what this script does, is at the moment you are near a weed plant and you have a Knife (Exile_Item_Knife) in your inventory, you get a scroll action and once you fire that, it will delete the nearest weed plant, play an animation which cannot be interrupted and add an item to your inventory (CUP_Item_Money).
Note: weed plants are a part of the mod "CUP - Core", and as far as I know there are no weed plants in vanilla ArmA 3. Another note, there's no "Kilo of Hemp" item available in ArmA or any mod that I'm aware of, so I choose to give the player an item called "CUP_Item_Money" so atleast he has something physical instead of just adding poptabs.
You can change the reward to anything you want.
Note that it says action = Custom\weed.sqf. This is the path for the script, you can change this to anything you like.
Last but not least, don't forget to add the item you are giving the player to the traders. You can easily do this by looking at your config.cpp clientside (again), and Ctrl + F for CfgExileArsenal.
One dumb question, how do the plants come to the map?
It would be nice if we could sow some kind of seeds and grow the plants.
@AlienfromouterSpace the script was created by GolovaRaoul for the purposes of harvesting the plants from a weed mission he created and released on the forums. The mission is what you can see him doing in the video posted above.
Currently, you'd have to spawn the plants in with a mission or actually place them on the map in a fixed location. If you want to setup some sort of growth system, someone is going to have to figure out how to do that within the bounds of the Exile territory system with restart monitoring & database entries. It wouldn't be impossible, you'd either need to do it yourself or see if you can inspire someone on the forums to have a go.
The last option would be to look through Golovaraoul's recent releases as he released a bunch of missions which operate like the old DayZ Ikea mission where they pop up for a short time with a general area marked on the map and players have to hunt for the loot. You might be able to edit this (if Golova didn't include it in the pack) to drop in a pile of weed plants instead.... not quite what you had in mind but might be fun.
I am just waiting for my new video card, my computer doctor is on it´s way with some fresh organs to implant, guess in two hours he will be here... yippieh!
And for the growth system, i think that would be a great addition to Exile, for the survival part.
It would be a good way to dodge conflicts, if people want to chill maybe rather than to fight for a while, but nevertheless make some money.
I don´t want to use Cup Core, it´s too big to upload at 10Mbit/s upload speed. And i only would use the one plant and nothing else of it.
So i found a hemp plant on Armaholic, made it a local mod and used this instead of the Cup plant. Everything worked fine with the weed part of the 4 types of events script, the plants spawned and looked very realistic. But i couldn´t harvest them.
@AlienfromouterSpace Find out model name from that mod and change it in script.
That´s what i did, but unfortunately it didn´t work.
But to be sure i will try it once more, i installed three or four different things that day.
Did you change it in both pieces of code? Does menu item "Harvest the Weed" come up?
Sorry that i answer that late, a lot of stuff to do the last days.
Yes, i installed it again, checked everything a thousand times, everything was right.
I think it has got something to do with the plant model.
Maybe Lord Rampant Hump can create a nice weed plant for us, will ask him.