Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
There's no easy way to do this, unfortunately. As you've discovered, ProjectileComponent:setAttackPower() only sets the attack power used for hitEffects, which can be useful for fireballs but not for throwing axes.
The easiest method I can think of is as follows.
In your init files, assuming you don't want your projectile to be able to miss or crit:
Define a silent sound effect (use any filename and a volume of 0).
Assuming you don't want your projectile to be able to miss or crit, make a trait with an onComputeCritChance hook that returns -1000 if its level isn't 0 (and returns nil otherwise), and an onComputeAccuracy hook that returns 10000 if its level isn't 0 (and returns nil otherwise). I'll call this trait "throw_hack_trait".
Each time you want to "throw" an object like this:
1. Pick a champion (doesn't really matter which one). Record their current energy, food level, and invisibility duration.
2. Give the item a ThrowAttackComponent if it doesn't already have one, and make it the item's primary action. Make sure the item has a stack size of 1 or isn't stackable.
3. Give the ThrowAttackComponent the attack power you want, multiplied by 1/(1+champion's Throwing skill/5), set its base damage stat to "none", set its cooldown to 0, and make it the item's primary action. Set its attack sound to that silent sound.
4. Put the item in a champion's hand, remove the "double_throw" trait from them if they have it, give them the "throw_hack_trait" trait, and use Champion:attack() to make them throw it.
5. Remove the "throw_hack_trait" trait, put back the original item that was in that champion's hand (if any), return their "double_throw" trait if they had it, return their previous energy and food values, and if they had invisibility, restore that invisibility duration to all four champions.
6. Set the item's world position and world rotation, its newly created ProjectileComponent's speed, etc. to whatever you want.
7. If the item isn't fragile, remember to return the item's original primary action, remove the ThrowAttackComponent if you added it, or if it originally had one, return its attack power, base damage, cooldown, attack sound, etc. to their original values.
Even this isn't great; it will set the ammo autopickup for the champion you use, which you presumably don't want, and of course swapping around items in the champion's hands might break weird onEquipItem/onUnequipItem hooks so if you have weird equip hooks you'll have to change them to account for this.
I added an onProjectileHit hook. Currently it does damageTile, which is OK for the purpose, but it's the shortcoming of doing it the easy way.
If I needed per-target damage I suppose I'd have to use setHealth(), not below 1, and let the normal hit happen for XP which means it would still show 1-5 damage.
It's for a spell, so it didn't need setup, cleanup, and pickup of inventory projectiles, or strength, or critical.
And the spell is a bit spammy with the projectiles, so counting which ones hit which target is not crucial, and would make it unbalanced compared to the elemental equivalent of the spell.
Oh, if you're ok with using damageTile, then you can just use a hitEffect with a TileDamagerComponent, like the fireballs I mentioned in my first post. That will allow you to use ProjectileComponent:setAttackPower() as you originally wanted.
Since your original post used an item projectile I assumed you wanted an item projectile :P