Jump to content
Forum Shutdown 28/7/2023  Read more... ×
Forum Shutdown 28/7/2023  Read more... ×
You need to play a total of 5 battles to post in this section.
PunishedKAsual

A simple step-by-step guide to extracting and preparing PnF modding files

22 comments in this topic

Recommended Posts

225
[BOTES]
Member
611 posts
4,520 battles

 

A simple step-by-step guide to extracting and preparing PnF modding files

ipatL4vr.jpg

(with skill and knowledge you too can make amazing mods like these, not that i can. LMAO)

Image Courtesy: AstreTunes from SEA Group. He also has significant contribution to this guide.

 

Preface/What's the point of this guide

This guide is written as a step-by-step tutorial to extract files and how to prepare them for release.

 

What’s PnF modding?

PnF modding is modding with wows ModsSDK, a modding tool provided by Wargaming Studio.

With PnFmodding and ModsSDK, one opens up many possibilities with modding such as replacing textures, 3D models and fine adjustments to various parameters compared to conventional modding methods.

Also, you can edit files to only affect a ship. This is especially useful if the ships you want to mod contains files that are shared (most frequently turrets and various small objects)

If, however, the mods you wish to make are more basic, such as simple texture tweeking and modification, you might not need to use PnF mods.

A further guide to texture modding will soon be released on the topic of camouflages and texture editing sometime in the future.

Guide

Tools/ resources you’ll need:

1.  A Text Editor

A capable text editor is needed to edit various configuration files.

Examples being NotePad++, Atom, VIM, Microsoft Visual Studio (the last one is a bit extreme if im honest).

Please do not use the notepad.exe that came included with your windows installation.

 

2. Paint.NET/ GIMP with dds plugin / Photoshop with dds plugin

Paint.NET is free and lightweight  but the UI is rather rudimentary.

GIMP is free opensource software thats very capable.

Photoshop with dds plugin will involve licensing fees. 

 

3. ModsSDK.zip

Released by Wargaming staff, this is a file that contains various files necessary to extracting information of ships.

Note that with each update, a separate version of ModsSDK.zip is required to extract PnF mod files. These resources are easily accessible from the forum.


 

Extracting files

1. Create a folder structure in file path \res_mod\version number\ called PnFMods

 

1.1. Create a folder called “ModsSDKExport”

2. Inside the ModsSDKExport folder, create a file called“Main.py”, then open it with a text editor.

Write the following lines

 

API_VERSION = 'API_v1.0'

contentSdk.extractSources('ModName', 'ShipID')

 

Replace SuperYamato with your mods name and replace JSB018_Yamato_1944 with the ship ID of the ship you want to mod. A possible way to find ShipIDs is to peep into the ModsSDK.zip .

In this example, I create a mod with name "AsashioMod" modifying Tier 8 Destroyer Asashio (ShipID JSD518_Asashio)

mCdMUqo.png

mVDLIyQ.png

 

3. Place the ModsSDK.zip inside the “PnFMods” folder. If the ModsSDK.zip file contain a version number like ModsSDK084834570293748.zip , simply rename the zip file to “ModsSDK.zip”.

 

4. Launch World of Warships normally.

 

5. After your game has been loaded successfully, a folder will automatically generate inside \PnFMods\ 

In this example, a folder called "AsashioMod" is generated containing all the relevant files needed.

GjEcVMS.png

Before proceeding, you are recommended to rename the /ModsSDKExport/Main.py  file into /ModsSDKExport/Main.txt . Otherwise the game will overwrite the PnF mod folder every-time the game loads and prevent you from logging in. Ruining all your hard work and wasting all your time. When renamed to a txt file, the PnF mod extraction process will not trigger and you have can easily reuse the Main.py file should you want to extract files for another ship.

Editing

In depth guide to editing specific files will be out-of-scope for this guide. The Folder Structure and file names should be self explanatory to what each file does. Never, here is a list of general description of what some of the files do.

 

Files with extension .dds

These are directdraw surface files that serves as textures of 3D models. I've a more elaborate guide concerning these files 

Use Paint.NET\GIMP\or Photoshop to edit them.

 

_a.dds :    this file is the Base texture you edit that directly affect the skin

_ao.dds:   ambient occlusion, that helps the game to load a pre-rendered shadow

_mg.dds : specular- determines the shininess and color of reflected environment light

_n.dds :  normal map- this adds the blue texture files allow you to create dents and grooves on the surface of a model

 

 

Files with extension  .mfm

.mfm files control which texture files the Game Client look up. Editing them will allow you to designed files with alternatives.

 

Files with extension .primitives

These are 3D model files. Regrettably I do not know what software are used to open/edit them, nor do i know about the procedure involved.

Perhaps other modders will be able to comment on this.

 

 

Readying your mod for game

There are some preparations required in order to successfully load your mods.

1. Create a empty file called PnFModsLoader.py in res_mod\[version number]

This file is needed to initiate PnFMod loading.

 

2. Create a file called Main.py containing the following lines

 

 

API_VERSION = 'API_v1.0'

contentSdk.registerShipMod('ShipID')

 

Replace ShipID with the Ship ID of the ship you are modding. 

 

3. Remove unneccesary file like ModsSDKExport and the Main.py file before sharing

Troubleshooting

Unfortunately, I’m not the most knowledgeable modder when it comes to PnFMod modding. While my esteemed colleagues at NA server and EU are compiling a comprehensive manual covering various aspects , there are only so much I can answer about PnFModding.

 

However, should you come across a problem when modding with the ModsSDK, I strongly advise you to check out the python.log file in directory \World_of_Warships\profile . The log file is readable with any text editors and searching for your own mod’s name inside the log should easily return relevant error messages.

 

Common Problems

1. Texture not found on deck-house glasses

2ik5cRz.png

This problem is caused by a loose end in the transparent_glass_alpha.mfm configuration file. To fix this, open the  transparent_glass_alpha.mfm and edit the <texture> file path to the following

content/gameplay/common/textures/transparent_glass_alpha_a.dds

2.Texture not found on aircraft propellers

Similar to problem 1, the solution to the problem would be in the propeller mfm file (file name would end in something like Blade_02_alpha.mfm)

content/gameplay/common/textures/German_Disk_3Blade_02_alpha_a.dds

 

Acknowledgement

A few fellow modders and WG staffs has helped me in gaining knowledge about PnF modding. At the end of this simple guide, I would like to give them a shout out. They are

AstreTunes       (EU, Yuudachi_Kai_Ni)

CompassRose (NA server)

MatroseFuchs (WG) 

Sub_Octavian (WG)

MedvedevTD (WG)

Aerroon ()

o_fingers_o (NA)

 

Good Luck and happy modding, fellow modders!

Edited by PunishedKAsual
  • Cool 1

Share this post


Link to post
Share on other sites
Member
21 posts
29,139 battles

Hello! I'm very interested in how to make camouflage mods, so I read your articles carefully to learn how to make them. But now I have some unknown problems. I need your help. Would it be convenient for you to check my screenshot and make suggestions to solve them? Thanks.

1.When I was making a camouflage, I only changed the file of _a.dds, but there was an unknown shadow color block on the hull.

1.thumb.png.f2cc3e1ff0b721198846662e7541a97e.png

2.When I don't change the file _mg.dds, the painting will be presented as a mirror, but I can only solve this problem by painting the blue part of _mg.dds as brown. But I'm still curious about how it works and why it's so reflective when you don't do anything.

2.thumb.png.a0dde25c064639b7b6f51df501fcf465.png

Share this post


Link to post
Share on other sites
225
[BOTES]
Member
611 posts
4,520 battles
2 hours ago, Enterprise_Invincible said:

Hello! I'm very interested in how to make camouflage mods, so I read your articles carefully to learn how to make them. But now I have some unknown problems. I need your help. Would it be convenient for you to check my screenshot and make suggestions to solve them? Thanks.

1.When I was making a camouflage, I only changed the file of _a.dds, but there was an unknown shadow color block on the hull.

Spoiler

1.thumb.png.f2cc3e1ff0b721198846662e7541a97e.png

 

2.When I don't change the file _mg.dds, the painting will be presented as a mirror, but I can only solve this problem by painting the blue part of _mg.dds as brown. But I'm still curious about how it works and why it's so reflective when you don't do anything.

 

Spoiler

2.thumb.png.a0dde25c064639b7b6f51df501fcf465.png

 

Hi Enterprise_Invincible, it's a great pleasure to hear back from readers.

It's not easily to tell what really is going on without inspecting the files in person. If it's convenient, perhaps it would be more effective if you could sending me a copy of the your mod files to me via a private message on the forum, ideally in a .zip file uploaded to a hosting service.

Regarding the mirror problem in the second question, the green value of every pixel's RGB value on the "mg.dds" file controls the reflection strength of the 3D model. To be honest, I'm quite surprised to learn that it was "reflective" and "presented as a mirror" without you changing the relevant "mg.dds".

 

Edited by PunishedKAsual

Share this post


Link to post
Share on other sites
Member
21 posts
29,139 battles
4 分鐘前,PunishedKAsual 說:

Hi Enterprise_Invincible, it's a great pleasure to hear back from readers.

It's not easily to tell what really is going on without inspecting the files in person. If it's convenient, consider sending me a copy of the your mod files to me via a private message on the forum, ideally in a .zip file uploaded to a hosting service.

Regarding the mirror problem in the second question, the green value of every pixel's RGB value on the "mg.dds" file controls the reflection strength of the 3D model. To be honest, I'm quite surprised to learn that it was "reflective" and "presented as a mirror" without you changing the relevant "mg.dds".

 

Thank you. I've figured out my mistakes, but still thanks for responding to my questions in the first place. Here I also point out my mistakes to help other authors make the same mistakes as me.

Texture size needs to be consistent. Before that, my file size of _a.dds was 4096 * 4096, but the file sizes of _mg.dds and _ao.dds were 512 * 512, which led to this error. After I used Photoshop to change _ao.dds to 4096 * 4096, the error shadow disappeared. In the same way, after I changed ﹐ _mg.dds to 4096 * 4096, the wrong mirror disappeared.

My guess is that due to the size difference, the texture is misaligned when reading, resulting in these shadows and highlights appearing in places where they should not appear.

Finally, thank you very much for your tutorial. I have learned a lot from your tutorial. I hope I can make my own camouflage mod

Share this post


Link to post
Share on other sites
225
[BOTES]
Member
611 posts
4,520 battles
1 hour ago, Enterprise_Invincible said:

Thank you. I've figured out my mistakes, but still thanks for responding to my questions in the first place. Here I also point out my mistakes to help other authors make the same mistakes as me.

Texture size needs to be consistent. Before that, my file size of _a.dds was 4096 * 4096, but the file sizes of _mg.dds and _ao.dds were 512 * 512, which led to this error. After I used Photoshop to change _ao.dds to 4096 * 4096, the error shadow disappeared. In the same way, after I changed ﹐ _mg.dds to 4096 * 4096, the wrong mirror disappeared.

My guess is that due to the size difference, the texture is misaligned when reading, resulting in these shadows and highlights appearing in places where they should not appear.

Finally, thank you very much for your tutorial. I have learned a lot from your tutorial. I hope I can make my own camouflage mod

Glad to hear that! Very cool.

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
On 5/29/2019 at 6:47 PM, PunishedKAsual said:

3. Place the ModsSDK.zip inside the “PnFMods” folder. If the ModsSDK.zip file contain a version number like ModsSDK084834570293748.zip , simply rename the zip file to “ModsSDK.zip”.

 

4. Launch World of Warships normally.

 

5. After your game has been loaded successfully, a folder will automatically generate inside \PnFMods\ 

In this example, a folder called "AsashioMod" is generated containing all the relevant files needed.

 

I gonna make Atlanta saperate skin but it can't create my mod folder after I completed your guide step

the ModsSDK.zip from 0.9.2 version

Something wrong out there?

 

PE.PNG

23.PNG

Edited by THAI_THIEF

Share this post


Link to post
Share on other sites
Administrator
534 posts
41 battles
6 hours ago, THAI_THIEF said:

Something wrong out there?

Hi, you need to unpack the archive "ModsSDK.zip" and remove it, then rename unpacked folder to "ModsSDK.zip".

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
54 minutes ago, MatroseFuchs said:

Hi, you need to unpack the archive "ModsSDK.zip" and remove it, then rename unpacked folder to "ModsSDK.zip".

Extract the file inside of that .zip ?

and what about Main.py?

Edited by THAI_THIEF

Share this post


Link to post
Share on other sites
Administrator
534 posts
41 battles
3 hours ago, THAI_THIEF said:

Extract the file inside of that .zip ?

No, just extract in a folder.

3 hours ago, THAI_THIEF said:

and what about Main.py?

All is good.

10 minutes ago, THAI_THIEF said:

Still not working either 

Send me "python.log" file after run the client with mod extract. Please make screen of "res_mods\0.9.2.1" folder.

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
16 hours ago, MatroseFuchs said:

Send me "python.log" file after run the client with mod extract. Please make screen of "res_mods\0.9.2.1" folder.

python.log

as.PNG

PE.PNG

Untitled.png

I guess doing something wrong what a joke

Edited by THAI_THIEF

Share this post


Link to post
Share on other sites
Administrator
534 posts
41 battles
On 4/4/2020 at 5:24 AM, THAI_THIEF said:

 

as.PNG

Version game folder (ex. 0.9.2.1) must contain empty "PnFModsLoader.py" file. Just create it.

image.png

On 4/4/2020 at 5:24 AM, THAI_THIEF said:

 

Untitled.png

The "Main.py" must be in mods folder. (ex. ModsSDKExport)

And i told you that "ModsSDK.zip" archive need to unpack in "ModsSDK.zip" folder, then the folder put in "PnFMods" folder.

ModsSDK_zip.png.b7cd7b3b5fae423d6923cfe250df2459.png

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles

Sorry it's failed game client stuck at waiting for authorization 

and no sign any of extraction 

CAN YOU GIVE ME A HAND? My PC can't do anything  :Smile_facepalm:

Honestly what am I doing? try to make my game client crashed?

Create "PnFModsLoader.py" file.   DONE

as.PNG.56bf3dcbfe3e89a8f7a599bacc61fe5f.PNG

You told me that "ModsSDK.zip" unpack in "ModsSDK.zip" folder, then the folder put in "PnFMods" folder. 

CORRECT?

Untitled.png.f92e4ed36c840ce80f6cde518800f161.png

The "Main.py" must be in mods folder. that's exactly I have to

PE.PNG.4e008e2062985a7e9c607bd2b7fe0087.PNG

 

Sorry to make you nervous but I need you just make one extract file for me I need one "Atlanta" file 

Otherwise I will make my own idea I'm dizzy enough

 

python.log  <bunch of syntax errors

 

Edited by THAI_THIEF

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles

I'm totally fultile efforts

Honestly what am I doing here?

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
On 4/6/2020 at 1:36 PM, MatroseFuchs said:

Version game folder (ex. 0.9.2.1) must contain empty "PnFModsLoader.py" file. Just create it.

image.png

The "Main.py" must be in mods folder. (ex. ModsSDKExport)

And i told you that "ModsSDK.zip" archive need to unpack in "ModsSDK.zip" folder, then the folder put in "PnFMods" folder.

ModsSDK_zip.png.b7cd7b3b5fae423d6923cfe250df2459.png

One last time I beg you 

Can you give me explanation how to do with everything method without error?

zip. file to unpack so you mean extract???

It's will be appreciated that you give me video with cleary of your methods 

Capture.JPG

python.log

waiting for authorization waiting for authorization

 shot-20_05.23_16_58.55-0915.thumb.jpg.2513614f8e2484e8e246f145c1369d65.jpg

Edited by THAI_THIEF

Share this post


Link to post
Share on other sites
Member
21 posts
29,139 battles
於 ‎2020‎年‎4‎月‎3‎日 在 PM4點16分,MatroseFuchs 說:

Hi, you need to unpack the archive "ModsSDK.zip" and remove it, then rename unpacked folder to "ModsSDK.zip".

Sorry to bother you.Could you provide me a copy of the exact and latest SDK code?I think the old SDK is no longer applicable after a client update, so it can't be found in the client.Here are my attempts and error messages.

2020-05-24 03:32:06.007: ERROR: [Script] [ModsAPI] SDK for ASD709_Black not found; (, 21749963773483, 561)

2020-05-24 03:42:36.652: ERROR: [Script] [ModsAPI] SDK for PASD709_Black not found; (, 21749963773483, 561)

2020-05-24 04:06:02.404: ERROR: [Script] [ModsAPI] SDK for ASD030_Black_1943 not found; (, 21749963773483, 561)

I have also tried to see if the error is related to whether the folder is unpacked, but the result of my experiment is irrelevant, and the error information is the same. So I hope you can consider my suggestion and solve the problem from another angle.

python.log

Edited by Enterprise_Invincible
Grammatical errors

Share this post


Link to post
Share on other sites
Member
16 posts
689 battles

Does the latest SDK 0.9.7.0 Missing Pommern files, or is it just me? And doing all the step above resulting in "waiting for authorization"  forever when login, the cause is the  PnFModsLoader.py (when its deleted it will login as normal) . In my case it will still extract the desired SDK but not usable as it will fail to load when i register it (the whole ship and skin wont load).

Share this post


Link to post
Share on other sites
Administrator
534 posts
41 battles
On 8/7/2020 at 10:35 PM, ZweistZecksclaw said:

Does the latest SDK 0.9.7.0 Missing Pommern files, or is it just me? And doing all the step above resulting in "waiting for authorization"  forever when login, the cause is the  PnFModsLoader.py (when its deleted it will login as normal) . In my case it will still extract the desired SDK but not usable as it will fail to load when i register it (the whole ship and skin wont load).

Hello!

At the moment, ContentDSK has a bug that prevents the loading of mods, we are working on fixing the error and will let you know when we will restore it.

Regards

  • Cool 1

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
On 8/10/2020 at 8:45 PM, MatroseFuchs said:

Hello!

At the moment, ContentDSK has a bug that prevents the loading of mods, we are working on fixing the error and will let you know when we will restore it.

Regards

It's fix yet?

Share this post


Link to post
Share on other sites
Administrator
534 posts
41 battles
15 hours ago, THAI_THIEF said:

It's fix yet?

We keep working on it. At this moment we found a temporary solution. Here is the working example ContentSDK mod - SEA_PI_Moskva_Kallen.zip. These changes need to be considered for mods in 0.9.8 patch:

  1. All "<name>_lod<number>.<ext>" files must be in "lods" folder.
  2. "primitiveGroup" can be only one in every "renderSet", if you have more then one primitiveGroup, then you need to create extra renderSet for each additional.
  3. All nodes of misc files that are missing in the client must be removed from the visual files.

You can research this example for your own mod.

Share this post


Link to post
Share on other sites
1,196
[LBAS]
Member
5,895 posts
15,199 battles
On 9/29/2020 at 2:36 PM, MatroseFuchs said:

You can research this example for your own mod.

Unbelievable I'm not programmer to do such a thing

Share this post


Link to post
Share on other sites

×