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

Fix Bahro Cave Kadish pole snow animation #244

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

DamnBriggsy
Copy link
Contributor

@DamnBriggsy DamnBriggsy commented Oct 12, 2023

Snow ("static") animation for the Kadish pole in the Bahro Cave did not actually move due to what is likely a copy-paste error. A small change to this prp fixes the issue mentioned in #231

The Layer Animation Snow1_LayerAnim_1 had line 10 of the UVW Transform animation controller changed to
<hsMatrix44 identity="True" />
where previously it was a duplicate of line 7.

@Hoikas Hoikas added visual An issue or fix that is primarily visual objective An issue or fix that is a clear defect or improvement hacktoberfest-accepted labels Oct 13, 2023
@Hoikas
Copy link
Member

Hoikas commented Oct 14, 2023

It appears that this PR changes a number of the ObjIDs for textures used in the YeeshaCave PRP file. Can you verify that these references have not been shattered by an old PRP Shop? If you're working with a current build of PRP Shop with all PRPs opened, I would not expect for any ObjIDs to change in this PR.

image

@Hoikas Hoikas added the awaiting author This pull request or issue is blocked on a response or revision from the author. label Oct 14, 2023
@DamnBriggsy
Copy link
Contributor Author

DamnBriggsy commented Oct 14, 2023

Looking at bhro_lightsupport*0#0.hsm in BahroCave_District_Textures.prp, its ObjID is 9. When I open BahroCave.age in prpshop and save it, it seems to change BahroCave_District_YeeshaCave.prp to match. If open all 3 .prps individually in prpshop, the ObjID for the same texture is still 9. This happens in the build I have from January and the installed version currently up as the release in the repo.
I'll keep working to try and resolve this.

@DamnBriggsy
Copy link
Contributor Author

YeeshaCave prp was saved first, then the textures prp following a series of events culminating in H-uru/libhsplasma#279. Everything looks okay on my end after this.

@Hoikas
Copy link
Member

Hoikas commented Oct 17, 2023

I'm still seeing reference shattering

image

@DamnBriggsy
Copy link
Contributor Author

I cannot make this change to the PRP without it affecting the ObjIDs, no matter what combination of plasmashop version and order in which things are saved I try. What's more, even though I save the textures PRP, there are no changes to the file and it cannot be pushed along with the YeeshaCave prp on my branch. I also can't explain why it works properly in-game with the ObjIDs changed the way they are. There are no errors shown from broken texture references, despite replacing only the YeeshaCave prp in the game files with the new version.

I've done all I can think of to make this edit without affecting the ObjIDs, which much help from chat. I am completely at a loss for what else to try at this point.

@Hoikas
Copy link
Member

Hoikas commented Oct 18, 2023

I've reproduced the changes with PRPShop 2022.05.19 and pushed the result to this PR. I see no evidence of ObjID shattering in my commit. The changes in the GenericPhysicals is expected. Can you make sure the fix still works as expected?

@DamnBriggsy
Copy link
Contributor Author

DamnBriggsy commented Oct 19, 2023

This looks like it might be identical to another version of this file I created by either opening just YeeshaCave's prp or all 3 without the .age file. Regardless, the visual effect is the same (many of the textures in the age are scrambled).

The only time it's worked for me has been when the ObjIDs get messed with, and this happens when I open the .age file in prpshop. The .age file needed to be modified to have the nonexistent page removed in order to be opened in this way.

image

Snow ("static") animation for the Kadish pole in the Bahro Cave did not actually move due to what is likely a copy-paste error
@Hoikas
Copy link
Member

Hoikas commented Oct 19, 2023

I reverted my commit to this PR because I see the same breakage. According to libHSPlasma, the changes to ObjIDs made by @DamnBriggsy actually fix incorrect references already in YeeshaCave.prp. What's weird is that the game does not report any problems with the current dataset.

Hoikas added a commit to Hoikas/libhsplasma that referenced this pull request Oct 19, 2023
Previously, when a uoid is read in from the stream, the ObjID from the
stream is discarded and reassigned to the value we already know. If the
key is not already known, then the next sequential ID is given. If we
want to preserve IDs, then we probably want to preserve *all* IDs, even
those mid-stream. This is most apparent when diffing PRPs. IDs of zero
are special values to the game client that mean "always look this up by
name." This situation exists in the wild, right now, on MOULa's
BahroCave_District_YeeshaCave.prp. When this file is read, libHSPlasma
assigns sequential IDs to the `plMipmap` references in the layers if the
Textures PRP is not already loaded. If the common PRP_as_Text.py is used
to diff the PRP, a comparison is made against a random/junk value,
resulting in a spurious looking change. See H-uru/moul-assets#244 for an
example of the confusion.
@Hoikas
Copy link
Member

Hoikas commented Oct 19, 2023

As a recap, the original PRP files use an ObjID of zero to reference the textures. libHSPlasma is replacing those zeros with the actual ObjIDs in the Textures PRP.

@DamnBriggsy
Copy link
Contributor Author

Could a maintainer please remove the tag awaiting author?

@dpogue dpogue removed the awaiting author This pull request or issue is blocked on a response or revision from the author. label Oct 31, 2023
@Hoikas Hoikas merged commit 5456bad into H-uru:master Oct 31, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted objective An issue or fix that is a clear defect or improvement visual An issue or fix that is primarily visual
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants