Jump to content

Recommended Posts

Posted (edited)

Stick of Truth file formats, so far:

.OAF - main archive format. Similar to Dungeon Siege 3. Can be extracted by Raptor's SoT oaf extractor http://raptor.cestiny.cz/download/south-park-the-stick-of-truth-oaf-files-extractor.html

.GFX - Autodesk GFX/SWF format. Used for most part of ingame graphics. Possibly can be edited by Autodesk tools. Or you can change file header from CFX to CWS and file extension to .swf and edit it by any swf editor.

.STD - Strings format. Ingame text stored in here. Can be extracted by Raptor's SoT translator http://raptor.cestiny.cz/download/south-park-the-stick-of-truth-translator.html

.DDS - Texture file format. Edit it with your favourite graphics editor.

.TGA - Another texture file format.

.XML - markup language file format. Easy to edit.

.ACTOR - renamed XMLs.

.OGD - converted/compressed XMLs. Uneditable at the moment.

.WEM - AudioKinetic Wwise RIFF (or RIFX) Vorbis files. Possibly can be converted with ww2ogg and patched with revorb.

.BNK - Soundbank that contains multiple sound files. Possibly can be converted with http://ctpax-cheater.narod.ru/personal/bnkextr.zip

 

Tips:

You don't have to compress oaf archives back. Let's say, you edited gui/se_hazard_bacteria_gas.gfx from unpacked data_archive.oaf and want to test it ingame. Copy new file into ./data/gui/ in game folder and start the game.

 

Items Data:

Categories:

  Reveal hidden contents

 

Item Types:

  Reveal hidden contents

 

 

FSCommands:

You can use FSCommands to call engine functions from within .GFX actionscript.

Example:

getURL("FSCommand:COMMAND", "PARAMS");

Commands list (incomplete):

  Reveal hidden contents

 

 

OGD Data:

 

/global/achievements/achievements.ogd - Achievements

/global/appearance_rigs/*.ogd - Appearance, costumes, etc. for every ingame character, including player

/global/creature_appearance/appearance_manifest.ogd - List of appearance OGDs allowed for game to load

/global/creature_appearance/player_appearance.ogd - Costumes and Items used in Character Creation menus

Note: item icon is defined in plaintext, dye data taken from item name. Actual item referenced by some id

 

Edited by DarkelUncut
Posted (edited)

Yes I was thinking in a possibility of South Park SoT modding, and found dungeon siege oaf extractor (work the same way as the one that you found)

Btw sorry for the stupid question, but how i change file header from cfx to cws?

Edited by he4dless
Posted (edited)

SoT engine is very similar to Dungeon Siege 3 engine. Same file structure, same formats. Almost the only difference and difficulty is that XMLs were packed into OGDs.

 

To change file header from CFX to CWS, use hex editor. Tiny Hexer, for example.

Though I was wrong. You won't be able to edit .SWFs, only view them.

 

To edit them you'll have to:

Outdated. Working methods are listed below this spoiler.

 

  Reveal hidden contents

 

 

Method A (Script editing):

 

  Reveal hidden contents

 

Method B (Overall editing):

 

  Reveal hidden contents

 

 

Update:

List of helpful tools:

Adobe Flash, Scaleform Gfx SDK, Flash Decompiler Trillix, SWiX, Sothink Decompiler, FLASM, RABCDAsm, JPEXS Free Flash Decompiler.

 

Update 2.2:

There is a developer console similar to Dungeon Siege 3 one. To call it:

1. Unpack help_topics.scn and game.gui from data_archive.oaf into data/gui.

2. Open help_topics.scn and change text to console.gfx.

3. Open game.gui and swap help_topics and console parserfunctions, so that it reads:

help_topics.scn parserfunction GUI_command_parser_console

console.scn parserfunction GUI_command_parser_help_topics

4. Run game and open help topics.

Console does work, but it doesn't work as it should. Either there are additional debug variables that need to be enabled, or something else.

Edited by DarkelUncut
Posted

I've managed to do conversions and such, but one problem I encounter in every single one is that all colors have been replaced by shades of red for the most part. Nothing is as it is in-game. Is there a way to fix it so it will display the correct coloration of the resulting SWF files?

Posted

This is due to Scaleform GFXs stripping of gradients and textures. I think it's possible to manually add them back.

If we had a tool that compresses everything back, it would be much easier. Surprisingly, there is no such tool.

I'll look into GFX SDK exporter sources.

Posted

Interesting.

You can force additional GFXs to load ingame. It should be last in ingame.scn loadorder and completely screws overlay menus' (inventories) input handling by some reason.

Posted

So I got the in-game command console to show up. I assume it can be used to insert specific items into inventory or storage, or directly onto the player? If so, how would one go about doing it? I've read over these files and the corresponding commands, but I'm having trouble deciphering how to pull something from storage based on item ID.

  • 2 weeks later...
Posted

The reason the extracted images are showing up red is because the textures they are being painted with are being declared in scaleform tags, so standard flash tools will not understand them.

 

Here are some technical details for anyone who is familiar with the guts of an SWF.

 

The gfx files in stick of truth use 3 nonstandard tag codes outside the normal flash codes. These are:

 

1000 (ExporterInfo)

 

1008 (DefineSubImage)

 

1009 (DefineExternalImage)

 

I haven't looked into the first 2 much yet, but the 3rd is used to reference DDS files to be used as textures. tag 1009 assigns an image to a character_id, and that character_id is then used in fillstyle declarations in order to fill the shape. Because the char_id is being declared in a tag flash doesn't understand, when it is time to render the shape, there is no matching asset under that character_id.

 

As an example, the gfx file se_mark_for_death.gfx (a loop animation of the dog, sparky) will appear as shades of red if you look at the shapes defined. Inside this file, we have a tag 1009 with character id 8 and filename "___backup_texture_palette_i63.dds". We then have a DefineShape2 with char_id 9, which contains a ShapeWithStyle record. The very first ShapeRecord is a stylechange record, and it sets the fillstyle to index 1, which has a bitmap_id value of 8. So this shape is meant to be filled with that image, but because it was declared in a 1009 tag, only a scaleform client will properly load that asset.

 

Flash has no idea what char_id 8 is, so it can't load anything.

 

One solution would be to convert the dds to a bmp, then change the 1009 tag to a DefineBits tag, maintaining the char_id.

  • 4 weeks later...
Posted

How about creating content for the character, though? I'm interested in making custom content in the way of hair, makeup, clothes, and even skin-tone. But unlike a lot of other games, I'm not sure where to start for this, despite the content I have in mind likely being pretty easy to put together.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...