v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Editing User:Quietust/rawextract.pl
Jump to navigation
Jump to search
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 77: | Line 77: | ||
1551, '0.43.01', | 1551, '0.43.01', | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
); | ); | ||
Line 154: | Line 125: | ||
$version = readLong($raw); | $version = readLong($raw); | ||
if (exists($versions{$version})) { print "World is from version $versions{$version}\n"; } | if (exists($versions{$version})) { print "World is from version $versions{$version}\n"; } | ||
− | else { print "World is from an unrecognized version | + | else { print "World is from an unrecognized version!\n"; } |
my $comp = readLong($raw); | my $comp = readLong($raw); | ||
if ($comp == 1) { $raw = decompress($version, $raw); } | if ($comp == 1) { $raw = decompress($version, $raw); } | ||
Line 161: | Line 132: | ||
seek($raw, 0x46, 1); | seek($raw, 0x46, 1); | ||
if ($version >= 1372) { seek($raw, 0x14, 1); } | if ($version >= 1372) { seek($raw, 0x14, 1); } | ||
− | if ($version >= | + | if ($version >= 1400) { seek($raw, 0x4, 1); } |
if ($version >= 1441) { seek($raw, 0x14, 1); } | if ($version >= 1441) { seek($raw, 0x14, 1); } | ||
− | if ($version >= | + | if ($version >= 1531) { seek($raw, 0x18, 1); } |
− | |||
− | |||
− | |||
− | |||
if (readByte($raw)) { | if (readByte($raw)) { | ||
seek($raw, readShort($raw), 1); | seek($raw, readShort($raw), 1); | ||
Line 177: | Line 144: | ||
my $len = readShort($raw); | my $len = readShort($raw); | ||
read($raw, my $world, $len); | read($raw, my $world, $len); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
print "Extracting randomly generated raws of $world:\n\n"; | print "Extracting randomly generated raws of $world:\n\n"; | ||
} | } | ||
− | elsif (open($raw, '<', $dir.'world.sav')) { | + | elsif (open($raw, '<', $dir.'world.sav')) |
+ | { | ||
binmode($raw); | binmode($raw); | ||
$version = readLong($raw); | $version = readLong($raw); | ||
if (exists($versions{$version})) { print "World is from version $versions{$version}\n"; } | if (exists($versions{$version})) { print "World is from version $versions{$version}\n"; } | ||
− | else { print "World is from an unrecognized version | + | else { print "World is from an unrecognized version!\n"; } |
my $comp = readLong($raw); | my $comp = readLong($raw); | ||
if ($comp == 1) { $raw = decompress($version, $raw); } | if ($comp == 1) { $raw = decompress($version, $raw); } | ||
Line 201: | Line 159: | ||
seek($raw, 0x56, 1); | seek($raw, 0x56, 1); | ||
if ($version >= 1372) { seek($raw, 0x14, 1); } | if ($version >= 1372) { seek($raw, 0x14, 1); } | ||
− | if ($version >= | + | if ($version >= 1400) { seek($raw, 0x4, 1); } |
if ($version >= 1441) { seek($raw, 0x14, 1); } | if ($version >= 1441) { seek($raw, 0x14, 1); } | ||
− | if ($version >= | + | if ($version >= 1531) { seek($raw, 0x18, 1); } |
− | |||
− | |||
− | |||
− | |||
my $len = readShort($raw); | my $len = readShort($raw); | ||
Line 214: | Line 168: | ||
$len = readShort($raw); | $len = readShort($raw); | ||
read($raw, my $world, $len); | read($raw, my $world, $len); | ||
− | + | print "Extracting randomly generated raws of $world:\n\n"; | |
− | + | readLong($raw); # year | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | print "Extracting randomly generated raws of $world | ||
} | } | ||
else { die("Could not open world.dat or world.sav!"); } | else { die("Could not open world.dat or world.sav!"); } | ||
Line 256: | Line 200: | ||
if ($version >= 1441) { extractList($raw, 'plant', 'PLANT'); } | if ($version >= 1441) { extractList($raw, 'plant', 'PLANT'); } | ||
− | if ($version >= | + | if ($version >= 1400) { extractList($raw, 'item', 'ITEM_.*?'); } |
extractList($raw, 'creature', 'CREATURE'); | extractList($raw, 'creature', 'CREATURE'); | ||
Line 262: | Line 206: | ||
if ($version >= 1441) { extractList($raw, 'entity', 'ENTITY'); } | if ($version >= 1441) { extractList($raw, 'entity', 'ENTITY'); } | ||
− | if ($version >= | + | if ($version >= 1531) { extractList($raw, 'reaction', 'REACTION'); } |
if ($version >= 1372) { extractList($raw, 'interaction', 'INTERACTION'); } | if ($version >= 1372) { extractList($raw, 'interaction', 'INTERACTION'); } | ||
− | if ($version >= | + | if ($version >= 1441) { extractList($raw, 'language', 'TRANSLATION'); } |
print "done!\n";</nowiki> | print "done!\n";</nowiki> |