• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

[Help] Help With Shields

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
I'm looking for a way to code the shield animation so that the .sod file displays the colour of the texture file being used, rather than the status/level of the shields ingame.

I know Elrond did this with his Blue Shields mod, and I've looked through those files, but my knowledge & understanding of animation coding is very limited. I'm just trying to set it for the specific texture file I'm using (for the stock 'Xshldx01.sod' file).

As always, any help would be appreciated :)
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
You have to use sprites; the mesh will always be recolored to match shield health.
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
Yeah I get that, what I need is help writing the sprite entries themselves.
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
The shield is coloured not greyscale.

Anyone know how to do this?
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
Only if the sheild texture is grayscale.
Could you show us an example. I thought I had tried that before.

Yeah I get that, what I need is help writing the sprite entries themselves.
Sorry, I misunderstood the question. Do you mean the entries in the SPR files or in the model hierarchy?
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
Sorry, I misunderstood the question. Do you mean the entries in the SPR files or in the model hierarchy?

Both would be really helpful, the animation needs to be the same as the stock sod though since that's what the texture was made for.

Is there any way to rewrite the existing sprite entries for the stock shield sod (I think they're in the 'tex_anim.spr' file), so that the animation & hardpoint entries are the same, but the colour uses the texture colour instead of the shield status?
 
T

thunderfoot

Deleted Due to Inactivity
Former MSFC Member
I think looking at what FahreS and CABAL have done with shields may be very helpful. I also think looking into Elrond's Blue Shields Mod may give you some good examples as well.
 

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
On the hierarchy, I set up the tree as:

h_root
|------------------\
| |
h_geometry h_sprites
| |
g_mesh s_bshield_01


Then I added the following to the lights.spr file:

@reference=128
@tmaterial=additive
BlueShield1 bshield1 0 0 128 128

@sprite_node bshield BlueShield1 const (3,3) (0.3,0.3,0.3) billboard

I also had a texture labeled bshield1.tga with a single frame in color for the sprite and the mesh for the shield had a blank texture. It got me a non-animated shield effect that didn't fade from green to red. This is almost exactly what's in my shield mod, but it used more sprites. If you're only using one sprite, you probably shouldn't use the billboard tag on that last line, though.
 
Top