Jump to content

LoveR Kiss - 改装讨论


Guest

Recommended Posts

Let's start modding discussions on LoveR Kiss for Switch!

 

official_twitter_photo.jpg.4a4dff9feda0fa2ce8002484897e9eab.jpg

 

### Thread Rules ?

  • Buy the game to support developers!
  • To respect forum rules, please don't upload Rinze and Magical Yumina photos (looks very young).
  • Don't ask about the basics of Switch modding. Learn about it on other sites.

### File Format ?

  • Archive: CPK
    • You can use any CPK unpacker/packer tools, just google it.
  • Texture: FPACTEX
    • Contains multiple BNTX textures, which can be edited with Switch-Toolbox .
  • Model: FPAC
    • Almost the same as RecoLove model format, but it has Tangent (x, y, z) and Sign (+1/-1) between Normal and Vertex Color data blocks.

### Links ?️

Link to comment

Current researching status:

 

Thanks to Switch-Toolbox, texture modding succeeded very easily.

Just unpack CharaTex.cpk, search BNTX data and open/edit it on Switch-Toolbox.

Left = texture modded, Right = original swimsuit

test1.jpg.aff7f1b53444e7957edbb93432e128df.jpg

 

Now we need to find the way to edit mesh data, because swimsuit mesh has a lot of visible cloth wrinkles and bulges.

test2.jpg.9dd97192683a8f72a30e1208ad948608.jpg

Link to comment

Tutorial for Texture Editing

tex-mod-test.jpg.928c7b983fc19f8171b7b24997ca11da.jpg

Editing texture is very easy just like other games.

 

### Requirements

  1. Buy the game and DLC. (DLC contains less data, so it's easier than modding main game.)
  2. Knowledge of Switch modding
  3. https://github.com/KillzXGaming/Switch-Toolbox (Thanks author!)

### Step 1. Unpacking

 

Unpack CharaTex.cpk file.
You'll get many files like 000, 001, 002, 003, ....

 

The first 000 file is a txt (csv) file, which contains costume IDs, so don't touch this file.

And the remaining files (001, 002, ...) are the texture archive files (FPACTEX files) for each costume.
File order is as follows;

     Riria, Nanatsu, Christa, Romi, Rinze, Yumina, Himari, and Magical Yumina.

 

### Step 2. Getting BNTX from FPACTEX

 

Open a FPACTEX file in hex editor.

At address 0x08, there is the number of contained data. In this case, it's 0x16 = 22.
From address 0x10, there are 22 pieces of { int offset; int size; }.

We should skip empty data with "offset" or "size" is zero.

001.jpg.8f1241ca40acd4cdfc5ec085b4c20218.jpg

 

Go to each "offset", copy bytes with "size" bytes, and save it with filename "*.bntx".

002.jpg.e15de992afb81c14e978d86fb0f3b914.jpg


Now we got multiple BNTX files.

 

### Step 3. Edit BNTX file in Switch Toolbox

 

Open BNTX file in Switch Toolbox.
With texture selected in left tree, right click it and choose Replace.

003.jpg.9e98f46d64615cc1fac4a3a03bae0440.jpg

 

Load your PNG image and click "OK".
(You can use a larger image like 2K=2048x2048, but you need to fix "offset" and "size" manually in Step 4.)

 

From "File" menu, run "Save as", and you'll get new modded BNTX file.

 

### Step 4. Inject BNTX back to FPACTEX

 

Overwrite new BNTX data into FPACTEX file at original offset.
If you used a larger image, you should add BNTX data at the end of FPACTEX file, and fix corresponding { int offset; int size; }.

 

### Final Step. Repacking

 

Repack CharaTex.cpk file. Run the game, enjoy your own mod.

 

Link to comment

Mesh Modding Tips

mod.jpg.2921ebb5cab61d1e1519c241139aa1b0.jpg

 

(1) Model Data Structure

Here is the difference compared to RecoLove model format.

///// details of FPACMESH data blocks /////
block[0] = {
  boundingBoxPos1 = { float x, y, z };
  boundingBoxPos2 = { float x, y, z };
  byte meshCount;  // 0: morph, 1: has one mesh, 2: has two meshes
  byte unknown[5];
};

///// if meshCount > 0 /////
block[1] = {
  short _faceCount;  // faceCount = _faceCount / 3
  short materialId;
  byte unknown1[12];
  int vertexCount;
  byte unknown2[12];
  vertices = { float x, y, z } x vertexCount;
  // padding here
  normals = { float x, y, z } x vertexCount;
  // padding here
  tangents = { float x, y, z, sign } x vertexCount;  // not used?
  // padding here
  vertexColors = { float R, G, B, A } x vertexCount;
  // padding here
  UVs = { float U, V } x vertexCount;
  // padding here
  faces = { short idx0, idx1, idx2 } x faceCount;
  // padding here
} x meshCount;

// The game uses unique values below
block[2] = {
  uniqVertices = { float x, y, z } x uniqVertexCount;  // uniqVertexCount = size / 12
};
block[3] = {
  uniqNormals = { float x, y, z } x uniqNormalCount;  // uniqNormalCount = size / 12
};
block[4] = {
  uniqVertexColors = { float R, G, B, A } x uniqVertexCount;
};
block[5] = {
  uniqUVs = { float U, V } x uniqUVCount;  // uniqUVCount = size / 8
};
block[6] = {
  uniqWeights = {
    int boneCount;
    weights = {
      int boneId;
      float weight;
    } x boneCount;
  } x uniqVertexCount;
};

// unique IDs are defined in block[7]
block[7] = {
  short uniqVertexIds[vertexCount];
  short uniqNormalIds[vertexCount];
  short uniqUVIds[vertexCount];
  short uniqVertexIdsCopy[vertexCount];  // same as uniqVertexIds
  byte unknown[vertexCount];
  byte zeros[vertexCount];
} x meshCount;

block[8] = {
  boundingBoxPos1 = { float x, y, z };
  boundingBoxPos2 = { float x, y, z };
  boundingBoxPos3 = { float x, y, z };  // same as boundingBoxPos1
  boundingBoxPos4 = { float x, y, z };  // same as boundingBoxPos2
};
block[9] = {
  tangentsPerCornerVertex =
    { float x, y, z, sign } x (faceCount x 3);  // not used?
};

 

(2) How Can I Inject a Larger FPACMESH Data?

 

If you want to replace the first FPACMESH[0],

001.jpg.97ed0ccc3332612bbc3507f905c9f774.jpg

 

insert new empty data (1-2MB of "00") between FPACDRMS and FPACMESH[1], then change offsets.

002.jpg.ad430995b307586956322b5ba92910e2.jpg

Now you can replace the empty data with new FPACMESH data, without vertex count limits.

The same technique can be used in RecoLove also.

 

Link to comment
  • 3 weeks later...
22 hours ago, gavinyueng said:

my abilities cannot be completed at the moment

In general, modding console game is far difficult than modding PC game.
I suggest you to try modding other popular games first (eg. Mario or Zelda).

Link to comment
  • 1 month later...
  • 6 months later...
  • Guest changed the title to LoveR Kiss - 改装讨论
  • 1 month later...
  • 4 weeks later...
On 12/14/2020 at 11:38 AM, char967 said:

Got the texture editing, but how to edit the model and Inject DOA5 mesh? need some help, how to open the model in blender?

I'm completely stuck on ### Step 2. Getting BNTX from FPACTEX

are you able to explain it in an easier way on what to do in hex edit?

Link to comment
  • 7 months later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use