IPB

Welcome Guest ( Log In | Register )


 
Reply to this topicStart new topic
> (**) Primary/SecondaryFireFLH, TurretOffset & PBarrelLength explained
Lin Kuei Ominae
post Oct 30 2009, 02:49 PM
Post #1


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



After you've created a new voxel and gave it some cool new weapons in rules.ini, you surely noticed that the bullets don't start from the same point where the barrel ends.

This tutorial will show you, how you can set the right bullet starting point for your unit and will cover the art.ini keys
PrimaryFireFLH
SecondaryFireFLH
TurretOffset
PBarrelLength
SBarrelLength


This is rated with 2 stars as it's quite time consuming in the beginning, but with a bit practice this is a very easy and fast job and could be rated with 0 stars.

Finding the right FireFLH values
I.
Make sure you've turned on in the game controls the option "Target Lines". This shows you a green line from the unit to the moving point and a red line from the unit to the target point. We are only interested in the red line as it starts from the exact PrimaryFireFLH position on the unit. Use force fire to show the red line whenever you want.

II. PrimaryFireFLH
Add to your units entry in art.ini the key PrimaryFireFLH=0,0,0.
FLH stands for Forward, Lateral and Height and the distance is measured in leptons. This is an engine specific scale unit, that is not related to the size of a voxel or a pixel.

-There is no way to calculate the correct FLH value.
-To find the right FLH values you have to trial and error and look each time ingame, if the value is correct.

Go in 3 steps to find the right FLH values, beginning with the Forward value, then the Lateral and finally the Height value.
I prefer to use a multiple of 8 to come fast closer to the right value, e.g. 8, 16, 32, 64, 128 and then slowly reduce or raise the value with 8 until i have the exact position.
1. Forward: Let the unit face to the west or east ingame and force fire straight to the west/east, to see if you have the right F value.
Attached Image the number in the top left shows the used F value (the red line has been changed to white for a better visibility)
Adjust the F value to move this way the bullet starting point forwards/backwards along the body centre line, until it's on the exact position of the barrel end. (positive values to move forwards, negative to move backwards)
Note: some muzzleflash anims are a bit bigger and to avoid that they are shown half in the barrel, you have to move the F value a bit more forward.

2. Lateral: Let the unit face north or south ingame and force fire straight to north/south.
Attached Image the number in the top left shows the used L value (the red line has been changed to white for a better visibility)
Adjust the L value to move this way the bullet starting point left/right, until it's on the sideward position of the barrel. (positive value for left, negative for right side of the unit)
If you have Burst=2 (or more) on your weapon, the unit automatically switches the sides for each shot from left to right and vice versa (in this case it's irrelevant if you use negative or positive values on the L value)

3. Height: Let the unit face to the west or east ingame and force fire straight to the west/east.
Attached Image the number in the top left shows the used H value (the red line has been changed to white for a better visibility)
Adjust the H value to move this way the bullet starting point up/down, until it's on the exact height of the barrel end.

III. SecondaryFireFLH
Use the same technique as described in II for the PrimaryFireFLH.
Since the red target line isn't shown for secondary weapons and always shows the PrimaryFireFLH, you have find the position with the primary weapon and then copy the FLH values to the SecondaryFireFLH key.


III. TurretOffset
If your unit uses a turret which shouldn't be placed on the centre of the chassis, you can use this key to move the turret forwards or backwards along the body centre line. Positive values move the turret forwards and negative values backwards. The graphical placement of the turret with this key works only for voxel units.
However the FireFLH position is messed up for turrets which aren't in the centre. This is a calculation error of the TS engine and can't be fixed.
The best is to find the FireFLH with TurretOffset=0 and then move the Turret along the body centre line.

IV. PBarrelLength & SBarrelLength
If your unit has a voxel barrel, you should use these keys to define the bullet starting point for the primary (PBarrelLength) and secondary (SBarrelLength) weapon.
Since voxel barrels stand in a different angle for closer and farther targets, these 2 keys are used to compensate the rotation of the tilting voxel barrel.

To make them work you have to set the FireFLH key to the exact pivot of the barrel.
Lets show this on the original Titan, which has even in the latest version 2.03 wrong FireFLH and PBarrelLength values and uses
[MMCH]
PrimaryFireFLH=250,-50,100
PBarrelLength=250
SBarrelLength=250
TurretOffset=-16

1. we can remove the key TurretOffset which is wrong, as the turret is in the centre of the unit and remove the key SBarrelLength as the Titan has no secondary weapon
2. we change temporarily the key SBarrelLength to 0
3. Lets find the correct FireFLH using step I and II, so the bullet starts on the end of the barrel.
PrimaryFireFLH=250,-50,128 is better
4. Since the barrels Pivot is on the centre of the unit, we can set PrimaryFireFLH=0,-50,128 and use now the removed 250 of the Forward value for the PBarrelLength key. If you have a tank with a big turret you have to keep a small Forward value so the FLH is again on the pivot of the barrel. Then use PBarrelLength to compensate the length of the Barrel.

The result for the MMCH are the following settings.
[MMCH]
PrimaryFireFLH=0,-50,128
PBarrelLength=250


Since the Titan barrel doesn't tilts that much like a tank or artillery barrel, it gives in this case better results ingame to use PrimaryFireFLH only
[MMCH]
PrimaryFireFLH=250,-50,128



@mod/admin: please remove the old and wrong tutorial.

This post has been edited by Lin Kuei Ominae: Oct 30 2009, 03:09 PM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post
HeLL7iGeR
post Oct 30 2009, 04:15 PM
Post #2


Grenadier
Group Icon

Group: Members
Posts: 22
Joined: 24-June 09
From: Temple Prime
Member No.: 1,585
Alliance: Nod
Favorite game: Tiberian Sun



very useful thanks LKO


--------------------
I am a soldier who's mouse is pollished like a glowing sword ready to kill forum newbs !
Go to the top of the page
 
: | +Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 28th March 2024 - 10:31 AM


XGhozt.com