Gun effects - Mao - 08-06-2011
Is there any tutorial about making gun effects? I'm talking about this:
I understand it's not that hard and it only requires editing a file with a text editor. So... is there any tutorial?
Gun effects - Phantom Mithras - 08-07-2011
Effects are related to .ale files, and yes, .ale files can be opened with a text editor, but actually editing them via the Notepad is very tedious and time consuming. I can't figure something more difficult than this, but wait, I have an idea. Making a .thn script (an intro script) with the notepad.
I'll have my graybeard soon, and I'll probably be exchanged for Gandalf.
Anyways, in order to modify or create new .ale effects you will need the .Ale Editor.
http://forge.discoveryfluk.com/forge/modding/flmt/
Download the modding tools bundle there. If you have any later questions, I'm here.
In the meanwhile, read this tutorial so that you can understand what an .ale is, what an .ale does, and how can you modify or create one.
Quote:This guide is designed to help you understand how freelancer uses .ales and renders them on-screen, so that you may be able to utilise them better. Especially if you're looking to edit/create some new .ales, though that is not covered in this guide. Whether the topics covered here have been covered/found before I do not know and cannot find tutorials based on this anywhere.
When using and modding effects and the way they appear on-screen, there are three main areas to look at:
FIRSTLY the .ale itself.
The heart of the effect, every definition, setting and used textures are specified in the ale itself, the ini's merely set up min+max parameters for freelancer to use. ale's consist of usually 2 or more components, some have only 1. A component of an ale would be (quick description):
Fx***Appearence + Fx***Emitter, the stars being replaced by whatever type of appearence and type of emitter. Each appearence section must have a corresponding emitter (logical) and the two make up one component. So a component therefore consisits normally of 2 sections. Field components only have 1 section however (turbulence, airfield, collidefield).Collide field, for instance, is what weapon projectiles use to know what to do when they strike an object and therefore doesn't need a defining appearence or emitter.
With the release of Lancer_Solurus' ale editor, it is now very easy to create new ale effects.
SECONDLY, the file effect_types.ini found in DATA\FX\ folder. Each effect type has the same entry with different nicknames and values.
The EffectType is what defines the appearence of the effect it is attached to, or the effect you attach it to.This gets defined in effects.ini or effects_explosion.ini, examples:
From effects.ini:
[Effect]
nickname = pi_capgun_01_proj
effect_type = EFT_WEAPON_PROJ <---WHAT WE WANT - effect_types.ini
vis_effect = pi_capgun_01_proj <---defined in the weapons_ale.ini file in DATA\FX\WEAPONS\
vis_beam = pi_capgun_01_beam <---defined in the beam_effects.ini file
From the effects_explosion.ini:
[Effect]
nickname = explosion_gas_mine
effect_type = EFT_EXPLOSION_SMALL <---WHAT WE WANT - effect_types.ini
vis_effect = explosion_gas_mine <---defined in the explosions_ale.ini DATA\FX\EXPLOSIONS\
snd_effect = med_explosion1 <---defined in sounds.ini DATA\Audio\
lgt_effect = elite_flash_to_red <---defined in lightanim.ini DATA\FX\
lgt_range_scale = 30 <---range of light
lgt_radius = 30 <---scale of range
So, based on the line: effect_type = EFT_EXPLOSION_SMALL , this means that the explosion_gas_mine effect will use these effect settings from effect_types.ini:
[EffectType]
nickname = EFT_EXPLOSION_SMALL <--- the effect type used in the effects.ini file.
priority = 1.000000 <--- I'm not entirely sure what these mean but I believe it has to do with the way the effect gets culled in relation to other effects on-screen.
generic_priority = 1.000000 <--- Once again, I'm not entirely sure what these mean but I believe it has to do with the way the effect gets culled in relation to other effects on-screen.
lod_type = EFT_LOD_SMALL <--- The level of detail setting defined in effects.ini. (I have not changed these for any effect and have so far gotten the results I want without altering any of the lod settings)
radius = 20.000000 <--- The on-screen radius of the effect, this is a max setting, if the ale itself has a size, radius, width, etc of 30, it will only show 20 (2 thirds) of the effect.
visibility = CULL_OFFSCREEN <--- What freelancer should do when the player does not have the effect in view, i.e., if its behind you it will be culled (not drawn), opposite value is EXIST_OFFSCREEN.
update = CULL_UPDATE <--- How to update the effect offscreen, CULL_UPDATE can be used with EXIST_OFFSCREEN, opposite value is UPDATE_OFFSCREEN.
run_time = 15 <--- The maximum time the effect may run, -1 is infinte, the effect would then run as defined in the ale itself.
pbubble = 500, 1000 <--- The minimum of visual range before cutoff (fl cannot delete the effect before this distance) + maximum visual range of the effect (the one I'll explain). If you create a beam projectile that can travel for 10k and the lifetime in the ale is specified to do that, having a value of 5000 would mean that your beam would be instantly (very ugly) deleted at only 5k, if the ale is set to last only about 2k (determined with lifetime settings in the ale + speed of the projectile in equipment files) then it will fade nicely enough. This is basically the farthest that the USER sees the effect so regardless of whether its for a projectile YOU fire or an explosion in the distance, you will not see the effect (or the rest of it) if you are beyond the second value of pbubble.
Now I hope you can see how this would affect an effects appearence on-screen, also, how it could limit any custom ale's you create. So before you rack your brains as to why your effect just magically disappears after a given time/distance, check the second value of pbubble and make sure of the runtime.
And LASTLY, the poolsizes for verts+indices, which can be found in Freelancer\EXE\dacom.ini.
This section isn't very important to the appearence of the effect itself but to how many effects can be drawn properly at once. This is called the poolsize, the ones you will want to change are these just below the [Alchemy] heading:
FxBasicAppearance.poolSize = 1000 ; each particle can generate: 4 verts 6, indices
FxRectAppearance.poolSize = 400 ; each particle can generate: 4 verts 6, indices
FxPerpAppearance.poolSize = 250 ; each particle can generate: 4 verts 6, indices
FxOrientedAppearance.poolSize = 0 ; each particle can generate: 4 verts 6, indices
FLBeamAppearance.poolSize = 680 ; custom app from flalchemy.dll: each particle can generate: 5 verts 24 indices
FLDustAppearance.poolSize = 250 ; custom app from flalchemy.dll: each particle can generate: 4 verts 6 indices
;---------------------- total = 2600 -------;
Now, if you look at most ales, as I said, have two components and a component has two sections, (an appearence+its emitter) and in many cases both appearence sections will be FxBasicAppearance. So if you have a long playing effect with a high max pbubble value (the one from EffectType) and two FxBasicAppearance entries in the ale itself, then only two instances of that effect can exist on-screen (properly) since there would be a total of 4 FxBasicAppearance playing out and the FxBasicAppearance poolsize is 1000 (4verts).
For instance, if you have this long playing long visual range effect on missiles and their trails and you fire three missiles, then after the third is fired all three trails will be horribly cutoff in sections because now you've created 6 FxBasicAppearance verts and the poolsize is only 4.
This is how mine is set up, feel free to increase or decrease as necessary, though I find these to be perfect for now:
FxBasicAppearance.poolSize = 5000 ; each particle can generate: 20 verts 30, indices
FxRectAppearance.poolSize = 800 ; each particle can generate: 8 verts 12, indices
FxPerpAppearance.poolSize = 500 ; each particle can generate: 8 verts 12, indices
FxOrientedAppearance.poolSize = 0 ; each particle can generate: 4 verts 6, indices
FLBeamAppearance.poolSize = 1360 ; custom app from flalchemy.dll: each particle can generate: 10 verts 48 indices
FLDustAppearance.poolSize =500 ; custom app from flalchemy.dll: each particle can generate: 8 verts 12 indices
;---------------------- total = 8160 -------;
ENTRIES BEHIND COMMENTS DONT NEED TO BE CHANGED, I DID IT FOR SHOW.
Hope this is helpful to those editing ales, its the only time I've needed to find and change all these things so I'm sure it will be useful to others.
|