1. Introduction
Gun Data is the set of parameters (data, for short) for a gun, packaged by GDE into a single data file (gunname.dat). This file is used by both the main game and GDE itself.
Data is prepared in 2 ways:
- Manual entry into objects inside the Titan Engine Model Editor. These are parameters that rarely change, such as the gun's name, how it operates, technical specs, muzzle velocity, rate of fire, etc.
- Real-time entry: for parameters that are estimation-based and need adjusting to find the best result, such as shell-ejection direction, the gun body's sensor, mount/attachment layout, etc.
2. Manually entered data
The places where data is entered are scattered across many objects, connected through parent-child relationships. Refer to the diagram below to quickly grasp the object structure that holds manually entered data.
2.1 CB Gun Model
The weapon model imported into GDE, named body, belonging to OBJ_GUN, includes these data groups:
2.1.1 AB flow group
Note
Can be left blank if the gun doesn't use the AB flow
| anim base gun | UID of the AB Gun model object |
| anim base hand | UID of the AB Hand model object |
| anim base sound | UID of the sound file used for the AB flow (not currently used) |
2.1.2 Basic parameters group
| attr cost | The gun's price, in in-game Credits |
| attr damage scale | - Scales damage per shot; the higher the value, the more damage is multiplied. - Default is 1, equivalent to the AK47's damage - If set to 2, this gun's damage will be double the AK47's |
| attr draw delay | - Time to draw the weapon (ms) when using the CB flow - With the AB flow, draw time depends on the length of the weapon-in animation instead |
| attr muzzle velocity | - Muzzle velocity (m/s). - Recommended to use the gun's real-world value, e.g. the AK47 is 715 m/s |
| attr rate of fire | - Rate of fire (rpm) - Recommended to use the gun's real-world value, e.g. the AK is 600 rounds/min |
| attr recoil | - Base recoil; this value is affected by several other factors to produce the gun's final in-game recoil - Default is 0.07 - The higher the number, the more the gun kicks |
| attr recover time | - Time for the gun to return to its original position after each shot (ms) - Default is 80ms, a figure that suits most gun types. |
2.1.3 Basic info group
| basic author | Author's name (optional) |
| basic gun code | - This is a required field. Must be unique. - Lowercase letters, no spaces. E.g. ak47 (correct), ak 47 (incorrect)- Usually kept short and based on the gun's name, like ak47, m4a1, mp5a3, etc., or what_ever, myrandom_gun, etc. |
| basic intro en | The English description |
| basic intro vi | The Vietnamese description |
| basic name en | English name, e.g. AK-47, FN-2000, etc. |
| basic name vn | Vietnamese name (usually the same as the English one) |
| basic version | Current version (optional) |
2.1.4 CB flow group
Warning
This data group is required
| code base gun anim | UID of the CB Gun's animation object |
| code base hand anim | UID of the CB Hand's animation object |
| code base reload duration | Duration of CB Gun's reload (the CB Gun model is hidden from view during reload) |
| code base sound | UID of the CBG's sound object |
2.1.5 Fire mode group
| firemode burst double | Double-fire mode (e.g. AN94) |
| firemode burst triple | 3-round burst mode |
| firemode full auto | Full automatic mode |
| firemode single delay | Delay between 2 semi-auto shots (ms), used to limit players from clicking/firing rapidly with high-recoil guns like sniper rifles |
2.1.6 Other data
| gun built in suppressor | Marked if the gun has a built-in suppressor (e.g. MP5SD) |
| gun mag object | UID of the magazine object. |
| gun max shell | Max number of rounds a single-load gun can hold, not counting the one already chambered. |
| gun mechanic operation | The gun's operating mechanism: - Bolt action ( OPERATION_BOLT)- Gas operation ( OPERATION_GAS)- Pump action ( OPERATION_PUMP)- Locked back action ( OPERATION_PISTOL) |
| gun mechanic reload | The gun's reload mechanism: - Single insert ( RELOAD_SINGLE_INSERT)- Magazine swap ( RELOAD_MAGAZINE)- Stripper clip ( RELOAD_STRIPPER_CLIP) |
| gun separated sight | Marked if the gun has a detachable ironsight — a gun whose ironsight mesh (rear sight and front sight) is attached to the CB Gun mesh; the ironsight mesh is hidden when an optical scope attachment is mounted. |
| gun thumbnail image | UID of the gun's thumbnail image object |
| gun type | The gun's category: - Assault rifle ( GUNTYPE_ASSAULT_RIFLE)- Submachine gun ( GUNTYPE_SMG)- Pistol ( GUNTYPE_PISTOL)- Sniper rifle ( GUNTYPE_SNIPER_RIFLE)- Shotgun ( GUNTYPE_SHOTGUN)- Light machine gun ( GUNTYPE_LMG)- Cornershot ( GUNTYPE_CORNERSHOT) |
| gun viewoffset | - The gun's offset while not aiming - Default is (0, 0, 0.13), and is kept nearly the same for every gun |
2.2 Objects belonging to the AB flow
This section covers deeper-level objects, referenced in 2.1.1 AB flow group
Both the AB Hand and AB Gun models each have their own inner object that holds a set of animations, called the Animation set object (OBJ_ANIM_BASE_GUN_ANIM). Each slot corresponds to one animation, divided into groups:
- Magazine-related group: magin, magin-dry, magout, magout-boltlock
- Mount pose group: mounted, mounted-fire, mounted-fire-dry, mounted-fire-dry-boltlock
- Normal pose group: normal, normal-fire, normal-fire-dry, normal-fire-dry-boltlock
- Reload group: reload, reload-dry, reload-fast, reload-fast-dry
- Other animations: weapon-deploy, weapon-in, weapon-inspect, weapon-out
Tip
See AB Flow Animation List for a more detailed description of each animation
2.3 Objects belonging to the CB flow
Animation set
- For CB Hand: mounted, normal, normal-left, shield
- For CB Gun: dry, original, shoot
Tip
See Code-based and Animation-based Concepts for more information on these animations
Sound set
This object holds a set of sound files with different priority levels that can fall back to each other following the rule: Outdoor > Indoor | 1p > 3p | normal > suppressed
Priority/fallback example: if the indoor sound hasn't been prepared, the system will use the outdoor sound as a fallback.
For the normal > suppressed pair specifically, even though the priority mechanism applies, since suppressed is a distinct sound type it's recommended to prepare it separately, to avoid a suppressed weapon playing unsuppressed gunfire before a suppressor is attached.
List of sound slots in the sound set (their purpose matches their name), where 1p is gunfire for the first-person view and 3p is for the third-person view.
- 1p fire indoor normal
- 1p fire indoor suppressed
- 1p fire outdoor normal
- 1p fire outdoor suppressed
- 3p fire indoor normal
- 3p fire indoor suppressed
- 3p fire outdoor normal
- 3p fire outdoor suppressed
- mag in: inserting the magazine into the gun
- mag out: removing the magazine from the gun
- reload finish: usually the sound of racking the bolt
2.4 Magazine model and thumbnail
- Some weapons don't use a magazine, but still have an object holding magazine information.
- The gun's thumbnail and preparation steps are covered in the corresponding tutorial.
3. Real-time entered data
This data isn't set by filling in an object's input fields, but is adjusted directly in GDE's viewport. These are all parameters that are hard to estimate and need to be adjusted while observing, split into 2 groups:
3.1 Anchor positions on the gun
Note
The CB and AB columns in the table mean "the parameter is used in…"
| Data point | Role | CB | AB |
|---|---|---|---|
| Magazine position (magPos) | Where the detachable magazine model is placed on the gun. | x | |
| Muzzle (muzzlePos) | The muzzle reference point, used as the origin for effects and projectile spawning | x | x |
| Buttstock (buttPos) | The buttstock reference point at the rear of the gun, used to determine the gun's physical length | x | |
| Shell position (shellPos) | Where the shell casing appears when firing | x | x |
| Shell eject direction (shellEjectDirPos) | The direction the shell casing flies toward | x | x |
| Sensor (sensorBase, sensorSize) | Used for the game's mount and block mechanics | x | |
| AB Gun offset (animBaseGunOffset) | Offset of the AB Gun model relative to the CB Gun model | x | |
| AB Hand offset (animBaseHandOffset) | Offset of the AB Hand model relative to the AB Gun model | x |
3.2 Attachment position and type per mount slot
| Data point | Role |
|---|---|
| Mount type (Optic/Barrel/Muzzle) | Determines which attachment group is compatible with, and can be mounted on, that slot |
| Attachment mount position | Where the attachment sits on the gun; stored separately per CB/AB flow, since the two flows use models in different spaces |
| Mount length | Length along the mount, used as the basis for calculating the attachment's default position on that mount |
| Default position ratio | Where along the mount's length the attachment sits by default, before any further adjustment |
| Attachment rotation angle | The attachment's rotation direction around the mount axis |
| Rail position (if any) | The mounting position for the rail specifically, separate from the attachment's own mounting position |


