Help Editing perks/level abilities :-)

Greetings amazing modders

Im in need of ya wisdom.

Just got my hand on this nifty nice game and having a blast editing/moding it.

But, I cant seem to find the folder/files where I can edit the diffrent classes level perks.
Must be ma old tired eyes :slight_smile:

Can anyone help me please?

Is it not under the class abilities folder? Let me take a look.

If they you look under the class description it has all the info you need. For instance under the knight it has a list off all the things he gets (as well as a folder that has all the knight buffs)

Thanks Micboydoodle, but what about the farmer, I see when he levels he gets diffrent perks, but cant seem to find em in the folder?

And like the Engineer and how many traps/turrets he can have.

I found this in farmer :

“3”: {
“perks”: [
{
“name”: “i18n(stonehearth:jobs.farmer.farmer_description.level_3_data.perk_000_name)”,
“id”: “farmer_harvest_increase”,
“icon”: “file(images/farmerLv3.png)”,
“description”: “i18n(stonehearth:jobs.farmer.farmer_description.level_3_data.perk_000_description)”,
“level”: 3
}
]

This should be about harvest increase, but I cant make a sense of it :slight_smile:

To be honest, I’m not sure either. I can only locate the speed buff. Maybe @BrunoSupremo might know better?

The perks (when not a buff) are just flags, markers. They just say that the job has that, but it is up to some other code somewhere to check it and take an action or do something with it.

In that case, this function

function HarvestCropAdjacent:_get_num_to_increment(entity)
   local num_to_spawn = 1

   --If the this entity has the right perk, spawn more than one
   local job_component = entity:get_component('stonehearth:job')
   if job_component and job_component:curr_job_has_perk('farmer_harvest_increase') then
      num_to_spawn = 2
   end

   return num_to_spawn
end

It checks if the guy harvesting the crop has the perk, and if it has spawns the item twice.

2 Likes

Where was that? I couldn’t find it anywhere.

At the ai files
stonehearth\ai\actions\harvest_crop_adjacent.lua

It is lua, not json

1 Like

Thanks alot Bruno

Any clues on the Engineer and on trap/turret limts?

Same thing, the perk is read from a lua file, this time it is the engineer.lua, inside its job folder.

aaaah, I see it.

But I dont see the numbers, like it starts out with 2 traps and 2 turrets limit, those numbers must be somewhere else then engineer.lua

No it is in his description, the same file with the perks.

“initial_num_siege_weapons”: {
“turret”: 0,
“trap”: 0
},

Thank you thank you thankyou :- )

+10 for helping a blind man, lol

(better help da wife with dinner or I will be a very sorry man… :- D )

1 Like