Yet more SO editing questions....

Eder

Mr. Standoff
1-Is there any way to change the HUD's text color? I've changed the graphics, but the text is still light blue, which doesn't quite match the rest.

2-Something's up with my fighter's rear turrets. First, they only shoot once. You press the button, it shoots, then it doesn't shoot anymore for the rest of the mission... And after shooting and getting shot at for a few minutes, the turret simply rotates back to "top turret" position. And stays there for the rest of the mission (you can still press F4 and rotate it around and such, but as if it were a top turret)

Someone please enlighten me on those two.

Also, I've figured a couple of things about bullet.iff

Wheter the gun acts as a "billboard" or not is defined by one of the chunk's unknown numerical values (I'm still trying to confirm which one) and not by having a mesh name specified in the chunk. I know this because for standoff, the Mass Driver will use the Tachyon's gun ID, and when I switched their mat numbers, the Mass Driver bolts would appear rotated around and stretching forward like the Tachyon bolts. Then, I copied all the unknown numbers from the Mass Driver's original chunk into the chunk which was originally the Tachyon's, and the gun went back to billboard mode. Second, another of the unknown values is for the gun's icon in the HUD. I still haven't quite figured out which value it is yet, either, but I'll have to, soon. (I don't know which one it is because like I said above, I've replaced all unknown values of one slot with the others'. As soon as I try this with one value at a time I'll have it down)

--Eder
 
Originally posted by Eder
1-Is there any way to change the HUD's text color? I've changed the graphics, but the text is still light blue, which doesn't quite match the rest.
You did? We were too lazy :p.

2-Something's up with my fighter's rear turrets. First, they only shoot once. You press the button, it shoots, then it doesn't shoot anymore for the rest of the mission... And after shooting and getting shot at for a few minutes, the turret simply rotates back to "top turret" position. And stays there for the rest of the mission (you can still press F4 and rotate it around and such, but as if it were a top turret)
Wow, that's odd. Maybe send the code to KW, since he has more experience with editing ships.
...Yes, I'm lazy :).

Someone please enlighten me on those two.

Also, I've figured a couple of things about bullet.iff
Keep researching! :) With bullet.iff, I only ever bothered with the most basic stuff (gun stats, basically), and in cases where something more was needed (ie., getting the Stormfire into SO), I simply copied the code from other guns.
 
The bullet will act as a 'billboard' when it doesnt have a mesh designed to it. There is some info on the bullet structure from Thomas page (im too lazy to rewritte it all ;) ), just gonna add a couple of details


"CHUNK "DATA" (this is the data from a Laser)
{
long 0 //gun ID
long 230 //name (points to a string in spacefli.eng)
long 167 //sound
float 4000 //speed
float 5000 //range
float 0 //charge time
float 10 //energy
float 18 //damage
float 0.25 //refire delay
long 0 //needs ammo
float 180 //?
long 1 //?
float 1 //?
long 0 //?
long 0 //?
float 1 //?
long 2 //?
long 20625 //matfile
float 0.8 //?scale of mat*
float 14 //?**
}"


* scale (width of the mat)
**scale (lenght of the mat)
 
Hey, Q, here's some more trouble for you: :p

First off, I couldn't figure out where some of the HUD graphics come from. They don't seem to be in any of the 000009* mats, like the rest of the HUD graphics. Specifically, I'm looking for those useless blue curves behind the radar, the frames around the target camera and comm VDUs, and the shield icon... do you know where those are? Oh, also, how do I move pieces of the HUD around in the cockpit files? (You know, like in HCl's hi-res patch)

Second, could I have my Ferret back, in IFF format? I think I still have the texture maps around, but at the time I sent it to you UE guys, I didn't even know how to convert it to IFF, so I guess I sent it in .OBJ or somesuch. You could save me the trouble of converting a model that's already converted... thanks! :)

Finally, how do missions tie together to each other? How are cutscenes and movies triggered between them? How do I edit stuff such as the names that'll be in the Killboard during the campaign, and how do I make someone go KIA from one mission to the next?

(I can already make missions where you circle waypoints, blow stuff up, and get a "mission accomplished!" comm afterwards in WCPPas, so I guess it's time I start worrying about gluing them all together :))

Thanks!

--Eder
 
Originally posted by Eder
First off, I couldn't figure out where some of the HUD graphics come from. They don't seem to be in any of the 000009* mats, like the rest of the HUD graphics. Specifically, I'm looking for those useless blue curves behind the radar, the frames around the target camera and comm VDUs, and the shield icon... do you know where those are?
No, I don't. I never did any research as far as the actual cockpit graphics go. But from what I have heard (can't remember where, so maybe it's not true) certain parts of the cockpit are hard-coded. This sounds possible, given the fact that capship VDU images are hardcoded (even though they're also stored in MAT files).

Oh, also, how do I move pieces of the HUD around in the cockpit files? (You know, like in HCl's hi-res patch)
Yes, I know... that's the part I did for that patch :). I honestly can't remember right now, but it is easy. I'd check it right now but... once again, my WC computer is down... and I don't even know what the hell is wrong this time :(.

Second, could I have my Ferret back, in IFF format?
I'll send it to you asap.

Finally, how do missions tie together to each other? How are cutscenes and movies triggered between them? How do I edit stuff such as the names that'll be in the Killboard during the campaign, and how do I make someone go KIA from one mission to the next?
Ah, it's very good that you are taking an interest in this area, because it's also related to CIC rooms. This is done using the series (srs) file. Well, not all of this... the killboard you actually manage inside the mission files. You use the AddToKillboard command (I don't remember what the command starts with) to add all the pilots. There are also commands to change the pilot's squadron (note - apart from changing the colour his name is displayed with on the killboard, this has no effect whatsoever in SO), to kill pilots, and to set them immortal (but not invulnerable - their ships can explode, but they'll eject). More details to follow after I am able to at least access my files on my computer.

God, this is depressing. You know, I've been struggling with that beast for almost a week now? Every time it seems that everything is finally working, something else comes up. First the graphics card, now this.
("Enough! You are not to blame for either!" :))
 
Originally posted by Quarto
No, I don't. I never did any research as far as the actual cockpit graphics go. But from what I have heard (can't remember where, so maybe it's not true) certain parts of the cockpit are hard-coded. This sounds possible, given the fact that capship VDU images are hardcoded (even though they're also stored in MAT files).

*Gasp*.... NOOOOOOOOOOOOOOOOOO! They can't be hardcoded..... my new HUD was looking so neat! :(


Originally posted by Quarto
Yes, I know... that's the part I did for that patch.

So did HCl tell me, that's why I asked you :)

Originally posted by Quarto
I honestly can't remember right now, but it is easy. I'd check it right now but... once again, my WC computer is down... and I don't even know what the hell is wrong this time.

Don't worry - as usual, I'm not in a hurry or anything.... just add that to your "must teach Eder" list, please ;)


Originally posted by Quarto
I'll send it to you asap.

Great! Thanks!


Originally posted by Quarto
Ah, it's very good that you are taking an interest in this area, because it's also related to CIC rooms. This is done using the series (srs) file. Well, not all of this... the killboard you actually manage inside the mission files. You use the AddToKillboard command (I don't remember what the command starts with) to add all the pilots. There are also commands to change the pilot's squadron (note - apart from changing the colour his name is displayed with on the killboard, this has no effect whatsoever in SO), to kill pilots, and to set them immortal (but not invulnerable - their ships can explode, but they'll eject).

Sounds easy enough, once I find my way around series editing... I think this much I can manage by myself (whoa, imagine that for a change! <G>)

Originally posted by Quarto
More details to follow after I am able to at least access my files on my computer. God, this is depressing. You know, I've been struggling with that beast for almost a week now? Every time it seems that everything is finally working, something else comes up. First the graphics card, now this. ("Enough! You are not to blame for either!")

Sounds like the computers my father has at his company... and they're all networked, so when it's a virus or something, I have to fix them all instead of just one. But mostly it's hardware-related..... argh. Those damn tubs ate half of my summer vacations away, hope you have better luck than me with your computer.

--Eder
 
Originally posted by Eder
Don't worry - as usual, I'm not in a hurry or anything.... just add that to your "must teach Eder" list, please ;)
Right. Before or after the "must write a WCPPas tutorial for KW" bit? :)

Sounds easy enough, once I find my way around series editing... I think this much I can manage by myself (whoa, imagine that for a change! <G>)
I'm sure you can, but I'll help you anyway, by sending you some commented sample series work.
KW, you want it too, or have you already gotten the hang of series files?

Sounds like the computers my father has at his company... and they're all networked, so when it's a virus or something, I have to fix them all instead of just one. But mostly it's hardware-related..... argh. Those damn tubs ate half of my summer vacations away, hope you have better luck than me with your computer.
Update: I have identified the problem. It was, thank God, hardware. After removing the brand new SB Live! card (which I bought because the previous one was having a conflict with WinME... :p), the computer once again decided to start up. Better than software-related problems, definitely - doesn't require a Windows reinstall.

Oh, and did I mention that for the last two days, I didn't have the internet because the phone cables were snapped by those nasty winds we have in Europe right now? As far as computers go, this has not been a good week for me.

BTW, I do need your e-mail address to send you that Ferret.
 
Originally posted by Quarto
I'm sure you can, but I'll help you anyway, by sending you some commented sample series work.

That'd be even greater, thanks!


Originally posted by Quarto
Oh, and did I mention that for the last two days, I didn't have the internet because the phone cables were snapped by those nasty winds we have in Europe right now? As far as computers go, this has not been a good week for me.

Two years ago, I lost THREE modems in a single month to some stupid summer thunderstorms :( top that! :p

Originally posted by Quarto
BTW, I do need your e-mail address to send you that Ferret.

Oh, sorry, I thought the profile thingie listed it... it's eder_hc@terra.com, but unless you're spamming, add a .br after the .com :)

--Eder
 
Originally posted by Eder
Hey, Q, here's some more trouble for you: :p

First off, I couldn't figure out where some of the HUD graphics come from. They don't seem to be in any of the 000009* mats, like the rest of the HUD graphics. Specifically, I'm looking for those useless blue curves behind the radar, the frames around the target camera and comm VDUs, and the shield icon... do you know where those are? Oh, also, how do I move pieces of the HUD around in the cockpit files? (You know, like in HCl's hi-res patch)


This may be what you're looking for:

guns 951
shields, some curvy background 952
autopilot, speed, fuel, armor, energy bars 953
missile reticles 954
 
Thanks, eddieb, those are the ones... but the problem is that the shields and the curvy background don't seem to change, even if you edit their mat file.

Maybe they're hardcoded, after all, and the mat is just there for reference or something... :(

--Eder
 
Originally posted by Eder
Two years ago, I lost THREE modems in a single month to some stupid summer thunderstorms. Top that!
I don't want to :p.

Oh, sorry, I thought the profile thingie listed it... it's eder_hc@terra.com, but unless you're spamming, add a .br after the .com
You mean like,
CONGRATULAUTIONS! Yuo have WON a brand new WCP-covnerted FERRET! To pikc it up, send me $5000, and you will get the FERRET for ABSOULUETETLY FREE!!!!!
:)
(spelling mistakes fully intented)
 
Right, let's get to work :).

Originally posted by Eder
Thanks, eddieb, those are the ones... but the problem is that the shields and the curvy background don't seem to change, even if you edit their mat file.

Maybe they're hardcoded, after all, and the mat is just there for reference or something...
After we creatively got around the capship VDU hardcoding problem, we encountered a different problem - on some graphics cards, the new VDU images were virtually invisible (only the bits where the lines were thicker than one pixel showed up). This problem does not occur with the hardcoded VDUs, even though they were the same style as our new ones. So, maybe that's why the cockpit mats are hardcoded too. However, we got around the problem by filling the capship diagrams on the new VDU images (so that there was never a point with a line 1 pixel thick), and I'm sure you can get around whatever problems will be caused by the use of non-hardcoded cockpit components.

First, however, a bit of info that you'll need.

Cockpit Files
First thing you've got is the STRU chunk - this is info about what mesh is to be used for the cockpit. Naturally, the meshes are stored in the \mesh folder, and are perfectly editable. The name of the mesh is the very first line of the STRU chunk. I don't know what the rest of the chunk does, but I've never had any reason to bother with it. Presumably, some of the numbers may indicate the position relative to the player that the strut mesh should be placed at, but this is something I have not tested.

Next comes the PTUR form. This form contains info about turrets. I assume that it links certain turrets to certain views. The form contains 1 to 3 chunks (if there are no turrets, the form doesn't exist) - LTUR, RTUR, and BTUR - left view, right view, and rear view. To each one, you bind a turret by entering a number (for example, 0 would be the first turret you entered in the ship file; if you have five turrets altogether, 4 would be the last one). Note, however, that this is something I've never tried, so I may be completely wrong.

The next chunk is MESG. I can't find anything in my notes about it, but from what I can remember, this chunk defines the coordinates of where text messages show up on the screen. The chunk contains four numbers - X, Y, X2, and Y2. X and Y define the top left corner, X2 and Y2 define the bottom right. Remember that text will only wrap to the next line when it reaches X2. I don't know what happens if you have a text longer than the amount of space you have for it. From various other experiences, I'd assume the game will crash.

This is followed by the SCAL chunk. What this is, I never bothered to find out. What I do know is that there didn't seem to be any need to touch it for the high-res patch, so you probably won't need to bother with it either.

Now we get to the real stuff, but first I'm gonna post this, so if something happens (phoneline restored, but lots of powercuts today :p), I won't lose everything.
 
The Ferret is on the way :). Back to work.

Cockpit Files Part 2
No more individual chunks from this point onwards - all the other cockpit components have their own forms. A lot of the info stored inside these forms remains black magic, but I was able to prepare the high-res cockpits without delving into these things, so I doubt this will be a problem.

First up, a list of all the forms, and what they contain:
NAVP - a text-based form, shows nav point information.
BACK - the weird blue arc-like things that show up in 3Dfx (meaning that I've never actually seen them). For the high-res patch, we actually moved them beyond the edge of the screen, because they couldn't be properly adapted to hi-res without making new images, which we couldn't be bothered with.
SCFG - the fore/aft shield adjusting component.
TARO - target display (shields/armour).
DAMV - a display of your own shields and armour.
RTCL - shooting reticle.
SETS - set speed info.
CURS - current speed info.
MTMR - mission timer.
TARG - target viewcam.
DAMG - damage control (list of damaged components). Text-based, and only contains a single chunk.
OCOM - comm options, also text-based.
PWRD - power distribution diagram.
RADA - radar.
GUNP - gun capacitator.
AFBN - afterburner fuel.
ICOM - comm visuals.
GNSI - what gun(s) you have selected.
MSSI - what missile(s) you have selected.
AUTO - autopilot light.
LOCK - missile lock warning. Was a bit of a nuisance with the hi-res patch.
EJCT - eject warning.

What's missing? Decoys. They do not seem to have their own form. It seems that messing with the LOCK form also messes with the decoys, but I was never 100% certain of this.

And now, how do we change their positions?

Each component form (except MESG) has a VIEW chunk. This chunk contains four coordinates - you guessed it, top left and bottom right corners. In most cases, this is the only thing you need to edit. For text-based components, don't forget about the bottom right corner. For all others, however, the bottom right corner seems irrelevant. Even if there's only two pixels of space between the top left and bottom right corners, the game WILL display the entire image.

But this is where things get complicated. For certain components, the VIEW chunk contains the following coordinates - 0,0,640,480. A component filling up the entire screen? That would be... strange. But this isn't the case. You will generally see such coordinates in components which consist of more than one image. The best example of what is going on is the LOCK form:

Code:
    FORM "LOCK"
    {
      CHUNK "VIEW"
      {
        long 0
        long 0
        long 640
        long 480
      }
      FORM "QUAD"
      {
        FORM "HARD"
        {
          CHUNK "NUMR"
          {
            long 2
          }
          CHUNK "DATA"
          {
            long 903
            float 25.0
            float 170.0
            float 84.0
            float 29.0
            float 0.06
            float 0.43
            float 0.38
            float 0.54
          }
          CHUNK "DATA"
          {
            long 903
            float 531.0
            float 170.0
            float 84.0
            float 29.0
            long 0
            float 0.43
            float 0.33
            float 0.54
          }
        }
        FORM "SOFT"
        {
          CHUNK "NUMR"
          {
            long 2
          }
          CHUNK "DATA"
          {
            long 953
            float 25.0
            float 170.0
            float 84.0
            float 29.0
            float 0.06
            float 0.43
            float 0.38
            float 0.54
          }
          CHUNK "DATA"
          {
            long 953
            float 531.0
            float 170.0
            float 84.0
            float 29.0
            float 0.00
            float 0.43
            float 0.33
            float 0.54
          }
        }
      }
    }

As you no doubt remember from the game, the LOCK component consists of two images, which show up on either side of the screen when somebody's got a lock on you. So, the programmers defined the VIEW chunk as taking up the entire screen, and went on to specify more precise positions inside the DATA chunks for each image.
Note that, in what I posted above, there are four DATA chunks, two in the HARD form and two in the SOFT form, containing almost the exact same data, except for the first line, which, as you may have guessed, is the number of the MAT file. So, the two forms take the same-sized part from the same coordinates in two different images (903 and 953). What is going on? I don't know. It may be that the HARD form has something with 3Dfx, but I can't check. At any rate, you when moving components around, you will need to make the same changes in both forms.

Anyway, let's take a closer look at a single DATA chunk:
Code:
          CHUNK "DATA"
          {
            long 903
            float 25.0
            float 170.0
            float 84.0
            float 29.0
            float 0.06
            float 0.43
            float 0.38
            float 0.54
          }
The next two floats are the coordinates of the top left corner of the image. These are not coordinates on a 640x480 screen (well, in this case they actually are) - they are offsets from the top left corner as defined in the VIEW chunk.
The next two numbers are the length and height of the image. I'm not sure if they are actually used by the game for anything, but they do coe in useful sometimes.
The last four numbers are interesting. These are the top left and bottom right corners of the area to be taken from the MAT file (since 903/953 contains graphics for several different components). However, instead of giving the coordinates in pixels, the programmers used percentage-based coordinates instead. Why they did so, I have no idea whatsoever.

Anyway, we're rapidly approaching the end of my knowledge. One thing that needs to be pointed out now is that some components are in sync with each other. An example of this is the GUNP, AFBN and RADA components. GUNP and AFBN components are positioned on either side of the RADA component. Of course, if you alter the graphics, this may no longer be the case.

Finally, a note about the MATs. As you know, certain MATs appear to be hardcoded.
However, so were the capship VDUs, and we got around that, by specifying a MAT number way beyond the range of the hardcoded ones (for example, our Ralari has 468 specified as its VDU image - which, taking into account the offset, ends up being 1401.MAT)
So, I would advise you to try the same method here - instead of trying to modify the existing component MATs, change the references inside the cockpit files to a different number. The game is programmed that when a cockpit requests something from 903/953, it should provide the hardcoded version instead... but if you refer to any other number, it should simply use whatever MAT file you specify.

Well, I think that's just about all I know about cockpit files... hopefully that's all you will need.

Hey KW, since I've gone to such lengths, maybe you should take this stuff and put it up on your site as a tutorial :).
 
Haven't read your post yet Q, but let me empty my clipboard with some bullet.iff discoveries I stumbled upon while testing your (my?) er...... our ferret :p

Code:
      long 2                  //bullet ID
      long 233                //name 
      long 153                //sound
      float 1800.0            //speed
      float 2500.0            //range
      float 0.0               //charge time
      float 20.0              //energy
      float 30.0              //damage
      float 0.35              //refire delay
      long 0                  //needs ammo
      long 0                  //?
      long 1                  //?
      float 0.2               //red flash ammount
      float 1.0               //green flash ammount
      float 1.0               //blue flash ammount
      float 1.0               //?
      long 1                  //bullet appearance type
      long 7500               //mat
      float 3.0               //mat width
      float 9.0               //mat length

What's new? There's three float values for RGB color of the flash of light that reflects on the ship when it fires its guns, and "bullet appearance type" controls exactly what it sounds like it does... 0 seems to indicate the bullet uses a mesh (though I haven't tested that because none of my bullets use meshes), 1 indicates the texture is shown parallel to the screen (mass driver, dust cannon, stormfire) and 2 indicates the texture is shown "tilted forward" (tachyon, ion, cloudburst, laser)


EDIT: I just noticed you posted a whole lot of info here, Q, more than I had noticed at first glance... Thanks a lot man! I'm going offline now, gonna get myself a cup of coffee and try to absorb all that info before todays soccer game starts :p Thanks again :D

--Eder
 
I just tried out cockpit editing, and not surprisingly, everything seems to work like you said it does, Q. :)
This really adds more customization than I ever expected to have... especially being able to assign any mat to the HUD gauges (haven't tried it with all of them, only with the "shields and some curvy background thingie" which eddie mentioned, and at least for those two, it works, seemingly without any flaws.

If all the other gauges turn out to be as customizable as this one, and if I make up my mind about wheter it's a good idea or not, I might get rid of the struts and use 2D graphics exclusively...

--Eder
 
Hey Q.... I think the decoy information is stored in the second data chunk of the MSSI form, though I haven't tried changing it... but there aren't too many 14x14 images related to missiles, so I guess it's pretty safe to assume that it's the decoys :)

--Eder
 
MSSI form? I never thought of checking that :). Can you give it a try to be sure?

I just tried out cockpit editing, and not surprisingly, everything seems to work like you said it does, Q.
Heh, if you knew how much of this stuff I made up as I went along yesterday, you would be surprised :). I'd never bothered with cockpit MATs before, so all that stuff was pure speculation. Glad to hear it works, though... maybe we could see a screenshot? And very glad to see you making progress with bullet.iff :). We should compile all the bullet.iff-related info into a short tutorial too.

Regarding 100% 2D graphics, I'd advise you to give that a lot of thought before going for it. I always loved the old cockpits, but there is a lot of people who thought that the 'turn off cockpit' option was a godsend when it appeared in Armada. Of course, even such pathetic creatures would have to admit that having all the subsystems drawn directly on the cockpit instead of the HUD would be appropriate for the era.
...On the other hand, I was kinda hoping you'd take advantage of the strut-editing possibilities to make 3D representations of the original cockpits... you know, so we could steal them for UE ;).

In the meantime, we really need to find someone with 3Dfx to help you test this sort of stuff. Pedro tells me that all the cockpit graphics are semi-transparent in 3Dfx (but he's got a different graphics card now)... and I still have no idea what the hell 903 is supposed to be. Any ideas?
 
Originally posted by Quarto
MSSI form? I never thought of checking that. Can you give it a try to be sure?

Sure, I'll do that today when I work on the Rapier's cockpit. It's looking good so far (In Adobe Photoshop, at least :p).... it's like a WC4-style version HUD, but using the original WC2-style gauge placement.

Originally posted by Quarto
We should compile all the bullet.iff-related info into a short tutorial too.

We should certainly do that... we're almost running out of unknown values to play around with.

Originally posted by Quarto
Regarding 100% 2D graphics, I'd advise you to give that a lot of thought before going for it. I always loved the old cockpits, but there is a lot of people who thought that the 'turn off cockpit' option was a godsend when it appeared in Armada. Of course, even such pathetic creatures would have to admit that having all the subsystems drawn directly on the cockpit instead of the HUD would be appropriate for the era.
...On the other hand, I was kinda hoping you'd take advantage of the strut-editing possibilities to make 3D representations of the original cockpits... you know, so we could steal them for UE.

Don't worry, I'll give this one a LOT of thought. I'm going to make sure Standoff looks both a) nothing like WCP/SO and b) great in either d3d or 3dfx (I won't care too much about software mode, I have to admit)

Originally posted by Quarto
I still have no idea what the hell 903 is supposed to be. Any ideas?

Looks like 953, minus the transparent backgrounds. My guess is that whatever it is, it's "outdated" by it's hardcoded counterparts, and therefore, pretty much useless....

--Eder
 
Originally posted by Eder
(I won't care too much about software mode, I have to admit)
But then again, who does? :)

Looks like 953, minus the transparent backgrounds. My guess is that whatever it is, it's "outdated" by it's hardcoded counterparts, and therefore, pretty much useless....[/QUOTE]
I wouldn't be too sure of that. If it's outdated, why would it be used inside the cockpit files? I can understand obsolete graphics being shipped with the game, but I simply don't see why they would still be linked to the rest of the game. One option would be that HARD actually means software (and that these are the images used in software), and SOFT means D3D.

In the meantime, there's a form in the BACK component called SHAR. Try changing it to SOFT - in theory, this should make those 3Dfx thingies show up in D3D.
 
Back
Top