Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Black Wolf on October 13, 2010, 08:47:02 am

Title: Weapon Icons vs. Tech Models
Post by: Black Wolf on October 13, 2010, 08:47:02 am
Don't know if this counts as a bug or a feature request, but I noticed something a little less than ideal with the Tech Models system in weapons.tbl. It seems that defining a tech model for use in the loadout screen results in any custom icons being replaced with those side on shots of the model. I've got no problem with those little shots normally (they're good for people who don't want to make icons), but I've made some FS1 style weapon icons for the weapons in question, and I was really hoping to use them. It makes everything look more consistent, plus there're more options with Icons (integrating text, for example).

Any ideas how difficult it would be to get these two features to work with each other?
Title: Re: Weapon Icons vs. Tech Models
Post by: Zacam on October 13, 2010, 02:53:52 pm
The only thing I can think of right now, would be some sort of +override option in ships.tbl/tbm that you can set that will show the Icon, but still show the 3D Weapon Model in the rotating view.

I'll take a look at it. (Unless someone beats me to it)
Title: Re: Weapon Icons vs. Tech Models
Post by: Nuke on October 13, 2010, 03:57:12 pm
i think a graphic icon with a model overlay might look better. or what zacam said. you should be able to explicitly say "use the icon instead and use the model for the spinney view" or "use the model to generate an icon" also id like to see the -ship_choice_3d and -weapon_choice_3d flags removed from the launcher and made as options in the table. or you can also use the very presence of a graphic icon to tell the game to override the game generated icon. but actually having a table flag might be more intuitive.
Title: Re: Weapon Icons vs. Tech Models
Post by: mjn.mixael on October 13, 2010, 04:03:04 pm
Uh....an override option is best. Or the model being default unless the icon is included with the mod.
Title: Re: Weapon Icons vs. Tech Models
Post by: Nuke on October 13, 2010, 04:04:35 pm
i just think +override is a horrible name for a flag. its used in way too many places and an uninitiated user would most likely have to look it up in the wiki to figure out what it does. it should be someting like +force 2d icon: yes/no
Title: Re: Weapon Icons vs. Tech Models
Post by: Zacam on October 13, 2010, 04:27:25 pm
I used +override in the example to get the point across that it would be an option for the Icon to over-ride on the left of a load-out display to show the icon while weapon3d is on so that you still get the show model in the right.

It'll probably actually be "+ForceIcon"

Edit: K. Got it to where +ForceIcon part works.

Downside is, it will also replace the Tech_Model animation as well, since for whatever reason "wl_load_icons" was created in such a way that the techroom animation is considered part of the "icon"

Edit the Second: Or, I could just have been a dumbass. Fixed.
Title: Re: Weapon Icons vs. Tech Models
Post by: Zacam on October 13, 2010, 10:46:18 pm
Because I can.

So, say you haven't made a $Tech Model:, you don't have (or don't want) an anim, you want an icon, but you still want weapon_choice_3d to mean a damn.

No problem.

**Edit the Second: Feature posted for review on Internal, hopefully coming soon to a Nightly near you.
Title: Re: Weapon Icons vs. Tech Models
Post by: Black Wolf on October 16, 2010, 04:08:18 am
Woo :D

Many thanks Zacam.
Title: Re: Weapon Icons vs. Tech Models
Post by: mjn.mixael on November 24, 2010, 06:22:48 pm
Sorry to bump this one...

Did this make it into a nightly?

Any new flags besides +ForceIcon?
Title: Re: Weapon Icons vs. Tech Models
Post by: Zacam on November 24, 2010, 07:27:24 pm
Actually, this did NOT make it into a Nightly. Revamping the system actually that will do away with the "-weapon_choice_3d" to begin with.

It will still allow the ability to over-ride Models showing as Icons, but it'll do it as a series of flags off $Tech Model and $Tech Anim instead of adding in a whole new single-use flag to the tables.

Here is a draft proposal for how to handle the Loadout Screen and "$Tech Model:" vs "$Icon:" and "$Anim:"

weapon_choice_3d - Deprecated and turned off.
$"Tech Model:" get's a +Flags: section consisting of ( "no icon" or "force icon" ) and/or ( "no anim" or "force anim" )

Here is how those Flags and interaction would then happen with "$Icon:" and "$Anim:"

$Icon:
   1: "$Tech Model:" if "+Flags: ("force icon")"
   2: "$Model File:" if "$Tech Model:" is <NONE> and "+Flags: ("force icon") set
   3: "$Icon:" if specified and the above are not true
   4: "$Tech Model:" if no "+Flags" are set and there is no "$Icon:" specified
   5: "$Model File:" If no "$Tech Model:" or is "Flags: ("no icon")" and no "$Icon:" defined
   6: "$Name:" text is displayed if no "$Tech Model:" (or it is set "no icon") and no "$Model File:" exists

$Anim:
   1: "$Tech Model:" if "$Flags: ( "force anim" )" is on
   2: "$Model File:" if "$Tech Model:" is <NONE> and "+Flags: ( "force anim" ) set
   3: "$Anim:" if specified and the above are not true
   4: "$Tech Model:" if no "+Flags" are set and if "$Anim:" not defined
   5: "$Model File:" If no "$Tech Model:" or "+Flags: ("no anim")" and no "$Anim:" defined
   6: If no $Tech Model: (or set to "no anim") or $Anim OR $Model File: show nothing
         (or a Text box saying "No Animation to Display")
Title: Re: Weapon Icons vs. Tech Models
Post by: mjn.mixael on November 24, 2010, 07:39:58 pm
That's all gibberish to me, but it seems like a good idea!
Title: Re: Weapon Icons vs. Tech Models
Post by: Black Wolf on January 05, 2012, 09:48:45 am
:bump:

This came up on IRC, did anything ever come of it Zacam?

[EDIT]And, of course, mere seconds after I bump this topic, Zacam turns up. Whoops. :nervous:
Title: Re: Weapon Icons vs. Tech Models
Post by: Zacam on January 05, 2012, 09:58:59 am
Other than me suffering a migraine trying to understand/rewrite the -weapon_choice_3d to work with it...

Sadly, no, not much. I also encountered the same style of problem attempting to add a related feature for Mjn regarding view_pos and view_zoom for displayed models in weapon select.

I need to get back to those and have another stab at it.


Normally, I'd have an aneurysm at a 1yr thread bump, but in this case, I find it acceptable so no worries there.
Title: Re: Weapon Icons vs. Tech Models
Post by: karajorma on January 05, 2012, 08:17:23 pm
When I have time I would be willing to take a look at this. Last feature I coded was in this field after all. I still haven't committed it cause I'm still unhappy that it causes a bug to do with tech models instead of weapon icons.