Modify Ammo on impact - #1687
Conversation
- Warheads can now modify ammo of the affected objects. In rulesmd.ini: [SOMEWARHEAD] ; Warhead AmmoModifier=0 ; integer
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
Starkku
left a comment
There was a problem hiding this comment.
Looks okay except for couple of small things.
|
|
What do you mean, reuse the tag name for the warhead tag? I don't remember if Ammo was used by someone else before in WH |
|
So does this mean that TransferTypes, and other attempts to make warheads modify ammo, were truly abandoned? |
|
TransferTypes have been lost in dev limbo even though they're much better than random one-off non-systematic modifiers. |
b429215 to
280b1c8
Compare
Made requested changes: - Removed obsolete code not used anymore. - Renamed tag from AmmoModifier to Ammo
|
Applied feedback and renamed the tag from AmmoModifier to Ammo. |
|
Seems to be working fine, but i didn't do any tests in multiplayer. |
|
To Chinese users:
|
The handling of merge conflicts is simply a disaster
|
As an old PR that has not yet been reviewed and approved, it obviously needs to be retested after tidying up, so I changed its test status back to "Needs testing". |
It means it worked properly at the moment i was testing it. Ammunition was being restored as it should have when warhead hit the targets. If you tested it with an early build then there is no way it would have worked, because the tag name was different back then. |
|
Also i remember @FS-21 saying he's planning to rewrite this logic, Is that still the case, or is this going to be merged anyway? Still, i tested the newest build, works fine. Didn't try multiplayer. |
|
I don't intend to push it forward, especially since it currently has a "Needs discussion" label that I don't quite understand. It's just that someone else wanted to use the functionality of this PR but it didn't work as expected after they merged it themselves, and the documentation description was too brief, so I did a simple maintenance. Since FS-21 has plans to rewrite it, I think we should wait for him to push it forward.
Well, it did work at that time, but its code did indeed have a problem, which only manifested when I updated it. Specifically, the warhead used to be read more than once, which masked the above-mentioned error, and this error was fixed in #2128, so it was exposed when I tested it after updating.
In short, the reason it originally worked was dependent on a Bug, and now that Bug has been fixed, so it is still necessary to correct the placement of its reading code. |
|
Sorry, but I don't remember mentioning I wanted to rewrite this small feature. In all case what I wanted is to to update all my PRs but due to my little free time I don't know if it is tomorrow or in a week or in a month or in an hour :-S |
|
It sounds like this PR has reached a completed state. :P |
|
It's still about the usual 'transfer type' thing. As @Metadorius suggested all these value tweak abilities should be made into a generic pattern that can support value change based on the victim's stat, which is why some similar PRs got rejected before IMO we don't have to implement a whole system right now, but perhaps it's better to decide tag pattern first so it's extendable and can be re-implemented without changing the protocol once a transfer type really happens |
|
I don't know, TransferType is a cursed feature, there were like 4 attempts to do it and they all flopped. |
|
Given the upcoming OpenYR, I think Phobos is nearly at the end of its lifecycle. I don't think there is much benefit in considering extensibility here right now; we might as well just get this merged quickly. |
In
rulesmd.ini:Note
This will not raise the ammo above the maximum defined by
[TechnoType] -> Ammo=, nor below 0.