Coder Social home page Coder Social logo

xnaconvert's Introduction

Alba.XnaConvert

Command-line utility for converting XNA XNB files.

Features

  • Converting Texture2D XNB files to PNG images.
  • All versions of XNA are supported: 1.0, 2.0, 3.0, 3.1, 4.0.
  • Command line.

N.B.

Do not forget: the fact that you can technically extract and view the resources from some games does not mean you can legally use the resources. Even extracting can be illegal in your country. If you are unsure, do not use this program.

Installation

Download XnaConvert binary files from the Releases tab.

You need to install the following redistributable packages before using the program (also necessary for compiling from sources):

Command line

Verb: convert

Convert file from one format to another.

Options:

  • -l, --library (Default: XNA) Library name.
  • -v, --version (Default: 4.0) Library version.
  • -i, --input (Required) Input file (*.xnb).
  • -d, --inputdir (Required) Input directory (with *.xnb files).
  • -m, --mask *(Default: .xnb) Input mask (with *.xnb files).
  • -r, --recursive (Default: false) Process files in input directory recursively.
  • -o, --output (Required) Output file or directory.

Examples:

Alba.XnaConvert convert -v 4 -d "C:\Games\Terraria\Content\Images" -o "C:\Unpacked\Terraria"
Alba.XnaConvert convert -v 4 -r -d "C:\Games\Dust An Elysian Tail\content\gfx" -o "C:\Unpacked\Dust An Elysian Tail"
Alba.XnaConvert convert -v 4 -r -d "C:\Games\They Bleed Pixels\Content" -o "C:\Unpacked\They Bleed Pixels"
Alba.XnaConvert convert -v 4 -r -d "C:\Games\Adventures of Shuggy\gfx" -o "C:\Unpacked\Adventures of Shuggy"
Alba.XnaConvert convert -v 4 -r -d "C:\Games\DLC Quest\Content" -o "C:\Unpacked\DLC Quest"
Alba.XnaConvert convert -v 3.1 -r -d "C:\Games\Capsized\Content" -o "C:\Unpacked\Capsized"
Alba.XnaConvert convert -v 3 -d "C:\Games\Blueberry Garden\Content" -o "C:\Unpacked\Blueberry Garden"

Verb: listlibs

List supported libraries and versions.

Options:

  • -a, --all (Default: false) Include all aliases.

Examples:

Alba.XnaConvert listlibs
Alba.XnaConvert listlibs --all

Known issues

  1. XNA sometimes fails to properly free resources. If multiple huge images are converted (in directory input mode) and your computer is low on memory, the program will terminate. Workaround: run the program again. It will skip already converted files.

  2. Support for XNA 1.0 and 2.0 is not tested as no games seem to use these versions.

License

New BSD License

Copyright © 2013, Athari

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Athari nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ATHARI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Links

xnaconvert's People

Contributors

athari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xnaconvert's Issues

Content loader error

I'm running Windows 8.1 with .Net 4.5 and all of the XNA Frameworks installed. XNA games are functioning properly. When I try to run "C:\xnaconvert>alba.xnaconvert convert -r -d "F:\Games\Steam Library\SteamApps\co
mmon\cthulhu saves the world" -o C:\CthuluFiles", I get "Content loader for 'XNA' with version '4.0' not found." despite having the XNA framework installed.

Can't find a supported device to process the XNB file

Looks like that my other issue was solved by just do the same that the developer said me (right click on the zip file before to unpack it, and click on the bottom button "unlock content", and also unmark the "only read" on the unpacked folder), from this link: #6

But now I have other different issue trying to extract the same XNB file from Terraria (it's a XNB example, from other XNB files from other games that I'm trying to unpack too, but that other tools extract all the terraria XNB files without problem; just Xna Converter fails). The problem is that (I'm not sure about if is it the only problem or other too), says me that I haven't a compatible graphic card to show me the content of the XNB (this is what I understood, OK?), and doesn't continue unpacking...

A screenshot of the problem:
http://imagensn.com/images/2015/01/13/Ashampoo_Snap_2015.01.13_13h37m12s_001_Administrador-Simbolodelsistema.png

What I used to unpack the XNB file:
C:\Users\CrashOverride93\Desktop\Alba.XnaConvert.0.1.2>Alba.XnaConvert convert -
v 4 -d "C:\Users\CrashOverride93\Desktop\Alba.XnaConvert.0.1.2\Images" -o "C:\Us
ers\CrashOverride93\Desktop\Alba.XnaConvert.0.1.2\Images2"

help me (ContentLoadException)

Can you help me

Application: XNB Exporter.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Xna.Framework.Content.ContentLoadException
Stack:
   at Microsoft.Xna.Framework.Content.ContentReader.PrepareStream(System.IO.Stream, System.String, Int32 ByRef)
   at Microsoft.Xna.Framework.Content.ContentReader.Create(Microsoft.Xna.Framework.Content.ContentManager, System.IO.Stream, System.String, System.Action`1<System.IDisposable>)
   at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, System.Action`1<System.IDisposable>)
   at Microsoft.Xna.Framework.Content.ContentManager.Load[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String)
   at XNBExport.ExportGame.LoadContent()
   at Microsoft.Xna.Framework.Game.Initialize()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean)
   at XNBExport.Form1.<button1_Click>b__0(System.Object)
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart(System.Object)

Error when i try load monogame xnb files

Hello! I want to edit android game xnb files. It seems that this xnb files was build by monogame studio. When I try to convetr them to png ther is error: Content loader for 'FDS' with version '4' not found. Please, help me.

Xna 1.0 conversion failed

Attempting to convert the files from the 2007 version of the rhythm game osu! causes an error to happen (it uses Xna 1.0 according to the version in the Xna binary dnSpy-x86_X21KIEc0kI ), and when attempting to convert an xnb file from it, it spits out an error

C:\Users\Ep1c_M1n10n\Downloads\Alba.XnaConvert.0.1.2>Alba.XnaConvert.exe convert -v 1.0 -i star.xnb -o star.png
Loading content loader for 'XNA' with version '1.0'...
Unexpected error!
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.  1) The method call is invalid.  Resulting in: An exception occurred while trying to create an instance of type 'Alba.XnaConvert.Loader.Xna10.ContentService'.  Resulting in: Cannot activate part 'Alba.XnaConvert.Loader.Xna10.ContentService'. Element: Alba.XnaConvert.Loader.Xna10.ContentService -->  Alba.XnaConvert.Loader.Xna10.ContentService -->  DirectoryCatalog (Path=".")  Resulting in: Cannot get export 'Alba.XnaConvert.Loader.Xna10.ContentService (ContractName="Alba.XnaConvert.Common.IContentService")' from part 'Alba.XnaConvert.Loader.Xna10.ContentService'. Element: Alba.XnaConvert.Loader.Xna10.ContentService (ContractName="Alba.XnaConvert.Common.IContentService") -->  Alba.XnaConvert.Loader.Xna10.ContentService -->  DirectoryCatalog (Path=".")  (1: An exception occurred while trying to create an instance of type 'Alba.XnaConvert.Loader.Xna10.ContentService'. The method call is invalid.)
Detailed exception information:
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) The method call is invalid.

Resulting in: An exception occurred while trying to create an instance of type 'Alba.XnaConvert.Loader.Xna10.ContentService'.

Resulting in: Cannot activate part 'Alba.XnaConvert.Loader.Xna10.ContentService'.
Element: Alba.XnaConvert.Loader.Xna10.ContentService -->  Alba.XnaConvert.Loader.Xna10.ContentService -->  DirectoryCatalog (Path=".")

Resulting in: Cannot get export 'Alba.XnaConvert.Loader.Xna10.ContentService (ContractName="Alba.XnaConvert.Common.IContentService")' from part 'Alba.XnaConvert.Loader.Xna10.ContentService'.
Element: Alba.XnaConvert.Loader.Xna10.ContentService (ContractName="Alba.XnaConvert.Common.IContentService") -->  Alba.XnaConvert.Loader.Xna10.ContentService -->  DirectoryCatalog (Path=".")

   at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
   at System.ComponentModel.Composition.Primitives.Export.get_Value()
   at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
   at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass11_0`2.<CreateStronglyTypedLazyOfTM>b__1()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Alba.XnaConvert.Program.GetContentService(String name, String version)
   at Alba.XnaConvert.Program.RunConvertVerb(ConvertSubOptions options)
   at Alba.XnaConvert.Program.MainInternal(String[] args)
   at Alba.XnaConvert.Program.Main(String[] args)

can't convert xnb of The Harvest (windows phone game)

All three files attached https://mega.nz/#F!G4pyVY5Q!GkDBs7s13WAntYnBfztv_A
Converting gives such error:
C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2>Alba.XnaConvert convert -v 4.0 -d "C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx" -o "C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\unn"
Loading content loader for 'XNA' with version '4.0'...
Loaded content loader successfully.
Found 3 files matching mask '*.xnb' in directory 'C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx'.
Loading file 'C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_01_i.xnb'...
Failed to save file. Error loading "C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_01_i.xnb". This file was compiled for the wrong target platform.
Loading file 'C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_02_i.xnb'...
Failed to save file. Error loading "C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_02_i.xnb". This file was compiled for the wrong target platform.
Loading file 'C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_03_i.xnb'...
Failed to save file. Error loading "C:\Users\Kyo\Desktop\Alba.XnaConvert.0.1.2\xx\Cut_Level_03_i.xnb". This file was compiled for the wrong target platform.
Done!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.