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

[New Feature] Tiberium-specific Warheads #899

Open
3 tasks done
Bittah opened this issue Oct 26, 2022 · 0 comments
Open
3 tasks done

[New Feature] Tiberium-specific Warheads #899

Bittah opened this issue Oct 26, 2022 · 0 comments
Labels
new-feature New feature or request.

Comments

@Bittah
Copy link
Collaborator

Bittah commented Oct 26, 2022

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I have attached as much information as possible (screenshots, videos, links, etc).

Description

Allow warheads to be directly specified for tiberium types such as [Vinifera] and make the game use all of the warhead's AnimList= animations, regardless of the tiberium's Power= value.

Proposed Code (optional)

[Vinifera]
Warhead=TIBHE
[TIBHE]
AnimList=TIBXA,TIBXB,TIBXC,TIBXD,TIBXE,TIBXF,TIBXG

Additional Context

This will be necessary to prevent #898 from causing issues.

The tiberium_damage patch of ts-patches is a work-around to allow tiberium types that are supposed to do a lot of damage to infantry that walk over it to still have working chain-reaction explosions.

The issue becomes immediately apparent when the hardcoded Power= value is removed for the Vinifera tiberium type because it's supposed to behave like it has Power=100 when infantry walk over it, while still behaving like it had Power=17 when exploding in a chain-reaction.
When tiberium explodes in a chain-reaction, it displays specific animations from the C4Warhead's AnimList and the higher the Power= value of the tiberium type is, the higher the indexes of the displayed C4Warhead AnimList items need to be and if no animations with an index that's high enough are listed, no explosion will be shown at all.
This means that when Vinifera's Power value is no longer hardcoded and it has Power=100 in order to deal the appropriate amount of damage to infantry that walk over it, the number of animations that need to be specified for the C4Warhead's AnimList= key needs to be so high that the string becomes too long for the game to read (and even if the game would read it, most of the listed animations would be redundant and it'd become a nightmare to track which explosions are actually used).

So as a work-around to the problem mentioned above, the tiberium_damage patch multiplies the damage that's inflicted on infantry that walk over tiberium by 5 so that the Vinifera tiberium type can be given Power=20 in order to deal the same damage as it previously did with Power=100 (and this also solves the same issue for when mods need other tiberium types to deal a lot of damage to infantry while also being able to explode).

@Bittah Bittah added the new-feature New feature or request. label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant