Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Editing FTEQW Modding

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 2: Line 2:
 
Making mods in FTE can be done the same way you make mods for any other Quake engine.
 
Making mods in FTE can be done the same way you make mods for any other Quake engine.
 
However, there are some nice tricks you can use to make it easier/faster/simpler.
 
However, there are some nice tricks you can use to make it easier/faster/simpler.
 
This is a somewhat random collection of FTEQW specific features and probably needs a clean-up at some point.
 
  
 
== QuakeC ==
 
== QuakeC ==
 
FTEQW has very advanced client-side QuakeC support and also comes with it's own set of qc_extensions for various features.
 
FTEQW has very advanced client-side QuakeC support and also comes with it's own set of qc_extensions for various features.
 
* Here is Spike's famous [[CSQC guide for idiots]]
 
* Here is Spike's famous [[CSQC guide for idiots]]
* [https://github.com/shpuld/sui-qc SUI-QC] Shpuld's HUD/UI library.
 
** It also serves as a template QuakeC codebase that can be used to make total conversions/games.
 
** It's an improved version of CleanQC4FTE
 
 
* [https://github.com/shpuld/CleanQC4FTE CleanQC4FTE] is a QuakeC codebase for total conversion mods/games utilizing FTEQW.
 
* [https://github.com/shpuld/CleanQC4FTE CleanQC4FTE] is a QuakeC codebase for total conversion mods/games utilizing FTEQW.
 
** It's been designed from ground-up to use CSQC as well. Does not come with assets.
 
** It's been designed from ground-up to use CSQC as well. Does not come with assets.
** It's highly recommended to use SUI-QC instead
 
* For help with QuakeC please visit the [https://forums.insideqc.com/ InsideQC forums]
 
 
  
 
== Built in compiler ==
 
== Built in compiler ==
Line 34: Line 26:
  
 
== FTEQCC ==
 
== FTEQCC ==
FTEQW comes with it's own advanced QuakeC compiler called [[FTEQCC]]. Under Windows it even has a graphical frontend called FTEQCCGui. It is also integrated into FTEQW by default.
+
FTEQW comes with it's own advanced QuakeC compiler called [[FTEQCC]]. Under Windows it even has a graphical frontend called FTEQCCGui. It is also integrated into FTEQWby default.
  
 
[http://triptohell.info/moodles/fteqcc/fteextensions.qc fteextensions.qc] includes various keywords that only FTEQCC understands, and only FTEQCC supports FTE's extended instruction set, so if you want ints/pointers/massive mods/etc, you need FTEQCC+FTEQW.
 
[http://triptohell.info/moodles/fteqcc/fteextensions.qc fteextensions.qc] includes various keywords that only FTEQCC understands, and only FTEQCC supports FTE's extended instruction set, so if you want ints/pointers/massive mods/etc, you need FTEQCC+FTEQW.
Line 62: Line 54:
 
Dedicated servers do not support a built in editor. If you set developer and hit a breakpoint, a dedicated server will simply print out the source code of each line which is executed, in a cheesy trace fashion.
 
Dedicated servers do not support a built in editor. If you set developer and hit a breakpoint, a dedicated server will simply print out the source code of each line which is executed, in a cheesy trace fashion.
 
  To recap: developer 1+.lno file = step-by-step debugging/code tracing.
 
  To recap: developer 1+.lno file = step-by-step debugging/code tracing.
 
== Profiling ==
 
* "show_fps 2" will draw a frametime graph
 
* "profile_ssqc/csqc" will show qc functions are taking cpu time
 
* "r_speeds 2" is used for figuring out which engine subsystems are taking the most time
 
  
 
== Coredumps ==
 
== Coredumps ==
Line 112: Line 99:
 
== Fully editable particles ==
 
== Fully editable particles ==
 
FTEQW comes with a very extensive particle system. See the [[FTEQW Particles System | full documentation here]].
 
FTEQW comes with a very extensive particle system. See the [[FTEQW Particles System | full documentation here]].
 
== Terrain & build in terrain editor ==
 
FTEQW supports large scale terrain maps that can be edited with the in-game terrain editor that comes with the CSAddon. See a small tutorial [https://spawnhost.wordpress.com/2012/08/14/on-the-rocks/ here] (''should be probably mirrored here at some point'').
 
 
Terrain is added in worldspawn by specifying the section size (for example 1024) and how many sections you want in the X and Y directions (mins/maxs), for example 16 x 16 for 16000 x 16000 quake units.
 
 
A terrain can have 4 different textures which are also properly blended. Painting is much like using an airbrush. Using the brush you can also lower and raise the terrain with different brush sizes. Holes in the terrain is also supported.
 
 
The terrain is somewhat separate from the BSP map. You can just delete the terrain files and start over. You don’t even need to recompile the map for this.
 
 
=== Ocean rendering for terrain maps ===
 
You can add some worldspawn fields to configure the default section
 
 
_defaultgroundtexture "city4_2"
 
_defaultwatertexture "*water2"
 
_defaultgroundheight -1024
 
_defaultwaterheight 0 //hurrah, sea level.
 
 
Then the default tile is underwater, giving you a nice big ocean type thing.
 
 
If you want waves and foam and other extra stuff, then you'll need to modify the glsl, which gets quite complicated (foam needs depth info, which you should be able to get with refraction fbos, but its a bit more expensive).
 
  
 
== FBSP map support ==
 
== FBSP map support ==
Line 139: Line 105:
 
When using q3map2 to compile the bsp map it can be activated with the switch:
 
When using q3map2 to compile the bsp map it can be activated with the switch:
 
  -game qfusion
 
  -game qfusion
 
=== Light styles in FBSP ===
 
Light-styles are a set of different styles on how light entities can behave, allowing them to pulse, flick, etc. Setting up a light with a light-style is as simple as creating a new field inside any light entity called "style", and feed with a number between 1 and 256 (0 is standard lighting).
 
 
The style has to be defined within the QC code, using the `lightstyle` builtin:
 
void(float lightstyle, string stylestring, optional vector rgb) lightstyle = #35; /*
 
    Specifies an auto-animating string that specifies the light intensity for entities using that lightstyle.
 
    a is off, z is fully lit. Should be lower case only.
 
    rgb will recolour all lights using that lightstyle. */
 
(snippet taken from fteextensions.qc)
 
  
 
== Server side anti-lag ==
 
== Server side anti-lag ==
Line 164: Line 120:
 
  float FL_LAGGEDMOVE = 65536; /*if set in self.flags, the entity will collide against a lagged copy of the world. The lagged copy depends upon the player, which is either this entity, or the entity's owner, whichever is the first player.*/
 
  float FL_LAGGEDMOVE = 65536; /*if set in self.flags, the entity will collide against a lagged copy of the world. The lagged copy depends upon the player, which is either this entity, or the entity's owner, whichever is the first player.*/
 
  float MOVE_LAGGED = 64; /*if this bit is set within the 'nomonsters' argument of traceline or tracebox, the trace will collide against the lagged world. Uses the ent parameter as the lagged player. If its not a player then the owner is used instead.*/
 
  float MOVE_LAGGED = 64; /*if this bit is set within the 'nomonsters' argument of traceline or tracebox, the trace will collide against the lagged world. Uses the ent parameter as the lagged player. If its not a player then the owner is used instead.*/
 
== A-Star support ==
 
 
FTE has builtin A* support through .way files.
 
The .way file has to be placed in the data directory in order for the engine to see them.
 
The first line of the file has to be the number of nodes within the file.
 
 
The node syntax follows the following format:
 
pos_x pos_y _pos_z radius num_of_links
 
    linked_node_1 path_cost path_flags
 
    linked_node_2 path_cost path_flags
 
 
In order to use it in QC, route_calculate builtin is used (snippet taken from fteextensions.qc):
 
typedef struct
 
{
 
    vector dest;
 
    int linkflags;
 
    float radius;
 
} nodeslist_t;
 
 
void(entity ent, vector dest, int denylinkflags, void(entity ent, vector dest, int numnodes, nodeslist_t *nodelist) callback) route_calculate = #0:route_calculate; /*
 
Begin calculating a route. The callback function will be called once the route has finished
 
being calculated. The route must be memfreed once it is no longer needed. The route must be
 
followed in reverse order (ie: the first node that must be reached is at index numnodes-1).
 
If no route is available then the callback will be called with no nodes. */
 
 
== Cubemaps ==
 
FTEQW supports cubemaps.
 
By placing entities named '''env_cubemap''' throughout the map, you're giving the engine calculation points. After (re)compiling the map, run the '''mod_findcubemaps''' command in-game.
 
Then, make a q3 shader that looks like:
 
yourmaterialname
 
{
 
  program defaultwall
 
  diffusemap YourTexture.tga
 
  normalmap LumpyBumpy.tga
 
  reflectmask AGreyScaleTextureThatsWhiteForTheReflectiveParts.tga
 
  specularmap YourSpecularReflectionInfoBecauseWhoDoesntWantShinyStuffEverywhere.tga
 
  //fullbrightmap EwwGlowyBitsIsJustBoring.tga
 
}
 
(snippet written by Spoike)
 

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)