Download

Question to: Damage type, Harvest Component

Hey there,

I am relatively new to this. I don’t quite understand everything about the terminology and architechture yet. So I might write things in a way that does sound wrong to someone who does.^^

What I want to do for a start is changing the amount and type of resources that can be harvested from dead dinos, bushes etc. by dinos, sickle and by using them etc…

I have a test mod set up with a “MyTrike” in it for now. I can summon it on the test map via console command. I added some foliage (Azalea01) on the map following the video of a guy named Brick Whut.

To get it out of the way first. When I added the foliage I had to add in the setting “Attached component class” “SeedHarvestComponent”. Does that mean that every bush on “The Island” has this component class attached to it and I can’t change that via a mod by adding a “MySeedHarvestComponent” class. I hope not^^

Now how I thought it would work is by copying “SeedHarvestComponents” to my mod folder,rename it and for example delete “Dmg_Type_Melee_Dino_Herbivore” from the “Harvest Damage Type Entries”. Then copy the foliage settings for the bush that I added in the test map, rename it and select my renamed “SeedHarvestComponent” under “Attached component class”. Needless to say my trike could still harvest them.

It works by just unticking “Melee Attack Harvet Usable Components” in my trike character bp but eventually I want to get to the point where I can make it so that e.g. a trike can harvest some resources but not others.

Some more things I was wondering:

In the game you can harvest everything from a corps with both tiers of picks, hatchets and spear/pike. In the “Harvest Damage Type Entries” it says only “DamageType_Melee_BasePick”. How does that work? Where is it controlled that e.g. metal harvests more that stone.

The Sickle can only harvest fibre but in the “SeedHarvestComponent” it just says “DmgType_Melee_SickleHarvest” but I can’t find anywhere in there that it only harvests fibre.

I’m confused. What am I missing?
Thanks!

Edit: When I place the bushes with proper modified foliage settings it works now. I still couldn’t find any answers to the rest of my questions yet though.

I am still trying to figure out HarvestComponents, myself. If you use the reference viewer, you can see that each one is tied to a number of in-game objects (and all the submap files, but that is less… editable). My assumption is that you’d have to manually replace all of those references if you wanted things to work your way. That or by editing the HarvestComponents, but even then it won’t be built outside a TC, if I’m not mistaken.

Setting which resources can or cannot be harvested is relatively simple.
You have the “Harvest Damage Type Entries” field which defines all damage types that affect this harvestable. Leaving this empty, and not properly setting “usable harvesting” and “use harvest damage type” will result in this component being impossible to harvest (or at least it should).

Then you have “Harvest Resource Entries” where you can define which resources can be gathered from this component, period. Under each of these elements is “Damage Type Entry Value Overrides”, where you can specify damage types that will use non-default settings. Specifically, the chance it will harvest this particular resource (weight overrides) and min/max quantity overrides. The line number in each array should correspond for things to work correctly.
These should only work as overrides if you have defined the same (or parent) damage type in the “Damage Type Entries” below it, but it is possible they will work regardless.

As for BasePick, it’s the parent class for MetalPick and StonePick damage types. In other words, it governs the settings for both. In some cases, the only difference is their speed (because of their different damage), and in some, overrides for either (or both) subclasses are used.

The sickle can only harvest fibers because the weight for fibers is set to a very high number for the SickleHarvest damage type (1000 specifically). Compared to 0.15 and lower weight for the other resources (an override is not set), gathering anything except fiber is not impossible, but very much improbable.

Hope this helps.

Thanks man that definately instantly helped a lot. I totally overlooked the “Damage Type Entry Value Override” thingys on my tiny screen and just thought it was the next “Harvest Resource Entry”^^

That is actually really awesome. I want to make it so that dinos can’t harvest chitin/keratin and hide and only little meat and berries. I’m sure I will run into loads more problems but now I know at least what to play around with.

Like I said terminology is still a problem so here is a noob question. What is the reference viewer and what are submap files?:rolleyes:

One thing I noticed is that it seems to actually matter which “Attached component class” I choose when placing foliage (the modded one or the original). Maybe you answered it in your first paragraph but does that mean that for foliage they are sort of fixed to the original because it is some sort of “property” of tha map? Sorry if I am being **** at explaining things, so much information to process and I’m getting easily confused :smiley:

Edit: Okay I found the reference viewer and I’m amazed.

For you other noobs, right click in the content browser/reference viewer or under assets in the detail view (the one you get when double clicking in the content browser or right click, details). So, so useful and pretty:D

Yeah, the reference viewer saved my bacon many times. It basically shows all files the chosen one is being referenced in (to the left) and all the files it references (to the right). Child classes are also located to the right.

Submaps are just what they sound like - portions of the main Island map, which is separated into 25 surface areas (from A1 to E5) and caves, so as not to keep too much information loaded at once. This is very obvious with caves: their entrances viewed from afar are untextured and allow you to see through the world, but entering them causes a “lag spike” as they are loaded in.

From my understanding, it is indeed the “attached component class” that matters for harvesting. Unfortunately, I haven’t been able to find an option to remap components or foliage (if there is one), and editing these objects will not work for a normal mod as you’d have to edit the map to replace them. It should work for TC, but in that case it would be easier to edit the HarvestComponents than each foliage (there are many more variants).

The “Remap Resource Component” under PrimalGameData is worth looking into, but I haven’t been able to figure out how it works yet.

Sweet, that straight out worked. Remapping, another concept I wasn’t quite sure about. It’s funny how one sometimes can’t understand anymore how it was possible to not understand something just a moment ago. Remapping. Even sounds exactly like what it does:D

Just made a very basic mod where I only made a copy of “SeedHarvestComponent” in wich I deleted “Dmg_Type_Melee_Dino_Herbivore” from the “Harvest Damage Type Entries”.
Remapped it exactly where you said. That’s it. Forcetamed me some herbivores in proper in-game sigleplayer and they stopped harvesting all them bushes. Now I really have everything to make it work I think. Although I sense that there might me more elegant ways to go about this but hey. I’m Happy.

I assume to disentangle for example bamboo from the rest of the foliage that uses “SeedHarvestComponents” won’t be possible that way right? That will be for much later but some foliage that uses “SeeHarvestComponents” really shouldn’t give berries:D In general it would be nice to tweak which type of “bushes” give you which type of berries. No idea what total conversions (TCs, totally figuered that one out) exactly do differently but I sense one might need to make oneself one of those for that.

Thanks a ton dude. You made me so much smarter.

Edit: Lol, maybe I sensed that you might need a TC for this because you said it in your post.:smiley:

SeedHarvestComponent and its sub-classes are actually the only ones that gives you berries and seeds at the moment. So you’ll need to add them somewhere else.

Wait, hold on. What did you remap to make this work? Did you use “Remap Resource Component” in PrimalGameData to replace HarvestComponents and it worked? If so, then you’ve also just taught me something new. :smiley:

Cool! Yeah that worked. Was very simple though once I knew where to look for it. Replace the original one with the edited one and it worked which is super awesome and makes it much easier for me.
You wouldn’t happen to know were to look for the files which control that the amount of resources dinos can gather scales with their melee damage, would you? Guess I can find it eventually but I have to find so many things :smiley:

Is this still clean/stackable with other mods if you do a remap? I’ll keep testing, but I think this “remap” works on every instance of the harvesting component. So if two people remap the same harvesting component, only the first-loaded will work.