Glad to see you here, because, if you are here, that means, that you are interested in Twinsanity Modding! Let me introduce you into basics of Twisanity Editor. Twinsanity Editor have four main GUI parts: Structure tree on the right, Summary window on the right-middle, menu on the top and frequently used tools on the right.
HEX Viewer - badly made HEX Viewer for emergency use
Export - Smartly Exports asset. For example, exports Game Object as packet of files, including all linked GO, Models, Sounds, Scripts and etc. Also smartly exports Sound Description with sound stream. Extract will only extract Game Object Asset and Sound Description without audio stream.
Search - Search asset by ID, Name or something else.
Replace - replaces asset with external asset
Extract - extracts asset as it is
Add - adds new external asset
Delete - deletes selected asset
New - makes new asset with default settings. Please, avoid using that feature
Import - imports Game Object with all connections in packet. Same with exported Sound Description - adds Sound Description asset and adds audio stream to Sound bank.
Replace Local - replaces ID2 item ID1 within one section
Randomize - just for fun, randomize items
FIle menu has common features. Use Open to open your level file. Save and Save As functions works as it works everywhere. New RM2 and New SM2 are experimental and are not recommended for use. Utilities
Utilities menu contains useful utilities for Twinsanity assets work. Elf Patcher - used when you need to patch your elf file E3 Converter - Vice verse Release <=> E3 converter Refresh Library - if you did some changes in Library.txt, you have to use this option. GeoData
Utilities section for GeoData tools. GeoData Visualizer - 3D View of level collision grid, triggers and instances on it. Clear GeoData - ERASES all GeoData (not Instance Info section) Add Layer SB ID: Converts Obj model to GeoData and adds it to collision grid with entered below Surface Behavior ID. Export OBJ - Converts all GeoData to single OBJ model Export OBJ Layered - Converts GeoData to separate OBJ models for every Surface Behavior. TriggerTree - debug feature. Graphics
Graphics Utilities. View Selected - views selected item from Graphics Section. Hotkey: Ctrl+V PSM Worker - Utilitie, that allows to view and both ways convert PSM, PTC and PSF images. Import Texture - Converts png image to Twinsanity Texture file Export Model - Converts Model or Graphics Compilation asset to OBJ Model Import Model - Converts OBJ Model to Twinsanity Model. Sound
Sound utilities. Play - plays selected sound file. Hotkey: Ctrl+P Convert to WAV - converts Twinsanity Sound to WAV Audio WAV to TwinSND - converts WAV Audio file to Twinsanity Sound stream. MH Worker - tool for working with MH Music Archives About
Version of Twinsanity Editor, Creator and peoples, who helped much. Thank you all! Open Level
First of all, you have to open Twinsanity Level - RM2 (Game logic) SM2(Terrain and scenery) file. You can get them by unpacking CRASH.BH Archive from game disc with BH Extractor form Additional Utilities archive. Press Files->Open Level Type
Note: You can change type of level you want to load here.
RM2 Level consists of few main sections - Graphics Section, Code Section, GeoData Section, Instance Info Section and some unknown element. Graphics Section
Textures - Twinsanity textures for models Materials - Have names. Have some additional info and reference to Texture. Model - vertex data, without texture Graphics Compilation (GC) - Have reference to Material and Model ID4Models - Some models of unknown format. ID5Models - Some models of unknown format. Rigged. GC - GC from SM2 file Unk Section 7 - Some SM2 Scenery data Unk Section 8 - Some SM2 Scenery data Code Section
Game Objects - heart of a level, if GeoData is liver. Or bones, whatever you want. Basically they are collection of OGI, Animations, Scripts, Sounds and links to other objects. OGI and Animations are paired. Every Script slot has it's own event - in which case script will trigger. Scripts - the rules, which determines, how objects will behave. Animations - name says all about it. Object Graphic Info - contains info about collision box, GC Lists, ID4 and ID5, etc. Unknown Section - some scripts, on which projectiles refer, foe example Sound Description - has info about length of audio, offset in Sound Bank, frequency and etc. Sound Effect Bank - stream of sound effects. NTSC\PAL Voice - Sound Descriptions and Streams for voice Instance Info Section
Game Object is template, scenario, description. Like blueprint of chair. Existing, placed chair is Instance. Unknown Section - encounters only in Default.rm2 Behavior - Responsible for navigation Fucking Shit - Responsible for navigation Position - simple Vector3 position Path - collection of 3D Positions Surface Behavior - Determines properties of GeoData surfaces. Only encounters in Defualt.rm2 Instance - Instance of Game Object, with position, rotations, connections and etc Trigger - zone which will call trigger event in Instance Unknown Section - presumably camera settings
PSM Worker is a great utility, that allows you to WORK WITH PSM SUDDENLY! It allows you to view Twinsanity files, save it as PNG and convert PNG files to PSM. Open PSM
First of all, open PSM you are interested in. They are lying in CRASH.BD Archive. PSM Worker Interface
Open - opens a PSM file. Demo flag - check it, if you are opening images from E3 demo. << and >> used, if you have selected few PSM files Save - saves Image as PNG BW Flag - Disables colors, BlackWhite filter Replace Segment - PSM consists of few Textures, that we call Segments. With that button you can replace it. USE 8-BIT PNG FOR THE QUALITY SAKE. Use images with power-of-two sizes, like 64x32. Replace 512x512 - if your PSM is 512x512 image, you can automatically replace whole PSM with 512x512 PNG Multiple Select
Just select multiple PSMs in Open dialog Multiple Select Switching
And then navigate with << and >> buttons Segment Replacement
Select segment you want to replace, open 8-bit PNG with power-of-two sizes and see result. 512x512 image replacement
If you work with most common 512x512 PSM, you can automatically replace all segments using 512x512 8-bit PNG. Note: you can use 16, 24, 32 bit PNG too, but my method of color reducion to 256 colors is kinda bad, so just save your image as 8-bit PNG in external editor GeoData Visualizer
Useful for you thing is GeoData Visualizer. Loading
Wait a little, Editor needs a time to process all collision data Movement
Use QWEASD buttons to move, mouse to rotate your camera Points, Pathes and Triggers
Press T Button to show Triggers, Positions and paths. Patching ELF
If you want to patch game's ELF, select your region and then open game's ELF ELF Patcher settings
For now there are two useful options: change startup level and chage name of archive to load. Don't forget to check boxes, if you want to apply your changes. E3 Convertor
Select in type Combo Box, what you want to convert and then open file you need. Texture Importer
In Combo Box select type of image you want to convert and then open mathing PNG Image. Texture will be saved in same folder where input Image is. Opening Music MH
Open Music archive from Disk contents. I'd recommend you to not use Music archive you are going to pack into ISO Image, because you can't overwrite opened in MH Worker archive, due to technical side. Best solution - mount game's Image and open Music archive from virtual drive, then save it in your project folder. MH Worker
MH Worker has simple interface. On the left side of window placed list of tracks. Some of them is named - mono tracks with voice. Stereo tracks doesn't have names. Reserved is beep-beep sound placeholder, that you can replace by anything you want. Still, you can just add new track, without replacing reserved slot. To listen press "Load" button first of all. When "Loaded" indicator say "yes", you can press "Play" button. No need to explain "Pause" and "Stop"? You can add new track by pressing "Add" button. Then select WAV Audio file you want to convert, wait a little and job's done! Same does "Replace", but it replaces existing track. Delete will delete selected track. To save selected track as WAV Audio, press "Convert". When you're done, press "Repack MB Archive". Texture Viewer
To view selected texture use Ctrl+V hotkey of Utilities->Graphics->View Selected. You can navigate between textures by "<<" and ">>" buttons. To convert Twinsanity Texture to PNG, use "Save" button Material Viewer
Material is just a reference to Texture, at least yet, so it does same things. Materials has names and few materials can refer to one texture. GC and Model Viewer
To view Model or GC use Ctrl+V hotkey of Utilities->Graphics->View Selected. Main difference between Model and GC is that Model just plain vertex data, when GC has links to Model and Materials. Navigation is same, as it was in GeoData Viz.
Behavior is simple Vector4 with some number, presumably used for AI Navigation. When you done with changes, press "Apply". If you did something wrong, press "Revert". Fucking Shit
FS is collection of five IDs. Purpose is unknown. When you done with changes, press "Apply". If you did something wrong, press "Revert". Position
Just Vector3 item. When you done with changes, press "Apply". If you did something wrong, press "Revert". Instance: General
ID - ID of instance Object ID - ID of Game Object, instance of which will be created. Flags - some flags, responsible for behavior. SatanVariable - 666 X,Y,Z - coordinates in level RotX, RotY, RotZ - rotations. In game files are 0 to 65535 values. When you done with changes, press "Apply". If you did something wrong, press "Revert". Instance: Collections
Collections of references and values are very important. They are separated in two sections - variables on the left and links on the right. Something - some unknown collection Float - collection of float variables for Game Object's purposes. For example, friction of character. Integer - collection of integer variables for Game Object's purposes. For example, Mask state or track ID. Position - collection of Positions, that used, for example, by Worms. They refer to order number of Position, not ID! Path - collection of Paths, that used, for example, by Birds in the sky. They refer to order number of Path, not ID! Instance - collection of Instances, that used, for example, by Detonator crate. They refer to order number of Instance, not ID! When you done with changes, press "Apply". If you did something wrong, press "Revert". Game Object
Game Object mostly consists of Unknown purpose data, unknown format data and collections. ID - ID of Game Object. Name - Name of Game Object. Class1, Class2, Class3 and Param are unknown purpose variables. Unknown Shit - COLLECTION OF UNKNOWN PURPOSE DATA, SUDDENLY! Maybe if i named it so, then it mean, than i don't know? OGI - collection of OGI IDs. Animation - collection of Animation IDs. OGI and Animations in order represents Graphical State. For example, if we have OGI List 1, 4, 5 and Animation list 4, 13, 1488, then it means, that Game Object has three Graphical States. First is With OGI 1 and Animation 4, Second is OGI 4 and Animation 13, and etc. Script - collection of scripts. Order is important, because event, when script will trigger, depends on it's order number. Game Object - collection of Game Objects. Used by scripts. Sounds - collection of Sounds. Used by scripts. SomeValues - IDFN Floats - collection of Floats Integers - collection of Integers. When you done with changes, press "Apply". If you did something wrong, press "Revert". Path
Collection of Vector 3 variables and Some numbers, somehow connected with Path points. When you done with changes, press "Apply". If you did something wrong, press "Revert". Trigger
Trigger is an 3D area, that will trigger some object, when Player reaches Trigger area. ID - ID of Trigger. Flags - some Flags. Number - GUESS FUCKING WHAT, OH HOW I'M FUCKING TIRED WITH THAT REFERENCE, NOBODY EVER WILL READ IT! NOBODY EVER WILL MAKE SOME MODS FOR TWINSANITY! HYPE IS ALREADY GONE AND TWINSANITY EDITOR IS STILL NOT ADVANCED ENOUGH TO MAKE YOUR FULLY CUSTOM LEVELS! Sorry. SomeValue1, SomeValue2, SomeValue3, SomeValue4, SomeNumber - i know, that they are exist, please, believe me, and they do something important, i don't know WHAT. Trigger has collection of instances to trigger. It refers to it's Order Number, not ID. Position Vector3 - position of bottom corner of area. Size Vector3 - size of trigger area. Vector3 - When you done with changes, press "Apply". If you did something wrong, press "Revert". Surface Behavior
Surface Behavior determines, how your character will behave on collision with surface. It have named flags (Thanks to BetaM). Other data are unknown, except that one group of variables is responsible for Physics behavior of player. When you done with changes, press "Apply". If you did something wrong, press "Revert". Object Graphics Info
Note: all changes made here instantly applies. ID - ID of OGI. Flags - Flags of OGI. Vector1 and Vector2 - some Vectors =D T1 and T2 some 3D info. Second window of T1 and T2 are matrixes.