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

Added projectile modification section, applies to bow and javelin #408

Merged
merged 21 commits into from
Mar 29, 2021

Conversation

ahnguyen09
Copy link
Contributor

This mod allows users to change how fast and accurate projectiles are. This mod started with trying to enhance bow gameplay.

I could not remove the delay on mouse release, but this is the next best thing. Your released arrows can be like a laser beam without affecting the damage.

I tested with +200% projectileVelMaxCharge and it felt pretty good when you also decrease the variance (increase accuracy)

@ahnguyen09
Copy link
Contributor Author

ahnguyen09 commented Mar 20, 2021

Upon further testing, the current code changes all projectiles. So Greydrawfs rocks become bullets, which is not great 😄 . I will have to change to code a little.

@healiha
Copy link
Contributor

healiha commented Mar 20, 2021

@ahnguyen09 You should try changing the Prefix condition to if (Configuration.Current.ProjectileFired.IsEnabled && __instance.m_character.IsPlayer()), it should give the expected result.

@ahnguyen09
Copy link
Contributor Author

@healiha thank you for the feedback. I figured if the users want to tweak the Greydrawf projectile, they should also be able to. The Greydrawfs could use some help 😄 . The code a bit longer but not a big deal.

@healiha
Copy link
Contributor

healiha commented Mar 20, 2021

@ahnguyen09 Looking at the code, you would have to define a list of names you want it to be applied since this function is called for all Humanoid. Greydwarfs are one thing but Fulings spears being bullet-like... 😅

@ahnguyen09
Copy link
Contributor Author

ahnguyen09 commented Mar 21, 2021

@healiha Yeah you are right also rock throw troll, many star Drager archer, and so on... 😨
.... I think I change my mind again. Because with just a slight increase in the enemy projectile. Dodge roll an attack feels much more rewarding.
Since I am conflicted, then it's better to provide an option. the Default is 0 change so it should be fine.

ValheimPlus/GameClasses/Attack.cs Show resolved Hide resolved
valheim_plus.cfg Outdated Show resolved Hide resolved
@nxPublic nxPublic added the needs updating Awaiting response from pull request author label Mar 21, 2021
@nxPublic
Copy link
Member

Seems like a good thing to have to improve bow gameplay!

@healiha
Copy link
Contributor

healiha commented Mar 21, 2021

I like the idea but it might be even better if we could add an option to change velocity and accuracy bease on current bow level to see a linear improvement.
What do you think?

development branch had changes to upstream and the projectile fired mod
should include those changes.
@ahnguyen09
Copy link
Contributor Author

@healiha I like that the idea of ramping max velocity with level. It gives you a minor reward as you level up. I look into adding it.

@nxPublic nxPublic added in progress development is in progress for bug or feature and removed needs updating Awaiting response from pull request author labels Mar 21, 2021
@ahnguyen09
Copy link
Contributor Author

List of updates:

  1. Change mod class name to end with _Patch to conform with existing style
  2. Change the namespace of the attack.cs file to conform with existing style
  3. removed the constants in the mod class and moved it into configurations
    a. The config is now changes value instead of change percentage increase/decrease
    b. I like this better anyway now that scaling is added.
  4. added ability to enable linear scaling of velocity and accuracy based on level
    a. User can now have a lot of customization around projectile scaling (or not)

Copy link
Contributor

@healiha healiha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks promising 😃

Remember to mark requested changes as resolved once done ;)

ValheimPlus/GameClasses/Attack.cs Outdated Show resolved Hide resolved
@ahnguyen09
Copy link
Contributor Author

ahnguyen09 commented Mar 22, 2021

It looks promising 😃

Remember to mark requested changes as resolved once done ;)

@healiha I think I just resolved it. I am still a little new to Contributing.

@nxPublic
Copy link
Member

Please resolve the merge conflicts and add your configuration file changes to the vplusconfig.json.

Everything else seems merge ready to me :)

@nxPublic nxPublic added merge conflicts Author has merge conflicts to resolve pending merge Admin team has reviewed and approved of PR and will merge after the next release and removed in progress development is in progress for bug or feature labels Mar 24, 2021
Copy link
Contributor Author

@ahnguyen09 ahnguyen09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nxPublic I think i resolved it. I do see the conflict when I merge the latest development.

@nxPublic
Copy link
Member

I think we need a lot better descriptions on these different configurations, we should also consider to split up the project changes into 2 different main categories, monster projectiles and player projectiles. Hit me up on discord to discuss this if you like :)

@nxPublic nxPublic added the in progress development is in progress for bug or feature label Mar 27, 2021
Copy link
Contributor Author

@ahnguyen09 ahnguyen09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@nxPublic nxPublic merged commit 7da8509 into valheimPlus:development Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress development is in progress for bug or feature merge conflicts Author has merge conflicts to resolve pending merge Admin team has reviewed and approved of PR and will merge after the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants