RSW - Resource World File

October 26th, 2005

Resource World, it’s a file that contains how a map is structured. It has a header, and then starts objects list, first an integer to design the model type, and then series of that (integer+object).

Rsw Header

Main Size : 246 bytes
* Field Size Type Description
0 Header 6 bytes Integer GRSW..
6 Ini File 40 bytes Char Only in Alpha
46 Ground File 40 bytes Char Gnd file
86 Altitude file 40 byte Char Gat file
126 Src File 40 byte Char Only in Alpha
- Water - (More info …)
166 Height 4 byte Float -
170 Type 4 byte Integer -
174 Amplitude 4 byte Float -
178 Phase 4 byte Float -
182 Surface Curve Level 4 byte Float -
186 Texture Ciclyng 4 byte Integer -
-
- Light
190 Ambient Red 4 byte Float -
194 Ambient Green 4 byte Float -
198 Ambient Blue 4 byte Float -
202 Difusse Red 4 byte Float -
206 Difusse Green 4 byte Float -
210 Difusse Blue 4 byte Float -
214 Shadow Red 4 byte Float -
218 Shadow Green 4 byte Float -
222 Shadow Blue 4 byte Float -
226 Alpha Value 4 byte Float Transparency
Light
230 ?? 4 bytes ?? -
242 Objects Count 4 bytes Integer Models + Sounds + Etc…
{ Objects
0 Object Type 4 bytes Integer See Below
4 Object x bytes - Depends on type
}

Rsw Body

Type 1 Size : 248 bytes
* Field Size Type Description
0 Name 40 bytes Char Unique name
40 ?? 4 bytes Integer  
44 ?? 4 bytes Float  
48 ?? 4 bytes Float  
52 Filename 40 bytes Char More info …
92 Reserved 40 bytes Char -
132 Type 20 bytes Char More info …
152 Sound 20 bytes Char Sound associated
212 Position X 4 bytes Float -
216 Position Y 4 bytes Float  
220 Position Z 4 bytes Float  
224 Rotation X 4 bytes Float  
228 Rotation Y 4 bytes Float  
232 Rotation Z 4 bytes Float  
236 Scale X 4 bytes Float  
240 Scale Y 4 bytes Float  
244 Scale Z 4 bytes Float  
Type 2 - Light Size : 108 bytes
* Field Size Type Description
48 Position Z 4 bytes Float  
52 ?? 40 bytes Char  
92 Color R 4 bytes Float  
96 Color G 4 bytes Float  
100 Color B 4 bytes Float  
104 ?? 4 bytes Float  
Type 3 - Sound Size : 192 bytes
* Field Size Type Description
0 Name 40 bytes Char Unique name
40 ?? 40 bytes Char  
80 Filename 40 bytes Char Wav file
120 ?? 20 bytes Char  
140 Position X 4 bytes Float  
144 Position Y 4 bytes Float  
148 Position Z 4 bytes Float  
152 ID 40 bytes Char ot sure
Type 4 - Effect Size : 116 bytes
* Field Size Type Description
0 Name 40 bytes Char Unique name
40 ?? 4 bytes Float  
44 ?? 4 bytes Float  
48 ?? 4 bytes Float  
52 ?? 4 bytes Float  
56 ?? 4 bytes Float  
60 ?? 4 bytes Float  
64 ?? 4 bytes Float  
68 ?? 4 bytes Float  
72 ?? 4 bytes Float  
76 Category 4 bytes Char  
80 Position X 4 bytes Float -
84 Position Y 4 bytes Float  
88 Position Z 4 bytes Float  
92 Type 4 bytes Integer More info …
96 Loop 4 bytes Float Time to loop
100 ?? 4 bytes Float  
104 ?? 4 bytes Float  
108 ?? 4 bytes Integer  
112 ?? 4 bytes Integer  


Info :
- - Designs a block type
{ } Designs a loop block
Credits :
Rodney Jason for water analysis
End_of_exam (info from igun source: gnd, rsw objects)
deufeufeu / ender (previous research)
ArtForz (previous research)


4 Responses to “RSW - Resource World File”

  1. Borf on November 6, 2006 3:34 am

    Could you please clarify the RSW body? it’s about 64k big, but my map’s just black when I remove it

  2. Dado on March 7, 2007 5:57 am

    MUIOTO BOM!

  3. flaviojs on March 25, 2007 1:07 am

    Hi, your format seams to be for version 2.0.
    The light part of the header is being read in a different way.

    You can check the differences between the various versions here:
    http://svn.eathena.ws/svn/ea/devel/FlavioJS/client/file_formats/rsw.cpp

    (still very rought at this stage, started yesterday)
    ————
    The ~64kb worth of data at the end in v2.1 is a 6 level deep quad tree of areas of the models or something like that (Borf knows better what it is, it’s his info)

  4. DaveYo on July 6, 2007 3:21 pm

    You have an error in Type1 objects: size - 248, but the size of structure is 208 bytes. Look here:
    152 Sound 20 bytes Char Sound associated
    212 Position X 4 bytes Float

    sound - 20 bytes, but offset - 60!
    And where is an error? in structure size or in structure itself?

Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind

    About this blog
    Here i post all Ragnarök Online related Tools