Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Replace" functionality from CW2 #32

Open
megascatterbomb opened this issue Sep 1, 2021 · 5 comments
Open

Add "Replace" functionality from CW2 #32

megascatterbomb opened this issue Sep 1, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@megascatterbomb
Copy link

Custom Weapons 2 has a feature that allows existing weapons to be replaced by custom weapons with custom stats. This would be incredibly useful for this plugin as developers could use custom attributes in their rebalance mods.

Use in CW2 looked like this: "replace" "425" where 425 is a weapon id.

For example: I could implement a custom attribute on the Family Business, and anyone who connects to the server and equips the Family Business normally would receive the modified version. A popup would appear with an item description so the user knows what the changes are (although I intend on documenting my balance changes elsewhere so I would greatly appreciate this popup being toggleable).

@nosoop nosoop added the enhancement New feature or request label Sep 2, 2021
@nosoop
Copy link
Owner

nosoop commented Sep 6, 2021

Definitely an idea worth looking into. That said it may be tricky to add with how persistence is currently handled, since the "no custom item" case operates on the assumption that the game will handle equipment.

The description popup idea would be tied-ish to #7 (where a plugin API would handle the menu logic in the future, leading to more flexible applications).

For the time being, you may also want to look at the basic attribute manager in Custom Attributes.

@nosoop
Copy link
Owner

nosoop commented Oct 20, 2021

The newest release adds some much desired native functionality for developers to work with; the important one for this issue is CWX_SetPlayerLoadoutItem.

However, it still holds that persistence makes this specific feature request complicated — CWX knows that it's replacing items in a particular class / loadout slot combination without having to know what item it's replacing. On the other hand, CW2/3 is way simpler since it stomps on item entities on every resupply (and so it knows what items the player has), but that's also the cause of a whole class of bugs.

All that's missing at this point is being able to determine what item would've been spawned without actually creating it. That's definitely possible; just a matter of if I'd like to introduce that additional complexity and how I'd implement that.

(The idea would be that on spawn, a separate plugin can determine if an item needs replacing, then force a specific loadout item to override user preference.)

@H20Gamez
Copy link

Hi. I was wondering if any work has been done in this certain request? I have been previously using Rebalanced Fortress 2 for my own server just so I edit default weapons. Only problem I ran into was that I wanted jarate and milk to be like the gas passer. So when I stubbled upon your TF2 Attribute fix pack I thought I was saved. Turns out it uses the way of replacing items that you are talking about here. So I was just wondering if anything has changed? My friends and I do like messing with balancing our own weapons and it would be cool to see them come into what we imagine.

@nosoop
Copy link
Owner

nosoop commented May 30, 2022

Hello — no new progress in this request on my part; I do have ideas for API changes that would make this a bit easier, CWX just hasn't been a priority for me to work on.

@H20Gamez
Copy link

Oh okay. Just wanted to check :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants