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 81: | Line 81: | ||
1555, '0.43.04', | 1555, '0.43.04', | ||
1556, '0.43.05', | 1556, '0.43.05', | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
); | ); | ||
Line 161: | Line 136: | ||
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 148: | ||
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); | ||
Line 201: | Line 163: | ||
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 172: | ||
$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 204: | ||
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 210: | ||
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> |