Git Product home page Git Product logo

mackiloha's Introduction

Mackiloha CI

A suite of modding software for hacking milo engine based games. This is still very much a work-in-progress project. So don't expect perfection. Although feel free to submit issues for any bugs found. The latest CI build can be found here.

DOWNLOAD

Overview

Ark Helper

CLI tool for unpacking/repacking .ark archives from milo. Should work with Amplitude (PS2) up to RB3. For dta/dtb serialization support, download dtab and place in same directory as ark helper executable.

Usage:

  • Extract ark archive:
    • Everything: arkhelper ark2dir main.hdr ext_dir -a
    • Everything + convert scripts: arkhelper ark2dir main.hdr ext_dir -a -s
  • Repack ark archive:
    • Amp/KR/AntiGrav PS2: arkhelper dir2ark ext_dir gen_dir -n "MAIN" -v 2
    • GH1/GH2 PS2: arkhelper dir2ark ext_dir gen_dir -n "MAIN"
    • GH2 360: arkhelper dir2ark ext_dir gen_dir -e
    • RB1 Patch: arkhelper dir2ark ext_dir gen_dir -n "patch_ps3" -e -f -v 4
    • RB2/TBRB/GDRB PS3: arkhelper dir2ark ext_dir gen_dir -n "main_ps3" -e -v 5
    • RB3 360: arkhelper dir2ark ext_dir gen_dir -n "main_xbox" -e -v 6

P9 Song Tool

CLI tool to assist in venue authoring for TBRB.

Usage:

  • Create new project: p9songtool newproj -n temporarysec project_temporarysec
  • Create project from milo: p9songtool.exe milo2proj -m temporarysec.mid temporarysec.milo_xbox project_temporarysec
  • Generate milo from project: p9songtool.exe proj2milo project_temporarysec temporarysec.milo_xbox

SuperFreq

CLI tool for unpacking/packing rnd archives from milo games. These files usually use the extensions: .gh, .kr, .milo, .rnd

Warning: Game compatibility is very limited. Editing archives for games beyond GH2 will have mixed results.

Usage:

  • Extract rnd archive: superfreq milo2dir test.milo_ps2 ext_test --convertTextures --preset=gh2
  • Create rnd archive: superfreq dir2milo ext_test test.milo_ps2 --preset=gh2
    • Note: Any .png files in the "Tex" directory will automatically be converted and serialized to milo encoded textures

mackiloha's People

Contributors

dependabot[bot] avatar ihatecompvir avatar pikminguts92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mackiloha's Issues

[Feature Request] Support for building "Broken" v4 arks

I tried doing as suggested in #11 (comment) to rebuild a Rock Band 1 Xbox 360 TU5 patch ark using ark version 3, unfortunately, even when run with a no checksum patched xex, all that is shown is a black screen.

This screenshot from xenia, hardware gave similar results:
image
The xenia log shows a spam of the line i> F8000028 xeRtlNtStatusToDosError C0000008 => 6. I'm not sure exactly what it means, I feel like it should be causing a fatal error crash, all I know for sure is it refuses to load the rebuilt v3 patch ark.

As expected, running with a xex that wasn't no checksum patched resulted in a disc read error:
image

I tried to use a hacky workaround, using a blank v3 patch ark and pushing the patch files into main by extracting both, replacing duplicates with patch files, and rebuilding main as v3. It worked. However, many glitches came up, the worst of which was found in a short amount of testing, crashing when attempting to create a character for band tour and solo tour.

Trying to convert a png_xbox (format 26) file to png with superfreq is failing

I'm using superfreq tex2png file.png_xbox file.png --platform x360 --miloVersion 26 to convert a texture from RB3 to png, and i'm getting

Unhandled exception. System.NotSupportedException: HMXBitmapReader: Expected 0x01 at offset 0
   at Mackiloha.IO.Serializers.HMXBitmapSerializer.ReadFromStream(AwesomeReader ar, ISerializable data)
   at Mackiloha.IO.MiloSerializer.ReadFromStream(Stream stream, ISerializable data)
   at Mackiloha.IO.MiloSerializer.ReadFromStream[T](Stream stream)
   at Mackiloha.IO.MiloSerializer.ReadFromFile[T](String path)
   at SuperFreqCLI.Options.TextureToPngOptions.Parse(TextureToPngOptions op)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at SuperFreqCLI.Program.Main(String[] args) 

every time i've tried to run it

This is on a machine running Ubuntu 23.04

Rock Band 4 (PS4) Rivals ARKs not properly extracting files from patch_main_ps4_#.ark

The post-Rivals updates of Rock Band 4 use an ark patching system similar to arkhelper's patchcreator function, where there is no patch_ps4.hdr and instead uses main_ps4.hdr. The issue is twofold.

  1. The patch_main_ps4_#.ark files need to be renamed to main_ps4_#.ark starting one number greater than the last real main_ps4 ark file.
  2. The way arkhelper's ark2dir function is set up, it will only read the first instance of a file and ignore the later ones.

While arkhelper cannot properly rebuild or create a patch for any version of Rock Band 4 (which should be an issue of its own), I would at least like a solution to problem 2, to get a look at the actual scripts of Rivals instead of leftover pre-Rivals scripts.

Guitar Hero II PS2 - Repack of character anim milo with no change causes stall in PCSX2 (and likely hardware)

I found myself needing to edit the contents of funk1_main.milo_ps2 in \char\funkgh1\anims\gen while working on gh1 characters in gh2. (read funkgh1 as funk1, they are duplicates and do work) Isolating the issue down, I unpack the milo, then repack with no edits of the milo's contents, and gh2 will no longer load the character in game. Attempting to load the character freezes during the loading screen. In the PCSX2 program log, this error shows and pops up every few seconds while the game is stalled

padman: DMA Busy ID = 4b110008 ret = 0
        SB_STAT = f0000102

If I restore the unedited milo, the character will again load.
I am unpacking the milo and repacking both with no flags set. Latest version 0.0.152 Windows x64
Ex.

superfreq milo2dir "B:\gh\game_env\GEN\ext_dir\char\funkgh1\anims\gen\funkgh1_main.milo_ps2" "B:\gh\game_env\GEN\ext_dir\char\funkgh1\anims\gen\unpack\funkgh1_main"

superfreq dir2milo "B:\gh\game_env\GEN\ext_dir\char\funkgh1\anims\gen\unpack\funkgh1_main" "B:\gh\game_env\GEN\ext_dir\char\funkgh1\anims\gen\funkgh1_main.milo_ps2"

Absolute path issue on Linux when auto converting dtb to dta

Heya, I happened to notice a small issue on Linux with arkhelper + dtab.
Basically if I extract an ark, use -s, and pass an absolute path for the extract folder, the converted .dta files are not being placed in the intended extract folder, but rather that absolute path is reinterpreted to be relative to my working directory.
So for example if I run arkhelper ark2dir -s -a /tmp/GEN/MAIN.HDR /tmp/GEN/extract from my home folder ~, most of the output will be correct, but I will also get a new folder ~/tmp/GEN/extract which contains just the .dta files.
The log looks like this:

...
Wrote "/tmp/GEN/extract/world/theatre2/streams/crowd_v4_4good.vgs"
Wrote "/tmp/GEN/extract/world/theatre2/streams/encore_v5_intro.vgs"
Wrote "/tmp/GEN/extract/world/theatre2/streams/encore_v5_outro.vgs"
Wrote "tmp/GEN/extract/(..)/(..)/system/run/char/char_objects.dta"
Wrote "tmp/GEN/extract/(..)/(..)/system/run/config/arkbuild-sliptest.dta"
Wrote "tmp/GEN/extract/(..)/(..)/system/run/config/arkbuild.dta"
...

So the slash at the start gets removed. I haven't verified but I suspect it's this regex which is the problem, it seems like it will only start matching just after the initial slash when trying to drop the gen folder:

var genPathedFile = new Regex(@"(?i)(([^\/\\]+[\/\\])*)(gen[\/\\])([^\/\\]+)$");

Not sure if this is the right place to report, but replacing MOGGs in DC3 main_xbox.hdr breaks song

So I just started working on a project to decensor songs on Dance Central 3's disc and I'm currently running into the issue where when I load in the updated main_xbox.hdr and ark files, they leave the song on an infinite loading screen. I'm currently using Starships as my test subject for this. I'm also using the same method for repacking Rock Band 3's files as I was assuming DC3's was of somewhat of a similar vein. If any help could be provided if possible please, it's appreciated.

arkhelper doesn't accept relative path on Linux

While working on dtab I tested the new Linux build of arkhelper with it. If I'm in a gen folder and I give the .hdr as a relative path, I get this:

$ arkhelper ark2dir -s main_xbox.hdr out
Using dtab in Path environment variable
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/main_xbox_1.ark'.
File name: '/main_xbox_1.ark'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream.OpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at Mackiloha.Ark.ArkFile.GetArkEntryBytes(ArkEntry entry)
   at Mackiloha.Ark.Archive.GetArkEntryFileStream(ArkEntry entry)
   at ArkHelper.Apps.Ark2DirApp.ExtractEntry(Archive ark, ArkEntry entry, String filePath)
   at ArkHelper.Apps.Ark2DirApp.Parse(Ark2DirOptions op)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at ArkHelper.Program.Main(String[] args)
fish: “~/Downloads/Mackiloha_v0.0.117-…” terminated by signal SIGABRT (Abort)

But if I run arkhelper ark2dir -s $(pwd)/main_xbox.hdr out it works fine.

RB1 Patch Ark unable to be extracted

Whenever I try to extract RB1's patch v1.07 for PS3, I get the following error:


Unhandled exception. System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length. (Parameter 'value')
   at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
   at Mackiloha.AwesomeReader.ReadInt32()
   at Mackiloha.Ark.ArkFile.ReadStringIndicies(AwesomeReader ar)
   at Mackiloha.Ark.ArkFile.ParseHeader(String input, Stream stream)
   at Mackiloha.Ark.ArkFile.FromFile(String input)
   at ArkHelper.Apps.Ark2DirApp.Parse(Ark2DirOptions op)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at ArkHelper.Program.Main(String[] args)

This is using the -s and -a commands, but it doesn't work for any combination of commands.

It's strange since every other hdr file before and after seems to work, but this is the only exception. The same seems to happen for the latest RB1 update for 360.

Fix hash sorting for arks without root files

Fix string sorting by hash in milo arks that don't contain files in root directory. The 0th slot should not be reserved for (empty) when no files are listed in root. Currently affects GH1.

Workaround for dir2ark, put a random file in the root directory of archive so game will successfully load ark.

// Prevents duplicate hashes
while (stringOffsets[hash] != 0)
{
hash++;
if (hash >= stringOffsets.Length) hash = 1; // Index of 0 is reserved for empty string
}

Caused by: cce8c0a

Expected
010Editor_5JsUfuDNND

Actual
010Editor_jfIHLO1Y1v

Rock Band 2 Wii texture transparency bugs (decoding and encoding)

When converting png_wii/tex files from Rock Band 2 that have transparency, the alpha channel is lost. Converting these textures back causes a black square to be shown around the texture.
tex2png output:
rb2_player_meter_background
repacked in game representation:
image
expected:
image

When the texture is read/extracted using Dolphin's texture dumper, it is output as 2 separate textures, one matching the tex2png output and another white one (possibly the missing alpha channel?):
tex1_256x64_13692c25a38e52c1_14

Converting pngs with transparency to png_wii causes this to happen when loaded in game:
image
source png:
player_meter_background_rb2

Amplitude (2016)

This is a V9 ark, but it is XOR'd with 0xFF.

The game also requires a very specific key that differs between the ps3/ps4 versions, but that's not really an issue with this code.

I've validated that forcing a 0xFF xor on the header produces a file that the game accepts, but not without.

Milo2Gltf Unhandled exception. System.NotSupportedException: ViewSerializer: Magic 0x0C does not correspond to serializer version 0x19 (Expected 0x0E)

When I run superfreq milo2gltf metal_singer.milo_xbox gh2_metal_singer_x_360 --platform=x360 --preset=gh2_x360 I get this error:

Unhandled exception. System.NotSupportedException: ViewSerializer: Magic 0x0C does not correspond to serializer version 0x19 (Expected 0x0E)
   at Mackiloha.IO.AbstractSerializer.ReadMagic(AwesomeReader ar, ISerializable data)
   at Mackiloha.IO.Serializers.ViewSerializer.ReadFromStream(AwesomeReader ar, ISerializable data)
   at Mackiloha.IO.MiloSerializer.ReadFromStream(Stream stream, ISerializable data)
   at Mackiloha.IO.MiloSerializer.ReadFromStream[T](Stream stream)
   at Mackiloha.App.Extensions.SerializerExtensions.ReadFromMiloObjectBytes[T](MiloSerializer serializer, MiloObjectBytes entry)
   at Mackiloha.App.Extensions.MiloExtensions.<>c__DisplayClass3_0.<ExportToGLTF>b__6(MiloObject y)
   at System.Linq.Enumerable.WhereSelectListIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Mackiloha.App.Extensions.MiloExtensions.ExportToGLTF(MiloObjectDir milo, String path, AppState appState)
   at SuperFreqCLI.Options.Milo2GLTFOptions.Parse(Milo2GLTFOptions op)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at SuperFreqCLI.Program.Main(String[] args)

how do I fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.