phost: tube recharge rate

G

Guest

Guest
Archived from groups: alt.games.vga-planets (More info?)

hello,

I just browse through the docs of phost v.4.0x. The formula for the tube
recharge rate reads

Torp_recharge_rate = Eff_TubeRechargeRate
+ Trunc((Torp_Kill_Power + Torp_Expl_Power) * Eff_TubeRechargeBonus

I wonder: is there a division by 100 missing (like for the beams) or is
it really this high?

Best regards,
Ingo
--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
 
G

Guest

Guest
Archived from groups: alt.games.vga-planets (More info?)

* Ingo von Borstel <newsgroups@planetmaker.de> wrote:

> Torp_recharge_rate = Eff_TubeRechargeRate
> + Trunc((Torp_Kill_Power + Torp_Expl_Power) * Eff_TubeRechargeBonus

Next line:
Torp_recharge_per_tick = Random(Torp_recharge_rate)

> I wonder: is there a division by 100 missing (like for the beams) or is
> it really this high?

"http://www.phost.de/phost4doc/config.html#TubeRechargeRate":
| This parameter indicates the rate at which torpedo tubes recharge.
| At every step in the battle, each tube is recharged by a random
| amount chosen uniformly between 0 and TubeRechargeRate. Once the
| charge level reaches 1000, the tube can fire another torpedo.
^^^^
|
| The TubeRechargeBonus modifies the recharge rate depending on the
| torpedo type, see the Combat Formulas for details.

Regards, Heiko
 
G

Guest

Guest
Archived from groups: alt.games.vga-planets (More info?)

Ingo von Borstel wrote:
> I just browse through the docs of phost v.4.0x. The formula for the tube
> recharge rate reads
>
> Torp_recharge_rate = Eff_TubeRechargeRate
> + Trunc((Torp_Kill_Power + Torp_Expl_Power) * Eff_TubeRechargeBonus
>
> I wonder: is there a division by 100 missing

Yep. If you look more closely, there's also a right parenthesis missing.

The PHost 3.x documentation is probably a bit more reliable than the 4.x
documentation regarding formulas; the 4.x formulas are very incomplete.


Stefan

--
// slightly simplified...
Uns16 TubeRechargeRate(Uns16 pTubeTech,
const CombatConfig_Struct *pConfig)
{
Int16 lRate;

lRate = pConfig->TubeRechargeRate +
((TorpKillPower(pTubeTech)+TorpDestructivePower(pTubeTech))
* pConfig->TubeRechargeBonus
/ 100L);
lRate = max(lRate, 1);
return lRate;
}