Skip to content

[Bugfix + Enhancement] Sword Trail fixes and enhancements#1473

Merged
Kenix3 merged 8 commits intoHarbourMasters:developfrom
digita-LUNA:trail_rework
Sep 21, 2022
Merged

[Bugfix + Enhancement] Sword Trail fixes and enhancements#1473
Kenix3 merged 8 commits intoHarbourMasters:developfrom
digita-LUNA:trail_rework

Conversation

@digita-LUNA
Copy link
Contributor

@digita-LUNA digita-LUNA commented Sep 14, 2022

After Noting some issues with trails in SoH, this should take care of most bugs/inaccuracies relating to them, as well as adding & fixing customization options.

FIXES

  • Fixes all trails having the properties of Link's sword trails when Custom trails are disabled, now having their proper colors and lengths
  • Fixed buggy interpolation on Link's Sword trails

ENHANCEMENTS

  • Better Trail colorization allowing for separate colors for Swords, the Boomerang, and Bombchus
  • Bombchus will now glow the color of their trail.
  • Added customization for Normal Arrow trails. Elemental arrow trails match the colors of their effects unless specified.
  • Added option for each sword to have its own trail color. Includes Deku Sticks and Megaton Hammer.

TODO

  • Clean and optimize handling of trail types
  • Clean up GUI of the Cosmetic Editor
  • Separate Arrow Trail Colors

@PurpleHato
Copy link
Member

I would personally not include 3D bombs if it's not using the bomb model, I know the 3D model can't be recoloured, but in this case it's better to leave it 2D in my opinions

Does this is still changing the arrow trails from the elemental arrow color? If yes, this should be an option with a checkbox, and also allow the people to choose their own arrow color trail if they want to, so they are not forced to have a trail color custom if they use custom colour for elemental arrows

@briaguya0
Copy link
Contributor

please split this into multiple PRs, it's a lot easier to review PRs that address one thing than a hodgepodge of fixes and enhancements. i've seen PRs like this sit unmerged for months because one of the enhancements wasn't perfect, even though the rest of the PR was great.

@digita-LUNA
Copy link
Contributor Author

Working on removing anything not related to trails now.

@jbodner09
Copy link
Contributor

Can you please rename and update the description so that it only describes what's currently in this PR?

@digita-LUNA digita-LUNA changed the title [Bugfix + Enhancement] Sword Trail fixes, 3D bombs, and misc. fixes. [Bugfix + Enhancement] Sword Trail fixes and enhancements Sep 15, 2022
@digita-LUNA
Copy link
Contributor Author

Fixed. That's my bad. I only updated the actual description and not the name of the pr itself, that's my B!

Copy link
Contributor

@briaguya0 briaguya0 left a comment

Choose a reason for hiding this comment

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

couple things that could be cleaned up but no suggestions that would require logic changes. any comments can be addressed in a followup PR.

}

//sp30 = sp30; // Optimized out but seems necessary to match stack usage
sp30 = sp30; // Optimized out but seems necessary to match stack usage
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this uncommented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question, actually. I think it got uncommented in my mad hysteria relating to figuring out the trail code and I...guess I forgot to recomment it out.

Color_RGB8 HammerBottomCol = CVar_GetRGB("gHammerTrailBottomCol", TrailsColorOriginal);

if ((CVar_GetS32("gUseTrailsCol", 0) != 0) && (this->trailType != 0)) {
switch (this->trailType) { //there HAS to be a better way to do this.
Copy link
Contributor

Choose a reason for hiding this comment

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

this would probably feel less bad if trailType was an enum, then we'd have something like
case TRAIL_TYPE_SWORD:
case TRAIL_TYPE_BOOMERANG:
etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be fair, I'd love to know how to do that. I just kinda...don't.

Copy link
Contributor

Choose a reason for hiding this comment

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

good example here

typedef enum {
/* 0x00 */ CLEAR_TAG_CUTSCENE_ARWING = 0,
/* 0x01 */ CLEAR_TAG_ARWING = 1,
/* 0x64 */ CLEAR_TAG_LASER = 100
} ClearTagType;

probably should put that in z64effect and then instead of using u8 for trailType you could use TrailType (or whatever you end up naming the enum) as the type

}
}

//dumb doo doo command to change the type of an object's blur on the fly. Link's Swords with unique trail colors.
Copy link
Contributor

Choose a reason for hiding this comment

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

this is perfectly reasonable, just adding a method because sometimes the type needs to be changed outside of z_eff_blure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it does with swords, otherwise changing settings mid-swing with bug out a bit. That, and if it set with other things it would just be way messier. I'm surprised I called this the dumb doo doo code instead of the massive bloat setting the proper colors for everything.

@Kenix3 Kenix3 merged commit d83c6f1 into HarbourMasters:develop Sep 21, 2022
Kenix3 pushed a commit to Kenix3/Shipwright that referenced this pull request Oct 19, 2022
…ters#1473)

* Fix Trails, add more Trail Customization

* 3d Bombs; Bombchu now glow custom trail colors

* 3D Seed/Nut Model, Separate Sword Slash Colors

* Removed 3D Seeds/Nuts; Don't work properly

* restored previous removal of sword blur code

* Remove things not related to Trails

* Remove fix to random color code
@digita-LUNA digita-LUNA deleted the trail_rework branch August 15, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants