Weapon modding question |

I`m playing around with components.txt trying to rewamp the weapon stats\tech tree to see if i can make something more to my liking and run into few questions. Maybe someone can tell me if what i want is even possible or i`m wasting time.
Do u think it would be possible to mod mmm say all Projectile weapons to a sertain style:
Range: 50-300+ Dam%\Range: 100SMLX (they keep 100% dam at any range) || CtH%\Range: 100S 50M 30L 5X (but have 100-80% probability to Hit at range 0-50 \ 50% CtH at ranges 60-150 \ 30% CtH at ranges 160-300 \ 5% CtH at 300+)
while changing stats on all Energy Bolt weapons to fit different style :
Range:50-300 Dam%\Range: 100% Damage at 0-50; 50% Dam at 60-150; 30% Dam at 160-300 || CtH%\Range: 100% CtH at 0-50; 60% CtH at 60-150; 40% CtH at 160-300) ?
Rough idea is to have Projectiles have Same damage over any range while having sharply deminishing with range Chance to Hit% , Energy Beam weapons to have high Hit% at long ranges (say 40% at 300) but sharp decline in damage (5% at same 300), Energy Bolt weapons to be somewhere in the middle with medium range\damage but high RoF and Seeking weapons to stay pretty much the same.
----------------
Also could someone point me somewhere where the damage formula is explained i`m a bit confused by it.
:= (Damage) - iif([%Range%] > Min(120 ,(([%Level%] - 1) * 5) + 70), 10000, 0)
in particular what do last 4 places in the formula mean ? ( max range , max range increase with research? , ? ,? )

Re: Weapon modding question
Projectile weapons never run out of fuel allowing inertia to carry them great distances. This could make for VERY long ranges on the projectile weapons with near horrific accuracy as the ranges increase. You could theoretically have all mass weapons have the range of 595, but with substantial accuracy penalities starting early in the range formula.
Re: Weapon modding question
That all depends on the strategy settings. Optimal tends to try to get closer than just maximum firing range (assuming the weapons don't have very long reload times).
Re: Weapon modding question
So is 595 the max range possible for weapons?
Re: Weapon modding question
The AI will open fire at max range, though it will attempt to close to it's prefered range.

Re: Weapon modding question
You are wasting a reload cycle though.
SEV, more than a feeling.






Re: Weapon modding question
Yes, all of that is possible.
You don't necessarily have to use the overly complex stock formula style. For example, a constant damage at range weapon could look like:
iif([%Range%] Min(120 ,(([%Level%] - 1) * 5) + 70), 10000, 0)
Replace that big miss in the iif condition with COND, to see the general idea going on:
(Damage) - iif(COND, 10000, 0)
First we have the base damage value. Next, we subtract either 10000 or 0, depending on how the iif condition evaluates. This is there to limit the range of the weapon, since a negative value is treated the same as 0 (ie: it is the end of the range of damage).
Now lets look at COND:
[%Range%] > Min(120 ,(([%Level%] - 1) * 5) + 70)
Here we have a boolean comparison. [%Range%] is a measure of the distance to the current target. When the distance is greater than the part on the right, COND is true. Else, it is false. Now, on the right, we have:
Min(120 ,(([%Level%] - 1) * 5) + 70)
The Min function returns the smaller of the two values. The first parameter, 120, is the maximum range this weapon can ever achieve. The second part determines the starting range, and how it increases per level. Essentially, range starts at 70, increases by 5 per level, and maxes out at 120.
The main reason for the Min(120..) part is the stupid "infinite" tech level setup of stock; without it, you could end up with a weapon range of 565... in a more sane tech tree setup, with say 10 levels of components, its not strictly necessary, since the level of the weapon will naturally limit the range.
SpaceEmpires.net | Space Empires Wiki