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

Implement parsing of espm records: SHOU, SLGM, WOOP, WTHR. #2109

Open
Pospelove opened this issue Aug 9, 2024 · 4 comments
Open

Implement parsing of espm records: SHOU, SLGM, WOOP, WTHR. #2109

Pospelove opened this issue Aug 9, 2024 · 4 comments

Comments

@Pospelove
Copy link
Contributor

Pospelove commented Aug 9, 2024

Implement parsing of espm records: SHOU, SLGM, WOOP, WTHR. Each record will have a corresponding .h and .cpp file. Additionally, include them in the following location: https://github.com/skyrim-multiplayer/skymp/blob/main/libespm/include/libespm/Records.h.

Documentation for the data format can be found here: https://en.uesp.net/wiki/Skyrim_Mod

Where to add: https://github.com/skyrim-multiplayer/skymp/tree/main/libespm
Examples are also available there 🙂

**UPD: EspmTest.cpp needs to be updated with tests for new espm records. ask skymp team for testing record IDs. **

@Pospelove
Copy link
Contributor Author

@ellipsis-dev do this

Copy link

ellipsis-dev bot commented Aug 11, 2024

🚀 This implementation plan was created by @ellipsis-dev

Tag me (@ellipsis-dev) in a comment with guidance if you want me to replan or to implement this plan.

Implementation Plan

Step 1: Define SHOU class in SHOU.h

Path: libespm/include/libespm/SHOU.h
Create SHOU.h in libespm/include/libespm/. Define class SHOU : public RecordHeader with a Data struct and GetData method, similar to SLGM.

Step 2: Implement SHOU.cpp

Path: libespm/src/SHOU.cpp
In libespm/src/SHOU.cpp, implement SHOU::GetData using RecordHeaderAccess::IterateFields, similar to SLGM.cpp.

Step 3: Define SLGM class in SLGM.h

Path: libespm/include/libespm/SLGM.h
Create SLGM.h in libespm/include/libespm/. Define class SLGM : public RecordHeader with a Data struct and GetData method, similar to SHOU.

Step 4: Implement SLGM.cpp

Path: libespm/src/SLGM.cpp
In libespm/src/SLGM.cpp, implement SLGM::GetData using RecordHeaderAccess::IterateFields, similar to SHOU.cpp.

Step 5: Define WOOP class in WOOP.h

Path: libespm/include/libespm/WOOP.h
Create WOOP.h in libespm/include/libespm/. Define class WOOP : public RecordHeader with a Data struct and GetData method, similar to SLGM.

Step 6: Implement WOOP.cpp

Path: libespm/src/WOOP.cpp
In libespm/src/WOOP.cpp, implement WOOP::GetData using RecordHeaderAccess::IterateFields, similar to SLGM.cpp.

Step 7: Define WTHR class in WTHR.h

Path: libespm/include/libespm/WTHR.h
Create WTHR.h in libespm/include/libespm/. Define class WTHR : public RecordHeader with a Data struct and GetData method, similar to SLGM.

Step 8: Implement WTHR.cpp

Path: libespm/src/WTHR.cpp
In libespm/src/WTHR.cpp, implement WTHR::GetData using RecordHeaderAccess::IterateFields, similar to SLGM.cpp.

Step 9: Add includes to Records.h

Path: libespm/include/libespm/Records.h
Add #include "SHOU.h", #include "SLGM.h", #include "WOOP.h", #include "WTHR.h" to libespm/include/libespm/Records.h.

Step 10: Add tests for new records

Path: unit/EspmTest.cpp
In unit/EspmTest.cpp, add test cases for SHOU, SLGM, WOOP, and WTHR following existing test patterns.


Questions? Check out our documentation. Leave 👍/👎 on this plan to give us feedback.

@Pospelove
Copy link
Contributor Author

hey @ellipsis-dev can you implement this?

Copy link

ellipsis-dev bot commented Aug 11, 2024

Pull request created: #2113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant