I am currently modding CoC alot with the goal of making the gameplay as hard as possible. Instead of creating a new thread with every new question I have, I figured I should post them all in a single thread.
1. So right now I am trying to make it so you get less ammo from unloading a weapon. When you unload a weapon, you get the exact amount of remaining bullets from the mag. Therefore, if you play stealthly, like how I usually do, you get to kill NPCs without giving them a chance to fire once and you end up with a full mag from the weapon they carried. I also noticed that they barely use their secondary so you get a full mag from their backup weapon as well.
I have tried to implement this code provided by Alundaio from here.
It doesn't do anything, I used the printf function on data.ammo_current and it shows 90 bullets in the mag of most of the weapons, which is impossible. Maybe it has to do with the fact that some functions from death_manager.script regarding loot drops from NPCs execute twice at the same time when they die? I posted that bug here.