ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
632 stars 73 forks source link

[TF2] [Feature Request] Add a cheat console command for setting weapon paintkit #5464

Open ghost opened 5 months ago

ghost commented 5 months ago

Motivation

Currently the only way outside of SourceMod plugins to preview and share screenshots of how a warpaint looks inside of a map (as opposed to the previewer the game provides) is to buy a real warpaint and apply it to a real item. For some creators, this may not be desirable or even feasible as sharing how a warpaint actually looks in-game is a common action on the workshop and within the warpaint creation community to accurately represent to players what they would see if that warpaint were accepted into the game and they bought it themselves.

Ideally the request would be to allow paintkit_proto_def_index and other warpaint related item attributes to be set via VScript, however since this is off the table, an FCVAR_CHEAT console command should fulfill the same need without any of the potential item economy concerns for Valve.

Implementation

Relevant item attributes:

You could have one command with multiple parameters that sets the active weapons paintkit id and wear with a random seed.

Example command:

tf_paintkit \<paintkit id> [wear]

Example usage to apply field tested steel brushed:

tf_paintkit 411 0.5

If one command with multiple parameters is not possible or feasible, you could split it into two commands.

Example commands:

tf_paintkit_id tf_paintkit_wear

Notes

You will probably need to re-give the active weapon for the above command(s) with the following concerns:

JoriKos commented 5 months ago

Seems better to implement this into the existing itemtest command rather than having to rely purely on console commands

jh34ghu43gu commented 5 months ago

Seems better to implement this into the existing itemtest command rather than having to rely purely on console commands

Maybe I misremember but itemtest is limited to use in the itemtest map? It would be beneficial to preview skins on actual maps (ig coaltown has very bright lighting that I don't think is properly replicated in itemtest).

Also it probably wouldn't let you test with your loadouts cause it strips all your items off iirc.

Bumbo-Walrusoni commented 5 months ago

Maybe I misremember but itemtest is limited to use in the itemtest map? It would be beneficial to preview skins on actual maps (ig coaltown has very bright lighting that I don't think is properly replicated in itemtest).

No, the itemtest command is not limited to just the itemtest map.

ghost commented 5 months ago

Seems better to implement this into the existing itemtest command rather than having to rely purely on console commands

While it's ultimately up to however Valve feels like implementing it, I don't think it fits within the UI of itemtest if you were to just slap it in the middle of there because itemtest only gives you options to spawn and give bots weapons rather than yourself. Without a redesign of the UI or featureset it might make it a little cluttered or confusing for people using it as to why one set of buttons works on yourself specifically for warpaints and the rest for testing custom models on bots. You might ask why not make it so it gives the bot the warpaint, and while that would be nice, I think the main feature people are looking for is viewing warpaints within first person inspect rather than third person.

While I do think having similar stuff like this in the same place is a good idea, in my opinion with what Valve has on their plate right now I don't think it would be worth the effort vs reward to redesign the UI vs simply making a one off command for a one off feature.

JoriKos commented 5 months ago

itemtest only gives you options to spawn and give bots weapons rather than yourself.

It has worked for me, I've been able to give myself weapons that I don't have, so it should also work on war paints. Having UI support for this feature is much more beginner friendly than having to understand what the numbers on "tf_paintkit 411 0.5" mean and would require some more advanced knowledge of TF2 than simply knowing how to navigate the UI.

MeatwadMeatwad commented 5 months ago

Yes, I absolutely would love this. Though I agree with JoriKos here in that it would be more appropriate to be implemented into itemtest, or ideally its own menu. Also additionally, allowing you to apply an unusual or stat-clock to the weapon would be good too incase people want to try out making weapon unusual and to see how a stat-clock looks on the gun. If anything, creating a weapon modification menu rather than JUST warpaint application would be even better, IE. killstreak kit application and spells.