RF FAQ
http://terrymorgan.net/rffaq.zip
The "DEBUG MENU" is simply a bunch of X, Y, Z numbers that
appear when you are positioning the 1st person weapon
http://dhost.info/realityfactory/online ... ponInv.htm
http://dhost.info/realityfactory/online ... ectile.htm
1st Person Weapons
The variables viewfillcolor and viewambientcolor are used to color and brighten the weapon actor - viewfillcolor changes the overall color of the actor while viewambientcolor changes the overall brightness.
The variables viewrotation, viewoffset and viewscale are used to position the 1st person weapon actor correctly on the screen. If you are using a converted Half-Life weapon model then set these variables to the following to roughly position them.
viewrotation = -7.1 86.9 29.7
viewoffset = 0 -1.5 -0.2
viewscale = 0.23
If you are using a 3DStudio Max made model try these values for the rough positioning :
viewrotation = -7.1 86.9 0
viewoffset = 0 -1.5 -0.2
viewscale = 0.23
To fine tune the positioning, the following steps are required :
Use the IniEditor to turn on Weapon Positioning, then run Reality Factory.
THIS IS IN REALITYFACTORY.INI:
; Set Weapon Positioning
;
WeaponPosition=On;
At the menu, go to Options->Debug and turn on the Debug Info box.
Run the level containing your new weapons and pickup the desired weapon.
Press NumLock to activate the numeric keypad. In some cases this may have to be done prior to running the game, as some keyboards don't allow NumLock activation while Reality Factory is running.
The numeric keypad can now be used to position the weapon. The values for rotation, offset and scale will be shown on the screen and can be copied down after the weapon is in the proper place and used to replace the rough values in the weapon.ini file.
The key pairs used to increase and decrease the values are as follows :
7 and 8
Change X offset (side to side)
4 and 5
Change Y offset (up and down)
1 and 2
Change Z offset (in and out)
7 and 8 with 0 held down
Change X rotation
4 and 5 with 0 held down
Change Y rotation
1 and 2 with 0 held down
Change Z rotation
9 and 6
Change actor scale
The changes made to a particular weapon do not affect any other weapons that you may have acquired so it is possible to switch between weapons to see if they are positioned properly in relation to each other.
For those users that don't have a number pad on their keyboard, you can now switch which keys are used to move the first person weapon around on the screen. To do this you add the following line to the [Misc] section of PlayerSetup.ini :
alternatekey = true
When this is set the keys are as follows :
J&K
Change X offset (side to side)
N&M
Change Y offset (up and down)
O&P
Change Z offset (in and out)
J&K w/Y held down
Change X rotation
N&M w/Y held down
Change Y rotation
O&P w/Y held down
Change Z rotation
Q&W
Change actor scale
The variable viewlaunchoffset is used to change the point at which the projectile launches. The default point is right in the center of the screen, with the projectile aimed right at the cross hairs (assuming cross hairs are turn on). If your view weapon is not positioned to this point (and it is very unlikely it is) then viewlaunchoffset must be changed. Regardless of the launch point, the projectile will be aimed right at the cross hairs in the center of the screen. Changing the X value will move the launch point side to side, with negative values moving it to the right. Changing the Y value will move the point up and down, with negative values moving it down. The Z value is a little different than the other two values. The launch point is always moved out from the center, on a line to the impact point, far enough to clear the player's bounding box. Therefore, a Z value of 0 will have the launch point forward enough to clear the player's bounding box, regardless of what values you have for X and Y. The Z value only has to be increased enough that the projectile's bounding box does not intersect the player's box. The inital starting location of the projectile is at the actor's center point so you have to set Z to be large enough to have the projectile bounding box ( set by boundingbox in the projectile definition) clear the player's box. This must be adjusted by trial and error, with the most likely intersection points coming when shooting upward at extreme angles.
If you are using a bone to define the launch point, by having a name in viewlaunchbone, then the launch point starts at that location. It is then moved out from the center, on a line to the impact point, far enough to clear the player's bounding box. At this point the Z value from viewlaunchoffset is added to the location, to allow the projectile to clear the player's bounding box. If a muzzleflash is used it will appear at the viewlaunchbone location during the first frame of the attacking animation.
3rd Person Weapons
The variables playerfillcolor and playerambientcolor are used to color and brighten the weapon actor - playerfillcolor changes the overall color of the actor while playerambientcolor changes the overall brightness.
The 3rd person weapon is the player skeleton with the weapon mesh attached to it. It requires no motions of its own, as it uses the motions builtin to the player actor for animating. Because of this the playerrotation and playerscale values will be the same as those used by the player actor.
The variable playerlaunchoffset is used to change the point at which the projectile launches. The default point is at the bone location as specified by playerbone. Changing the X value will move the launch point side to side, with negative values moving it to the right. Changing the Y value will move the point up and down, with negative values moving it down. The Z value is a little different than the other two values. The launch point is always moved out from the center, on a line to the impact point, far enough to clear the player's bounding box. Therefore, a Z value of 0 will have the launch point forward enough to clear the player's bounding box, regardless of what values you have for X and Y. The Z value only has to be increased enough that the projectile's bounding box does not intersect the player's box. The weapon does not have a bounding box so it is not a factor in this.