Skip to content

Commit

Permalink
merge Sewer56/master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanstuck committed Jan 21, 2024
1 parent e3c5fa6 commit 3ff0afa
Show file tree
Hide file tree
Showing 16 changed files with 342 additions and 9 deletions.
5 changes: 4 additions & 1 deletion README-LOADER.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ For more information, [please visit the documentation](https://sewer56.dev/p5rpc
- Support for hot reload (update files on the fly without game reboot).
- Automatically merges .tbl files.
- Automatically merges PAK (.bin) files.
- Automatically merges .bf and .bmd files
- Automatically merges .bf files.
- Automatically merges .spd files.

# Special Thanks

- Lipsum (zarroboogs): Original Implementation
- CherryCreamSoda: Project Logo
- Shujynx, Covfefe: Mod Test Data
- AnimatedSwine37: PAK Merging
- Secre-C: SPD Merging
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ For more information, [please visit the documentation](https://sewer56.dev/p5rpc
- Support for hot reload (update files on the fly without game reboot).
- Automatically merges .tbl files.
- Automatically merges PAK (.bin) files.
- Automatically merges .bf files
- Automatically merges .bf files.
- Automatically merges .bmd files.
- Automatically merges .spd files.

# Building

Expand All @@ -38,3 +40,6 @@ When you build your project, the files will automatically be copied to the right
- Lipsum (zarroboogs): Original Implementation
- CherryCreamSoda: Project Logo
- Shujynx, Covfefe: Mod Test Data
- AnimatedSwine37: PAK and BF Merging
- Secre-C: SPD Merging
- oceanstuck: BMD Merging
2 changes: 1 addition & 1 deletion Submodules/FileEmulationFramework
Submodule FileEmulationFramework updated 84 files
+8 −0 .github/workflows/reloaded.yml
+0 −1 .idea/.idea.FileEmulationFramework/.idea/.name
+2 −2 Emulator/AFS.Stream.Emulator/AFS.Stream.Emulator.csproj
+3 −2 Emulator/AFS.Stream.Emulator/Afs/AfsBuilder.cs
+1 −1 Emulator/ARC.Stream.Emulator/ARC.Stream.Emulator.csproj
+2 −2 Emulator/ARC.Stream.Emulator/Arc/ArcBuilder.cs
+1 −1 Emulator/AWB.Stream.Emulator/AWB.Stream.Emulator.csproj
+9 −8 Emulator/AWB.Stream.Emulator/Awb/AwbBuilder.cs
+6 −5 Emulator/AWB.Stream.Emulator/Awb/Utilities/ValueWriters.cs
+5 −1 Emulator/BF.File.Emulator/BfEmulator.cs
+3 −7 Emulator/BF.File.Emulator/BfEmulatorApi.cs
+57 −0 Emulator/Interfaces/SPD.File.Emulator.Interfaces/ISpdEmulator.cs
+9 −0 Emulator/Interfaces/SPD.File.Emulator.Interfaces/SPD.File.Emulator.Interfaces.csproj
+50 −0 Emulator/Interfaces/SPD.File.Emulator.Interfaces/Structures/IO/Structures.cs
+1 −1 Emulator/ONE.Heroes.Stream.Emulator/ONE.Heroes.Stream.Emulator.csproj
+4 −3 Emulator/ONE.Heroes.Stream.Emulator/One/OneBuilder.cs
+1 −1 Emulator/PAK.Stream.Emulator/PAK.Stream.Emulator.csproj
+10 −8 Emulator/PAK.Stream.Emulator/Pak/PakBuilder.cs
+1 −0 Emulator/PAK.Stream.Emulator/Utilities/PakReader.cs
+149 −0 Emulator/SPD.File.Emulator/.github/workflows/reloaded.yml
+9 −0 Emulator/SPD.File.Emulator/BuildLinked.ps1
+2 −0 Emulator/SPD.File.Emulator/CHANGELOG.MD
+27 −0 Emulator/SPD.File.Emulator/Config.cs
+13 −0 Emulator/SPD.File.Emulator/Constants.cs
+87 −0 Emulator/SPD.File.Emulator/Mod.cs
+65 −0 Emulator/SPD.File.Emulator/ModConfig.json
+ Emulator/SPD.File.Emulator/Preview.png
+408 −0 Emulator/SPD.File.Emulator/Publish.ps1
+7 −0 Emulator/SPD.File.Emulator/Reloaded.Checks.targets
+149 −0 Emulator/SPD.File.Emulator/Reloaded.Trimming.targets
+59 −0 Emulator/SPD.File.Emulator/SPD.File.Emulator.csproj
+338 −0 Emulator/SPD.File.Emulator/Spd/SpdBuilder.cs
+27 −0 Emulator/SPD.File.Emulator/Spd/SpdHeader.cs
+44 −0 Emulator/SPD.File.Emulator/Spd/SpdSpriteEntry.cs
+24 −0 Emulator/SPD.File.Emulator/Spd/SpdTextureEntry.cs
+133 −0 Emulator/SPD.File.Emulator/SpdEmulator.cs
+147 −0 Emulator/SPD.File.Emulator/SpdEmulatorApi.cs
+332 −0 Emulator/SPD.File.Emulator/Spr/SprBuilder.cs
+23 −0 Emulator/SPD.File.Emulator/Spr/SprHeader.cs
+19 −0 Emulator/SPD.File.Emulator/Spr/SprPointer.cs
+47 −0 Emulator/SPD.File.Emulator/Spr/SprSpriteEntry.cs
+66 −0 Emulator/SPD.File.Emulator/Sprite/SpriteBuilder.cs
+136 −0 Emulator/SPD.File.Emulator/Sprite/SpriteBuilderFactory.cs
+145 −0 Emulator/SPD.File.Emulator/Template/Configuration/Configurable.cs
+97 −0 Emulator/SPD.File.Emulator/Template/Configuration/Configurator.cs
+54 −0 Emulator/SPD.File.Emulator/Template/Configuration/ConfiguratorMixinBase.cs
+41 −0 Emulator/SPD.File.Emulator/Template/Configuration/Utilities.cs
+69 −0 Emulator/SPD.File.Emulator/Template/ModBase.cs
+41 −0 Emulator/SPD.File.Emulator/Template/ModContext.cs
+103 −0 Emulator/SPD.File.Emulator/Template/Startup.cs
+35 −0 Emulator/SPD.File.Emulator/Utilities/SpriteChecker.cs
+20 −0 Emulator/SPD.File.Emulator/Utilities/StreamUtils.cs
+33 −19 FileEmulationFramework.Tests/Emulators/AWB/AwbEmulatorTests.cs
+2 −2 FileEmulationFramework.Tests/Emulators/ONE/OneEmulatorTests.cs
+35 −0 FileEmulationFramework.Tests/Emulators/SPD/Assets.cs
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/CHAT.SPD
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/combine.spd
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/patch_sprite.spd
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/replace_sprite.SPD
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/replace_tex.SPD
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/spr_38.dds
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/spr_5.dds
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/spr_5.spdspr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPD/tex_2~66-69.dds
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/combine.spr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/menu.spr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/patch_sprite.spr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/replace_sprite.spr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/replace_tex.spr
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/spr_12.sprt
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/spr_12.tmx
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/spr_15.tmx
+ FileEmulationFramework.Tests/Emulators/SPD/Assets/SPR/tex_0~3-5.tmx
+110 −0 FileEmulationFramework.Tests/Emulators/SPD/SpdEmulatorTests.cs
+8 −4 FileEmulationFramework.Tests/FileEmulationFramework.Tests.csproj
+1 −0 FileEmulationFramework.Tests/MemoryManagerStreamTests.cs
+21 −0 FileEmulationFramework.sln
+1 −2 FileEmulationFramework/FileAccessServer.cs
+1 −1 FileEmulationFramework/FileEmulationFramework.csproj
+15 −15 FileEmulationFramework/Utilities/Native.cs
+8 −2 PublishAll.ps1
+1 −1 Submodules/Heroes.SDK
+136 −0 docs/emulators/spd.md
+1 −0 mkdocs.yml
Binary file added docs/images/SpdLooseExample1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SpdLooseExample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SpdPakedExample1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/SpdPakedExample2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ Persona Essentials is a set of miscellaneous improvements for Persona 3 Portable
- Support for injecting custom music into the game without extracting files.
- Support for hot reload (update files on the fly without game reboot).
- Automatically merges .tbl files.
- Automatically merges PAK (.bin) files.
- Automatically merges .bf files
- Automatically merges PAK (.bin) files.
- Automatically merges .bf files.
- Automatically merges .spd files.

# Building

Expand All @@ -41,3 +42,5 @@ Refer to the [usage section](./usage.md).
- Lipsum (zarroboogs): Original Implementation
- CherryCreamSoda: Project Logo
- Shujynx, Covfefe: Mod Test Data
- AnimatedSwine37: PAK Merging
- Secre-C: SPD Merging
39 changes: 37 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Then you would put your `.flow` or `.msg` file with the same name in `FEmulator\

![BFLooseExample2](./images/BFLooseExample2.png)

### Example - BF In Archivee
### Example - BF In Archive
To edit `f007.bf` in the archive `field\pack\fd007_003.arc` you would first add a dummy bf file in `FEmulator\PAK\field\pack\fd007_003.arc` (as per [the information above](#replacing-files-in-archives))

![BFPakedExample1](./images/BFPakedExample1.png)
Expand Down Expand Up @@ -191,10 +191,45 @@ In P3P and P4G `MSG.TBL` contains an embedded bmd file. To edit this place your

When BMD emulator releases you will be able to use it to edit only individual messages in this (and other) bmds, for now though you will have to replace the entire file.

## Editing SPD Files

!!! info

Essentials can be used to edit textures and sprites in SPD files such that multiple mods can edit sprites in the same texture.

[Uses FileRedirectionFramework under the hood, follow instructions here for more information.](https://sewer56.dev/FileEmulationFramework/emulators/spd.html)
Don't add dependency on SPD emulator (it's not necessary), but do follow rest of guide.

In addition to the sprite entry files `(.spdspr/.sprt)` and/or textures `(.dds/.tmx)` files you include in `FEmulator\SPD` per the above guide you may need to add dummy spd files where they would normally go in `FEmulator\PAK` (only if the spd you're editing is located in an archive).

### Example - Loose SPD

To edit the loose `CHAT.SPD` file in `FONT\CHAT` you would first create a directory mimicking the path of the spd in `FEmulator\SPD`, including the spds filename.

![SpdLooseExample1](./images/SpdLooseExample1.png)

Then you would put your sprite entry and/or texture files in `FEmulator\SPD\FONT\CHAT\CHAT.SPD\`

![SpdLooseExample2](./images/SpdLooseExample2.png)

### Example - SPD in archive

!!! info

To create a dummy spd file you can create a new empty text file and just rename it, changing the file extension.

To edit `higawari_common.spd` in the archive `CALENDAR\HIGAWARI.PAK` you would first add a dummy spd file in `FEmulator\PAK\CALENDAR\HIGAWARI.PAK` (as per [the information above](#replacing-files-in-archives))

![SpdPakedExample1](./images/SpdPakedExample1.png)

Then follow the steps for loose spds.

![SpdPakedExample2](./images/SpdPakedExample2.png)

## Releasing/Uploading your Mods

Please refer to the [Reloaded wiki](https://reloaded-project.github.io/Reloaded-II/EnablingUpdateSupport/), and follow the guidance.

You should both Enable Update Support AND Publish according to the guidelines.

It is recommended to enable update support even if you don't plan to ship updates as [doing so will allow your mod to be used in Mod Packs.](https://reloaded-project.github.io/Reloaded-II/CreatingModPacks/)
It is recommended to enable update support even if you don't plan to ship updates as [doing so will allow your mod to be used in Mod Packs.](https://reloaded-project.github.io/Reloaded-II/CreatingModPacks/)
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"rollForward": "latestFeature"
}
}
10 changes: 10 additions & 0 deletions p5rpc.modloader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.3.32922.545
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "p5rpc.modloader", "p5rpc.modloader\p5rpc.modloader.csproj", "{6F4B205B-ABF6-4A29-BD48-03E18C769813}"
ProjectSection(ProjectDependencies) = postProject
{425E6521-F58A-46D4-AD08-30006C929C7C} = {425E6521-F58A-46D4-AD08-30006C929C7C}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persona.Merger.Common", "Persona.Merger.Common\Persona.Merger.Common.csproj", "{7915AEFD-7E09-4C1A-AF09-14235225975E}"
EndProject
Expand All @@ -21,6 +24,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PAK.Stream.Emulator.Interfa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileEmulationFramework.Lib", "Submodules\FileEmulationFramework\FileEmulationFramework.Lib\FileEmulationFramework.Lib.csproj", "{3D9C1C67-FFB1-48D0-87B0-17D15AA93E00}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SPD.File.Emulator.Interfaces", "Submodules\FileEmulationFramework\Emulator\Interfaces\SPD.File.Emulator.Interfaces\SPD.File.Emulator.Interfaces.csproj", "{73CFF175-8E6A-4C31-8D10-D05B8D64755E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BMD.File.Emulator.Interfaces", "Submodules\FileEmulationFramework\Emulator\Interfaces\Bmd.File.Emulator.Interfaces\BMD.File.Emulator.Interfaces.csproj", "{7457A314-6852-4ADA-B266-264BD7510C11}"
EndProject
Global
Expand Down Expand Up @@ -65,6 +70,10 @@ Global
{7457A314-6852-4ADA-B266-264BD7510C11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7457A314-6852-4ADA-B266-264BD7510C11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7457A314-6852-4ADA-B266-264BD7510C11}.Release|Any CPU.Build.0 = Release|Any CPU
{73CFF175-8E6A-4C31-8D10-D05B8D64755E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73CFF175-8E6A-4C31-8D10-D05B8D64755E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73CFF175-8E6A-4C31-8D10-D05B8D64755E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73CFF175-8E6A-4C31-8D10-D05B8D64755E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -75,6 +84,7 @@ Global
{66B0D482-C88B-483F-995F-32F3308C7859} = {D0885FA9-1AF6-4CB1-8CED-E49AC9F99EC0}
{3D9C1C67-FFB1-48D0-87B0-17D15AA93E00} = {D0885FA9-1AF6-4CB1-8CED-E49AC9F99EC0}
{7457A314-6852-4ADA-B266-264BD7510C11} = {D0885FA9-1AF6-4CB1-8CED-E49AC9F99EC0}
{73CFF175-8E6A-4C31-8D10-D05B8D64755E} = {D0885FA9-1AF6-4CB1-8CED-E49AC9F99EC0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56D65FA2-2A48-49CB-BA59-C44FDDB11E8D}
Expand Down
Loading

0 comments on commit 3ff0afa

Please sign in to comment.