Important information: this site is currently scheduled to go offline indefinitely by end of the year.

World of Warships

Post questions about game models here, or help out others!
gr33nmous3
ultra-n00b
Posts: 9
Joined: Mon Sep 28, 2015 11:12 am
Been thanked: 4 times

Re: World of Warships

Post by gr33nmous3 »

Wobble wrote:It's a Phython module or database object.

Just search for "ccopy_reg_reconstructor" and "c__builtin__object" and you'll get a couple hits on Google.
I don't use Phython, so I have no idea how to use it.
It's a python pickle, the game uses a few of those for network data as well.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:24 am, edited 1 time in total.
TheSeeker
advanced
Posts: 44
Joined: Tue Sep 29, 2015 1:36 am
Has thanked: 4 times
Been thanked: 17 times

Re: World of Warships

Post by TheSeeker »

Wobble wrote:6MB is too much data to look at.

You can use regex to rip out all strings between single quotes:

Code: Select all

grep32.exe "S\'[a-zA-Z0-9_/\.-]+\'" GameParams.dat.txt > GameParams_strings.txt
All content paths:

Code: Select all

grep32.exe "S\'content[a-zA-Z0-9_\\/\.-]+\'" GameParams.dat.txt > GameParams_paths.txt
I'll throw my hat in the ring, here's a response from a dev -
Image
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:24 am, edited 1 time in total.
gr33nmous3
ultra-n00b
Posts: 9
Joined: Mon Sep 28, 2015 11:12 am
Been thanked: 4 times

Re: World of Warships

Post by gr33nmous3 »

To get the pickle working you have to have a file named 'GameParams.py' in the same location as the main script for it's instanced classes.

Code: Select all

class TypeInfo(object): pass
class GPData(object): pass
class GameParams: pass
After this the pickle would load normally. The data does reference some additional models, but it contains a lot more than just the ships.

Code: Select all

try:
    import cPickle as pickle
except:
    import pickle

f = open('GameParams.txt')
gameParams = pickle.load(f)
f.close()

# Do something with gameParams
print gameParams['PWSD501_Blyskawica'].ArtilleryDefault.HP_WGM_1.model
Standard python to dump json text as well

Code: Select all

# ...
f.close()

import json
class GPEncode(json.JSONEncoder):
    def default(self, o):
        return o.__dict__

f = open('PWSD501_Blyskawica.json')
f.write(json.dumps(gameParams['PWSD501_Blyskawica'], cls=GPEncode, sort_keys=True, indent=4, separators=(',', ': ')))
f.close()
TheSeeker
advanced
Posts: 44
Joined: Tue Sep 29, 2015 1:36 am
Has thanked: 4 times
Been thanked: 17 times

Re: World of Warships

Post by TheSeeker »

gr33nmous3 wrote:To get the pickle working you have to have a file named 'GameParams.py' in the same location as the main script for it's instanced classes.

Code: Select all

class TypeInfo(object): pass
class GPData(object): pass
class GameParams: pass
After this the pickle would load normally. The data does reference some additional models, but it contains a lot more than just the ships.

Code: Select all

try:
    import cPickle as pickle
except:
    import pickle

f = open('GameParams.txt')
gameParams = pickle.load(f)
f.close()

# Do something with gameParams
print gameParams['PWSD501_Blyskawica'].ArtilleryDefault.HP_WGM_1.model
Thanks m8, I put all of your scripts in a zip:http://www.mediafire.com/download/jrqf1 ... ractor.zip

copy your GameParams.data file into the extracted folder, then run reverse first, then inflate - everything.py dumps all the contents into one .json (the result is a 30mb monster), shipids.py lists all the shipids and the ships they correspond to
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:24 am, edited 1 time in total.
User avatar
Andrakann
ultra-veteran
ultra-veteran
Posts: 392
Joined: Wed Jul 06, 2011 8:47 am
Location: Russia
Has thanked: 967 times
Been thanked: 192 times
Contact:

Re: World of Warships

Post by Andrakann »

Wobble wrote:Awesome. Can you get your scripts working with the latest Python version, 3.5.0?
I'm getting several errors.
I have Python26 installed and all works fine.
gr33nmous3
ultra-n00b
Posts: 9
Joined: Mon Sep 28, 2015 11:12 am
Been thanked: 4 times

Re: World of Warships

Post by gr33nmous3 »

Wobble wrote:Awesome. Can you get your scripts working with the latest Python version, 3.5.0?
I'm getting several errors.
The scripts were written for Python 2.7, I have no clue what differences python3 has with 2.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:24 am, edited 1 time in total.
User avatar
Andrakann
ultra-veteran
ultra-veteran
Posts: 392
Joined: Wed Jul 06, 2011 8:47 am
Location: Russia
Has thanked: 967 times
Been thanked: 192 times
Contact:

Re: World of Warships

Post by Andrakann »

TheSeeker wrote:shipids.py lists all the shipids and the ships they correspond to
Very useful, with that IDs I made a mod for previewing all available ships ingame :)

Image Image Image
Image Image Image

Archive content:
gui\lobby\shipstree.xml - modified ships tree, all ships unhidden, display resolution 1920x1080 is recommended.
camerasConfig.xml - camera mod for close zooming.
postfx_animations.xml - disable B/W shader in ships preview.
You do not have the required permissions to view the files attached to this post.
TheSeeker
advanced
Posts: 44
Joined: Tue Sep 29, 2015 1:36 am
Has thanked: 4 times
Been thanked: 17 times

Re: World of Warships

Post by TheSeeker »

Andrakann wrote:
TheSeeker wrote:shipids.py lists all the shipids and the ships they correspond to
Very useful, with that IDs I made a mod for previewing all available ships ingame :)

Image Image Image
Image Image Image

Archive content:
gui\lobby\shipstree.xml - modified ships tree, all ships unhidden, display resolution 1920x1080 is recommended.
camerasConfig.xml - camera mod for close zooming.
postfx_animations.xml - disable B/W shader in ships preview.
I've had a mod out for quite some time that does this, except for the Worcester, Smith, and Pensacola 1930 which iirc are broken, if you click on them, they won't finish loading.
http://forum.worldofwarships.com/index. ... tech-tree/
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:25 am, edited 1 time in total.
gr33nmous3
ultra-n00b
Posts: 9
Joined: Mon Sep 28, 2015 11:12 am
Been thanked: 4 times

Re: World of Warships

Post by gr33nmous3 »

Coffee wrote:The only reference to BIN files, in what little bigworld documentation I have is not even close
Speaking of those .BIN files, what do you know? There's only one .bin file in the game, res/particles/particles.bin and i've been trying to load that one up but I am hugely inexperienced.
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 584
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: World of Warships

Post by Wobble »

[out]
Last edited by Wobble on Sun Mar 12, 2017 11:25 am, edited 2 times in total.
Post Reply