ACNHDesignPatternEditor icon indicating copy to clipboard operation
ACNHDesignPatternEditor copied to clipboard

Cannot transform the design to my own

Open willing1234 opened this issue 4 years ago • 2 comments

I tried several time, but it is not works. After import and export a design code, it suppose to be edit on you switch, but no matter what I do, it is not working, However, my friend create a file for me, and import the code I upload in community, it is works. Do anyone know what's the problem?

willing1234 avatar Jun 07 '21 05:06 willing1234

I answered this issue in #30. Will continue commenting there.

FluffyFishGames avatar Aug 30 '21 14:08 FluffyFishGames

Issue https://github.com/FluffyFishGames/ACNHDesignPatternEditor/issues/30 was closed by opener, so continuing conversation here (years later).

Issue https://github.com/FluffyFishGames/ACNHDesignPatternEditor/issues/27 & https://github.com/FluffyFishGames/ACNHDesignPatternEditor/issues/30 are related.

The ACNH file format needs to include the players PlayerID and TownID from main.dat or personal.dat being written to the pattern data and then written back to main.dat at each pattern index.

https://github.com/FluffyFishGames/ACNHDesignPatternEditor/blob/498aa02174c3bce744a9305f4f858d1e4c65e4cb/Assets/Plugins/ACNHFileFormat.cs#L97-L107

Similarly to the way that the ACNL file format reads/writes those bytes:

https://github.com/FluffyFishGames/ACNHDesignPatternEditor/blob/498aa02174c3bce744a9305f4f858d1e4c65e4cb/Assets/Plugins/ACNLFileFormat.cs#L457-L458

But read from the *.dats and written to the pattern byte arrays would be best (not relying on pattern dumps that originate from the user).

Without those IDs written to the start of each pattern array the game marks them as not owned by the player and thus unable to be edited within the game (marked with 🚫).

Refer here for details on the data side.

If I get time I might look over the codebase and implement, but it might be quicker for @FluffyFishGames to action it due to familiarity with the codebase.

I would also recommend not using a trimmed file format for the pattern exports to increase interoperability.

vectorcmdr avatar Oct 27 '23 11:10 vectorcmdr