Jump to content
You need to play a total of 1 battles to post in this section.
Lei_Falcon

PnF mods creator doesnt work please help.

6 comments in this topic

Recommended Posts

[SWLF_]
Players
7 posts
9,779 battles

i used to make some PnF mods for the game but  i tried to recently updated them i used to use this method below 

UPDATE (for modders)

 

A short manual for Content SDK. Sorry for my English and good modding:)

 

Content SDK allows modders to alter ship visual models and textures.
Content SDK suggests that master resources for the ship are prepared prior to modding. To do this, you need to:

1. Download ModsSDK_<update number>.zip.

2. Unpack it to "<game folder>/res_mods/<update number>".

3. Open the file "<game folder>/res_mods/<update number>/PnFMods/ModsSDKExport/Main.py" with Notepad and in the line

contentSdk.extractSources('SuperYamato', 'JSB018_Yamato_1944')

 

Change 'SuperYamato' to your mod name, and change 'JSB018_Yamato_1944' to the modded ship ID.
4. Save changes and launch the game.
5. After the game is loaded "<game folder>/res_mods/<update number>/PnFMods/" will contain a new folder with your mod name (from stage 3), and it will contain all files neccessary for modding.
6. Delete "ModsSDKExport" folder from "<game folder>/res_mods/<update number>/PnFMods/".
7. Add to your new mod folder a text file with Main.py name. It should contain

API_VERSION = 'API_v1.0'
contentSdk.registerShipMod('JSB018_Yamato_1944')

 

Of course, you should insert the modded ship ID instead of 'JSB018_Yamato_1944'.

8. Done! Now, your modded textures and models will be shown in the game! 1294256558_Screenshot(1513).thumb.png.c1c9d03711897e23775bdb26998c0430.png

 

but for some reason when i do this the game doesn't create the mod folder1713571309_Screenshot(1514).thumb.png.59b53b24dfddd6773a9b147f6cf92454.png

 

this is what my main.py file looks like can anyone help me?

Share this post


Link to post
Share on other sites
Modder
338 posts
5,964 battles

"<game folder>/res_mods/<update number>/PnFModsLoader.py" missing?

Share this post


Link to post
Share on other sites
Modder
338 posts
5,964 battles

ModSDK is broken for a while related to your issue.. Add the code below to your Main.py. It should fix it automatically.

 

def writeFile(file, data):
    with open(file, 'wb') as f:
        f.write(data)

def readFile(file):
    try:
        with open(file, 'rb') as f:
            data = f.readlines()
    except:
        return None
    return list(data)

for dirpath, dirnames, filenames in utils.walk("."):
    for filename in filenames:
        path = ('%s/%s'%(dirpath, filename)).replace('\\', '/').replace('//', '/')
        fname = filename[:filename.rfind('.')]
        ext = filename[filename.rfind('.'):]
        if ext == '.mfm':
            data = readFile(path)
            idx = -1
            for line in data:
                idx += 1
                if 'shaders/' in line:
                    data[idx] = line.replace('shaders/std_effects/ship_material.fx','shaders/materials/pbs/ship_material.fx').replace('shaders/std_effects/ship_material_skinned.fx','shaders/materials/pbs/ship_material_skinned.fx').replace('shaders/std_effects/wire_material.fx','shaders/materials/pbs/wire_material.fx')
                else:
                    if 'ship_atlas_detail.dds' in line:
                        toreplace = line.split('content/gameplay/')[-1].split('/textures/ship_atlas_detail.dds')[0]
                        replacestr = 'common'
                        data[idx] = line.replace(toreplace, replacestr)
                    elif ('_Disk_' in line and not '.mfm' in line) or 'transparent_glass_alpha.dds' in line:
                        toreplace = line.split('</Texture>')[0]
                        replacestr = '\t\t<Texture>\tcontent/gameplay/common/textures/%s_a.dds\t'%fname
                        data[idx] = line.replace(toreplace, replacestr)
            writeFile(path, ''.join(data) )

 

  • Cool 1

Share this post


Link to post
Share on other sites
[SWLF_]
Players
7 posts
9,779 battles

1198967986_Screenshot(1523).thumb.png.5b9744716f3be881d23471fba40041a2.png761655577_Screenshot(1525).thumb.png.4cfb09d46ae1a5d09ed1a8a95c70c98f.png1743200915_Screenshot(1524).thumb.png.f4ca08f98b5047f0a0cc22fbf1c062bf.png

Thank you so much for your help OlliN so far your advice worked on hood and nelson but when i try to mod Kaga and Tirpitz they remain uneffected.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×