Assuming you're using the default damage system, take a look at game_battler 3 and compare normal_effect and skill_effect.
It seems pretty complicated cause it goes through all sorts of corrections.
But I think the only thing you need is this:
CODE
atk = [attacker.atk - self.pdef / 2, 0].max
self.damage = atk * (20 + attacker.str) / 20
CODE
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
# Calculate rate
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
# Calculate basic damage
self.damage = power * rate / 20
We want self.damage to be the same for both equations, so clearly if rate = 20, then self.damage = power.
So now we just need power = atk * (20 + attacker.str) / 20, which would be the same as a normal attack before all of those corrections (skill correction might be different, so then you'd have to do some more math to consider those)
But I'm not sure how to solve that equation.
Anyways once you figure out the values you need for all of those stats and rates, you just need to plug them in and it should be about the same as your normal attack.