Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Fuses and TXMs...

The general place to discuss MOD''ing Freelancer!

Post Fri Nov 19, 2004 2:29 am

Fuses and TXMs...

Fuses seem to be a very essential part of making one of the next technical goals of my mod come to fruition- animated propellers.

So hopefully Fjord or somebody will read this and help me out here... I've got two questions, relating to different ideas I had for this idea.

1. I see in fuses.ini that events are called at damage states, and that they can be timed, and they appear to have a time-to-live. Can the event be looped? I.E., is there a way to call a Fuse event at .001, then at .10, then at 1.0, and then reset the Fuse so that the state recurs? For that matter, once a Fuse event is called, it's clearly calling something that's looping...

2. Another idea I had was to make a custom TXM file containing the frames of animation for a 2D sprite-based propeller, which would then activate upon a Fuse event, and continue forever (just like smoking engines). I haven't been able to find any relevant information about the information contained in this portion of the UTF file, though (here I'm using StandardEffects.txm)

Frame_Rects- data as Float Array:
0.000000
0.000000
1.000000
0.250000
0.750000
0.000000
0.250000
1.000000
0.500000
0.750000
0.000000
0.500000
1.000000
0.750000
0.750000
0.000000
0.750000
1.000000
1.000000
0.750000
0.000000
0.000000
0.750000
0.250000
0.500000
0.000000
0.250000
0.750000
0.500000
0.500000
0.000000
0.500000
0.750000
0.750000
0.500000
0.000000
0.750000
0.750000
1.000000
0.500000
0.000000
0.000000
0.500000
0.250000
0.250000
0.000000
0.250000
0.500000
0.500000
0.250000
0.000000
0.500000
0.500000
0.750000
0.250000
0.000000
0.750000
0.500000
1.000000
0.250000
0.000000
0.000000
0.250000
0.250000
0.000000
0.000000
0.250000
0.250000
0.500000
0.000000
0.000000
0.500000
0.250000
0.750000
0.000000
0.000000
0.750000
0.250000
1.000000
0.000000

Now, I've checked, and the number of frames is 16... there are 80 of these Frame_Rects. So... which parts refer to the angles (XYZ), and which refer to position XYZ? There are 5 of these for every frame (80/16) so I strongly suspect that the frame_rects don't refer to the Z... this is caused by the movement of the ship away from the point source, and the txm is generating the FX at a given point XY (XYZ).

So, what can I do to "tie" the FX to a position in the Z? I don't want the "propeller" to look like it's trailing the aircraft, obviously...

If anybody has a clue about this, I'd appreciate the info... tomorrow, I'll be hacking up a custom TXM to see what (if anything) it'll do here.

Post Fri Nov 19, 2004 6:29 am

about retriggering fuses:
each "tic" the game engine checks ship damage. if the ship hitpoints are lower than the fuse trigger value, the fuse is initiated.
i made the experiance that an already running fuse wont re-trigger until it is finished.

cant help with the animation stuff, sry.

Fjord

Post Fri Nov 19, 2004 12:11 pm

NP, wasn't expecting a miracle

Post Fri Nov 19, 2004 5:07 pm

Argh, I think you are looking for something more on the lines of the FX's than fuses (for making spinning propellers). Take a look at the station "smallstation1" and see how it has a constant animation? If you can figure that out, then you'll be well on your way to making constant FX's.

Post Fri Nov 19, 2004 6:55 pm

I've taken a look at that, and I don't even have the slightest clue what to do with it. I think that, at the very least, I'd need a custom model file with that animation data in it. I'll see whether I can't get it working, but I don't have a lot of hope that I can successfully translate it into a working propeller.

Post Sat Nov 20, 2004 1:42 am

The best thing to do is probably edit the animation entries in the ship UTF file. If you open up station_small_a_lod.cmp (Fort Bush etc.) and look inside the Animation-->Scripts node you should see this:



Using "sc_rotate_ring" as a template is probably a good idea, since it's basically the animation you're looking for. The "Channel-->Header" entry seems to be the orientation that the animation will run in, and I would just copy the "Frames" entry since that's the animation you want. Set "Parent Name" to "Root", and "Child Name" to the section of model acting as your propeller - then see if it actually works

Post Sat Nov 20, 2004 3:00 am

Hmm. Gonna have to build and export a multi-part model, too, with the propeller being a seperate part....

I'll take a long look at this and see if I can't get this to work. If I can... I have to build all new aircraft models... but other than the two newest ones, that won't be a great loss anyway. Or maybe I can figure out how to just have this part and some triangles for the other VMeshData, and store it like any ol' CMP... and attach them to Hardpoints where the Engines go... that's sounding like a better plan overall.

Return to Freelancer General Editing Forum