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.php
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 1: | Line 1: | ||
+ | How to add discussion? This need to extract generated positions of various groups (human and goblin civilizations, bandits, guilds). | ||
+ | |||
<nowiki><?php | <nowiki><?php | ||
$versions = array( | $versions = array( | ||
Line 93: | Line 95: | ||
1712 => '0.47.03', | 1712 => '0.47.03', | ||
1715 => '0.47.04', | 1715 => '0.47.04', | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
); | ); | ||
Line 109: | Line 104: | ||
while (1) | while (1) | ||
{ | { | ||
− | $len = | + | $len = readLong($file); |
if (feof($file)) | if (feof($file)) | ||
break; | break; | ||
Line 175: | Line 170: | ||
if ($version >= 1662) | if ($version >= 1662) | ||
fseek($raw, 0x8, SEEK_CUR); | fseek($raw, 0x8, SEEK_CUR); | ||
− | |||
if (readByte($raw)) | if (readByte($raw)) | ||
{ | { | ||
Line 186: | Line 180: | ||
$len = readShort($raw); | $len = readShort($raw); | ||
$world = fread($raw, $len); | $world = fread($raw, $len); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
echo "Extracting randomly generated raws of $world:\n\n"; | echo "Extracting randomly generated raws of $world:\n\n"; | ||
} | } | ||
Line 238: | Line 221: | ||
$len = readShort($raw); | $len = readShort($raw); | ||
$world = fread($raw, $len); | $world = fread($raw, $len); | ||
− | + | echo "Extracting randomly generated raws of $world:\n\n"; | |
− | + | readLong($raw); // year | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | echo "Extracting randomly generated raws of $world | ||
} | } | ||