Author Topic: Can't create working .mpk file  (Read 70 times)

Acuru

  • Newbie
  • *
  • Posts: 32
    • View Profile
Can't create working .mpk file
« on: July 15, 2017, 02:11:50 pm »
I have problem with creating working .mpk file.

What i understand i need to do is pack mod file to .zip and then rename it to .mpk. But im getting error: "Error loading mod from [path]".

I tried to unpack working mod, and then pack it without doing any changes in files, but im still getinng this error. I was using 7-zip and winrar to pack into zip. Any idea what is wrong?

My system: 64-bit Windows 10 Pro

Edit: Ok i found problem, and solved it :D So nvm.
« Last Edit: July 15, 2017, 04:20:09 pm by Acuru »

Lurler

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
Re: Can't create working .mpk file
« Reply #1 on: July 16, 2017, 08:12:44 pm »
So, what was the problem then? :)

Sharing it could help other people who have the same difficulty.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 986
    • View Profile
Re: Can't create working .mpk file
« Reply #2 on: July 16, 2017, 09:35:17 pm »
Acuru, I guess you forgot to set "no compression" setting in 7-zip.

Acuru

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Can't create working .mpk file
« Reply #3 on: July 16, 2017, 11:41:34 pm »
I packing like this:
http://scr.hu/6eb/8or23

Not like this:
http://scr.hu/6eb/lgsyn

xD I found on forum, that someone was making this same mistake, mayby add information about to wiki page?

And about this... is there a possibility that u will add functionality to game, that we can make mods bundle? I.e. you can create randomname.bpk that will contain mod1.mpk, mod2.mpk, mod3.mpk etc. Why?
  • It would be easier for someone to gather mods, make them compatibile and share wiht others
  • I'm making mod that (i hope) would be pretty big. It would be nice to slice it into few smaller mods without complicating it's installing. Making it modular, will give players more flexibility with it, will help bugtracing for me, and will make easier for other modders to use my work.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 986
    • View Profile
Re: Can't create working .mpk file
« Reply #4 on: July 16, 2017, 11:58:53 pm »
Acuru, you're right. We will update wiki page to clearly describe that CPK/MPK are just a ZIP archive with no compression and they should contain files directly, not in an extra subfolder.

Regarding the mod bundles - we have plans for this in CryoFall. Perhaps, we will port this feature back to VoidExpanse (core engine part of the games are shared, but VoidExpanse will require several non-trivial engine/UI modifications to support this feature).
Basically, the idea is to have our own mods repository at AtomicTorch.com with fast CDN (Azure or Amazon) where anyone will be able to upload their mods with our Mod Uploader tool (the same tool as our Steam Mod Uploader, but modified to work with AtomicTorch.com CDN instead and, perhaps, ported to Linux/Mac to smooth out the process for everyone).
The game will be able to download a mod by its ID and version number and install/activate automatically accordingly to the game server configuration. This is necessary as there will be many modded servers and manual installation/updating of mods on the client is something we want to avoid.
With this architecture, the mods bundle is trivial to implement - it will contain just a single XML manifest file with the bundle information (id, version, title, author, description, date) and the list of mods (with their versions) in the order of activation (plus an icon for the bundle, but nothing more). So the game client and server will be able to automatically download all the required mods from the list and install/activate them.