December 22, 2024, 08:17:44

Author Topic: Weapon's Range and Accuracy  (Read 10913 times)

Offline Dark-Zero

  • Crewman
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • http://
Weapon's Range and Accuracy
« on: May 04, 2009, 04:34:37 »
Ok, so heres the deal, I wanted to change the actual Energy torp, into a normal torp variant without the sheil penetration, damage both hull and shield,But here are the 2 things i cannot find out

How to change the actual weapon range
and
Its hit accuracy
For the range, i got nothing
But for the accuracy, as i read the manual this is waht i get
Code: [Select]
> HitChanceCat
The hit accuracy of the weapon, see the BaseHitChance chart.
witch led me to this
Code: [Select]
11.3.9 BASEHITCHANCE
> #
The serial number of the hit accuracy.
>
‘targettype’: this can be the TargetType of a shipclass
’range’: 2: combat; 3: artillery, 4:bomber
The hit chances of the weapon under normal circumstances for the given distance. If it does not have hit chances against the certain shipclass on certain range, than the weapon will not fire. All weapons have 100% hit chances against ships that’s engine is turned off, or don’t have an engine at all.

the actual hitchancecat of the Etorp is 19, and if i wanted to mimic the eshell hitchcancecat, wich is 4, the weapons do not fires
Any help?

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #1 on: May 04, 2009, 12:41:53 »
As luck would have it, I answered a similar question about weapon ranges a few days ago on another forum, so I'll be quoting myself now:
Quote from: Arparso
Range is being determined by the BASEHITCHANCE entries:

Code: [Select]
BASEHITCHANCE 4
[..]
23 2 100
23 3 90
23 4 0
[..]
BASEHITCHANCE

Every weapon with HitChanceCat 4 targetting a ship with TargetType 23 at Range 2 has a 100 percent chance to hit the target (without considering ECM/ECCM devices). At Range 3 the hitchance decreases to 90 percent and at even greater distances there is no chance at hitting the target at all...

That not only defines the chances to hit, but also the maximum firing range, because a weapon won't fire, if there is no chance to hit.

What does Range 2 or Range 3 mean?
This is defined in the tacticsbase.ini. Basically Range 2 is the usual combat distance ranging up to 5000 meters per default, while Range 3 covers 5001-10000 meters. Every weapon having a chance to hit for Range 3 against the given target will be able to fire at that range. It won't be able to fire at anything outside this maximum range of 10000 meters, if the hitchance for Range 4 equals 0 percent.

There is one exception, though. Laser and flak weapons (specifically with Travel 1 ...) can have a shorter distance than what is being determined by their HitChanceCat. The second parameter of the Travel property of that weapon specifies the maximum range for that weapon. If, for example, the laser has a hitchance of 50 percent at range 3 (10000 meters), but has Travel 1 8000 ... defined, than it won't fire at anything further away than 8000 meters. Raising this Travel-parameter above the limit established by the HitChanceCat won't have any effect, though.

Weapons with infinite range
You can create weapons with infinite range by defining a hitchance greater than 0 for Range 5 for the desired TargetType. Range 5 typically has no hitchance defined, but you can add that manually. Because Range 5 covers everything above 20000 meters distance, the weapon will have infinite range, basically.
However, it appears, that the AI won't be using the weapons correctly with certain ranges. They won't fire when they are farther away than 10000 meters, for example... apparantly not even the player ships will do that, unless you order them manually to fire each weapon.

Swapping out HitChanceCats should theoretically swap out ranges and hitchances just fine, though... at least in most cases. I actually just tried it myself and didn't see any problems with the weap_etorp using a HitChanceCat of 4... both my own and the enemy's ship used it, when being ordered to "Drain shields".

Offline Dark-Zero

  • Crewman
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #2 on: May 04, 2009, 19:58:38 »
Oh, well when i changed it to hitchancecat 4, none my ships or the Ai woudl fire them, even manually, it locks the targets, charges but never fire
il try again, just to check, i doupt it has to do witht he other mod i mad ein them

basicly, what i wanted to do with them, is having them just like normal torps, except without the sheild penetration, a universal weapon, im thinking of leaving the range thou, il maybe just rye change the accuray. that is if i can understand all this clearly

So i changed the damage, energy charge and input and they work, but whenever the hitchancecat changes it does not

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #3 on: May 04, 2009, 22:07:05 »
Strange. Did you change anything in BASEHITCHANCE 4? I tried it with the default Nexus Skirmisher mod and it worked flawlessly.

Offline Dark-Zero

  • Crewman
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #4 on: May 05, 2009, 01:46:41 »
i never touched anythign in the baschance itself, affria dof screwing things up, but its already the case it seems XD
i tried the hitchancecat of the torp, of the plasma gun none of them works, only its original

EDIT: i tough ti should post my currently modified Energy torp , maybe you c an tell me if somethign is wrong
Code: [Select]
DEVICETYPE 2
Name "weap_eTorp"
Mesh "earthdevicesgun_energiabombaveto"
Category 1
Civilization 0
Sets 3 30 100 32 116 ;
Purpose 1 2 ;
HitChanceCat 19
Substance 1
Charge 16
EnergyIn 480
PenetrateShield 1
DamageShield 400
DamageHull 900
        MaxHullDam 5
Detected 60
Scanned 130
HPmax 1800
RepairHP 11
Start 2 0 196 1
Travel 2 5000 197 1
End 1 0 198 1
Available
MPValue 7
Info_Category "info_wcat_ashld"
Info_Damage 6
Info_RateOfFire 3
Info_Precision 1
DEVICETYPE

Offline Dark-Zero

  • Crewman
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #5 on: May 07, 2009, 00:56:21 »
Ok, seems the problem got self fixed somehow, i only removed the max hull damage and it started working for some reason :/