### Start X11 for GtkRadiant Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/apple/README.md Manually starts the X11 server if it does not launch automatically. This is a prerequisite for running GtkRadiant on some configurations. ```bash /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin ``` -------------------------------- ### Example: Footsteps on Grass Sounds Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Compile_Manual/q3map.html Illustrates how to implement surface flags, using 'footsteps on grass' sounds as an example. ```text surfaceparm grass ``` -------------------------------- ### Example: Turning a Red Light Shader On Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/appendix/appA.html This example demonstrates how to use targetShaderName and targetShaderNewName to change a shader from an 'off' state to an 'on' state. ```quakec "targetShaderName" "textures/proto2/redlight_off" "targetShaderNewName" "textures/proto2/redlight_on" ``` -------------------------------- ### Example: Turning a Red Light Shader Off Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/appendix/appA.html This example shows how to revert a shader back to its original 'off' state using targetShaderName and targetShaderNewName. ```quakec "targetShaderName" "textures/proto2/redlight_off" "targetShaderNewName" "textures/proto2/redlight_off" ``` -------------------------------- ### Custom Infoparms File Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Terrain_Manual/pages/new_or_revised_q3map_shader_comm.html An example of a custom infoparms file defining custom contents flags and surface flags. ```text // Custom Infoparms File // Custom Contentsflags { treacle 0x4000 } // Custom Surfaceflags { grass 0x80000 } ``` -------------------------------- ### Example Voice File Structure Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html This is a structural example of a Quake 3 Team Arena voice file. It shows how to define categories of voice commands and associate them with specific sound files and on-screen text. ```voice getflag { sound/voices/male5/or_01.wav "Get the flag" sound/voices/male5/or_02.wav "Secure the flag" } ``` ```voice offense { sound/voices/male5/or_03.wav "You're on offense" } ``` ```voice defend { sound/voices/male5/or_04.wav "Stay Home" sound/voices/male5/or_05.wav "Guard the base" sound/voices/male5/or_07.wav "You're on defense" } ``` ```voice defendflag { sound/voices/male5/or_06.wav "Guard our flag" } ``` ```voice patrol { sound/voices/male5/or_08.wav "Patrol" sound/voices/male5/or_09.wav "Take point" sound/voices/male5/or_10.wav "Go on patrol" } ``` ```voice followme { sound/voices/male5/or_11.wav "Follow me" sound/voices/male5/or_12.wav "Cover me" sound/voices/male5/or_13.wav "Watch my back" } ``` ```voice yes { sound/voices/male5/re_01.wav "Yessir" sound/voices/male5/re_02.wav "Yes ma'am" sound/voices/male5/re_03.wav "Aye, aye, sir" sound/voices/male5/re_04.wav "Aye, aye, ma'am" sound/voices/male5/re_05.wav "Affirmative" sound/voices/male5/re_06.wav "Copy" sound/voices/male5/re_07.wav "Roger" } ``` ```voice no { sound/voices/male5/re_08.wav "No sir" sound/voices/male5/re_09.wav "No ma'am" sound/voices/male5/re_10.wav "Negative" sound/voices/male5/re_11.wav "I'm busy" } ``` ```voice ihaveflag { sound/voices/male5/gs_01.wav "I'm coming in hot!" sound/voices/male5/gs_02.wav "I've secured the flag!" sound/voices/male5/gs_03.wav "I've got the flag!" sound/voices/male5/gs_04.wav "Bringing home the bacon!" } ``` ```voice baseattack { sound/voices/male5/gs_05.wav "We're taking enemy fire!" sound/voices/male5/gs_06.wav "Security breach!" sound/voices/male5/gs_07.wav "Our base is under attack." } ``` ```voice enemyhasflag { sound/voices/male5/gs_08.wav "Our flag is gone!" sound/voices/male5/gs_09.wav "They've got our flag!" sound/voices/male5/gs_10.wav "Enemy has secured our flag!" } ``` ```voice ongetflag { sound/voices/male5/ps_03.wav "Getting the flag..." } ``` ```voice onoffense { sound/voices/male5/ps_01.wav "I'm taking offense" sound/voices/male5/ps_02.wav "I'm going in..." } ``` ```voice ondefense { sound/voices/male5/ps_04.wav "I'll stay home" sound/voices/male5/ps_05.wav "Securing base" sound/voices/male5/ps_06.wav "Guarding the base now" } ``` ```voice onpatrol { sound/voices/male5/ps_07.wav "On patrol..." sound/voices/male5/ps_08.wav "Patroling..." sound/voices/male5/ps_09.wav "I'll take point" } ``` -------------------------------- ### Quake 3 Team Arena Team File Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html Defines a team's assets, character setups, and aliases. Links head models to body models and AI files for gameplay. ```team // .team file begins here teams { { "Kreechurs" "ui/assets/kreechurs" "BoB" "Lily" "Vlad" "Infinite" "Prime"} } characters { { "Callisto/Lily" " BoB " } { "Kreecha" " BoB " } { "Infinite" " BoB " } { "Prime" " BoB " } { "Vlad" " BoB " } } aliases { ������� { "Kreecha" "BoB" "a" } ������� { "Lily" "Callisto/Lily" "d" } ����������� { "Vlad" "Vlad" "o" } ����������� { "Infinite" "Infinite" "d" } ����������� { "Prime" "Prime" "o" } } //.team file ends here ``` -------------------------------- ### Install GtkRadiant Dependencies on OSX Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/apple/README.md Installs necessary dependencies for GtkRadiant using MacPorts. Ensure MacPorts and XQuartz are installed first. ```bash sudo port install dylibbundler pkgconfig gtkglext scons ``` -------------------------------- ### Expanded Team Skin Functionality Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html This example lists the required assets in a pakfile for a user-created team skin ('Hellion_blue') to work correctly with the 'Crash' model in Quake III Arena version 1.28 and later. It highlights the necessity of a specific renamed head skin file. ```text Hellion_blue.tga models\players\crash\ Hellion_blue_f.tga models\players\crash\ Hellion_blue_t.tga models\players\crash\ Head_Hellion_blue.skin models\players\crash\ Icon_Hellion_blue.tga models\players\crash\ Lower_Hellion_blue.skin models\players\crash\ Upper_Hellion_blue.skin models\players\crash\ Head_blue.skin models\players\crash\Hellion\ ``` -------------------------------- ### Custom Surfaceparms and Content Flags Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Compile_Manual/q3map.html Example of a custinfoparms.txt file defining custom content flags (treacle) and surface flags (grass). ```text // Custom Infoparms File // Custom Contentsflags { treacle 0x4000 } // Custom Surfaceflags { grass 0x80000 } ``` -------------------------------- ### Install Build Dependencies on Arch Linux Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/README.md Installs the required packages for building GtkRadiant on Arch Linux using pacman. ```sh # ArchLinux pacman -S git scons libxml2 gtk2 freeglut gtkglext subversion libjpeg-turbo ``` -------------------------------- ### Quake 3 Shader: Light Emission Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch03/pg3_1.htm This shader example demonstrates how to specify a light image texture for a light source, influencing the color of emitted light based on a blend map. It also includes settings for the light's intensity and how it interacts with lightmaps and textures. ```quake shader textures/eerie/ironcrosslt2_10000 { q3map_lightimagetextures/gothic_light/ironcrosslt2.blend.tga // this TGA is the source for the color of the blended light qer_editorimagetextures/gothic_light/ironcrosslt2.tga //base TGA (used because the shader is used with several // different light values q3map_surfacelight 10000 //emitted light value of10,000 { map $lightmap //source texture is affected by the lightmap rgbGen identity // this command handles the overbright bits created by "sunlight" // in the game } { maptextures/gothic_light/ironcrosslt2.tga blendFunc filter rgbGen identity } { maptextures/gothic_light/ironcrosslt2.blend.tga blendFunc add } } ``` -------------------------------- ### Basic animMap Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch05/pg5_1.htm Demonstrates a 4-frame animated texture sequence. Each frame is displayed for 1 second, with the cycle repeating after the last frame. ```quake3-shader animMap 0.25 animMap 10textures/sfx/b_flame1.tga textures/sfx/b_flame2.tga textures/sfx/b_flame3.tgatextures/sfx/b_flame4.tga ``` -------------------------------- ### Quake 3 Conversion File (.qdt) Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Model_Manual/model_manual.htm Specifies the .ase model files and conversion parameters for the q3data tool. This file is used to grab and convert 3dsMax files into Quake 3 compatible formats. ```qdt $asecanimconvert models/players/[character]/[character].ase -playerparms 92 155 $asecanimconvert models/players/[character]/[character]_1.ase -lod 1 -playerparms 92 155 $asecanimconvert models/players/[character]/[character]_2.ase -lod 2 -playerparms 92 155 ``` -------------------------------- ### Example Shader with Clampmap and Animation Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch05/pg5_1.htm This example shader demonstrates the use of clampmap for texture control and includes multiple stages with different blend functions and RGB generation, including an animated texture effect. ```quake-shader textures/sfx/metalbridge06_bounce { //q3map_surfacelight 2000 surfaceparm nodamage q3map_lightimage textures/sfx/jumppadsmall.tga q3map_surfacelight 400 { map textures/sfx/metalbridge06_bounce.tga rgbGen identity } { map $lightmap rgbGen identity blendfunc gl_dst_color gl_zero } { map textures/sfx/bouncepad01b_layer1.tga blendfunc gl_one gl_one rgbGen wave sin .5 .5 0 1.5 } { clampmap textures/sfx/jumppadsmall.tga blendfunc gl_one gl_one tcMod stretch sin 1.2 .8 0 1.5 rgbGen wave square .5 .5 .25 1.5 } // END } ``` -------------------------------- ### Quake 3 Team Arena Bot File Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html Defines a single bot's properties including name, model, headmodel, and AI file. Used for configuring individual team members. ```bot //bot file begins here { name Kreecha model BoB headmodel *Kreecha aifile bots/taa_c.c } { name Callisto/Lily model BoB headmodel *Callisto/Lily aifile bots/tad_c.c } { name Infinite model BoB headmodel *Infinite aifile bots/tad_c.c } { name Prime model BoB headmodel *Prime aifile bots/tao_c.c } { name Vlad model BoB headmodel *Vlad aifile bots/tao_c.c } //bot file ends here ``` -------------------------------- ### Q3A Teamplay Headmodel Search Order Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html Illustrates the search order for team-specific head model skins in Quake 3 Arena teamplay. It prioritizes team-colored skins within specific directories. ```text team_headmodel = *callisto/lily team = red models/players/heads/callisto/lily/head_red.skin models/players/heads/callisto/head_red.skin team_headmodel = callisto/lily team = red models/players/callisto/lily/head_red.skin models/players/callisto/head_red.skin models/players/heads/callisto/lily/head_red.skin models/players/heads/callisto/head_red.skin ``` -------------------------------- ### Using qer_editorimage for Custom Texture Display Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch04/pg4_1.htm This example demonstrates how to use 'qer_editorimage' to specify a texture that will be displayed in the Q3Radiant editor. It also includes other editor-specific and game-rendering parameters. ```quake3-shader textures/liquids/lavahell2//path and name of new texture { qer_editorimagetextures/eerie/lavahell.tga //based on this qer_nocarve //cannot be cut by CSG subtract surfaceparm noimpact //projectiles do not hitit surfaceparm lava //has the game properties of lava surfaceparm nolightmap //environment lighting does not affect q3map_surfacelight 3000 //light is emitted tessSize 256 //relatively large triangles cull disable //no sides are removed deformVertexes wave 100sin 5 5 .5 0.02 fogparms 0.85191420.309723 0.0 128 128 { maptextures/eerie/lavahell.tga //base texture artwork tcMod turb .25 0.2 1 0.02 //texture is subjected to turbulence tcMod scroll 0.1 0.1 //the turbulence is scrolled } } ``` -------------------------------- ### Quake 3 Animation Configuration File Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Model_Manual/model_manual.htm Defines animation sequences, frame ranges, and frame rates for character models. Place this file in the model's directory. Changes can be previewed in-game using 'vid_restart'. ```cfg // animation config file sex m headoffset 0 0 0 footsteps normal // first frame, num frames, looping frames, frames per second 0 30 0 25 // BOTH_DEATH1 29 1 0 25 // BOTH_DEAD1 30 30 0 25 // BOTH_DEATH2 59 1 0 25 // BOTH_DEAD2 60 30 0 25 // BOTH_DEATH3 89 1 0 25 // BOTH_DEAD3 90 40 0 20 // TORSO_GESTURE 130 6 0 15 // TORSO_ATTACK (MUST NOT CHANGE -- hand animation is synced to this) 136 6 0 15 // TORSO_ATTACK2 (MUST NOT CHANGE -- hand animation is synced to this) 142 5 0 20 // TORSO_DROP (MUST NOT CHANGE -- hand animation is synced to this) 147 4 0 20 // TORSO_RAISE (MUST NOT CHANGE -- hand animation is synced to this) 151 1 0 15 // TORSO_STAND 152 1 0 15 // TORSO_STAND2 153 8 8 20 // LEGS_WALKCR 161 12 12 20 // LEGS_WALK 173 9 9 18 // LEGS_RUN 182 10 10 20 // LEGS_BACK 192 10 10 15 // LEGS_SWIM 202 8 0 15 // LEGS_JUMP 210 1 0 15 // LEGS_LAND 211 8 0 15 // LEGS_JUMPB 219 1 0 15 // LEGS_LANDB 220 10 10 15 // LEGS_IDLE 230 10 10 15 // LEGS_IDLECR 240 7 7 15 // LEGS_TURN ``` -------------------------------- ### Example Detail Shader Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch05/pg5_1.htm An example of a shader that utilizes a detail texture. This shader draws the lightmap first, then modifies it with a detail texture, and finally applies the base texture. ```shader textures/bwhtest/foo { // draw the lightmap first { map $lightmap rgbGen identity } // modify the lightmap in the framebuffer by // a highly compressed detail texture { map textures/details/detail01.tga blendFunc GL_DST_COLOR GL_SRC_COLOR // YOU MUST USE THIS!! detail // for the detail to be disabled, this must be present tcMod scale 9.1 9.2 } // now slap on the base texture { map textures/castle/blocks11b.tga blendFunc filter } } ``` -------------------------------- ### Build GtkRadiant .app Bundle Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/apple/README.md Generates a distributable GtkRadiant application bundle using the Makefile in the 'apple/' directory. This process utilizes dylibbundler. ```bash make make image ``` -------------------------------- ### MPTerra2 Terrain Shaders Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Terrain_Manual/pages/the_meta_shader.html This example defines the root and blended shaders for the 'mpterra2' terrain entity. It includes texture maps, surface properties, and lighting parameters. ```shader textures/terrain/mpterra2_0 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex tcmod scale 0.125 0.125 } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` ```shader textures/terrain/mpterra2_1 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock12b_2.tga rgbGen vertex tcmod scale 0.1 0.1 } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` ```shader textures/terrain/mpterra2_2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock10b_2.tga tcmod scale 0.05 0.05 rgbGen vertex } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` ```shader textures/terrain/mpterra2_0to1 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.125 0.125 } { map textures/stone/pjrock12b_2.tga tcmod scale 0.1 0.1 rgbGen vertex alphaGen vertex blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` ```shader textures/terrain/mpterra2_0to2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock9b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.125 0.125 } { map textures/stone/pjrock10b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.05 0.05 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` ```shader textures/terrain/mpterra2_1to2 { surfaceparm nolightmap q3map_novertexshadows q3map_forcesunlight { map textures/stone/pjrock12b_2.tga rgbGen vertex alphaGen vertex tcmod scale 0.1 0.1 } { map textures/stone/pjrock10b_2.tga tcmod scale 0.05 0.05 rgbGen vertex alphaGen vertex blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA } { map textures/skies2/clouds.tga blendfunc filter detail tcmod scale 0.01 0.01 tcMod scroll -0.05 0.05 tcmod transform 1 0 1 1 1 1 } } ``` -------------------------------- ### Basic Quake III Arena Shader Example Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Q3AShader_Manual/ch01/pg1_1.htm A simple shader definition including a deformVertexes command for wave animation, tessellation size, and a texture map. This demonstrates the basic structure of a Quake III Arena shader file. ```shader textures/liquids/lava { deformVertexes wave sin 0 3 0 0.1 tessSize 64 { map textures/common/lava.tga } } ``` -------------------------------- ### Custom Surface Flag Definition Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/Compile_Manual/q3map.html Example of adding a custom surface flag 'grass' with a hexadecimal value to the custinfoparms.txt file. ```text grass 0x80000 ``` -------------------------------- ### Run GtkRadiant Build Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/apple/README.md Executes the compiled GtkRadiant binary. This command should be run from the GtkRadiant/ directory. ```bash ./install/radiant.bin ``` -------------------------------- ### Sample animation.cfg File for Quake 3 Team Arena Source: https://github.com/ttimo/gtkradiant/blob/1.6-release/docs/manual/quake3/New_Teams_For_Q3TA/index.html An example animation.cfg file used for custom models in Quake 3 Team Arena. It includes settings for gender, animation freezing commands, and frame definitions for various animations. ```cfg // animation.config file begins here sex���� m����� // THIS VALUE� (m, f, n) DETERMINES GENDER OF MODEL //fixedlegs� // PREVENTS PROGRAMMATIC ROTATION OF LEGS //fixedtorso // PREVENTS PROGRAMMATIC ROTATION OF TORSO headoffset -3 0 0 footsteps boot // first frame, num frames, looping frames, frames per second 0������ 30����� 0������ 20������������ // BOTH_DEATH1 29����� 1������ 0������ 20������������ // BOTH_DEAD1 30����� 30����� 0������ 20������������ // BOTH_DEATH2 59����� 1������ 0������ 20������������ // BOTH_DEAD2 60����� 30����� 0������ 20������������ // BOTH_DEATH3 89����� 1������ 0������ 20������������ // BOTH_DEAD3 90����� 26����� 0������ 20������������ // TORSO_GESTURE 116���� 6������ 0������ 15������������ // TORSO_ATTACK������� (MUST NOT CHANGE -- hand animation is synced to this) 122���� 6������ 0������ 15������������ // TORSO_ATTACK2������ (MUST NOT CHANGE -- hand animation is synced to this) 128���� 5������ 0������ 20������������ // TORSO_DROP��������� (MUST NOT CHANGE -- hand animation is synced to this) 133���� 4������ 0������ 20������������ // TORSO_RAISE�������� (MUST NOT CHANGE -- hand animation is synced to this) 137���� 1������ 0������ 15������������ // TORSO_STAND 138���� 1������ 0������ 15������������ // TORSO_STAND2 199���� 8������ 8������ 20������������ // LEGS_WALKCR 207���� 12����� 12����� 20������������ // LEGS_WALK 219���� 10����� 10����� 20������������ // LEGS_RUN 229���� 10����� 10����� 20������������ // LEGS_BACK ```