I was looking into adding different ores in different biomes to force players into exploring more. But instead of adding a whole new ore block and textures and adding new worldgen stuff, I was hoping there would be a lazy way of doing it by making certain items get harvested from the iron ore nodes but to specify that I want them to only harvest in certain biomes.
As far as I can tell there's nothing I can add to the xml to do that, right? I know I could do it by adding a new metal to the world gen, but that would require a new world being generated for it to work. I was hoping I could edit the <block name="terrOreIron"> and <block name="oreIronBoulder"> by adding something that specifies "You'll harvest THIS ITEM only by mining <block name="terrOreIron"> in the snow biome.
Any help is awesome, and if the only solution is through creating a new block and doing it through worldgen, so be it.
You can do this with buffs easily. In one of my many... many mods i'm working on, you can only harvest x item when you're on x quest. This is done by adding a harvestable item on the block, then setting it to 0 on the player in entityclasses. Then, using a buff, set the harvest count at 1, if player is on the quest. You could use any requirement check for this buff, which includes being in certain biomes. Take a look at the harvesting of different items with the wasteland books in progression to get an idea of how it works.
You can do this with buffs easily. In one of my many... many mods i'm working on, you can only harvest x item when you're on x quest. This is done by adding a harvestable item on the block, then setting it to 0 on the player in entityclasses. Then, using a buff, set the harvest count at 1, if player is on the quest. You could use any requirement check for this buff, which includes being in certain biomes. Take a look at the harvesting of different items with the wasteland books in progression to get an idea of how it works.
That's great news, thank you. I never thought of looking into buffs. So I did some digging and came across this <requirement name="InBiome" biome="9"/> and I found all the biome ids under the biome.xml
Sorry to bother you, but I can't for the life of me figure out how buffs work. I have the harvestable item on the block, and it's set to zero in the entityclasses. That works, as I can no longer harvest it. But from there I can't figure out how to get the buff to activate when I enter a biome. I'm either messing up the inbiome code, or I'm just not applying the buffs right. All the buffs.xml contains are just the buffs that you create and then you have to apply them elsewhere, correct? So then would I apply the buff in the entityclasses.xml under the player?
Thanks for any help that you can provide. This is the only thing I'm stumped on.
The way i do stuff is create a master buff for w/e mod i'm working on, so a fishingmaster for the fishing mod, or a husbandrymaster for the husbandry mod. I give the player this buff through adding it to the buffstatuscheck01 or buffstatuscheck02.
The way i do stuff is create a master buff for w/e mod i'm working on, so a fishingmaster for the fishing mod, or a husbandrymaster for the husbandry mod. I give the player this buff through adding it to the buffstatuscheck01 or buffstatuscheck02.
THANK YOU! I'm very new to xml and that seemed to have solved my problem. I guess my only issue was that I couldn't figure out how to trigger the buff, but once the buff got triggered it works fine. Much appreciated!
The way i do stuff is create a master buff for w/e mod i'm working on, so a fishingmaster for the fishing mod, or a husbandrymaster for the husbandry mod. I give the player this buff through adding it to the buffstatuscheck01 or buffstatuscheck02.
I'm stumped again. So my plan was to have multiple harvestable resources in the iron ore, but make it so you can only harvest one resource at a time from each biome.
ie: mining iron in the snow biome gives only SnowOre and nothing else.
My current issue is that when I'm in the snow biome, it harvests all three instead of only the one that I want to harvest. I might have to find another solution but before I did that I wanted to double check with you.
I'm stumped again. So my plan was to have multiple harvestable resources in the iron ore, but make it so you can only harvest one resource at a time from each biome.
ie: mining iron in the snow biome gives only SnowOre and nothing else.
My current issue is that when I'm in the snow biome, it harvests all three instead of only the one that I want to harvest. I might have to find another solution but before I did that I wanted to double check with you.
If you are using a buff to give the harvest count, you need a tag. First you set the player to count=0 of that tag. Then you can edit that through the buff.
So, for example in my mod, there is a quest where the player needs to collect training dummy parts. But I don't want them to be available until on this quest. So on the player i have:
Then, the player gets on the quest and is given the buff needed to harvest the items. In this buff, that count is set to 1, but note it still has the tag applied. Instead of a biome check, mine checks for the amount of quest items needed, so ignore that bit. Just pretend that requirement is the inbiome one.
And finally, on the block i have this. This will tell it that you need the tag in order to harvest that item. The count doesnt matter, since i'm using the buff to control that. If i were to set the buff to say 100, then it would basically rewrite this line to be count=100, but still need the tag in order to harvest.
If you are using a buff to give the harvest count, you need a tag. First you set the player to count=0 of that tag. Then you can edit that through the buff.
So, for example in my mod, there is a quest where the player needs to collect training dummy parts. But I don't want them to be available until on this quest. So on the player i have:
Then, the player gets on the quest and is given the buff needed to harvest the items. In this buff, that count is set to 1, but note it still has the tag applied. Instead of a biome check, mine checks for the amount of quest items needed, so ignore that bit. Just pretend that requirement is the inbiome one.
And finally, on the block i have this. This will tell it that you need the tag in order to harvest that item. The count doesnt matter, since i'm using the buff to control that. If i were to set the buff to say 100, then it would basically rewrite this line to be count=100, but still need the tag in order to harvest.
Check your configDump file (in the Saves folder for the worlds, each saved game will generate this folder and it exports what the code for the game is seeing, so you can open the blocks.xml file and you will see what the base game loaded and what your mod is trying to do).
One thing that might be happening is where the game is appending your code. When I do it, I typically use insertAfter
and then add your new code followed by </insertAfter>
That way I know the game will insert my code right after the last drop event in that block node. I would also then go to the configsDump blocks file and do a search for my mod name to see where the code was inserted or changed.
Check your configDump file (in the Saves folder for the worlds, each saved game will generate this folder and it exports what the code for the game is seeing, so you can open the blocks.xml file and you will see what the base game loaded and what your mod is trying to do).
One thing that might be happening is where the game is appending your code. When I do it, I typically use insertAfter
and then add your new code followed by </insertAfter>
That way I know the game will insert my code right after the last drop event in that block node. I would also then go to the configsDump blocks file and do a search for my mod name to see where the code was inserted or changed.
Ill test all of this out a bit later to see if something's different. How are you getting these buffs? I'm assuming you have all three of those added to the statucheck01 or 02? If not, then that's probably the issue is you're not getting those buffs to begin with. But if not, like i said, ill test it out after some house work.
Messed around with it for quite a while. Was stumped at why it wouldnt work. Looks exactly like the stuff I have in my mod. An hour later i noticed in blocks, it says tags= instead of tag=...... I changed that and now get 100 lead when in the snow, and 0 in the grassland. I didnt check the other stuff, but there's your problem. One single friggin letter. lol.
Messed around with it for quite a while. Was stumped at why it wouldnt work. Looks exactly like the stuff I have in my mod. An hour later i noticed in blocks, it says tags= instead of tag=...... I changed that and now get 100 lead when in the snow, and 0 in the grassland. I didnt check the other stuff, but there's your problem. One single friggin letter. lol.