Adding fx to weapons/equipment
-
I’m trying to add effects to equipment like you would add stuff to ships, like the addon = stuff in goods.ini.
I like to be able to add lights and smoke effects so that when you add say, a flame thrower, the flame thrower will steam or smoke while flying. Or letting the player will be able add there own lights on there ship.
My main goal would be to add animations to items for example; a radar dish that spins when you equip it.
I’m guessing it is similar to how shield effects happen when you get shot, depending on the shield a different effect happens. But I haven’t a clue how this works.
Any help would be greatly appreciated.
-
phoenix_crow wrote:
I’m guessing it is similar to how shield effects happen when you get shot, depending on the shield a different effect happens. But I haven’t a clue how this works.For the shields you have to look into st_equip.ini:
[ShieldGenerator]
nickname = shield01_mark01_lf
ids_name = 263789
ids_info = 264789
DA_archetype = equipment\models\st\li_refractor_shield.3db
material_library = equipment\models\li_equip.mat
HP_child = HpConnect
hit_pts = 400
explosion_resistance = 0.500000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
regeneration_rate = 13.300000
max_capacity = 600
toughness = 6.000000
hp_type = hp_fighter_shield_special_1
offline_rebuild_time = 12
offline_threshold = 0.150000
constant_power_draw = 0
rebuild_power_draw = 10
shield_type = S_Graviton01
shield_collapse_sound = shield_offline
shield_rebuilt_sound = shield_rebuilt
shield_hit_effects = 0, gf_li_shield01
shield_hit_effects = 100, gf_li_shield02
shield_hit_effects = 500, gf_li_shield03
separation_explosion = sever_debris
LODranges = 0, 20
lootable = trueThe red text tells the game which effect it has to use for which shield, depending on the damage dealt per shot. In this case it’s the liberty effects.
-
I imagine that any effect, whether its the flamethrower smoke or the spinning radar, would have to be done in ALE. And well my ALE skills are about as good as a that of a block of wood.
Though if I had to hazard a guess for the flamethrower smoke, would be something along the lines of Particle Emitters in an ALE file.
-
phoenix_crow wrote:
Or letting the player will be able add there own lights on there ship.This is available (for servers, at least) via the Player Control Plugin for FLHook.
A mountable system would be… different, perhaps clunky. Interesting thought, though.
-
Spinning Radars (or any add-on) can be done in any cmp. The model needs multiple parts though, it can’t just be one solid mesh. It is accomplished by adding an animation script within the cmp -> via UTF editor. Crack open some Base cmps. There are a few threads on mesh animation, like this one in the tutorials forum. Once your model has a constantly running-type animation, it’ll run whenever you undock, whether it’s some mounted piece or your ship, or a base. You can get pretty creative mixing ale effects mounted on moving parts in some trippy docking jaloppy. It just takes a bit of planning, time, torn out various hair, and copious amounts of swearing. But way worth it in the end ^.^ Personally, I’d like to have pilots animated constantly giving the bird.
As for smoking guns, that’s a tough one. There’s no way to mount an effect on a gun, because they don’t have anywhere for the declaration in the ini / they can’t have loadouts. Only option I can think of is for built-in weapons, which means you’re adding the fx to the ship itself instead.
I’d been thinking over something similar. And haven’t tried this yet, as it will likely throw errors often and be tons of work implementing. You could try adding a unique HP type on the weapon model, specifically for say… flamethrower_smoking or whatever, then go through alllllll the ship packages and add the effect via addon = .
In theory it should work; nothing should show up when the unique HP is missing (gun not mounted).In fact that was how I was going to attempt some half-arsed way to mount lights too. Unfortunately ship / docking lights are hidden within the engine itself [at least the few I was discussing this with didn’t happen upon a standard ale effect which could be tweaked and mounted like normal[/i]]. But most of this was before people began tweaking the FL engine with external lighting additions. Recalling a couple Freeworlds videos, it seems they have multiple light sources, even on projectiles, so it could very well be possible now.
Sorry, I haven’t done jack with the hooked d3d9 mods, so cannot be of more help there -
Mini_Me wrote:
You could try adding a unique HP type on the weapon model, specifically for say… flamethrower_smoking or whatever, then go through alllllll the ship packages and add the effect via addon = .
In theory it should work; nothing should show up when the unique HP is missing (gun not mounted).That works, at least if you add the effect by fuse. Only Problem: If you mount two flamethrowers then, the effect will only appear on the first of them.
Try it yourself: Create a fuse that fires instantly and adds an effect to the hp_fire hardpoint.