Created
March 18, 2013 20:38
-
-
Save jbarrett/5190597 to your computer and use it in GitHub Desktop.
First pass at a script to change the mayor and organisation name in SimCity 2000 for DOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Change the mayor's name in SimCity 2000 | |
# | |
# You should probably stick with plain ASCII if you use it. | |
use strict; | |
use warnings; | |
use bytes; | |
open my $fh, '+<', 'SC2000.DAT' | |
or die("Unable to open SC2000.DAT, please run from SC2000 install dir"); | |
binmode $fh; | |
print "Enter Mayor Name : "; | |
my $mname = <STDIN>; | |
chomp ($mname); | |
print "Enter Organisation Name : "; | |
my $oname = <STDIN>; | |
chomp ($oname); | |
sysseek $fh, 0x1E563D, 0; | |
syswrite $fh, pack('a32', $mname), 32; | |
# Org name overflows on title screen if we fill all 32 chars. | |
syswrite $fh, pack('a31', $oname), 31; | |
syswrite $fh, pack('a1', ''), 1; | |
close $fh; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment