<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>ModdingWiki  - Recent changes [en-gb]</title>
		<link>https://moddingwiki.shikadi.net/wiki/Special:RecentChanges</link>
		<description>Track the most recent changes to the wiki in this feed.</description>
		<language>en-GB</language>
		<generator>MediaWiki 1.39.11</generator>
		<lastBuildDate>Wed, 12 Aug 2026 18:17:53 GMT</lastBuildDate>
		<item>
			<title>DAT Format (Shadowcaster)</title>
			<link>https://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Shadowcaster)&amp;diff=12885&amp;oldid=0</link>
			<guid isPermaLink="false">https://moddingwiki.shikadi.net/w/index.php?title=DAT_Format_(Shadowcaster)&amp;diff=12885&amp;oldid=0</guid>
			<description>&lt;p&gt;Initial draft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
[[Shadowcaster]] contains two forms of DAT archive. This page is about the game&amp;#039;s WAD-like game data archives. Another page details the [[Cutscene Format (Shadowcaster)|cutscene DAT format]].&lt;br /&gt;
&lt;br /&gt;
A Shadowcaster game-data archive has the following general structure:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
uint16_t  NumRecords;    // the number of sub-files contained in this archive.&lt;br /&gt;
uint32_t  Directory;     // an offset from the start of this file to the beginning of the record list.&lt;br /&gt;
&lt;br /&gt;
uint8_t DataRegion[...]; // raw sub-file data. there can be hidden sections here; a sub-file&amp;#039;s start does not have to begin right after the end of the previous.&lt;br /&gt;
&lt;br /&gt;
// within each sub-file record is the following format:&lt;br /&gt;
uint32_t Offset;    // offset to the start of the data, from the beginning of the file.&lt;br /&gt;
uint32_t Size;      // the sub-file&amp;#039;s size in bytes.&lt;br /&gt;
uint16_t NameOfs;   // a pointer from the beginning of the directory to a null-terminated string. this can be zero.&lt;br /&gt;
uint16_t Flags;     // in the floppy version, this is always zero. in the CD version, a value of 1 indicates RLE compression.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Record Names ===&lt;br /&gt;
In this format, sub-file records do not have to have a name.&lt;br /&gt;
&lt;br /&gt;
The underlying logic of this is that the game will often request a specific named lump, then refer to unnamed records using an ID offset from that. For example, if the lump named &amp;quot;view&amp;quot; is lump #0, then the game can refer to &amp;quot;view+5&amp;quot; to refer to lump #5, and therefore, lump #5 does not have to store its name. In such a case, &amp;lt;code&amp;gt;NameOfs = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By convention, SLADE and MapCaster notate the names of these lumps as ID offsets from the last named entry found.&lt;br /&gt;
&lt;br /&gt;
== Reading a DAT Archive ==&lt;br /&gt;
&amp;lt;small&amp;gt;Adapted from MapCaster GML:&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
NumRecords = buffer_read(buf, buffer_u16);&lt;br /&gt;
Directory = buffer_read(buf, buffer_u32);&lt;br /&gt;
&lt;br /&gt;
buffer_seek(buf, buffer_seek_start, Directory);&lt;br /&gt;
for(z = 0; z &amp;lt; NumRecords; z++) {&lt;br /&gt;
    Records[z] = ds_map_create();&lt;br /&gt;
    &lt;br /&gt;
    r = Records[z];&lt;br /&gt;
    r[? &amp;quot;Offset&amp;quot;] = buffer_read(buf, buffer_u32);&lt;br /&gt;
    r[? &amp;quot;Size&amp;quot;] = buffer_read(buf, buffer_u32);&lt;br /&gt;
    r[? &amp;quot;NameOffset&amp;quot;] = buffer_read(buf, buffer_u16);&lt;br /&gt;
    r[? &amp;quot;Flags&amp;quot;] = buffer_read(buf, buffer_u16);&lt;br /&gt;
    &lt;br /&gt;
    // name all lumps&lt;br /&gt;
    if(r[? &amp;quot;NameOffset&amp;quot;] != 0) {&lt;br /&gt;
        last_name = 0;&lt;br /&gt;
        prev_ofs = buffer_tell(buf);&lt;br /&gt;
        &lt;br /&gt;
        // seek to the name table&lt;br /&gt;
        buffer_seek(buf, buffer_seek_start, Directory + r[? &amp;quot;NameOffset&amp;quot;]);&lt;br /&gt;
&lt;br /&gt;
        r[? &amp;quot;Name&amp;quot;] = ReadString(...); // read until 0x00 is encountered&lt;br /&gt;
        &lt;br /&gt;
        // go back to where we were before in reading the directory&lt;br /&gt;
        buffer_seek(buf, buffer_seek_start, prev_ofs);&lt;br /&gt;
    }&lt;br /&gt;
    else {  // if the lump has no name, treat it as being&lt;br /&gt;
            // named as an offset from the previous named lump&lt;br /&gt;
        last_name++;&lt;br /&gt;
        l = Records[z - last_name];&lt;br /&gt;
        r[? &amp;quot;Name&amp;quot;] = l[? &amp;quot;Name&amp;quot;] + &amp;quot;+&amp;quot; + string(last_name);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 14:50:54 GMT</pubDate>
			<dc:creator>Diema</dc:creator>
			<comments>https://moddingwiki.shikadi.net/wiki/Talk:DAT_Format_(Shadowcaster)</comments>
		</item>
		<item>
			<title>Shadowcaster</title>
			<link>https://moddingwiki.shikadi.net/w/index.php?title=Shadowcaster&amp;diff=12884&amp;oldid=12873</link>
			<guid isPermaLink="false">https://moddingwiki.shikadi.net/w/index.php?title=Shadowcaster&amp;diff=12884&amp;oldid=12873</guid>
			<description>&lt;p&gt;Update to also put DAT format spec in, acknowledge a difference between ravdata and cutscene DATs&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:39, 6 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-multi&quot; lang=&quot;en-GB&quot;&gt;(One intermediate revision by the same user not shown)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Name = [https://www.doomworld.com/forum/topic/155625-mapcaster-level-editor-for-shadowcaster/ MapCaster]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Name = [https://www.doomworld.com/forum/topic/155625-mapcaster-level-editor-for-shadowcaster/ MapCaster]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Platform = Windows&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Platform = Windows&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| grp = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;No&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| grp = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Edit&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| map = Edit&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| map = Edit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| gfx = No&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| gfx = No&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  | KnownFormat = Yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  | KnownFormat = Yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  | Desc = Sound effects&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  | Desc = Sound effects&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{GameFile&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Name = ravdata.dat&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Format = [[DAT Format (Shadowcaster)]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | KnownFormat = Yes&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Desc = Data archive&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{GameFile&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Name = *.dat&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Format = [[Cutscene Format (Shadowcaster)]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | KnownFormat = No&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; | Desc = Cutscenes&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{GameFile&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{GameFile&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key moddingwiki:diff::1.12:old-12873:rev-12884 --&gt;
&lt;/table&gt;</description>
			<pubDate>Thu, 06 Aug 2026 14:39:13 GMT</pubDate>
			<dc:creator>Diema</dc:creator>
			<comments>https://moddingwiki.shikadi.net/wiki/Talk:Shadowcaster</comments>
		</item>
		<item>
			<title>OJT Format (Shadowcaster)</title>
			<link>https://moddingwiki.shikadi.net/w/index.php?title=OJT_Format_(Shadowcaster)&amp;diff=12882&amp;oldid=0</link>
			<guid isPermaLink="false">https://moddingwiki.shikadi.net/w/index.php?title=OJT_Format_(Shadowcaster)&amp;diff=12882&amp;oldid=0</guid>
			<description>&lt;p&gt;Initial draft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
[[Shadowcaster]] OJT files describe a list of static objects present in a given level. These files are a linear list of 57-byte records with no header.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
uint32_t Tag;              // does not have to necessarily be unique.&lt;br /&gt;
uint32_t Ptr_Prev;         // typically if there is a previous OJT record before this one, this is set to sizeof(ojt_record) (57).&lt;br /&gt;
uint32_t Ptr_Next;         // same as above, but forwards in the file.&lt;br /&gt;
uint8_t  Collision;        // typically zero for a non-solid object, or 1 for a solid one.&lt;br /&gt;
uint8_t  Gravity;          // a bitfield describing the object&amp;#039;s relationship to gravity.&lt;br /&gt;
                           // some known values: 0 = no gravity; 1 = hangs from ceiling; 3 = spawn on ceiling, subject to gravity.&lt;br /&gt;
char     DisplayName[20];  // not used by the game. a string that usually contains the name of the sprite used. seems to be an editor leftover?&lt;br /&gt;
uint32_t Pic;              // a literal lump number from RAVDATA.DAT. This is the graphic the object will use in the 3D view.&lt;br /&gt;
uint32_t Width;            // the object&amp;#039;s width (or &amp;quot;radius&amp;quot; if you prefer), represented in frac-units (0-63 within a tile).&lt;br /&gt;
uint32_t Height;           // same as the above, but the object&amp;#039;s height along Z+.&lt;br /&gt;
uint32_t Unknown;&lt;br /&gt;
uint8_t  TileX;&lt;br /&gt;
uint8_t  TileY;            // the object&amp;#039;s coarse tile X/Y coordinates (0-31 are valid).&lt;br /&gt;
uint8_t  Sides;            // the number of sides the sprite has. for example: 0 = one-sided sprite, 8 = eight-sided sprite (like Doom).&lt;br /&gt;
uint16_t SubTileX;&lt;br /&gt;
uint16_t SubTileY;         // the object&amp;#039;s sub-tile X/Y fractional values (0-63 are valid).&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reading an OJT file ==&lt;br /&gt;
&amp;lt;small&amp;gt;Adapted from MapCaster GML:&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
for(i = 0; i &amp;lt; NumOjtsInFile; i++) {&lt;br /&gt;
	ojt.Tag = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Ptr_Prev = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Ptr_Next = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Collision = buffer_read(ojt_file, buffer_u8);&lt;br /&gt;
	ojt.Gravity = buffer_read(ojt_file, buffer_u8)&lt;br /&gt;
	ojt.DisplayName = ReadString(20);&lt;br /&gt;
	ojt.Pic = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Width = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Height = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.Unknown = buffer_read(ojt_file, buffer_u32);&lt;br /&gt;
	ojt.x = buffer_read(ojt_file, buffer_u8) * TILESIZE;  // TILESIZE = 64 in Shadowcaster&lt;br /&gt;
	ojt.y = buffer_read(ojt_file, buffer_u8) * TILESIZE;  // TILESIZE = 64 in Shadowcaster&lt;br /&gt;
	ojt.Sides = buffer_read(ojt_file, buffer_u8);&lt;br /&gt;
	ojt.x += buffer_read(ojt_file, buffer_u16);&lt;br /&gt;
	ojt.y += buffer_read(ojt_file, buffer_u16);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 14:27:18 GMT</pubDate>
			<dc:creator>Diema</dc:creator>
			<comments>https://moddingwiki.shikadi.net/wiki/Talk:OJT_Format_(Shadowcaster)</comments>
		</item>
		<item>
			<title>LIB Format (Shadowcaster)</title>
			<link>https://moddingwiki.shikadi.net/w/index.php?title=LIB_Format_(Shadowcaster)&amp;diff=12881&amp;oldid=0</link>
			<guid isPermaLink="false">https://moddingwiki.shikadi.net/w/index.php?title=LIB_Format_(Shadowcaster)&amp;diff=12881&amp;oldid=0</guid>
			<description>&lt;p&gt;Initial draft&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Shadowcaster]] .lib archives can be considered the &amp;quot;ancestor&amp;quot; of the Doom WAD format. They are mostly similar, realistically only differing in how you are expected to find the sub-file directory.&lt;br /&gt;
&lt;br /&gt;
At the high level, .lib archives consist of a data region, the directory region, and finally the number of records stored at the very end of the file.&lt;br /&gt;
&lt;br /&gt;
=== Data Region ===&lt;br /&gt;
&lt;br /&gt;
The data region is simply every file&amp;#039;s contents, concatenated end-to-end. There can possibly be &amp;quot;hidden&amp;quot; sections; one file does not necessarily need to exactly start at the end of the previous, or itself end at the start of the next.&lt;br /&gt;
&lt;br /&gt;
In the case of .lib files, mostly level data and music are stored; graphics are stored in [[DAT Format (Shadowcaster)|DAT files]].&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
&lt;br /&gt;
The directory immediately precedes the record count, and consists of a number of 21-byte entries with the following format:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
uint32_t Size;&lt;br /&gt;
uint32_t Offset;  // from beginning of file&lt;br /&gt;
char RecordName[13];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Record Count ===&lt;br /&gt;
&lt;br /&gt;
Determining how many records are stored in the directory is done by seeking to the end of the file and reading the final uint16_t found there.&lt;br /&gt;
&lt;br /&gt;
== Reading a lib file ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Adapted from MapCaster GML:&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// first, we get the number of records and construct a pointer to the start of the directory&lt;br /&gt;
buffer_seek(Lib, buffer_seek_start, filesize - 2);&lt;br /&gt;
NumRecords = buffer_read(Lib, buffer_u16);&lt;br /&gt;
// offset to the start of the directory:&lt;br /&gt;
Directory = filesize - 2 - (NumRecords * 21);&lt;br /&gt;
&lt;br /&gt;
// seek to the start of the directory&lt;br /&gt;
buffer_seek(Lib, buffer_seek_start, Directory);&lt;br /&gt;
&lt;br /&gt;
// Read all entries until the end&lt;br /&gt;
for(i = 0; i &amp;lt; NumRecords; i++) {&lt;br /&gt;
    Records[i] = ds_map_create();&lt;br /&gt;
    r = Records[i];&lt;br /&gt;
    r[? &amp;quot;Size&amp;quot;] = buffer_read(Lib, buffer_u32);&lt;br /&gt;
    r[? &amp;quot;Offset&amp;quot;] = buffer_read(Lib, buffer_u32);&lt;br /&gt;
    &lt;br /&gt;
    // read the name string&lt;br /&gt;
    r[? &amp;quot;Name&amp;quot;] = ReadString(13);  // directory subfile names are always exactly 13 bytes and follow 8.3 DOS filename convention, and are null-terminated&lt;br /&gt;
&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</description>
			<pubDate>Thu, 06 Aug 2026 13:23:17 GMT</pubDate>
			<dc:creator>Diema</dc:creator>
			<comments>https://moddingwiki.shikadi.net/wiki/Talk:LIB_Format_(Shadowcaster)</comments>
		</item>
</channel></rss>