Skeleton Files

For those of us who are curious and like to poke around in the game's data files and scripts as well as glitching. Caters to anything from unit/building stats to level data to telling how to glitch and stories of game errors.
GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 858
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Skeleton Files

Post by GoldStar611 » Tue Sep 15, 2009 9:28 pm

Purpose of this document: To create new style units. And by new I mean as in new shaped units.

Alright, I've started dissassembly of the skeleton files -- starting with the most basic triangle.skl in the data\wireless directory. I did a quick read/search on google to familiarize myself with current wireframe/model formats and UA's seem to be in Vertex/Edge format where the POO2 section are the verticies (x, z, y in FPUs) and POL2 are the edges (in unsigned ints).

Code: Select all

From triangle.skl:
P O O 2
00 00 00 30                          Section size  0x30 (48) bytes
00 00 00 00 00 00 00 00 c4 a7 80 00  Point 0(0 0 -1340)
00 00 00 00 00 00 00 00 c4 a2 80 00  Point 1(0 0 -1300)
44 7a 00 00 00 00 00 00 44 2f 00 00  Point 2(1000 0 700)
c4 7a 00 00 00 00 00 00 44 2f 00 00  Point 3(-1000 0 700)

Code: Select all

From triangle.skl:
P O L 2
00 00 00 16        (Section size  0x16 (22) bytes)
00 00 00 03        (Number of polygons)
00 02 00 00 00 03  (Command: 02 means connect line from vertex 0000 to 0003)
00 02 00 03 00 02  (Line from 0003 to 0002)
00 02 00 02 00 01  (Line from 0002 to 0001)
The format is really easy to understand, it's just making sense of all of it and documenting it that takes forever. The next easiest skeleton file to understand is frame.skl -- it is just a square.

Some files have a SEN2 part too I'll have to investigate this further at a later date. We still have a long way to go as I have to figure out the STRC and Area Mesh identifiers as well within set.bas

FPU converter:
http://www.h-schmidt.net/FloatApplet/IEEE754.html
Attachments
POO2.py.txt
Python POO2 class
(1.39 KiB) Downloaded 15 times
POL2.py.txt
Python POL2 class
(1.94 KiB) Downloaded 10 times
Last edited by GoldStar611 on Fri Mar 26, 2010 4:28 am, edited 4 times in total.
Image
Image

User avatar
leftylink
Useless Bystander Admin
Useless Bystander Admin
Posts: 799
Joined: Sat Dec 01, 2007 8:41 pm
Location: To your left. No, your other left.

Re: Skeleton Files

Post by leftylink » Wed Sep 16, 2009 8:56 pm

Ormu wrote:
Ormu wrote:I also made a working SKLT editor which I will post here later... :ninja:
Forget this. :P I have created a plugin for Blender that allows importing and exporting SKLT files. Now you can finally create new wireframes with a real 3D model editor.

Textures aren't supported yet but research goes on...


Download:
http://metropolisdawn.com/files/persona ... 9.2013.zip

Requirements:
Blender (v. 2.5 or newer)
http://www.blender.org/


Installation:

After installing Blender, locate the addons directory:
http://wiki.blender.org/index.php/Doc:2 ... on/Add-Ons

Unpack the plugin and copy the folder ("io_mesh_sklt") into the addons directory.
Start Blender, go to File -> User preferences -> Addons -> Import-export -> enable SKLT plugin.
Now there should be entry for Skeleton(.sklt) in File -> Import/Export menus.


Import options:

Filename filter: Choose which files (by extension) to show.

Import SEN2: Whether to process SEN2 section data when importing (see notes).


Export options:

File extension: Which extension to use for the new file. .sklt = most models inside BAS files, .skl = HUD models (\data\wireless\).

Filename filter: Same as above

Primitive mode: How to process 3D primitives
>>Polygon mode: Save polygons as polygons. This is recommended for most models.
>>Edge mode: Save edges (lines from vertex to another). Use this only when there are lines that do not belong to any polygon (mostly HUD models) as polygon mode ignores them. Polygons that consist of separate edges can't (probably?) be textured!

SEN2 mode: How to save SEN2 data (see notes).
>>Ignore: Do not save anything.
>>Save: Save existing SEN2 data if it exists.
>>Auto-generate: Automatically generate the "SEN2 box" around the model and save it.


Notes:

-Y and Z coordinates are flipped in UA, i.e. Y is negative above ground and Z is negative from north to south.

-Switch from edit mode to object mode before exporting to make sure that all chages are applied to the objects.

-Only mesh objects are supported at the moment.

-You may want to delete the cube which is created by default when Blender starts.

-Duplicate vertices and invalid primitives ("0" and "1-gons") are ignored when importing.

-The function of SEN2 section is currently unknown. It might be related to model scaling, or it might not have any function.

-The SEN2 data is imported as a separate object named "SEN2_BOX". The name is hard-coded so do not change it (see below).

-You can import multiple files but new SEN2 objects will be renamed if they are imported. The export plugin will export them as ordinary meshes (see above) so they should be deleted.

-SEN2 section should have 8 vertices if it exists. Otherwise glitches may occur.

-This is highly experimental! Backup your works and report all problems!


I have very little experience on 3D modeling or Blender itself so feel free to request for any feature that should be added.
Attachments
SKLTplugin_1.9.2013.zip
Skeleton import.export Blender by Ormu
(5.62 KiB) Downloaded 8 times
Last edited by GoldStar611 on Thu Nov 24, 2016 7:53 pm, edited 1 time in total.
Reason: goldstar611: Commandeering leftys post to promote some good stuff
~Leftylink, the former Useless Bystander Admin.
Retired from UA since university. May play again someday...

"SERP RUSH KEKEKEKEKEKEKEKE!!!"
"OMG I SAID NO RUSH 15 MINS!!!!!!" *dies*

Proud creator of the Urban Assault Campaign Guides [Resistance] [Ghorkov] [Taerkasten], the Urban Assault LDF Reader, and the Excel maps

User avatar
leftylink
Useless Bystander Admin
Useless Bystander Admin
Posts: 799
Joined: Sat Dec 01, 2007 8:41 pm
Location: To your left. No, your other left.

Re: Skeleton Files

Post by leftylink » Sun Sep 20, 2009 4:15 pm

A lot of things to address in that post...

first of all, maybe http://www.cfxweb.net/modules.php?name= ... e&sid=1922 would help, but I don't know, I didn't look at it extensively.
http://nehe.gamedev.net/ seems to have stuff in a lot of programming languages, including VB, VB.NET, and ASM, among others.

At this point though, I really have to ask, why, why, why would you ever write entire programs in assembly language? Are other languages too high-level fo ryou or something? (To be fair, VB is higher level, so fine). Writing code at the low level like that is IMHO painful enough that the only time it would ever be worth it it is in specific sections of a larger program (programmed in some sane programming language) that is absolutely performance critical. I can acknowledge that knowing assembly language (for any platform, really, but the more platforms the better actually!) contributes a lot to your programming knowledge, so it's no doubt a very cool thing that you know assembly, but actually writing whole programs for it... again, painful!

If the answer's just that assembly and visual basic are the only languages you happen to know, then I guess one could call it bad coincidence that those two are languages that people don't usually use to run OpenGL. I mean, I could suggest learning C++ because OpenGL has bindings for it, but I don't know if it'll take too long to learn or even if it'll change your language preferences. But consider it as a suggestion from one programmer to another, as a tool that might help make your job easier. If you write in C++, that code should be able to call your assembly code if you do... something.

Of course, there's also the consideration that if you write code in VB, I'll refuse to learn VB or work on that code. Assembly I might deal with because I think it'd be nice for me to learn it, but again it's a lot more painful than writing at a higher level...

As for 3d modeling... meh, I'd be okay with google sketchup, though if working with it under Linux it'd probably have to go on Wine. The most well known free (both as in speech and as in beer/lunch) would have to be Blender, so consider that.
~Leftylink, the former Useless Bystander Admin.
Retired from UA since university. May play again someday...

"SERP RUSH KEKEKEKEKEKEKEKE!!!"
"OMG I SAID NO RUSH 15 MINS!!!!!!" *dies*

Proud creator of the Urban Assault Campaign Guides [Resistance] [Ghorkov] [Taerkasten], the Urban Assault LDF Reader, and the Excel maps

UrbanAce3
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 152
Joined: Mon Jul 07, 2008 12:39 am
Location: New Zealand

Re: Skeleton Files

Post by UrbanAce3 » Fri Oct 02, 2009 6:11 am

I know i said that the other post i made would be my last but this made me come back. Wow this so does this mean the in game models could be replaced with new ones ?
UrbanAce3~
:/i163.photobucket.com/albums/t318/Al-Khabir/UrbanAssaultSig7.gif[/img]
://i529.photobucket.com/albums/dd333/pete_kaboom/SulgogarsUB2.png[/img]

garry's waffle
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 286
Joined: Sat Nov 21, 2009 3:18 pm

SKL File

Post by garry's waffle » Fri Mar 19, 2010 3:28 am

Teach me how to open SKL file in data/wireless. perhaps that is model file?

GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 858
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Re: SKL File

Post by GoldStar611 » Sun Mar 21, 2010 9:26 pm

the skeleton file is part of the heads up display when you jump in the vehicle. In the file is a POO2 and a POL2 section which lists the coordinates (XYZ) of the verticies and also a section of edges. I'll send out a little more information later but have a look here on the BAS file explanation -- it uses the exact same style files
viewtopic.php?f=23&t=464&p=4704#p4704
Image
Image

User avatar
MarcOlle
Bugged Ostwind?
Bugged Ostwind?
Posts: 542
Joined: Fri Apr 09, 2010 8:48 pm
Location: Brazil
Contact:

Re: Skeleton Files

Post by MarcOlle » Tue May 18, 2010 8:22 pm

Whoa! This is great, now the game will can have new vehicles!!!
Trying to do a comeback...
://i529.photobucket.com/albums/dd333/pete_kaboom/SulgogarsUB2.png[/img]
Image
________________________________________________________________________________________
Fra6160 at 29/Apr/2009 wrote:In 2011 we'll discover the plasma creation :D
And still we have not discovered the plasma creation...

User avatar
MarcOlle
Bugged Ostwind?
Bugged Ostwind?
Posts: 542
Joined: Fri Apr 09, 2010 8:48 pm
Location: Brazil
Contact:

Re: Skeleton Files

Post by MarcOlle » Wed May 19, 2010 12:26 am

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
That's amazing!!!!
But you can edit this SKLT files? And what is this first unit? I can't identify it...
Trying to do a comeback...
://i529.photobucket.com/albums/dd333/pete_kaboom/SulgogarsUB2.png[/img]
Image
________________________________________________________________________________________
Fra6160 at 29/Apr/2009 wrote:In 2011 we'll discover the plasma creation :D
And still we have not discovered the plasma creation...

User avatar
MarcOlle
Bugged Ostwind?
Bugged Ostwind?
Posts: 542
Joined: Fri Apr 09, 2010 8:48 pm
Location: Brazil
Contact:

Re: Skeleton Files

Post by MarcOlle » Wed May 19, 2010 12:55 am

But the animations don't is just 2d animations?
Trying to do a comeback...
://i529.photobucket.com/albums/dd333/pete_kaboom/SulgogarsUB2.png[/img]
Image
________________________________________________________________________________________
Fra6160 at 29/Apr/2009 wrote:In 2011 we'll discover the plasma creation :D
And still we have not discovered the plasma creation...

GoldStar611
BlackSect Creator
BlackSect Creator
Posts: 858
Joined: Sun Dec 02, 2007 1:16 am
Location: USA
Contact:

Re: Skeleton Files

Post by GoldStar611 » Wed May 19, 2010 10:47 pm

Not sure, but I was able to manually inject a brand new image into the SET.Bas file and change the weasel to use this new file. I'd like to create my own wireframe but this will take some time, I may just mess around with the weasel skeleton for a while. Ability to create new units is coming soon I hope. Once I get it down how to do it by hand I can take some time to program it out.
Image
Image

Post Reply