project-cartographer / h2pc_tagextraction Goto Github PK
View Code? Open in Web Editor NEWA application made to extract assets from cache files of H2v using BlamLib by KornnerStudios.
A application made to extract assets from cache files of H2v using BlamLib by KornnerStudios.
Copied from #10
Crash on load due to improper handling of 3D BSP node. Fixed by 0c528e3
Environment objects needs the references readded. Environment pallet seems to be emptied out and environment objects has a copy made in scnr. Not sure if there is any logic that can get back whatever the original was. Maybe compare unique ID and tag type to find the original?
Copied from #10
Just barely working. Crash on load if the resource and AI resource tag block isn't deleted from the scenario resource tag block. solved by 5781246
Decorators tag block needs to be moved back from sbsp and repaired if needed.
Seems to have issues with tag references being fine in Guerilla but being empty in Sapien. This is related to the environment objects tag block in sbsp. tag block will overwrite whatever exists in scnr.
Won't look the same but we might not have a choice if we can't understand or repair the PRT tag block.
Instead of flashlight, its flashligh.
Same as the others, missing the last character.
Shared maps don't place extracted tags in the proper folder path and aren't properly named. Pretty sure this started in a21d3cc Can't really just undo this because it means shared refs won't work when we need them for bitmap data and such. Need to find a solution later.
Workaround for now involves making a copy of the shared map and extracting from that instead.
Copied from #10
Crashes on load. Appears to be because the tag extractor isn't undoing the post processing H2Tool does on package. Add the number of mass distribution tag block equivalent to the amount of objects in the physics_model tag. The mass distribution tag block gets created when the file is initially created from source JMS files and is merged with rigid bodies tag block on package.
Something is wrong with physics models that isn't post processing. See crate_space_a. crate_space_b, detail_keyplug, and fuselage_arm in 06a_sentinelwalls.map. I'll look into this more when I can.
Will have to set this to be ignored since we don't actually have this shader template.
Using an extracted collision model or physics within a tag cause sapien crashes.
Animations that make use of the inheritance reference still have inheritance related tag blocks in their modes tag block. Need to clear modes of invalid indexes.
Copied from #10
Due to post processing H2Tool does on package, the tag does not function for it's intended purpose. Must be remade from scratch. Data within can be used to remake the shader properly. Data changes completely from what H2Sapien expects.
Copied from #10
Mostly comes out without issue. Acceleration values have some math done on them on package and the tag extractor does not undo this. Use "X^(-1)" to undo. X is the extracted value. Solution provided by 07bc53a
Dead sphere shapes, pill shapes, sphere shapes tag block should be empty as these don't exist until the tags are packaged.
Copied from #10
cache_file_sound is what is given instead of the .sound tag. Code to reconstruct the sound tag might be incomplete.
Copied from #10
Same issue with render_models (see #15) where everything after section will not be written. Unlike render_models this does not have anything to do with resource maps. My theory is that the geometry classification is causing it to store the mesh data in a different way from render_models. I have no proof for this though.
What the title says. Will look into why H2Guerilla won't open them at times. Typically when the particle tag is 3kb in size is a trend I've noticed..
Copied from #10
Comes out without issue unless it references something to inherit animations from it. This must be undone as the blocks that were added from this will remain and will reference invalid animation indexes. Can cause crashing during packaging or during map loading. All that you have to do is delete any animations blocks that do not have a -1 value as a graph index as that means it is referencing the data from a different source.
Copied from #10
Can be used without issue.
The nodes tag block and the flag "has runtime nodes" needs to be undone as these don't exist until they are packaged.
Copied from #10
Appears to be missing bitmap data a majority of the time among other things. Seems to be an issue with the extractor not loading the resource maps. Fixed by 0600328
Has issues beyond this where even if the bitmap data is internal then it may not be written for whatever reason.
Something is preventing them from being compressed in H2Tool. This means that extracted bitmaps can't be reused until the cause is found and fixed. Worked around by Project-Cartographer/H2Codez@f4adbbc
When selecting a tag type all the tags under that tag and the tag type itself count towards the total number of tags. So if there is 10 weapons and you select weap then the count will be 11.
Tag count isn't cleared on map close.
If the tag type tree isn't open then it will only add 1 to the tag count.
Haven't really caused problems yet and they aren't big issues but should prob do something about this.
I will be listing issues with tag groups here and possible causes and solutions if known.
physics_model/phmo
Crashes on load. Appears to be because the tag extractor isn't undoing the post processing H2Tool does on package. Add the number of mass distribution tag block equivalent to the amount of objects in the physics_model tag. The mass distribution tag block gets created when the file is initially created from source JMS files and is merged with rigid bodies tag block on package. Worked around by 628b95a Will need a proper fix at some point as Havok active physics objects won't work without proper mass distribution values. Current best solution would be to read the dumped tag and dump that to a JMS file to be reimported. https://pastebin.com/h6WUDFDZ
Block index in physics models that make use of the phantom tag block are set to unused. This has to be undone.
Objects with repaired Phantom meshes can cause death. Looking into this when I can. Seems to be related to Havok
collision_model/coll
render_model/mode
Mesh itself is fine but weights and/or node indexes in the parts tag block aren't filled in properly. This means rigged models have to be remade since their weights are missing.
Some models can be missing everything after the section tag block entirely such as the grunt which means they are just an empty render_model file with no mesh data. Seems to be fixed by 0600328
If the render_model has PRT_info then this needs to be cleared as it will cause a crash on load. The crash in H2Sapien is because the render_model is missing the PRT specific shaders but I have no idea what state it would be after this. Seems fixed by 26f718a
Render models made with the DAE converter don't seem to get their raw vertices tag block written. This is because the DAEConverter doesn't fill in the section info block.
sound/!snd
shader/shad
Due to post processing H2Tool does on package, the tag does not function for it's intended purpose. Must be remade from scratch. Data within can be used to remake the shader properly. Data changes completely from what H2Sapien expects. Workaround provided by e4e36f3
Some quick notes on shaders. https://pastebin.com/FmqmP6F9
model/hlmt
Can be used without issue.
The nodes tag block needs to be undone as these don't exist until they are packaged. Fixed by a292b2a
The flag "has runtime nodes" needs to be undone as these don't exist until they are packaged. Fixed by fcfe0c6
biped/bipd
Mostly comes out without issue. Acceleration values have some math done on them on package and the tag extractor does not undo this. Use "X^(-1)" to undo. X is the extracted value. Solution provided by 07bc53a
Dead sphere shapes, pill shapes, sphere shapes tag block should be empty as these don't exist until the tags are packaged. Fixed by a292b2a
scenario/scnr
Just barely working. Crash on load if the resource and AI resource tag block isn't deleted from the scenario resource tag block. solved by 5781246
Decorators tag block needs to be moved back from sbsp and repaired if needed.
Seems to have issues with tag references being fine in Guerilla but being empty in Sapien. This is related to the environment objects tag block in sbsp. tag block will overwrite whatever exists in scnr.
Scenario cluster data tag block needs its sbsp reference readded. Just add it back in the same order as structure bsp
Structure BSP lighting tag block needs it's sbsp reference readded. Just add it back in the same order as structure bsp
scenario_structure_bsp/sbsp
Crash on load due to improper handling of 3D BSP node. Fixed by 0c528e3
Environment objects needs the references readded. Environment pallet seems to be emptied out and environment objects has a copy made in scnr. Not sure if there is any logic that can get back whatever the original was. Maybe compare unique ID and tag type to find the original?
Predicted resource tag block needs to be cleared. Fixed by a292b2a
model_animation_graph/jmad
device_machine/mach
bitmap/bitm
Appears to be missing bitmap data a majority of the time among other things. Seems to be an issue with the extractor not loading the resource maps. Fixed by 0600328
Has issues beyond this where even if the bitmap data is internal then it may not be written for whatever reason. Not happening as of commit 0600328 so it was probably resource map related to and I just guessed wrong.
Something is preventing them from being compressed in H2Tool. This means that extracted bitmaps can't be reused until the cause is found and fixed. Worked around by Project-Cartographer/H2Codez@f4adbbc
scenario_structure_lightmap/ltmp
light_volume/MG32
vehicle/vehi
vehicle/vehi
particle/PRT3
What the title says. Will look into why H2Guerilla won't open them at times. Typically when the particle tag is 3kb in size is a trend I've noticed. Appears to be some issue with block size in the particle function area. I believe the issue is that some functions are different sizes and Blamlib isn't handling this correctly.
Also should look into clearing the processed particle data from the file. It seems it's still there in hex and Guerrilla does get rid of it when the file is saved but might as well take care of it here and now.
decorator_set/DECR
Copied from #10
Mesh itself is fine but weights and/or node indexes in the parts tag block aren't filled in properly. This means rigged models have to be remade since their weights are missing.
Some models can be missing everything after the section tag block entirely such as the grunt which means they are just an empty render_model file with no mesh data. Seems to be fixed by 0600328
If the render_model has PRT_info then this needs to be cleared as it will cause a crash on load. The crash in H2Sapien is because the render_model is missing the PRT specific shaders but I have no idea what state it would be after this. Crash was actually caused by post processing on the mesh. Fixed by 26f718a
Render models made with the DAE converter don't seem to get their raw vertices tag block written.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.