Updating stat rewards from NPCs
There are 2 main supported methods of updating stat rewards given by npcs on kill without coding.
As a reminder by default NPCs without any of the following methods attached to them will simply calculate their rewards based on HP and attack power attributes.
NBT Data
This is the easiest to get started with as it simply means updating the NBT data of an NPC or spawning them with this data.
For example the following command:
/data modify entity <uuid> ForgeCaps.mineminenomi:entity_stats.doriki set value 1000 will set the NPC's doriki to
1000, this means when you kill it you'll get 10 doriki.
But why 10 ? Its important to note this simply the default behavior of how the mod rewards doriki (in particular here, other stats have different %s). When gaining doriki from a non-player enemy their doriki divided by 100 (1000 / 100 => 10) and by 10000 if the attacker's doriki is higher than the target's (example if the attacker had 2000 doriki using the same case as above they'll only gain 0.1 doriki (1000 / 10000 => 0.1))
This method also has a pretty big flaw, without further infrastructure for automatically handling this command on spawn it can get extremely annoying to run such commands for all NPCs.
So what are the nbt paths for other stats ? Most of them are under ForgeCaps.mineminenomi:entity_stats with haki being
an exception and being found under ForgeCaps.mineminenomi:haki_data.
Overwriting loot table
This method involves overwriting the loot table of the NPC and using functions provided by the mod for these rewards,
for example the increase-doriki function.
For example the following loot table for yagara bull's we'll set in the following path
resources/data/<modid>/loot_tables/entities/yagara_bull.json:
{
"type": "minecraft:entity",
"functions": [
{
"function": "mineminenomi:increase_doriki",
"amount": 1000,
"source": "KILL_NPC"
}
],
"random_sequence": "mineminenomi:entities/yagara_bull"
}
This one will straight up increase the attacker's doriki by 1000, without any additional math done to it.
On 0.10.x these functions only take a fixed integer value resulting in some of these function being a bit too stiff for regular usage.
The major drawback for this method is that it requires a datapack for any entity type you wish to drop specific amounts, requiring more work and handling/distributing json files.
For more such stat increasing functions check their dedicated page.