[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4712: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4714: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4715: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4716: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
Decompiling/Deobfuscating the Ultima Online Demo scripts | JoinUO Forums

Decompiling/Deobfuscating the Ultima Online Demo scripts

The UO "Demo" is a slightly modified OSI UO Server and Client which was bundled on the Ultima Online Second Age retail CD. This forum seeks to reveal it's mysteries.

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Thu Sep 17, 2009 1:22 pm
One of the big mysteries inside the Ultima Online DAT file were the .m (.m.q) files. Those files, like the directory name suggests, contain code. As it turns out, the scripts are obfuscated but by analyzing the script execution engine inside uodemo.exe I was able to figure it all out.

More technical explanation can be found on the wiki :

There are 1615 scripts in total, 814 of them assign behaviours to objects. The other 801 are the behaviours themselves, the skills & dungeon scripts (quests). OSI magery is spread over more than 120 scripts (2 scripts per spell).

How to "decompile" the scripts:
1) Extract the "scripts" directory from the DAT file :
2) Download the Mass M Decompiler :
3) Run the "Mass M Decompiler" and point it to the "scripts" directory
4) Press the Dump All button when decompilation is complete

You will find that the variable names inside the scripts are obfuscated.
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 11
Joined: Sun Jan 03, 2010 4:28 am
PostPosted: Sun Jan 03, 2010 4:32 am
Nothing is changed.. Mass decompile button doesnt work. :(

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Sun Jan 03, 2010 10:18 am
Hello xantier

You have to press the "..." button and select the directory that contains the .m files & the sdb.txt file.
Screenshot Mass M Decompiler.JPG
Screenshot Mass M Decompiler.JPG (100 KiB) Viewed 9642 times

If you have VB.Net installed (Express editions should work), set a break-point at the ScanAndDecompileAll procedure at see what happens there.
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 16
Joined: Wed Jun 10, 2009 2:27 am
PostPosted: Sun Jan 03, 2010 6:17 pm
Link doesn't work for me.

Posts: 21
Joined: Thu Jun 03, 2010 12:44 am
PostPosted: Fri Jun 04, 2010 4:31 pm
I can't get the Mass Decompile to work either. I've selected the correct directory, but still nothing. :(

edit: Nevermind, I got it working after messing around with it in visual studio a bit.

Btw, thank you for all of this Batlin. :)

Now I just gotta figure out a way to re-compile the scripts. ;p

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Tue Jun 29, 2010 8:00 am
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 21
Joined: Thu Jun 03, 2010 12:44 am
PostPosted: Fri Jul 16, 2010 2:24 am

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Sat Aug 21, 2010 9:21 pm
I've uploaded a new version of the Mass M Decompiler which fixes a bug that Garret reported me 9 months ago. Sorry for the delay.

To fix the bug manually in your already decompiled scripts: replace "location usedon" by "location place" in those scripts that implement the "targetloc" event.
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Sat Sep 18, 2010 6:24 am
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Return to UO Demo

Who is online

Users browsing this forum: No registered users and 0 guests

cron