RandomEvents.yml
RandomEvents.yml
This file stores all possible random events for the random event feature of dynamiceconomy.
To add some realism to your server, this allows random, unexpected events to occur, similar to the real world! These events will affect supply, demand, price, and stock of items affected.
RandomEvents.yml comes with two events preloaded, I will explain event1, and its fields, so you can make your own. The entire idea of randomevents isn't to come with a bunch preloaded, but for you to see how randomevents are made, and make your own in this file!
- event1:
- Description: '&2A forest-fire sparks, and the entire forest burns to ashes! The supply of wood is decreased'
- Item: '17'
- Amount: 40
So, let's go through these fields one by one.
Description
This field is exactly what it sounds like. A text description of the event that'll be broadcasted if it occurs. I recommend you make this description two parts: one part to explain the event, and the second to explain what happens to price/stock/supply/demand, etc. Color codes work too!
Item
The item name, alias, or ID of the item affected. Only one item per event is currently supported.
Amount
Any integer value, negative or positive. This is the amount by which stock will decrease or increase. If positive, this is the amount stock will increase by. If negative, this is the amount it'll decrease by. EnderEngine will accordingly compute price.
I hope this cleared up how random events work.
To add your own, just add event3 to this file, and add all appropriate fields. Feel free to copy and paste old events and just change their information. but don't forget to change their name (don't copy and paste event2 and forget to change the 2 to a 3).
Also, always follow yml syntax and spacing and NEVER use tabs.
I am confused by your first example. The description says it will decrease the amount of wood in stock then you go and ADD 40 to the stock? I think you typo'd there should be a - in there yes?
"I am confused by your first example."
I'm also,How do you change the price's? This is an old event from along time ago will this still work?
I was getting errors so i deleted all files and let them reload to current version. And i notice allot of stuff that used to be in the files are not there anymore.
I like this example better, If it still works. Pretty much self explanatory.
Thanks,