+ Reply to Thread
Results 1 to 3 of 3

Thread: Help plz!

  1. #1
    Junior Member kryze is on a distinguished road
    Join Date
    Nov 2011
    Posts
    12

    Help plz!

    Can anyone help me to make some fx scripts on wolfcam please. I do not know how to use fx scripts and I am looking to create something similar to the Strenx frag movie at 4:27 http://www.youtube.com/watch?v=yYQ832wiDbU

  2. #2
    Junior Member raise is on a distinguished road
    Join Date
    Feb 2012
    Posts
    28
    Quote Originally Posted by kryze View Post
    Can anyone help me to make some fx scripts on wolfcam please. I do not know how to use fx scripts and I am looking to create something similar to the Strenx frag movie at 4:27 http://www.youtube.com/watch?v=yYQ832wiDbU
    Refer to the readme's of wolfcam / q3mme. Also if you google you can find pre-made scripts and also explanations of scripting.
    Also what ever happened to self teaching, you would probably learn more by messing with other made fx and figuring out what they do on your own, that's what I did and I can make fx pretty easily.

  3. #3
    Senior Member EARTH_QUAKE is on a distinguished road EARTH_QUAKE's Avatar
    Join Date
    Nov 2010
    Location
    UK
    Posts
    158
    "FxSystem
    FX scripts are used by the Q3mme to add graphical and sound effects to the scene. Stock quake3 does all such effects in code, so it requires a programmer to modify them and the game has to be recompiled and restarted after every change. Q3mme hooks up external scripts to certain game events (like missile impact) and entities (players and weapon projectiles). These scripts can be overwritten by moviemakers. The game looks for scripts in mme\scripts\*.fx. These files are loaded in alphabetical order.
    Contents
    Example
    Here's an example fx script that will show an image over the head of players that are chatting:
    player/talk {
    size 10
    shader sprites/balloon3
    Sprite
    }
    The fist part, player/talk is the script name. It tells the game which event this script is for. All valid names and the events they correspond to are listed below. Next comes the script block, in parentheses. It assigns the size and shader variables and then calls the Sprite command. This command adds an image to the render scene, using the size, shader and origin variables. origin is not defined in the script, but passed to it by the game.

    General notes
    Scripts can be reloaded at runtime by the fxreload console command. For the above example: changing the size variable, saving the script file and running /fxreload in the game should update the effect immediately.

    Script names
    Every event that is handled by the fxSystem is linked to a script name. The following tables list theses names, a desciption of the event that triggers them, and the arguments that the game passes to the script. The X in the weapon table can be replaced by each of these: rocket, rail, grenade, machinegun, shotgun, plasma, bfg, gauntlet, lightning, grapple.

    script hooks for weapons
    Script name
    event description
    passed arguments
    weapon/X/flash
    called every frame for 20msec after the weapon was fired
    origin, velocity, axis, life
    weapon/X/fire
    weapon was fired
    origin, direction, velocity
    weapon/X/impact
    bullet or projectile hit the wall
    origin, direction
    weapon/X/projectile
    called every frame for missile projectiles
    origin, velocity, direction, angles
    weapon/X/trail
    called every frame for projectiles. called once at firing time for non-projectile weapons
    origin, velocity for projectiles.
    origin, direction for non-projectiles.
    origin, direction, color for the railgun


    other script hooks
    Script name
    event description
    passed arguments
    weapon/common/bubbles
    called for both the start and end point of the bubble trail that projectiles and bullets leave in water
    origin (q3mmeUI also passes direction)
    player/gibbed
    called when player was killed and his body should explode
    origin, velocity
    player/teleportIn
    player is entering a teleporter
    origin
    player/teleportOut
    player is leaving a teleporter
    origin
    player/haste
    player carries the haste powerup
    origin
    player/talk
    player is chatting
    origin
    player/connection
    the server currently receives no input from the player
    origin
    player/impressive
    player got an "impressive" award
    origin
    player/excellent
    player got an "excellent" award
    origin
    player/gauntlet
    player got gauntlet award
    origin
    player/capture
    player captured the flag
    origin
    player/assist
    player got an assist award
    origin

    Commands
    FX commands add actual effects to the game, be it sound, graphics or screen shaking. All other script lines are just setting up variables for a subsequent command.
    Sprite
    Adds a camera-aligned shader to the scene at position
    origin.
    arguments: renderfx
    variables used:
    origin, shader, size, angle, color
    Quad
    This is similar to the Sprite command, but here the shader is not camera-aligned, instead it is perpendiculat to
    dir.
    arguments:
    variables used:
    origin, dir, angles[ROLL], size, color, shader
    Beam
    Beams are used for the lightning gun and railgun effects. The shader is streched between
    origin and (origin+dir). The Beam width is set to size. The shader is not camera-aligned. Instead it is drawn multiple times, rotated around it's direction. A rotate value of 90 draws two shaders, 45 draws four, 30 draws 6, etc.
    arguments:
    variables used:
    origin, dir, shader, size, angle, color
    weapon/lightning/trail {
    shader lightningBoltNew
    size 16
    angle 45
    beam
    }

    Spark
    Spark is very similar to Beam, except that it is camera-aligned. The shader is centered at
    origin, it's length is set to size, it's width is set to width. One endpoint is aiming at velocity.
    arguments:
    variables used:
    origin, velocity, size, width, shader, color
    Decal
    Decals are used for painting shaders onto world surfaces, like bullet holes and blood marks. The shader stays around for
    life milliseconds, so make sure to only use decals for events, not continuous effect. The decal is centered at origin, dir is it's normal vector.
    arguments:
    [temp] fade the alpha instead of rgb
    [alpha] fade rgb in beginning followed by an alpha fade
    [energy] temporary decal, lives only 1 frame
    <float life> lifetime of the decal in milliseconds (default: 10'000)

    variables used:
    origin, shader, dir, color, rotate, size
    example

    weapon/rocket/impact {
    shader gfx/damage/burn_med_mrk
    size 64
    Decal
    }

    Rings
    description
    arguments:
    variables used:
    origin, dir, size, width, shader, color
    anglesModel
    description
    arguments:
    variables used:
    origin, angles, model, shader, size, color
    axisModel
    description
    arguments:
    variables used:
    origin, axis, model, shader, size, color
    dirModel
    description
    arguments:
    variables used:
    origin, dir, model, shader, rotate, size, color
    Light
    Adds a dynamic light at origin, intensity is set to
    size.
    arguments:
    variables used:
    origin, size, color
    sound
    Plays the sound
    soundname.
    arguments: <soundname>
    variables used:
    origin
    loopSound
    Plays the sound
    soundname in an endless loop.
    arguments: <soundname>
    variables used:
    origin

    soundList
    Plays a sound, randomly picked from the list of sounds in
    block.
    arguments: <block> : block contains paths to soundfiles
    variables used:
    origin
    vibrate
    description
    arguments: <strength>
    variables used:
    origin
    renderfx**: [firstPerson] [thirdPerson] [shadow] [cullNear] [cullRadius] [depthHack] [stencil] these are all flags for the renderer.
    block statements
    • repeat <mathX> <block> the block is run X times. The variable loop goes from 0 to 1 in X steps.
    • emitter <mathX> <block> any particle created in the block lives for X seconds. The variable lerp runs from 0 to 1 during the life of the entity. The variable life contains the age of the entity in seconds.
    • if <mathX> <block> [else <mathX> <block>] [elif <mathX> <block>] the block is executed only if X is true
    • entity : alias for emitter
    Example:
    weapon/rocket/impact {
    shader rocketExplosion
    size 40
    emitter 1 {
    Sprite
    }
    }
    The following statements should only be used in entity scripts, like projectile trails. They don't make sense for event scripts, like projectile impacts.
    • distance <mathX> <block> the block is run every X units along the entities path. in other words, it is run when the entity has moved x units since the last distance block was executed .
    • interval <mathX> <block> the block is run every X seconds as long as the entity lives.
    Variables
    Variables provide the context for script commands: how bright a light is, which sound to play, what shader to display etc. All variables are predefined, you can't create your own. Some are set by the game, depending on the script event. There are three variable types: vectors, floats and strings. The vector variables are: origin, velocity, angles, dir, parentOrigin, parentVelocity, parentAngles, parentDir, color, v0, v1, v2, v3. String variables are shader, model, script. Float variables are colorFade, colorScale, colorHue, alphaFade, red, green, blue, alpha, size.

    Math expressions
    Whereever a float or vector is expected, you can put a mathematical expression as well.

    Math with floating point number
    Float expressions can contain console variables, float variables, arithmetic operators (+, -, *, /) as well as comperators (=, !, >, <) and boolean operators (&, |). The following basic math functions are also available:
    • sqrt(x) gives the square root of x
    • ceil(x) rounds x up to the nearest integer
    • floor(x) rounds x down to the nearest integer
    • sin(x) sine trig function
    • cos(x) cosine trig function
    • wave(x) sinus type wave but takes 0-1 to complete compared to 0 - 2pi
    • clip(x) returns value clipped between 0,1 so <0 becomes 0 and > 1 becomes 1
    Here are some example assignments to a float variable:
    size 10 // size becomes 10
    size 10 + 5*crand // size becomes a random value between 5 and 15
    size sin( t1 * t2 ) // size becomes the sine of t1*t2
    size dir // size becomes the length of the vector dir

    Math with vectors
    The following functions can be used to modify vector variables. vDst stands for the vector that gets written, vSrc are the vectors that are read, floatX can be any float expression.
    • copy <vSrc> <vDst> vDst = Vsrc
    • scale <vSrc> <vDst> <floatX> vDst = vSrc * floatX
    • sub <vSrc1> <vSrcs> <vDst> vDst = vSrc1 - vSrc2
    • add <vSrc1> <vSrc1> <vDst> vDst = vSrc1 + vSrc2
    • addScale <vSrc1> <vSrc2> <vDst> <floatX> vDst = vSrc1 + vSrc2 * floatX
    • subScale <vSrc1> <vSrc2> <vDst> <floatX> vDst = vSrc1 - floatX* vSrc2
    • rotateAround <vSrc> <vDir> <vDst> <floatX> Point vSrc is rotated floatX degrees around vDir, result stored in vDst
    • wobble <vSrc> <vDst> <floatX> vDst = vSrc altered by at most floatX degrees
    • inverse <vSrc> [vDst] vDst = vSrc * -1
    • normalize <vSrc> [vDst] Scales vSrc such that it's lentgh becomes 1.
    • perpendicular <vSrc> [vDst] Makes vDst a vector perpendicular to vSrc
    • clear <vSrc> vSrc = (0, 0, 0)
    • random <vDst> writes random values between 0 and 1 to vDst
    The vDst variables in inverse, normalize and perpendicular are optional. If omitted, the output vector is written to vSrc.

    Particle Emitter specific keywords
    • the variable colorFade is a value between 0 and 1 that determines when in the particles life the color starts to fade out.
    • moveGravity <floatGravity> adds a gravity force of the given strength to the particle movement
    • moveBounce <floatGravity> <floatBounceFactor> same as moveGravity, but also makes the particle bounce on surfaces
    • impactDeath <floatGravity> same as moveGravity, but particles disappear at surface impact
    • sink <floatDelay> <floatDepth> makes the particle sink into surfaces
    • impact <floatSpeed> <block> : the speed value gets squared (don't know why)
    • death <block>
    other
    • shaderClear resets the shader
    • shaderList <floatX> <block> block contains a list of shader names. a list element determined by floatX is assigned to shader. floatX should be between 0 (first element) and 1 (last element).
    • modelList <mathX> <block> block contains a list of modelnames. a list element determined by floatX is assigned to model. floatX should be between 0 (first element) and 1 (last element).
    • colorList <mathX> <block> a list element determined by floatX is assigned to color. floatX should be between 0 (first element) and 1 (last element).
    • colorBlend <mathX> <block> block contains a list of colors. Instead of picking one element from the list, this command interpolates between the two list entries adjacent to floatX.
    • pop - todo
    • push - todo
    • pushParent - todo
    • once <block> run block only once, no matter how often this line is passed"
    This is all you need to learn basics. Also the part of the strenx video you mentioned is not an fx script but an animation (I think). Lock thread.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts