-
Notifications
You must be signed in to change notification settings - Fork 0
Villagers
In config/Elec's_Mods/Villages you will find the configs you need.
The main config file contains a section where you have to define wich config files the mod will read and what files wont get read.
# Insert the names for CFG files here [default: [custom1.cfg], [custom2.cfg]]
S:Filenames <
custom1.cfg
custom2.cfg
>
Change the filenames to whatever you called your files.
When you first run your mod, you will crash. This is because the mod generates 2 indential demonstartion files. The problem is, that you then have duplicate villager ID's (See villager ID's like block ID's from 1.6, if they conflict, you crash)
So, to fix the duplicate ID, go to one on the configs, and change the ID.
I:ID=9999 to an unused one (Vanilla uses 0-5)
You will also have to set a texture for your villager. To give your villager a certain texture, go to:
S:Texture=default.png and change that to your PNG filename, and then place that PNG in the folder:
config/Elec's_Mods/Villages/textures
Then you will find I:trades=3 in your config. You should change this number to whatever amount of trades you want. (Keep in mind that the order of the trades is automatically randomised!)
Ok, so now we've come to the spawn mechanics.
The first thing you will fine is S:chance=0.1. This number can be anything from 0.0 to 1.0 (0.0 would be kind of useless, but that would mean that they do still randomly spawn from villager spawn eggs)
The second thing you will find here is I:replaceID=0
Ok, the way this mod spawns the custom villagers is by replacing vanilla villager spawns. There is unfortunately no method to just add the villagers to the village.
What the 2 lines above mean: there is a 10% chance that the custom villager defined in that config will spawn INSTEAD of a villager with villager ID 0. (Villager ID 0 is the common villager)
If you'd, for expample, want to replace all priests with your custom villager, you should change those 2 settings to: S:chance=1.0 and I:replaceID=1
So now we've come to the most important part: the part where you can define your own trades!
This part is pretty self-explanatory. On the first line you define your item, so EG minecraft:emerald:0
Keep in mind that every item you define NEEDS to have specified metadata. If your item doest have metadata, you must put a 0 at the end (Like in the example, emeralds dont have metadata, but do have a 0 at the end).
Secondly, you need to define the amount of that item the trades needs, so if you want the trade to take 4 emeralds as the (first) item, you define that below your first defined item.
The same goes for the second input, and also for the "output".