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

feat: improve building IWD and IPak obj containers #286

Merged
merged 49 commits into from
Jan 3, 2025

Conversation

Laupetin
Copy link
Owner

@Laupetin Laupetin commented Oct 14, 2024

Previously

Currently building IPaks is pretty annoying and building IWDs is not implemented yet.
Previously OBJ containers had to be built as seperate targets.
If they were supposed to include obj data for assets from the built zone they had to include an assetlist which have not been generated automatically and have a fully defined zone file.

// zone_raw/mod/mod.zone
build,mod_ff
build,mod_ipak
// zone_raw/mod/mod_ff.zone
>game,T6
>name,mod
>type,fastfile
>level.ipak_read,mod
include,content
// zone_raw/mod/mod_ipak.zone
>game,T6
>name,mod
>type,ipak
include,content
// zone_raw/mod/content.zone
image,image1
image,image2
xmodel,xmodel1
// ...

Now

This PR tries to unify the building process of fastfile and additional obj containers into a single target.
This aims to improve building of IPaks, IWDs and in the future soundbanks.

// zone_raw/mod/mod.zone
>game,T6
>name,mod
>ipak,mymoddedipakname
>iwd,mymoddediwdname

image,image1
image,image2
xmodel,xmodel1

This is supposed to result in a built mod.ff, mymoddedipakname.ipak and mymoddediwdname.iwd.
The IPak and IWD contain all supported obj data of the assets that follow.

You can switch to another IWD or IPak by redefining >ipak,newipak or >iwd,newiwd respectively.
This will cause all following obj data to go into a new obj container.
This way you can split data.

Specifying the respective metadata key with an empty value >ipak, or >iwd, then you can stop writing data to this obj container.

Closes: #27

@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch 5 times, most recently from 34f54a8 to 252d3b8 Compare October 19, 2024 20:37
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch from 526ea8c to 20433b7 Compare October 28, 2024 18:42
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch 2 times, most recently from 900260e to 6295500 Compare November 17, 2024 21:14
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch 3 times, most recently from 4eb71eb to ffe0600 Compare December 15, 2024 14:12
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch 6 times, most recently from 4e13645 to bf481eb Compare December 24, 2024 07:53
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch 4 times, most recently from 57d68d1 to 68d6470 Compare December 31, 2024 11:40
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch from 3bd1464 to a7254aa Compare January 2, 2025 11:57
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch from dccf16b to dfd6e41 Compare January 2, 2025 17:00
@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch from 6e97383 to 9097db7 Compare January 2, 2025 21:39
@Laupetin Laupetin marked this pull request as ready for review January 2, 2025 22:16
@Laupetin
Copy link
Owner Author

Laupetin commented Jan 2, 2025

It turned out that implementing these kinds of features required a bigger rewrite than i initially thought.
So I took the chance and restructured everything for a future separation of asset compilers and asset loaders.

I hope this is not breaking anything, i will test thoroughly and write more unit tests before a release i guess.

@Laupetin Laupetin mentioned this pull request Jan 2, 2025
@Laupetin
Copy link
Owner Author

Laupetin commented Jan 3, 2025

This does not add support for ending containers early by omitting name.
The parser does not currently emit new line tokens which means that an omitted value would prefetch the next token which could be from the next line.

So this would require a bigger adaption to the ZoneDefinition parsing which i might only add after introducing ANTLR4..

@Laupetin Laupetin force-pushed the feature/obj-container-improvements branch from 3a75832 to b84c719 Compare January 3, 2025 13:55
@Laupetin Laupetin merged commit a781aae into main Jan 3, 2025
3 checks passed
@Laupetin Laupetin deleted the feature/obj-container-improvements branch January 3, 2025 14:16
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.

IWD project type
1 participant