Help with weapon fire time

Hello everyone
I have just started a new mod project that aims to change the game’s gunplay element
It is a mod mostly because of the player base of CDDA seems to have some disagreement around how the firearms should be balanced and handled in the vanilla base game.
Features I planned to add are:

  • more guns
  • more firearm-related location (shooting range, firearm factory and SHOT Show etc.)
  • A more complex firearm modification system
  • A “martial arts” for firearms ( fanfire, double tap and mad minute etc.)
  • more professions
  • more specific skill for each type of firearms

Most of the work can be done through editing json file and is pretty easy, but I have trouble once I need to touch the hard code of the game.
Right now I am trying to separate the rifle skill to manual action and automatic.
I want different firearms require different action point to fire (not aiming time)
It seems like the action point required by each type of ranged weapon is hardcoded in ranged.cpp
Code is linked here

int time_to_fire( const Character &p, const itype &firing )
{
struct time_info_t {
int min_time; // absolute floor on the time taken to fire.
int base; // the base or max time taken to fire.
int reduction; // the reduction in time given per skill level.
};

static const std::map<skill_id, time_info_t> map {
    {skill_id {"pistol"},   {10, 80,  10}},
    {skill_id {"shotgun"},  {70, 150, 25}},
    {skill_id {"smg"},      {20, 80,  10}},
    {skill_id {"rifle"},    {30, 150, 15}},
    {skill_id {"archery"},  {20, 220, 25}},
    {skill_id {"throw"},    {50, 220, 25}},
    {skill_id {"launcher"}, {30, 200, 20}},
    {skill_id {"melee"},    {50, 200, 20}}
};

const skill_id &skill_used = firing.gun->skill_used;
const auto it = map.find( skill_used );
// TODO: maybe JSON-ize this in some way? Probably as part of the skill class.
static const time_info_t default_info{ 50, 220, 25 };

I have zero experience in programming, and adding {skill_id {“boltaction”}, {70, 400, 20}} did not work. (I have added the new skill in skill.json already)
Can anyone provide some help with this problem?
Thank you very much

The problem is that you can’t change hardcoded C++ with a JSON mod. Doing what you want would require you to edit the source code and recompile it.

Learnt how to use basic c++ code and programs for it
Thanks for the help