Trails of Cold Steel-map modification, model extraction

Introduction to OPS files

You can refer to this video:Shin no trajectory series scene modification and optimization method ops file introduction part1_Legend of Heroes_Miscellaneous Talk (bilibili.com)

File location

The OPS file of Shinobi is located in the game root directory/data/ops directory. If it is Shinobi 3, 4 or creation track, you need to enter the pc folder to modify it.

Main document content

MapColor:

Lighting, shadow and other effects in different time periods, modify the Type column, you can modify the lighting of the scene

Note: This modification will not change the texture of the skybox.

MapObjects:

For all objects in the scene, M_XXXX is the main part of the map, which can be passedTrails in the Database Query the correspondence between map codes. By deleting some O_XXX assets, such as PLT, LIG and other assets, the frame rate of the game can be optimized to a certain extent.

Entry:

Various types of portals, you can view the related videos below, which is more intuitive. It also contains some event triggers (entry with EV in name)

LookPoints:

The introduction points of various scenes in the map.

MapPlants:

For randomly generated plants in the scene, the count parameter can be modified to reduce the number of vegetation

Lights:

The light source in the scene can also be optimized by deleting it properly.

MapSounds:

Scene special effects sound, not bgm.

MapEffects:

Visual effects in the scene

Track Series-Cafe

Modify the OPS file to achieve the purpose of transmission

You can directly view the video introduction, how to modify, and the effect:Transmit between scenes in the SEN no Trail series to get the missing treasure chests and props ops file introduction part2_Legend of Heroes (bilibili.com).

Track Series-Cafe

Model file extraction

Video tutorial:The sen no trajectory series model extraction ops file introduction part3_ stand-alone game popular video (bilibili.com)

Code file:trails-games-tools (github.com)

Extraction method (Shan no trajectory 1, 2):

The first step: find the corresponding pkg file

according toTrails in the Database Find the corresponding map number file, the pkg file is in the data/asset/D3D11 directory.

Step 2: Extract the model

Use pkgtoglb.py to directly process the pkg file (the processing method is python pkgtoglb.py pkg file name)

Extraction method (Shan no trajectory 3, 4, creation trajectory):

The ways of generating maps for Shining Trails 3, 4, and Chuangzhi Trails are different. There will be a large number of duplicate buildings in the same map. Therefore, the buildings in the map are separate pkg files and need to be queried through the ops file.

At the same time, Shanzhi's trajectory 3, 4, and Chuangzhi trajectory package the pkg file into a pka file, and the corresponding pkg file needs to be extracted before the model can be extracted.

Step 1: Find the corresponding ops file

according toTrails in the Database Find the corresponding map number file, the pkg file is in the data/asset/D3D11 directory.

Step 2: Extract pkg and model

inparseModel.py  In the file, replace xml_file with the path of the ops file, and replace path4 with the path of the game pka file. Just use python parseModel.py.

Note: The parameter map_id is added, and python parseModel.py map_id is required when using it. while map_id isTrails in the Database The corresponding map number found.

Depending on the computer configuration and the size of the model file, the extraction time may be longer, and you need to wait patiently.

Step 3: Organize the model

usebuildScene.py You can use the scripting function (replace the path) in Blender to read the model and rebuild the scene, and then you can choose to save it as fbx, obj, glb or other model formats you like, but the glb format is recommended.

Extract image files:

The operation method is roughly similar to the model, find and useunpackpka.py Extract the corresponding pkg (the file name of flash 1, 2 can be used as a reference), and then usepkgtoglb.py Just unzip the pkg.

Note:Can be modifiedunpackpka.py Line 32, if not "keyword" in package_name: continue, you can decompress only the required pkg

Note:After texconv converts dds to png, there will be a certain degree of distortion when viewing the picture with the windows built-in picture viewer, just change the viewer

Additional processing steps for character models

When the character model is first extracted, it will have a shadow layer like the map model. The processing of the map model is to delete the parts at the beginning of CK, etc., and this operation can be completed through buildScene.py. The processing of characters requires the following steps.

  1. Select the model, enter Edit mode, and deselect all.
  2. In the materials on the right, find a material similar to or containing the word shadow, select it and click select below
  3. X→delete vertices delete all related vertices.