[Scummvm-git-logs] scummvm master -> c99302c7b6d8beadf00cd7b843ad0ee50b3cf316

dreammaster paulfgilbert at gmail.com
Sun Mar 8 20:54:37 UTC 2020


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
84a2f10c49 ULTIMA: Add the individual files of ultima.dat to create_ultima folder
e65685cf76 ULTIMA8: Removal of deprecated HIDManager and bindings
c99302c7b6 ULTIMA8: Remove now deprecated settings/controls gumps


Commit: 84a2f10c49eee2d4bd9f96c53bb065e59522be98
    https://github.com/scummvm/scummvm/commit/84a2f10c49eee2d4bd9f96c53bb065e59522be98
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-03-08T12:49:40-07:00

Commit Message:
ULTIMA: Add the individual files of ultima.dat to create_ultima folder

Since the ultima.dat is just a zip file, this should have been done
sooner. This will allow the tracking of changes to individual files
within the archive. Additionally, it will allow for future work
in-progress changes to files without taking the space of creating an
entirely new ultima.dat

Changed paths:
  A devtools/create_ultima/files/ultima1/flags.bmp
  A devtools/create_ultima/files/ultima1/logo.bmp
  A devtools/create_ultima/files/ultima1/version.txt
  A devtools/create_ultima/files/ultima6/BorderU6_1.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_2.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_3.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_4.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_5.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_6.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_7.bmp
  A devtools/create_ultima/files/ultima6/BorderU6_8.bmp
  A devtools/create_ultima/files/ultima6/ScrollBarDown_1.bmp
  A devtools/create_ultima/files/ultima6/ScrollBarDown_2.bmp
  A devtools/create_ultima/files/ultima6/ScrollBarUp_1.bmp
  A devtools/create_ultima/files/ultima6/ScrollBarUp_2.bmp
  A devtools/create_ultima/files/ultima6/U6_WOU_Scroll_bg.bmp
  A devtools/create_ultima/files/ultima6/defaultkeys.txt
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/0.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/1.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/2.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/3.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/4.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/5.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/6.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/7.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/celestial/8.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/backpack_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/barrel_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/chest_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/corpse_animal_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/corpse_body_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/corpse_cyclops_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/corpse_gargoyle_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/container/crate_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_002.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_003.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_004.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_009.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_062.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_066.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_067.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_097.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_113.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_114.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_131.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_137.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_162.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_164.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_186.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_00.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_01.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_02.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_03.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_04.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_05.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_06.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_07.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_08.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_09.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_10.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_11.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/doll_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_002.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_003.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_004.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_009.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_062.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_066.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_067.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_097.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_113.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_114.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_131.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_137.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_162.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_164.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_186.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_00.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_01.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_02.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_03.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_04.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_05.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_06.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_07.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_08.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_09.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_10.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_11.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/doll_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.dat
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.dat
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.dat
  A devtools/create_ultima/files/ultima6/images/gumps/gump_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/gump_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/left_arrow.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_down.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_up.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/portrait_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/right_arrow.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/sign/sign_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.dat
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/1.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/2.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/3.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/4.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/5.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/6.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/7.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/8.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/nd.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/rd.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_bg.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_left_arrow.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_right_arrow.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_000.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_001.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_002.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_003.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_004.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_005.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_006.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_007.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_008.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_009.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_016.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_017.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_018.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_019.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_020.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_021.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_022.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_023.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_024.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_025.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_032.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_033.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_034.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_035.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_036.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_037.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_038.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_039.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_040.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_041.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_048.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_049.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_050.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_051.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_052.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_053.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_054.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_055.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_056.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_057.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_064.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_065.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_066.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_067.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_068.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_069.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_070.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_071.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_072.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_073.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_080.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_081.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_082.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_083.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_084.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_085.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_086.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_087.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_088.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_089.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_096.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_097.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_098.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_099.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_100.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_101.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_102.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_103.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_104.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_105.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_112.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_113.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_114.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_115.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_116.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_117.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_118.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_119.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_120.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_121.bmp
  A devtools/create_ultima/files/ultima6/images/gumps/spellbook/st.bmp
  A devtools/create_ultima/files/ultima6/images/roof_tiles.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0376.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0377.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0386.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0392.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_009_0354.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0387.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0386.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0392.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0387.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0385.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0386.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0392.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0387.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0376.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0383.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0376.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0363.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0376.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0410.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0410.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0339.bmp
  A devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0410.bmp
  A devtools/create_ultima/files/ultima6/maps/u6/roof_map_00.dat
  A devtools/create_ultima/files/ultima6/mdkeys.txt
  A devtools/create_ultima/files/ultima6/scripts/common/actor.lua
  A devtools/create_ultima/files/ultima6/scripts/common/common.lua
  A devtools/create_ultima/files/ultima6/scripts/common/intro_common.lua
  A devtools/create_ultima/files/ultima6/scripts/common/lang.lua
  A devtools/create_ultima/files/ultima6/scripts/md/actor.lua
  A devtools/create_ultima/files/ultima6/scripts/md/combat.lua
  A devtools/create_ultima/files/ultima6/scripts/md/dreamworld.lua
  A devtools/create_ultima/files/ultima6/scripts/md/ending.lua
  A devtools/create_ultima/files/ultima6/scripts/md/init.lua
  A devtools/create_ultima/files/ultima6/scripts/md/intro.lua
  A devtools/create_ultima/files/ultima6/scripts/md/lang/en/game.lua
  A devtools/create_ultima/files/ultima6/scripts/md/lang/it/game.lua
  A devtools/create_ultima/files/ultima6/scripts/md/look.lua
  A devtools/create_ultima/files/ultima6/scripts/md/player.lua
  A devtools/create_ultima/files/ultima6/scripts/md/talk.lua
  A devtools/create_ultima/files/ultima6/scripts/md/usecode.lua
  A devtools/create_ultima/files/ultima6/scripts/md/worktype.lua
  A devtools/create_ultima/files/ultima6/scripts/se/actor.lua
  A devtools/create_ultima/files/ultima6/scripts/se/init.lua
  A devtools/create_ultima/files/ultima6/scripts/se/intro.lua
  A devtools/create_ultima/files/ultima6/scripts/se/lang/en/game.lua
  A devtools/create_ultima/files/ultima6/scripts/se/look.lua
  A devtools/create_ultima/files/ultima6/scripts/se/player.lua
  A devtools/create_ultima/files/ultima6/scripts/se/usecode.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/actor.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/ending.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/init.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/intro.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/lang/en/game.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/create_food.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/detect_magic.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/detect_trap.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/dispel_magic.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/douse.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/harm.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/heal.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/help.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/ignite.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_01/light.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/infravision.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/magic_arrow.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/poison.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/reappear.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/sleep.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/telekinesis.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/trap.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/unlock_magic.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/untrap.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_02/vanish.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/curse.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/dispel_field.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/fireball.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/great_light.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/magic_lock.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/mass_awaken.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/mass_sleep.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/peer.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/protection.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_03/repel_undead.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/animate.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/conjure.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/disable.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/fire_field.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/great_heal.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/locate.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/mass_dispel.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/poison_field.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/sleep_field.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_04/wind_change.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/energy_field.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/explosion.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/insect_swarm.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/invisibility.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/lightning.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/paralyze.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/pickpocket.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/reveal.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/seance.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_05/xray.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/charm.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/clone.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/confuse.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/flame_wind.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/hail_storm.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/mass_protect.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/negate_magic.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/poison_wind.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/replicate.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_06/web.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/chain_bolt.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/enchant.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/energy_wind.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/fear.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/gate_travel.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/kill.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/mass_curse.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/mass_invisibility.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/wing_strike.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_07/wizard_eye.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/armageddon.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/death_wind.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/eclipse.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/mass_charm.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/mass_kill.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/monster_invisible.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/resurrect.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/slime.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/summon.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/time_stop.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/magic/circle_08/tremor.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/player.lua
  A devtools/create_ultima/files/ultima6/scripts/u6/usecode.lua
  A devtools/create_ultima/files/ultima6/sekeys.txt
  A devtools/create_ultima/files/ultima6/u6keys.txt
  A devtools/create_ultima/files/ultima6/version.txt
  A devtools/create_ultima/files/ultima8/Vera.ttf
  A devtools/create_ultima/files/ultima8/VeraBd.ttf
  A devtools/create_ultima/files/ultima8/Vera_copyright.txt
  A devtools/create_ultima/files/ultima8/fixedfont.ini
  A devtools/create_ultima/files/ultima8/fixedfont.tga
  A devtools/create_ultima/files/ultima8/fixedfont12.ini
  A devtools/create_ultima/files/ultima8/fixedfont12.tga
  A devtools/create_ultima/files/ultima8/mouse.tga
  A devtools/create_ultima/files/ultima8/pentagram.png
  A devtools/create_ultima/files/ultima8/remorsebindings.ini
  A devtools/create_ultima/files/ultima8/u8.ini
  A devtools/create_ultima/files/ultima8/u8armour.ini
  A devtools/create_ultima/files/ultima8/u8bindings.ini
  A devtools/create_ultima/files/ultima8/u8french.ini
  A devtools/create_ultima/files/ultima8/u8german.ini
  A devtools/create_ultima/files/ultima8/u8japanese.ini
  A devtools/create_ultima/files/ultima8/u8monsters.ini
  A devtools/create_ultima/files/ultima8/u8spanish.ini
  A devtools/create_ultima/files/ultima8/u8weapons.ini
  A devtools/create_ultima/files/ultima8/version.txt


diff --git a/devtools/create_ultima/files/ultima1/flags.bmp b/devtools/create_ultima/files/ultima1/flags.bmp
new file mode 100644
index 0000000000..61f6408aa5
Binary files /dev/null and b/devtools/create_ultima/files/ultima1/flags.bmp differ
diff --git a/devtools/create_ultima/files/ultima1/logo.bmp b/devtools/create_ultima/files/ultima1/logo.bmp
new file mode 100644
index 0000000000..0000e4f06e
Binary files /dev/null and b/devtools/create_ultima/files/ultima1/logo.bmp differ
diff --git a/devtools/create_ultima/files/ultima1/version.txt b/devtools/create_ultima/files/ultima1/version.txt
new file mode 100644
index 0000000000..d3827e75a5
--- /dev/null
+++ b/devtools/create_ultima/files/ultima1/version.txt
@@ -0,0 +1 @@
+1.0
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_1.bmp b/devtools/create_ultima/files/ultima6/BorderU6_1.bmp
new file mode 100644
index 0000000000..12bcd74e5f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_1.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_2.bmp b/devtools/create_ultima/files/ultima6/BorderU6_2.bmp
new file mode 100644
index 0000000000..b8083714ca
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_2.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_3.bmp b/devtools/create_ultima/files/ultima6/BorderU6_3.bmp
new file mode 100644
index 0000000000..631a52259c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_3.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_4.bmp b/devtools/create_ultima/files/ultima6/BorderU6_4.bmp
new file mode 100644
index 0000000000..aafac9db14
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_4.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_5.bmp b/devtools/create_ultima/files/ultima6/BorderU6_5.bmp
new file mode 100644
index 0000000000..c882a8e405
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_5.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_6.bmp b/devtools/create_ultima/files/ultima6/BorderU6_6.bmp
new file mode 100644
index 0000000000..93a1105beb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_7.bmp b/devtools/create_ultima/files/ultima6/BorderU6_7.bmp
new file mode 100644
index 0000000000..23884998da
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_7.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/BorderU6_8.bmp b/devtools/create_ultima/files/ultima6/BorderU6_8.bmp
new file mode 100644
index 0000000000..0518f6297e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/BorderU6_8.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/ScrollBarDown_1.bmp b/devtools/create_ultima/files/ultima6/ScrollBarDown_1.bmp
new file mode 100644
index 0000000000..ad3e665ce1
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/ScrollBarDown_1.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/ScrollBarDown_2.bmp b/devtools/create_ultima/files/ultima6/ScrollBarDown_2.bmp
new file mode 100644
index 0000000000..82863a7115
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/ScrollBarDown_2.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/ScrollBarUp_1.bmp b/devtools/create_ultima/files/ultima6/ScrollBarUp_1.bmp
new file mode 100644
index 0000000000..b2682f9b90
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/ScrollBarUp_1.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/ScrollBarUp_2.bmp b/devtools/create_ultima/files/ultima6/ScrollBarUp_2.bmp
new file mode 100644
index 0000000000..cf97aaff05
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/ScrollBarUp_2.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/U6_WOU_Scroll_bg.bmp b/devtools/create_ultima/files/ultima6/U6_WOU_Scroll_bg.bmp
new file mode 100644
index 0000000000..46383c9f58
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/U6_WOU_Scroll_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/defaultkeys.txt b/devtools/create_ultima/files/ultima6/defaultkeys.txt
new file mode 100644
index 0000000000..a8d1e5dbfa
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/defaultkeys.txt
@@ -0,0 +1,165 @@
+right	walk_east
+left	walk_west
+up	walk_north
+down	walk_south
+KP7	walk_north_west
+KP8	walk_north
+KP9	walk_north_east
+KP4	walk_west
+KP6	walk_east
+KP1	walk_south_west
+KP2	walk_south
+KP3	walk_south_east
+
+Esc	game_menu_dialog
+SPACE	cancel_action
+ENTER	do_action
+KP_ENTER	do_action
+Alt-ENTER	toggle_fullscreen
+
+q	quit
+Ctrl-q	quit
+Alt-q	quit_no_dialog
+Alt-x	quit
+s	save_menu
+Ctrl-l	load_latest_save
+Ctrl-r	load_latest_save
+
+;	multi_use
+,	new_command_bar
+.	toggle_original_style_command_bar
+`	toggle_combat_strategy
+tab	toggle_cursor
+l	look
+t	talk
+u	use
+g	get
+m	move
+d	drop
+b	toggle_combat
+a	attack
+i	doll_gump #cycle doll gump
+h	show_keys
+z	close_gumps
+
+Ctrl-c	toggle_cheats
+Alt-Ctrl-g	toggle_god_mode
+Alt-h	toggle_hackmove
+Alt-Ctrl-h	heal_party
+e	show_eggs
+Alt-E	toggle_ethereal
+Alt-Ctrl-e	toggle_egg_spawn
+Alt-i	toggle_no_darkness
+Alt-Ctrl-p	toggle_pickpocket_mode
+Ctrl-t	teleport_to_cursor
+x	toggle_x_ray
+
+Ctrl-a	toggle_audio
+Ctrl-m	toggle_music
+Ctrl-s	toggle_sfx
+
+Alt-a	select_command_bar	0	# select attack on the command bar
+Alt-t	select_command_bar	2	# select talk on the command bar
+Alt-l	select_command_bar	3	# select look on the command bar
+Alt-g	select_command_bar	4	# select get on the command bar
+Alt-d	select_command_bar	5	# select drop on the command bar
+Alt-m	select_command_bar	6	# select move on the command bar
+Alt-u	select_command_bar	7	# select use on the command bar
+Alt-b	select_command_bar	9	# select toggle combat on the command bar
+pageup	msg_scroll_up
+pagedown	msg_scroll_down
+
+1	solo_mode	1	# solo mode as Avatar
+2	solo_mode	2	# solo mode as character 2
+3	solo_mode	3	# solo mode as character 3
+4	solo_mode	4	# solo mode as character 4
+5	solo_mode	5	# solo mode as character 5
+6	solo_mode	6	# solo mode as character 6
+7	solo_mode	7	# solo mode as character 7
+8	solo_mode	8	# solo mode as character 8
+9	solo_mode	9	# solo mode as character 9
+0	party_mode
+F10	party_view
+KP/	party_view
+/	party_view
+
+Alt-F1	doll_gump	1	# Show doll_gump for Avatar
+Alt-F2	doll_gump	2	# Show doll gump for character 2
+Alt-F3	doll_gump	3	# Show doll gump for character 3
+Alt-F4	doll_gump	4	# Show doll gump for character 4
+Alt-F5	doll_gump	5	# Show doll gump for character 5
+Alt-F6	doll_gump	6	# Show doll gump for character 6
+Alt-F7	doll_gump	7	# Show doll gump for character 7
+Alt-F8	doll_gump	8	# Show doll gump for character 8
+Alt-F9	doll_gump	9	# Show doll gump for character 9
+
+F1	inventory	1	# Show inventory for Avatar
+F2	inventory	2	# Show inventory for character 2
+F3	inventory	3	# Show inventory for character 3
+F4	inventory	4	# Show inventory for character 4
+F5	inventory	5	# Show inventory for character 5
+F6	inventory	6	# Show inventory for character 6
+F7	inventory	7	# Show inventory for character 7
+F8	inventory	8	# Show inventory for character 8
+F9	inventory	9	# Show inventory for character 9
+ctrl-1	show_stats	1	# Show stats for Avatar
+ctrl-2	show_stats	2	# Show stats for character 2
+ctrl-3	show_stats	3	# Show stats for character 3
+ctrl-4	show_stats	4	# Show stats for character 4
+ctrl-5	show_stats	5	# Show stats for character 5
+ctrl-6	show_stats	6	# Show stats for character 6
+ctrl-7	show_stats	7	# Show stats for character 7
+ctrl-8	show_stats	8	# Show stats for character 8
+ctrl-9	show_stats	9	# Show stats for character 9
+
+shift-=	next_party_member
+=	next_party_member
+KP+	next_party_member
+-	previous_party_member
+KP-	previous_party_member
+home	home_key
+end	end_key
+KP*	toggle_view	# Toggle between inventory and actor view
+shift-8	toggle_view	# Toggle between inventory and actor view
+
+Ctrl-f	toggle_fps_display
+
+Ctrl-d	decrease_debug
+Ctrl-i	increase_debug
+
+joy_up		walk_north
+joy_down	walk_south
+joy_left	walk_west
+joy_right	walk_east
+joy_rightup		walk_north_east
+joy_rightdown	walk_south_east
+joy_leftup		walk_north_west
+joy_leftdown	walk_south_west
+joy_up2		msg_scroll_up
+joy_down2	msg_scroll_down
+joy_left2	previous_party_member
+joy_right2	next_party_member
+joy_rightup2	do_nothing
+joy_rightdown2	do_nothing
+joy_leftup2		do_nothing
+joy_leftdown2	do_nothing
+joy_hat_up	walk_north
+joy_hat_down	walk_south
+joy_hat_left	walk_west
+joy_hat_right	walk_east
+joy_hat_rightup	walk_north_east
+joy_hat_rightdown	walk_south_east
+joy_hat_leftup		walk_north_west
+joy_hat_leftdown	walk_south_west
+joy0	toggle_cursor
+joy1	cancel_action
+joy2	do_action
+joy3	multi_use
+joy4	solo_mode 0
+joy5	toggle_combat
+joy6	get
+joy7	drop
+joy8	game_menu_dialog
+joy9	new_command_bar
+joy10	move
+joy11	look
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/0.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/0.bmp
new file mode 100644
index 0000000000..310695ff8f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/0.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/1.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/1.bmp
new file mode 100644
index 0000000000..54718411ae
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/1.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/2.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/2.bmp
new file mode 100644
index 0000000000..0f581ee85b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/2.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/3.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/3.bmp
new file mode 100644
index 0000000000..3956cf2973
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/3.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/4.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/4.bmp
new file mode 100644
index 0000000000..190c3ba996
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/4.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/5.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/5.bmp
new file mode 100644
index 0000000000..c5883e57af
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/5.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/6.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/6.bmp
new file mode 100644
index 0000000000..702123fd93
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/7.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/7.bmp
new file mode 100644
index 0000000000..6768df362a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/7.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/celestial/8.bmp b/devtools/create_ultima/files/ultima6/images/gumps/celestial/8.bmp
new file mode 100644
index 0000000000..44ab9aacd0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/celestial/8.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/backpack_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/backpack_bg.bmp
new file mode 100644
index 0000000000..1dd954373a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/backpack_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/barrel_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/barrel_bg.bmp
new file mode 100644
index 0000000000..ef4b733145
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/barrel_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/chest_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/chest_bg.bmp
new file mode 100644
index 0000000000..95970b574f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/chest_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_down.bmp
new file mode 100644
index 0000000000..6c81eea5a6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_up.bmp
new file mode 100644
index 0000000000..6bfae41db8
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_doll_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_down.bmp
new file mode 100644
index 0000000000..51330d4dbf
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_up.bmp
new file mode 100644
index 0000000000..68df408eb3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_down_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_down.bmp
new file mode 100644
index 0000000000..3ad6a14699
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_up.bmp
new file mode 100644
index 0000000000..a5426137eb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_left_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_down.bmp
new file mode 100644
index 0000000000..737840ecd3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_up.bmp
new file mode 100644
index 0000000000..ae28cfb802
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_right_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_down.bmp
new file mode 100644
index 0000000000..bd74bd4393
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_up.bmp
new file mode 100644
index 0000000000..1031dcb0ae
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/cont_up_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_animal_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_animal_bg.bmp
new file mode 100644
index 0000000000..0d6ae6ef9b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_animal_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_body_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_body_bg.bmp
new file mode 100644
index 0000000000..45d8b2d95f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_body_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_cyclops_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_cyclops_bg.bmp
new file mode 100644
index 0000000000..3000de0737
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_cyclops_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_gargoyle_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_gargoyle_bg.bmp
new file mode 100644
index 0000000000..8e9aa3cc5a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/corpse_gargoyle_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/container/crate_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/container/crate_bg.bmp
new file mode 100644
index 0000000000..04482dfdaa
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/container/crate_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6.bmp
new file mode 100644
index 0000000000..c374ac6015
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_002.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_002.bmp
new file mode 100644
index 0000000000..0ba24d170f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_002.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_003.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_003.bmp
new file mode 100644
index 0000000000..1b2e98eaf6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_003.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_004.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_004.bmp
new file mode 100644
index 0000000000..14f1d1c624
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_004.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_009.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_009.bmp
new file mode 100644
index 0000000000..77e46a33c0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_009.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_062.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_062.bmp
new file mode 100644
index 0000000000..5b3c7e593d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_062.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_066.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_066.bmp
new file mode 100644
index 0000000000..62ef1f8e07
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_066.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_067.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_067.bmp
new file mode 100644
index 0000000000..da469f8481
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_067.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_097.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_097.bmp
new file mode 100644
index 0000000000..6dbc176551
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_097.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_113.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_113.bmp
new file mode 100644
index 0000000000..b474fd027b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_113.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_114.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_114.bmp
new file mode 100644
index 0000000000..ce1d7ce1b1
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_114.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_131.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_131.bmp
new file mode 100644
index 0000000000..3e50717473
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_131.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_137.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_137.bmp
new file mode 100644
index 0000000000..1a21c49287
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_137.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_162.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_162.bmp
new file mode 100644
index 0000000000..a811b787fd
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_162.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_164.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_164.bmp
new file mode 100644
index 0000000000..aff20ec2f9
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_164.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_186.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_186.bmp
new file mode 100644
index 0000000000..0cf1d3ad64
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/actor_U6_186.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_00.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_00.bmp
new file mode 100644
index 0000000000..15beeb72ea
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_00.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_01.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_01.bmp
new file mode 100644
index 0000000000..ecae96ef2a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_01.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_02.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_02.bmp
new file mode 100644
index 0000000000..537b062c69
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_02.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_03.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_03.bmp
new file mode 100644
index 0000000000..742044b8dd
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_03.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_04.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_04.bmp
new file mode 100644
index 0000000000..9be22cb4ae
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_04.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_05.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_05.bmp
new file mode 100644
index 0000000000..cc7fcb6e14
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_05.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_06.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_06.bmp
new file mode 100644
index 0000000000..bf6ed61c7d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_06.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_07.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_07.bmp
new file mode 100644
index 0000000000..1d9df6913d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_07.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_08.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_08.bmp
new file mode 100644
index 0000000000..a6bc02267f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_08.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_09.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_09.bmp
new file mode 100644
index 0000000000..7b52f2b87a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_09.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_10.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_10.bmp
new file mode 100644
index 0000000000..81f49a74d4
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_10.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_11.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_11.bmp
new file mode 100644
index 0000000000..9571f7fbfe
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/avatar_U6_11.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_down.bmp
new file mode 100644
index 0000000000..421b87adc3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_up.bmp
new file mode 100644
index 0000000000..9344c6b055
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/combat_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/doll_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/doll_bg.bmp
new file mode 100644
index 0000000000..8c7875d6c4
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/doll_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_down.bmp
new file mode 100644
index 0000000000..81564c8916
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_up.bmp
new file mode 100644
index 0000000000..d0be869d5d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/heart_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_down.bmp
new file mode 100644
index 0000000000..478c323a62
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_up.bmp
new file mode 100644
index 0000000000..53619faf89
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/inventory_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6.bmp
new file mode 100644
index 0000000000..930f8273ef
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_002.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_002.bmp
new file mode 100644
index 0000000000..33a59c34de
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_002.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_003.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_003.bmp
new file mode 100644
index 0000000000..1b3f94a76f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_003.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_004.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_004.bmp
new file mode 100644
index 0000000000..ac3fdc1269
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_004.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_009.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_009.bmp
new file mode 100644
index 0000000000..89a66c1069
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_009.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_062.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_062.bmp
new file mode 100644
index 0000000000..5f9ded5433
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_062.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_066.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_066.bmp
new file mode 100644
index 0000000000..1b735c3a26
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_066.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_067.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_067.bmp
new file mode 100644
index 0000000000..6c102cf967
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_067.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_097.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_097.bmp
new file mode 100644
index 0000000000..941b951478
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_097.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_113.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_113.bmp
new file mode 100644
index 0000000000..b9186500eb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_113.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_114.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_114.bmp
new file mode 100644
index 0000000000..f07702f03f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_114.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_131.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_131.bmp
new file mode 100644
index 0000000000..d296915847
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_131.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_137.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_137.bmp
new file mode 100644
index 0000000000..d64cd9b891
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_137.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_162.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_162.bmp
new file mode 100644
index 0000000000..8f5d5d1737
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_162.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_164.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_164.bmp
new file mode 100644
index 0000000000..8a5fbdbdf3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_164.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_186.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_186.bmp
new file mode 100644
index 0000000000..7047fd38a8
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/actor_U6_186.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_00.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_00.bmp
new file mode 100644
index 0000000000..83a32df19d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_00.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_01.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_01.bmp
new file mode 100644
index 0000000000..ac5d0877cf
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_01.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_02.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_02.bmp
new file mode 100644
index 0000000000..5ead36bdc7
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_02.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_03.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_03.bmp
new file mode 100644
index 0000000000..94e4a9b498
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_03.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_04.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_04.bmp
new file mode 100644
index 0000000000..d08237c71a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_04.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_05.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_05.bmp
new file mode 100644
index 0000000000..f27d882279
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_05.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_06.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_06.bmp
new file mode 100644
index 0000000000..01787b69df
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_06.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_07.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_07.bmp
new file mode 100644
index 0000000000..a7a82c3386
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_07.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_08.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_08.bmp
new file mode 100644
index 0000000000..381da8d02f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_08.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_09.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_09.bmp
new file mode 100644
index 0000000000..522d619a72
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_09.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_10.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_10.bmp
new file mode 100644
index 0000000000..95e8fd3340
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_10.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_11.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_11.bmp
new file mode 100644
index 0000000000..6d419c8738
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/avatar_U6_11.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/doll_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/doll_bg.bmp
new file mode 100644
index 0000000000..27bdedfc62
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/orig_style/doll_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_down.bmp
new file mode 100644
index 0000000000..7bd873fcc8
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_up.bmp
new file mode 100644
index 0000000000..91c729ddeb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/doll/party_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.bmp b/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.bmp
new file mode 100644
index 0000000000..8e3b3872f6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.dat b/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.dat
new file mode 100644
index 0000000000..75b7054062
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/images/gumps/fonts/MD.dat
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.bmp b/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.bmp
new file mode 100644
index 0000000000..2119516553
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.dat b/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.dat
new file mode 100644
index 0000000000..9cc5eb6c28
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/images/gumps/fonts/SE.dat
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.bmp b/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.bmp
new file mode 100644
index 0000000000..fa4189d05e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.dat b/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.dat
new file mode 100644
index 0000000000..9cc5eb6c28
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/images/gumps/fonts/U6.dat
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_down.bmp
new file mode 100644
index 0000000000..34fbf00273
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_up.bmp
new file mode 100644
index 0000000000..d048264adf
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/gump_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/left_arrow.bmp b/devtools/create_ultima/files/ultima6/images/gumps/left_arrow.bmp
new file mode 100644
index 0000000000..c6db39216d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/left_arrow.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_down.bmp
new file mode 100644
index 0000000000..62e2cc89d6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_up.bmp
new file mode 100644
index 0000000000..62e2cc89d6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/down_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_down.bmp b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_down.bmp
new file mode 100644
index 0000000000..e141845298
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_down.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_up.bmp b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_up.bmp
new file mode 100644
index 0000000000..e141845298
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/mapeditor/up_btn_up.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/portrait_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/portrait_bg.bmp
new file mode 100644
index 0000000000..1e953b1a58
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/portrait_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/right_arrow.bmp b/devtools/create_ultima/files/ultima6/images/gumps/right_arrow.bmp
new file mode 100644
index 0000000000..4bd3174672
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/right_arrow.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_bg.bmp
new file mode 100644
index 0000000000..c3726f366d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.bmp b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.bmp
new file mode 100644
index 0000000000..56b556554b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.dat b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.dat
new file mode 100644
index 0000000000..12860766d4
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/sign/sign_font.dat differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/1.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/1.bmp
new file mode 100644
index 0000000000..d3bc914ebe
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/1.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/2.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/2.bmp
new file mode 100644
index 0000000000..296d037e86
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/2.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/3.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/3.bmp
new file mode 100644
index 0000000000..fbb077152e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/3.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/4.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/4.bmp
new file mode 100644
index 0000000000..3f15b4f521
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/4.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/5.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/5.bmp
new file mode 100644
index 0000000000..579fbb1e95
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/5.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/6.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/6.bmp
new file mode 100644
index 0000000000..8a4b8d512b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/6.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/7.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/7.bmp
new file mode 100644
index 0000000000..89c00c5b8e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/7.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/8.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/8.bmp
new file mode 100644
index 0000000000..aa55d48fec
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/8.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/nd.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/nd.bmp
new file mode 100644
index 0000000000..a4ec836c8e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/nd.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/rd.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/rd.bmp
new file mode 100644
index 0000000000..a1f4840f69
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/rd.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_bg.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_bg.bmp
new file mode 100644
index 0000000000..61a7e39208
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_bg.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_left_arrow.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_left_arrow.bmp
new file mode 100644
index 0000000000..ef6a5542a0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_left_arrow.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_right_arrow.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_right_arrow.bmp
new file mode 100644
index 0000000000..b3a790965c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_right_arrow.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_000.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_000.bmp
new file mode 100644
index 0000000000..6857255ef7
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_000.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_001.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_001.bmp
new file mode 100644
index 0000000000..780c6b78c9
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_001.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_002.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_002.bmp
new file mode 100644
index 0000000000..20b8ee7c75
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_002.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_003.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_003.bmp
new file mode 100644
index 0000000000..53945434b2
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_003.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_004.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_004.bmp
new file mode 100644
index 0000000000..6fbab68da7
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_004.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_005.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_005.bmp
new file mode 100644
index 0000000000..ec3636b858
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_005.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_006.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_006.bmp
new file mode 100644
index 0000000000..dbd15d1c7c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_006.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_007.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_007.bmp
new file mode 100644
index 0000000000..28d2737215
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_007.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_008.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_008.bmp
new file mode 100644
index 0000000000..4595136dfd
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_008.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_009.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_009.bmp
new file mode 100644
index 0000000000..f45f89529a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_009.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_016.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_016.bmp
new file mode 100644
index 0000000000..30e2f42f60
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_016.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_017.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_017.bmp
new file mode 100644
index 0000000000..83b3e0ef53
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_017.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_018.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_018.bmp
new file mode 100644
index 0000000000..6e6586aeee
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_018.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_019.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_019.bmp
new file mode 100644
index 0000000000..20675787f0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_019.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_020.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_020.bmp
new file mode 100644
index 0000000000..8bd9e0fa01
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_020.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_021.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_021.bmp
new file mode 100644
index 0000000000..1349f33837
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_021.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_022.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_022.bmp
new file mode 100644
index 0000000000..162d0688fc
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_022.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_023.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_023.bmp
new file mode 100644
index 0000000000..d3a3855847
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_023.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_024.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_024.bmp
new file mode 100644
index 0000000000..5a870d22ec
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_024.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_025.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_025.bmp
new file mode 100644
index 0000000000..199b242032
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_025.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_032.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_032.bmp
new file mode 100644
index 0000000000..69c4bb038d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_032.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_033.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_033.bmp
new file mode 100644
index 0000000000..a4a9302fc7
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_033.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_034.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_034.bmp
new file mode 100644
index 0000000000..bd48aa1c30
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_034.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_035.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_035.bmp
new file mode 100644
index 0000000000..4e9d04c4b0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_035.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_036.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_036.bmp
new file mode 100644
index 0000000000..4bb450299f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_036.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_037.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_037.bmp
new file mode 100644
index 0000000000..15c3ee7327
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_037.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_038.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_038.bmp
new file mode 100644
index 0000000000..9c2a510bce
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_038.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_039.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_039.bmp
new file mode 100644
index 0000000000..15b2f70919
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_039.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_040.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_040.bmp
new file mode 100644
index 0000000000..75618debec
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_040.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_041.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_041.bmp
new file mode 100644
index 0000000000..eade098006
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_041.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_048.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_048.bmp
new file mode 100644
index 0000000000..96534f8669
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_048.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_049.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_049.bmp
new file mode 100644
index 0000000000..28b146bd84
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_049.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_050.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_050.bmp
new file mode 100644
index 0000000000..fa21085823
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_050.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_051.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_051.bmp
new file mode 100644
index 0000000000..4a9475c334
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_051.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_052.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_052.bmp
new file mode 100644
index 0000000000..8a95aff016
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_052.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_053.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_053.bmp
new file mode 100644
index 0000000000..a89cd459a6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_053.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_054.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_054.bmp
new file mode 100644
index 0000000000..140319d19c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_054.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_055.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_055.bmp
new file mode 100644
index 0000000000..e572e1bebe
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_055.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_056.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_056.bmp
new file mode 100644
index 0000000000..0aad117a4f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_056.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_057.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_057.bmp
new file mode 100644
index 0000000000..1ce528528a
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_057.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_064.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_064.bmp
new file mode 100644
index 0000000000..e4616e7c3e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_064.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_065.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_065.bmp
new file mode 100644
index 0000000000..52fa8cafaf
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_065.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_066.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_066.bmp
new file mode 100644
index 0000000000..2d28f3a7d1
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_066.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_067.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_067.bmp
new file mode 100644
index 0000000000..db51cd4224
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_067.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_068.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_068.bmp
new file mode 100644
index 0000000000..499bf4254d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_068.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_069.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_069.bmp
new file mode 100644
index 0000000000..c1a65dc2b2
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_069.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_070.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_070.bmp
new file mode 100644
index 0000000000..20ad8dbb01
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_070.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_071.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_071.bmp
new file mode 100644
index 0000000000..99fd9752ec
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_071.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_072.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_072.bmp
new file mode 100644
index 0000000000..5dc93b7ec0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_072.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_073.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_073.bmp
new file mode 100644
index 0000000000..f7aa423865
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_073.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_080.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_080.bmp
new file mode 100644
index 0000000000..af0d36b9ca
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_080.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_081.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_081.bmp
new file mode 100644
index 0000000000..04424eec42
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_081.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_082.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_082.bmp
new file mode 100644
index 0000000000..9cfb72c293
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_082.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_083.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_083.bmp
new file mode 100644
index 0000000000..ec66a573c2
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_083.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_084.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_084.bmp
new file mode 100644
index 0000000000..3e6c3edd7f
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_084.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_085.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_085.bmp
new file mode 100644
index 0000000000..062b3cf90c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_085.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_086.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_086.bmp
new file mode 100644
index 0000000000..1330196e46
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_086.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_087.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_087.bmp
new file mode 100644
index 0000000000..aed2997a09
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_087.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_088.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_088.bmp
new file mode 100644
index 0000000000..b13dfde491
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_088.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_089.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_089.bmp
new file mode 100644
index 0000000000..4d007679ba
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_089.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_096.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_096.bmp
new file mode 100644
index 0000000000..5bda6454f9
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_096.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_097.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_097.bmp
new file mode 100644
index 0000000000..8c3ef1dc34
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_097.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_098.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_098.bmp
new file mode 100644
index 0000000000..945936438e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_098.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_099.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_099.bmp
new file mode 100644
index 0000000000..1ff111db32
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_099.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_100.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_100.bmp
new file mode 100644
index 0000000000..92afe90b0b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_100.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_101.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_101.bmp
new file mode 100644
index 0000000000..8d6953142e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_101.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_102.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_102.bmp
new file mode 100644
index 0000000000..f3f84cb402
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_102.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_103.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_103.bmp
new file mode 100644
index 0000000000..70462ac95b
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_103.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_104.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_104.bmp
new file mode 100644
index 0000000000..cdcf18ddbb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_104.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_105.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_105.bmp
new file mode 100644
index 0000000000..4f4f4e5098
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_105.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_112.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_112.bmp
new file mode 100644
index 0000000000..bb0e7bd8d9
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_112.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_113.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_113.bmp
new file mode 100644
index 0000000000..ed28c75efb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_113.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_114.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_114.bmp
new file mode 100644
index 0000000000..8a07d282af
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_114.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_115.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_115.bmp
new file mode 100644
index 0000000000..0644670fcb
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_115.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_116.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_116.bmp
new file mode 100644
index 0000000000..7f94f94078
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_116.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_117.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_117.bmp
new file mode 100644
index 0000000000..67d92c73a5
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_117.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_118.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_118.bmp
new file mode 100644
index 0000000000..8436ff06e0
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_118.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_119.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_119.bmp
new file mode 100644
index 0000000000..460a5de5b2
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_119.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_120.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_120.bmp
new file mode 100644
index 0000000000..f43eb169ab
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_120.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_121.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_121.bmp
new file mode 100644
index 0000000000..d6704653d3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/spellbook_spell_121.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/gumps/spellbook/st.bmp b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/st.bmp
new file mode 100644
index 0000000000..6a4244cc0c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/gumps/spellbook/st.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/roof_tiles.bmp b/devtools/create_ultima/files/ultima6/images/roof_tiles.bmp
new file mode 100644
index 0000000000..82a69c2776
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/roof_tiles.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0339.bmp
new file mode 100644
index 0000000000..bf17bc40a3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0376.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0376.bmp
new file mode 100644
index 0000000000..25c7454c96
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_002_0376.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0339.bmp
new file mode 100644
index 0000000000..7c555528d6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0377.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0377.bmp
new file mode 100644
index 0000000000..f5ac84a4c7
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_003_0377.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0339.bmp
new file mode 100644
index 0000000000..4f1cf838d9
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0386.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0386.bmp
new file mode 100644
index 0000000000..150b3dbdd2
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0386.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0392.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0392.bmp
new file mode 100644
index 0000000000..b3765de7c3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_004_0392.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_009_0354.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_009_0354.bmp
new file mode 100644
index 0000000000..aa2fda6f67
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_009_0354.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0339.bmp
new file mode 100644
index 0000000000..541eac1666
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0387.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0387.bmp
new file mode 100644
index 0000000000..f590106a42
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_062_0387.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0339.bmp
new file mode 100644
index 0000000000..b8db649678
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0386.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0386.bmp
new file mode 100644
index 0000000000..113b5170d3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0386.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0392.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0392.bmp
new file mode 100644
index 0000000000..48ec957894
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_066_0392.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0339.bmp
new file mode 100644
index 0000000000..3a8d71c65d
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0387.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0387.bmp
new file mode 100644
index 0000000000..af250c26c8
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_067_0387.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0339.bmp
new file mode 100644
index 0000000000..21ea688b43
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0385.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0385.bmp
new file mode 100644
index 0000000000..5390d50b12
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_097_0385.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0339.bmp
new file mode 100644
index 0000000000..bf0b6baa3c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0386.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0386.bmp
new file mode 100644
index 0000000000..0d7e439df4
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0386.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0392.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0392.bmp
new file mode 100644
index 0000000000..9f94592d7e
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_113_0392.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0339.bmp
new file mode 100644
index 0000000000..e5ce142c72
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0387.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0387.bmp
new file mode 100644
index 0000000000..a103c80f7c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_114_0387.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0339.bmp
new file mode 100644
index 0000000000..cbfd6edb58
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0376.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0376.bmp
new file mode 100644
index 0000000000..35dfdce9c3
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_131_0376.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0339.bmp
new file mode 100644
index 0000000000..51c6c85259
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0383.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0383.bmp
new file mode 100644
index 0000000000..52fd469188
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_137_0383.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0339.bmp
new file mode 100644
index 0000000000..8ec9bfdfdc
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0376.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0376.bmp
new file mode 100644
index 0000000000..b58eac860c
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_162_0376.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0339.bmp
new file mode 100644
index 0000000000..68ad9184b6
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0363.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0363.bmp
new file mode 100644
index 0000000000..2963cb7769
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_164_0363.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0339.bmp
new file mode 100644
index 0000000000..10b4a6eb84
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0376.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0376.bmp
new file mode 100644
index 0000000000..83b0b522bc
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/actor_186_0376.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0339.bmp
new file mode 100644
index 0000000000..33c821e2be
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0410.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0410.bmp
new file mode 100644
index 0000000000..4c2b42fd92
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_001_0410.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0339.bmp
new file mode 100644
index 0000000000..e7cba2dd65
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0410.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0410.bmp
new file mode 100644
index 0000000000..e32a52f852
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_006_0410.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0339.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0339.bmp
new file mode 100644
index 0000000000..cbaf7b5308
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0339.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0410.bmp b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0410.bmp
new file mode 100644
index 0000000000..eea64a86c1
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/images/tiles/U6/avatar_010_0410.bmp differ
diff --git a/devtools/create_ultima/files/ultima6/maps/u6/roof_map_00.dat b/devtools/create_ultima/files/ultima6/maps/u6/roof_map_00.dat
new file mode 100644
index 0000000000..368cfba418
Binary files /dev/null and b/devtools/create_ultima/files/ultima6/maps/u6/roof_map_00.dat differ
diff --git a/devtools/create_ultima/files/ultima6/mdkeys.txt b/devtools/create_ultima/files/ultima6/mdkeys.txt
new file mode 100644
index 0000000000..0c8811e09e
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/mdkeys.txt
@@ -0,0 +1,3 @@
+p	use_item	102	#use pry bar
+r	use_item	106	#use tent
+w	use_item	98	#use watch
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/common/actor.lua b/devtools/create_ultima/files/ultima6/scripts/common/actor.lua
new file mode 100644
index 0000000000..3b2b8e34d9
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/common/actor.lua
@@ -0,0 +1,202 @@
+ALIGNMENT_DEFAULT = 0
+ALIGNMENT_NEUTRAL = 1
+ALIGNMENT_EVIL    = 2
+ALIGNMENT_GOOD    = 3 
+ALIGNMENT_CHAOTIC = 4
+
+HEAD   = 0
+NECK   = 1
+BODY   = 2
+ARM    = 3
+ARM_2  = 4
+HAND   = 5
+HAND_2 = 6
+FOOT   = 7
+
+
+g_combat_range_tbl = {
+0, 1, 2, 3, 4, 5, 6, 7,
+1, 1, 2, 3, 4, 5, 6, 7,
+2, 2, 2, 3, 4, 5, 6, 7,
+3, 3, 3, 4, 5, 6, 7, 7,
+4, 4, 4, 5, 6, 7, 7, 8,
+5, 5, 5, 6, 7, 7, 8, 8,
+6, 6, 6, 7, 7, 8, 8, 8,
+7, 7, 7, 7, 8, 8, 8, 8}
+
+function get_combat_range(absx, absy)
+   if absx < 8 and absy < 8 then
+      return g_combat_range_tbl[absx * 8 + absy + 1]
+   end
+
+   return 9
+end
+
+function get_weapon_range(obj_n)
+
+   local range = g_range_weapon_tbl[obj_n]
+   
+   if range == nil then
+      return 1
+   end
+
+   return range
+end
+
+function actor_randomise_stat(base_stat)
+   local tmp = math.floor(base_stat/2)
+   if tmp == 0 then
+      return base_stat
+   end
+   
+   return math.random(0, tmp) + math.random(0, tmp)  + base_stat - tmp
+end
+
+function actor_is_holding_obj(actor, obj_n)
+   local hand
+   
+   hand = Actor.inv_get_readied_obj_n(actor, HAND)
+   if hand == obj_n then
+      return true
+   end
+   hand = Actor.inv_get_readied_obj_n(actor, HAND_2)
+   if hand == obj_n then
+      return true
+   end
+   
+   return false   
+end
+
+function actor_has_free_arm(actor)
+   if Actor.inv_get_readied_obj_n(actor, ARM) == -1
+           or Actor.inv_get_readied_obj_n(actor, ARM_2) == -1 then
+      return true
+   end
+
+   return false
+end
+
+function actor_find_max_xy_distance(actor, x, y)
+   x, y = abs(actor.x - x), abs(actor.y - y)
+   return (x > y) and x or y
+end
+
+function actor_find_max_wrapped_xy_distance(actor, x, y)
+   x, y = get_wrapped_dist(actor.x, x), get_wrapped_dist(actor.y, y)
+   return (x > y) and x or y
+end
+
+function actor_get_combat_range(actor, target_x, target_y)
+   --FIXME might need to adjust the src position for multi-tile actors.
+   x, y = get_wrapped_dist(actor.x, target_x), get_wrapped_dist(actor.y, target_y)
+   return get_combat_range(x, y)
+end
+
+function subtract_map_movement_pts(actor)
+   local points = map_get_impedence(actor.x, actor.y, actor.z, false) + 5
+   subtract_movement_pts(actor, points)
+end
+
+function actor_move_towards_loc(actor, map_x, map_y)
+   --dgb("move actor "..actor.name.." from ("..actor.x..","..actor.y..") towards ("..map_x..","..map_y..") ")
+   local var_2 = (word_30A6B == 1) and 0 or 1
+   local var_6 = 1
+   local diff_x = map_x - actor.x
+   local diff_y = map_y - actor.y
+
+   if (diff_x == 0 and diff_y == 0) or actor.wt == WT_STATIONARY then subtract_movement_pts(actor, 5) return 0 end
+
+   local x_direction, y_direction
+
+   if diff_x ~= 0 then
+      x_direction = (diff_x >= 0) and DIR_EAST or DIR_WEST
+   else
+      x_direction = (math.random(0, 1) == 0) and DIR_WEST or DIR_EAST
+   end
+
+   if diff_y ~= 0 then
+      y_direction = (diff_y >= 0) and DIR_SOUTH or DIR_NORTH
+   else
+      y_direction = (math.random(0, 1) == 0) and DIR_SOUTH or DIR_NORTH
+   end
+
+   unk_30A72 = 0
+
+   local var_4
+
+   if abs(diff_x) >= 4 or abs(diff_y) >= 4 then
+      var_4 = (math.random(1, abs(diff_x) + abs(diff_y)) <= abs(diff_x)) and 1 or 0
+   else
+      if abs(diff_x) > abs(diff_y) then
+         var_4 = 0
+      else
+         if abs(diff_x) < abs(diff_y) then
+            var_4 = 1
+         else
+            var_4 = math.random(0, 1)
+         end
+      end
+
+      --var_4 = (abs(diff_x) >= abs(diff_y) or abs(diff_x) ~= abs(diff_y) or math.random(0, 1) == 0) and 0 or 1
+   end
+   ----dgb("var_4 = "..var_4.."\n")
+   if var_4 == 0 then
+      if actor_move(actor, x_direction, var_2) == 0 then
+         if actor_move_diagonal(actor, x_direction, y_direction) == 0 then
+            if actor_move(actor, y_direction, var_2) == 0 then
+               if math.random(0, 1) ~= 0 or actor_move(actor, (y_direction == DIR_NORTH) and DIR_SOUTH or DIR_NORTH, 1) == 0 then
+
+                  subtract_map_movement_pts(actor)
+                  var_6 = 0 --didn't move anywhere
+               end
+            end
+         end
+      end
+
+   else
+
+      if actor_move(actor, y_direction, var_2) == 0 then
+         if actor_move_diagonal(actor, x_direction, y_direction) == 0 then
+            if actor_move(actor, x_direction, var_2) == 0 then
+               if math.random(0, 1) ~= 0 or actor_move(actor, (x_direction == DIR_EAST) and DIR_WEST or DIR_EAST, 1) == 0 then
+
+                  subtract_map_movement_pts(actor)
+                  var_6 = 0 --didn't move anywhere
+               end
+            end
+         end
+      end
+
+   end
+
+   unk_30A72 = 1
+   ----dgb("var_6 = "..var_6)
+   --dgb(" now at ("..actor.x..","..actor.y..") dir="..actor.direction.."\n")
+   return var_6
+
+end
+
+function toss_actor(actor, from_x, from_y, from_z, arg_0)
+
+   local random = math.random
+   local player_loc = player_get_location()
+
+   for i=1,8 do
+
+      local new_x = random(1, 4) + random(1, 4) + from_x - 5
+      local new_y = random(1, 4) + random(1, 4) + from_y - 5
+
+      if arg_0 == 0
+              or player_loc.x - 5 > new_x or player_loc.x + 5 < new_x or player_loc.y - 5 > new_y or player_loc.y + 5 < new_y then
+
+         if Actor.move(actor, new_x, new_y, from_z) == true then return true end
+
+      end
+   end
+
+   return false
+end
+
+function actor_has_bad_alignment(actor)
+   return actor.wt == ALIGNMENT_EVIL or actor.wt == ALIGNMENT_CHAOTIC
+end
diff --git a/devtools/create_ultima/files/ultima6/scripts/common/common.lua b/devtools/create_ultima/files/ultima6/scripts/common/common.lua
new file mode 100644
index 0000000000..f78b506393
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/common/common.lua
@@ -0,0 +1,399 @@
+--note nuvie direction values aren't the same as the original it uses the following scheme
+--701
+--6 2
+--543
+
+DIR_NORTH     = 0
+DIR_EAST      = 1
+DIR_SOUTH     = 2
+DIR_WEST      = 3
+DIR_NORTHEAST = 4
+DIR_SOUTHEAST = 5 
+DIR_SOUTHWEST = 6
+DIR_NORTHWEST = 7
+DIR_NONE      = 8
+
+
+UI_STYLE_ORIG = 0
+UI_STYLE_NEW  = 1
+UI_STYLE_ORIG_PLUS_CUTOFF_MAP = 2
+UI_STYLE_ORIG_PLUS_FULL_MAP   = 3
+
+STACK_OBJECT_QTY = true
+
+movement_offset_x_tbl  = {0, 1, 1, 1, 0, -1, -1, -1}
+movement_offset_y_tbl = {-1, -1, 0, 1, 1, 1, 0, -1 }
+
+if not setfenv then -- Lua 5.2
+   -- based on http://lua-users.org/lists/lua-l/2010-06/msg00314.html
+   -- this assumes f is a function
+   local function findenv(f)
+      local level = 1
+      repeat
+         local name, value = debug.getupvalue(f, level)
+         if name == '_ENV' then return level, value end
+         level = level + 1
+      until name == nil
+      return nil
+   end
+   getfenv = function (f) return(select(2, findenv(f)) or _G) end
+   setfenv = function (f, t)
+      local level = findenv(f)
+      if level then debug.setupvalue(f, level, t) end
+      return f
+   end
+end
+
+function get_target()
+   local loc = coroutine.yield("target")
+
+   return loc
+end
+
+function get_direction(prompt)
+
+	if prompt ~= nil then
+		print(prompt)
+	end
+	
+	local dir = coroutine.yield("dir")
+
+	return dir
+end
+
+function really_get_direction(prompt)
+
+	if prompt ~= nil then
+		print(prompt)
+	end
+
+	local dir = coroutine.yield("need_dir")
+
+	return dir
+end
+
+function direction_string(dir)
+	if dir ~= nil then
+		if dir == DIR_NORTH then return "north" end
+		if dir == DIR_NORTHEAST then return "northeast" end
+		if dir == DIR_EAST then return "east" end
+		if dir == DIR_SOUTHEAST then return "southeast" end
+		if dir == DIR_SOUTH then return "south" end
+		if dir == DIR_SOUTHWEST then return "southwest" end
+		if dir == DIR_WEST then return "west" end
+		if dir == DIR_NORTHWEST then return "northwest" end
+	end
+	
+	return "unknown"
+end
+
+local dir_rev_tbl =
+{
+   [DIR_NORTH] = DIR_SOUTH,
+   [DIR_NORTHEAST] = DIR_SOUTHWEST,
+   [DIR_EAST] = DIR_WEST,
+   [DIR_SOUTHEAST] = DIR_NORTHWEST,
+   [DIR_SOUTH] = DIR_NORTH,
+   [DIR_SOUTHWEST] = DIR_NORTHEAST,
+   [DIR_WEST] = DIR_EAST,
+   [DIR_NORTHWEST] = DIR_SOUTHEAST
+}
+   
+function direction_reverse(dir) return dir_rev_tbl[dir] end
+
+local g_dir_offset_tbl =
+{
+   [DIR_NORTH] = {["x"]=0, ["y"]=-1},
+   [DIR_NORTHEAST] = {["x"]=1, ["y"]=-1},
+   [DIR_EAST] = {["x"]=1, ["y"]=0},
+   [DIR_SOUTHEAST] = {["x"]=1, ["y"]=1},
+   [DIR_SOUTH] = {["x"]=0, ["y"]=1},
+   [DIR_SOUTHWEST] = {["x"]=-1, ["y"]=1},
+   [DIR_WEST] = {["x"]=-1, ["y"]=0},
+   [DIR_NORTHWEST] = {["x"]=-1, ["y"]=-1},
+   [DIR_NONE] = {["x"]=0, ["y"]=0}
+}
+
+function direction_get_loc(dir, from_x, from_y)
+	return g_dir_offset_tbl[dir].x + from_x, g_dir_offset_tbl[dir].y + from_y
+end
+
+function abs(val)
+   if val < 0 then
+      return -val
+   end
+   
+   return val
+end
+
+--collect Yes/No input from user and return true if Yes selected. false otherwise.
+function input_should_proceed()
+   local input = input_select("yn", true)
+   print("\n")
+   if input == nil or input == "N" or input == "n" then
+      return false
+   end
+
+   return true
+end
+
+function play_midgame_sequence(seq_num)
+   local ui_style = game_get_ui_style()
+   
+   canvas_show()
+   canvas_hide_all_sprites()
+   canvas_set_opacity(0xff);
+   canvas_set_update_interval(25)
+   canvas_rotate_game_palette(true)
+
+   local bg = sprite_new(nil, 8, 16, true)
+   local avatar = sprite_new(nil, 8, 16, false)
+   
+   local text_sprite
+   --local text_sprite_bg
+      
+   if ui_style == UI_STYLE_ORIG then
+      canvas_set_solid_bg(false)
+   else
+   --[[
+      text_sprite_bg = sprite_new(nil, 8, 160, true)
+      text_sprite_bg.text_align_centre = true
+      text_sprite_bg.text_color = 14
+      --]]
+      text_sprite = sprite_new(nil, 8, 160, true)
+      text_sprite.text_align_centre = true
+      text_sprite.text_color = 15
+      bg.x = 80
+      bg.y = 12
+      avatar.x = 80
+      avatar.y = 12
+   end
+
+   local midgame_data = midgame_load("midgame"..string.format("%x", seq_num)..".lzc")
+   local i = 0
+   local data = midgame_data[i]
+   
+
+      
+   while data ~= nil do
+      bg.image = data.images[0]
+      if data.images[1] ~= nil then
+         local gender = player_get_gender()
+         avatar.image = data.images[1+gender]
+         avatar.visible = true
+      else
+         avatar.visible = false
+      end
+      
+      local j = 0
+      local text = data.text[j]
+      while text ~= nil do
+         if text ~= "*END*" then
+            if ui_style == UI_STYLE_ORIG then
+               clear_scroll()
+               print(text)
+            else
+               text_sprite.text = text
+               --text_sprite_bg.text = text
+            end
+
+            local input = nil
+            while input == nil do
+               canvas_update()
+               input = input_poll()
+               if input ~= nil then
+                  break
+               end
+            end
+         end
+         j = j + 1
+         text = data.text[j]
+      end
+      i = i + 1
+      data = midgame_data[i]
+   end
+
+   if ui_style == UI_STYLE_ORIG then
+      clear_scroll()
+   end
+   canvas_set_solid_bg(true)
+   canvas_rotate_game_palette(false)
+   canvas_hide()
+end
+
+function get_wrapped_dist(pt1, pt2)
+   local diff
+   
+   if pt2 >= pt1 then
+      diff = pt2 - pt1
+   else
+      diff = pt1 - pt2
+   end
+   
+   if diff > 512 then
+      diff = 1024 - diff
+   end
+   
+   return diff
+end
+
+function get_anim_index_for_tile(tile_number)
+   local total_anims = anim_get_number_of_entries()
+   for i=0,total_anims-1 do
+      if anim_get_tile(i) == tile_number then
+         return i
+      end
+   end
+   
+   return nil
+end
+
+function altcode_242_set_actor_talk_flag()
+   print("NPC: ")
+   local input = input_select(nil, true)
+   local actor_num = tonumber(input, 16)
+   local actor = Actor.get(actor_num)
+   print("\n"..actor.name.."\n")
+   print("flags: \n") --FIXME print talk flags
+   print("\nBit: ")
+   local bit = input_select_integer(nil, true)
+   local value = Actor.get_talk_flag(actor, bit)
+   local value_str = "off"
+   if value == true then
+      value_str = "on"
+   end
+   print(" is "..value_str..".\n")
+   print("New value? ")
+   value = input_select_integer(nil, true)
+   
+   value_str = "off"
+   
+   if value == 1 or value == "o" then
+      value_str = "on"
+      Actor.set_talk_flag(actor, bit)
+   else
+      Actor.clear_talk_flag(actor, bit)
+   end
+   print("\n"..value_str.."\n")
+end
+
+function altcode_250_create_object()
+   print("Create Item:\nType:0x")
+   local input = input_select(nil, true)
+   local obj_n = tonumber(input, 16)
+   local obj = Obj.new(obj_n)
+   local tmp_obj = Obj.new(obj_n+1)
+   if tmp_obj ~= nil and tmp_obj.tile_num - obj.tile_num > 1 then
+      print("\nFrame:0x")
+      input = input_select(nil, true)
+      obj.frame_n = tonumber(input, 16) 
+   end
+   
+   print("\nQual:0x")
+   input = input_select(nil, true)
+   obj.quality = tonumber(input, 16)
+   
+   if obj.stackable or create_object_needs_quan(obj_n) then
+      print("\nQuan:0x")
+      input = input_select(nil, true)
+      obj.qty = tonumber(input, 16)
+   end
+   Obj.moveToInv(obj, Actor.get(1).actor_num)
+   print("\n")
+end
+
+function altcode_913_export_tmx_map_files()
+   print("\nExport maps to savedir? ")
+
+   if not input_should_proceed() then
+      return
+   end
+
+   print("saving.\n")
+   script_wait(1)
+   if map_export_tmx_files() == true then
+      print("done.\n\n")
+   else
+      print("error!!\n\n")
+   end
+end
+
+function altcode_914_export_tileset()
+   print("Exporting tileset to \"data/images/tiles/"..config_get_game_type().."/custom_tiles.bmp\" in the savegame directory.\n")
+   if not tileset_export() then
+      print("file already exists. Overwrite? ")
+      if not input_should_proceed() then
+         return
+      end
+      tileset_export(true)
+   end
+   print("done.\n\n")
+end
+
+function altcode_999_find_objs_on_map()
+   print("Find Object\nObj_n: ")
+   local input = input_select(nil, true)
+   local obj_n = tonumber(input, 10)
+   if obj_n == nil then
+      print("Nothing.\n")
+      return
+   end
+   print("\nFrame: ")
+   input = input_select(nil, true)
+   local frame_n = tonumber(input, 10)
+   print("\nQuality: ")
+   input = input_select(nil, true)
+   local quality = tonumber(input, 10)
+   print("\nz: ")
+   input = input_select(nil, true)
+   local z = tonumber(input, 10)
+   if z == nil then
+      z = 0
+   end
+   print("\n")
+   for obj in find_obj(z, obj_n, frame_n, quality) do
+      print(string.format("OBJ: (%x,%x,%x)\n", obj.x, obj.y, obj.z))
+      party_move(obj.x, obj.y, obj.z)
+      print("continue? ")
+      input = input_select("yn", false)
+      print("\n")
+      if input == "N" or input == "n" then
+         return
+      end
+   end
+end
+
+local altcode_tbl = {
+   [242]=altcode_242_set_actor_talk_flag,
+   [250]=altcode_250_create_object,
+   [913]=altcode_913_export_tmx_map_files,
+   [914]=altcode_914_export_tileset,
+   [999]=altcode_999_find_objs_on_map,
+}
+
+function handle_alt_code(altcode)
+   local func = altcode_tbl[altcode]
+   if func ~= nil then
+      func()
+   end
+end
+
+function get_actor_or_obj_from_loc(location)
+   local target = map_get_actor(location)
+   if target == nil then
+      target = map_get_obj(location)
+   end
+   return target
+end
+
+--load other common functions
+
+local lua_file = nil
+
+lua_file = nuvie_load("common/lang.lua");
+lua_file();
+lang_init("game")
+
+lua_file = nuvie_load("common/actor.lua"); lua_file();
+
+
diff --git a/devtools/create_ultima/files/ultima6/scripts/common/intro_common.lua b/devtools/create_ultima/files/ultima6/scripts/common/intro_common.lua
new file mode 100644
index 0000000000..e13593ebcd
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/common/intro_common.lua
@@ -0,0 +1,320 @@
+-- input value constants
+MOUSE_CLICK       = 0
+MOUSE_MOTION      = 1
+SDLK_BACKSPACE    = 8
+SDLK_RETURN       = 13
+SDLK_ESCAPE       = 27
+SDLK_SPACE        = 32
+SDLK_a            = 97
+SDLK_b            = 98
+SDLK_c            = 99
+SDLK_g            = 103
+SDLK_i            = 105
+SDLK_j            = 106
+SDLK_q            = 113
+SDLK_r            = 114
+SDLK_s            = 115
+SDLK_t            = 116
+SDLK_KP2          = 258
+SDLK_KP4          = 260
+SDLK_KP6          = 262
+SDLK_KP8          = 264
+SDLK_KP_ENTER     = 271
+SDLK_UP           = 82 + 1073741824
+SDLK_DOWN         = 81 + 1073741824
+SDLK_RIGHT        = 79 + 1073741824
+SDLK_LEFT         = 80 + 1073741824
+
+
+function trim_string(s)
+   return s:match'^%s*(.*%S)' or ''
+end
+
+function wait_for_input()
+   local input = nil
+   while input == nil do
+      canvas_update()
+      input = input_poll()
+      if input ~= nil then
+         break
+      end
+   end
+
+   return input
+end
+
+local g_should_exit = false
+
+function clear_should_exit_flag()
+   g_should_exit = false
+end
+
+function should_exit()
+   return g_should_exit
+end
+
+function poll_for_input()
+   input = input_poll()
+   if input ~= nil then
+      if input == SDLK_ESCAPE then
+         g_should_exit = true
+      end
+   end
+
+   return input
+end
+
+function poll_for_key_or_button(cycles)
+   local input
+   if cycles == nil then
+      input = input_poll()
+      if input ~= nil then
+         if input == SDLK_ESCAPE then
+            g_should_exit = true
+         end
+         return true
+      end
+   else
+      local i
+      for i=0,cycles,1 do
+         local input = input_poll()
+         if input ~= nil then
+            if input == SDLK_ESCAPE then
+               g_should_exit = true
+            end
+            return true
+         end
+         canvas_update()
+      end
+   end
+   return false
+end
+
+function poll_for_esc(cycles)
+   local input
+   if cycles == nil then
+      input = input_poll()
+      if input ~= nil and input == SDLK_ESCAPE then
+         return true
+      end
+   else
+      local i
+      for i=0,cycles,1 do
+         local input = input_poll()
+         if input ~= nil and input == SDLK_ESCAPE then
+            return true
+         end
+         canvas_update()
+      end
+   end
+   return false
+end
+
+function fade_in(speed)
+   if speed == nil then
+      speed = 3
+   end
+   
+   local i
+   for i=0x0,0xff,speed do
+      canvas_set_opacity(i)
+      canvas_update()
+   end
+
+   return false
+end
+
+function fade_out(speed)
+   if speed == nil then
+      speed = 3
+   end
+    
+   local i
+   for i=0xff,0,-speed do
+      canvas_set_opacity(i)
+      canvas_update()
+   end
+
+   return false
+end
+
+function update_players(players, img_tbl)
+local rand = math.random
+
+   players[1].image = img_tbl[1][rand(0,12)]
+   players[2].image = img_tbl[2][rand(0,8)]
+   players[3].image = img_tbl[3][rand(0,2)]
+   players[4].image = img_tbl[4][rand(0,6)]
+   players[5].image = img_tbl[5][rand(0,4)]
+   players[6].image = img_tbl[6][rand(0,2)]
+   players[7].image = img_tbl[7][rand(0,4)]
+   players[8].image = img_tbl[8][rand(0,4)]
+   players[9].image = img_tbl[9][rand(0,3)]
+      
+end
+
+function create_player_sprite(image, x, y)
+   local sprite = sprite_new(image, x, y, true)
+   sprite.clip_x = 0
+   sprite.clip_y = 0
+   sprite.clip_w = 320
+   sprite.clip_h = 152
+
+   return sprite
+end
+
+function create_sprite(image, x, y)
+   local sprite = sprite_new(image, x, y, true)
+   sprite.clip_x = 0
+   sprite.clip_y = 24
+   sprite.clip_w = 320
+   sprite.clip_h = 128
+   return sprite
+end
+
+function create_firework(img_tbl)
+   local rand = math.random
+   local colour = rand(0,2)
+   local exp = {create_sprite(img_tbl[11][8*colour], rand(0,319), rand(0,127)), colour, 0}
+   return exp
+end
+
+function fireworks_update(exp_tbl, img_tbl)
+   local exp_finished = 0
+   local k,v
+   for k,v in pairs(exp_tbl) do
+      if v[3] == 7 then
+         v[1].visible = false
+         table.remove(exp_tbl, k)
+         exp_finished = exp_finished + 1
+      else
+         v[3] = v[3] + 1
+         v[1].image = img_tbl[11][8*v[2]+v[3]]
+      end
+   end
+   
+   return exp_finished
+end
+
+function fireworks(img_tbl, logo)
+   local rand = math.random
+   local exp_tbl = {}
+   local exp_count = 0
+   local i
+   for i=0,125 do
+      if exp_count < 5 then
+         if rand(0,5) == 0 then
+            local exp = create_firework(img_tbl)
+            table.insert(exp_tbl, exp)
+            exp_count = exp_count + 1
+            sprite_move_to_front(logo)
+            play_sfx(12, false)
+         end
+      end
+      local num_finished = fireworks_update(exp_tbl, img_tbl)
+      exp_count = exp_count - num_finished
+      poll_for_esc(1)
+   end
+   
+   --wait for remaining explosions to finish
+   while exp_count > 0 do
+      local num_finished = fireworks_update(exp_tbl, img_tbl)
+      exp_count = exp_count - num_finished
+      poll_for_esc(1)
+   end
+   
+   poll_for_esc(10)
+      
+   -- create final 30 explosions.
+   for i=1,30 do
+      local exp = create_firework(img_tbl)
+      table.insert(exp_tbl, exp)
+      exp_count = exp_count + 1
+   end
+
+   while exp_count > 0 do
+      local num_finished = fireworks_update(exp_tbl, img_tbl)
+      exp_count = exp_count - num_finished
+      poll_for_esc(1)
+   end
+
+end
+
+function display_image_table(img_tbl, x, y)
+   if x == nil then
+      x = 160
+   end
+   
+   if y == nil then
+      y = 100
+   end
+   
+   local sprite = sprite_new(nil, x, y, true)
+   
+   local text_sprite = sprite_new(nil, 100, 180, true)
+            
+   local i = 0
+   for k,v in pairs(img_tbl) do
+      if type(v) == "table" then
+         local j = 0
+         for l,m in pairs(v) do
+   
+            local img = image_new(50,20)
+            text_sprite.image = img
+            image_print(img, "("..k..","..l..")", 0, 50, 0, 8, 0x6)
+            sprite.image = m
+            wait_for_input()
+            j = j + 1
+         end
+      else
+         local img = image_new(50,20)
+         text_sprite.image = img
+         image_print(img, "("..k..",x)", 0, 50, 0, 8, 0x6)
+         sprite.image = v
+         wait_for_input()
+      end
+      i = i + 1
+   end
+end
+
+function about_martian_dreams()
+   canvas_hide_all_sprites()
+   local bg = sprite_new(image_load("mars.lzc", 0), 0, 24, true)   
+   
+   local text_tbl = text_load("scenetxt.lzc", 4)
+   music_play("mdd_mus.lzc", 8)
+   
+   local sprites = {}
+   local i
+   for i=0,81 do
+      local s = sprite_new(nil, 11, 153 + i * 14, true)
+      s.text_color = 6
+      s.text = text_tbl[i]
+      table.insert(sprites, s)
+      
+      s = sprite_new(nil, 12, 152 + i * 14, true)
+      s.text_color = 14
+      s.text = text_tbl[i]
+      table.insert(sprites, s)
+   end
+   
+   --black bars for the top and bottom of the screen.
+   --These hide the text as it is scrolling in and out.
+   sprite_new(image_new(220, 24, 0), 0, 0, true)  
+   sprite_new(image_new(220, 48, 0), 0, 152, true)
+   
+   --scroll the text up the screen
+   for i=0,90*14 do
+      local j
+      for j=1,82*2 do
+         sprites[j].y = sprites[j].y - 1
+      end
+      poll_for_key_or_button(2)
+      if should_exit() then
+         fade_out()
+         return
+      end
+   end
+   music_stop()
+   fade_out()
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/common/lang.lua b/devtools/create_ultima/files/ultima6/scripts/common/lang.lua
new file mode 100644
index 0000000000..693ece89ed
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/common/lang.lua
@@ -0,0 +1,58 @@
+
+local lang
+local lang_en
+
+local game_type = config_get_game_type()
+local lang_selected = config_get_language()
+
+function lang_init(lang_type)
+   if lang_type ~= "intro" then
+      lang_type = "game"
+   end
+   
+   lang_en = nuvie_load(string.lower(game_type).."/lang/en/"..lang_type..".lua")
+
+   if lang_en == nil then
+      lang_en = {}
+   else
+      lang_en = lang_en()
+   end
+   
+   if lang_selected ~= "en" then
+       lang = nuvie_load(string.lower(game_type).."/lang/"..lang_selected.."/"..lang_type..".lua")
+       if lang == nil then
+         lang = lang_en
+       else
+         lang = lang()
+       end
+   else
+      lang = lang_en
+   end
+end
+
+function i18n(code)
+   local str = lang[code]
+   if str == nil then
+      str = lang_en[code]
+   end
+   if str == nil then
+      str = code
+   end
+   return str;
+end
+
+function i18nf(code, ...)
+   return string.format(i18n(code), ...)
+end
+
+function printnl(code)
+   print("\n"..i18n(code))
+end
+
+function printl(code)
+   print(i18n(code))
+end
+
+function printfl(code, ...)
+   print(i18nf(code, ...))
+end
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/actor.lua b/devtools/create_ultima/files/ultima6/scripts/md/actor.lua
new file mode 100644
index 0000000000..b2b582e28f
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/actor.lua
@@ -0,0 +1,1685 @@
+io.stderr:write("actor.lua get here\n")
+
+--Worktypes      
+WT_NOTHING                = 0x0  --do nothing
+
+WT_FOLLOW                 = 0x1  --follow avatar (in party)
+
+WT_PLAYER                 = 0x2  --player mode
+
+WT_SLEEP                  = 0x91
+
+ACTOR_STAT_DMG = 7
+--Actor stats table
+--[obj_num] = {str,dex,int,hp,alignment,,damage??,,,,,,,,,,,,,,,,}
+actor_tbl = {
+--OBJ_YOURSELF5
+[343] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_YOURSELF6
+[344] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_POOR_MONK
+[342] = {22,22,22,60,ALIGNMENT_EVIL,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_SCIENTIST
+[345] = {15,15,25,30,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_YOUNG_WOMAN
+[346] = {18,18,22,60,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_COWBOY
+[347] = {20,25,18,60,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_GENTLEMAN
+[348] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_UNIFORMED_MAN
+[349] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_ADVENTURER
+[350] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_COMMON_FELLOW
+[351] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_MAN
+[352] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_MAN_IN_WHITE
+[353] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_LADY
+[354] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_WOMAN
+[355] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_ADVENTURESS
+[356] = {25,25,25,90,ALIGNMENT_GOOD,0,6,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_METAL_WOMAN1
+[357] = {25,25,25,90,ALIGNMENT_GOOD,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_MECHANICAL_MAN
+[358] = {25,15,10,40,ALIGNMENT_GOOD,4,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_MARTIAN
+[369] = {15,15,20,30,ALIGNMENT_NEUTRAL,0,6,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_SEXTELLEGER
+[359] = {20,20,10,45,ALIGNMENT_CHAOTIC,4,35,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_BUSHALO
+[360] = {25,12,11,35,ALIGNMENT_NEUTRAL,8,20,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0},
+--OBJ_PLANTELLOPE
+[361] = {15,22,9,20,ALIGNMENT_NEUTRAL,1,12,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_ROCKWORM2
+[372] = {20,15,10,40,ALIGNMENT_CHAOTIC,8,25,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_WISP
+[377] = {20,20,20,80,ALIGNMENT_NEUTRAL,3,30,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0},
+--OBJ_AIRSQUID
+[378] = {10,20,15,10,ALIGNMENT_EVIL,0,6,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0},
+--OBJ_AIRSQUID1
+[380] = {15,15,8,30,ALIGNMENT_EVIL,4,20,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_GIANT_MAW
+[373] = {30,10,9,100,ALIGNMENT_CHAOTIC,3,30,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_TENTACLE1
+[362] = {20,20,9,10,ALIGNMENT_CHAOTIC,2,20,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0},
+--OBJ_CREEPING_CACTUS
+[383] = {20,12,3,30,ALIGNMENT_CHAOTIC,4,25,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_AMMONOID
+[363] = {15,15,3,20,ALIGNMENT_CHAOTIC,10,12,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_PROTO_MARTIAN
+[364] = {20,19,10,20,ALIGNMENT_EVIL,2,10,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0},
+--OBJ_MONSTER_FOOTPRINTS
+[145] = {20,19,10,20,ALIGNMENT_EVIL,2,12,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0},
+--OBJ_POD_DEVIL
+[384] = {15,18,3,25,ALIGNMENT_CHAOTIC,4,12,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_JUMPING_BEAN
+[385] = {10,22,10,10,ALIGNMENT_CHAOTIC,1,4,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_HEDGEHOG
+[365] = {17,12,8,20,ALIGNMENT_CHAOTIC,3,20,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_CREEPER
+[374] = {15,15,3,20,ALIGNMENT_CHAOTIC,1,16,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_AGROBOT
+[376] = {29,18,10,30,ALIGNMENT_CHAOTIC,10,20,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0},
+--OBJ_CANAL_WORM
+[379] = {20,20,15,30,ALIGNMENT_CHAOTIC,5,25,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0},
+--OBJ_DUST_DEVIL
+[381] = {30,30,30,255,ALIGNMENT_NEUTRAL,99,60,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0},
+--OBJ_SAND_TRAPPER
+[386] = {25,25,10,40,ALIGNMENT_CHAOTIC,4,18,1,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0},
+--OBJ_OXY_LEECH
+[375] = {10,25,12,20,ALIGNMENT_CHAOTIC,1,10,0,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_CAVE_WORM
+[366] = {15,15,15,30,ALIGNMENT_EVIL,2,15,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_JANITOR
+[367] = {20,15,10,30,ALIGNMENT_CHAOTIC,10,20,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0},
+--OBJ_BUSHRAT
+[387] = {10,25,10,20,ALIGNMENT_EVIL,2,12,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_PLANTHER
+[368] = {15,22,12,20,ALIGNMENT_CHAOTIC,4,20,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_MINOTAUR
+[398] = {20,18,8,90,ALIGNMENT_NEUTRAL,2,15,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0},
+--OBJ_YOUR_MOTHER
+[391] = {12,20,15,255,ALIGNMENT_CHAOTIC,9,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0},
+--OBJ_TREE
+[408] = {25,18,5,90,ALIGNMENT_NEUTRAL,3,12,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_SOMETHING_YOU_SHOULDNT2
+[424] = {25,18,5,90,ALIGNMENT_NEUTRAL,3,12,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0},
+--OBJ_HUGE_RED_SPOT
+[403] = {20,20,10,255,ALIGNMENT_EVIL,99,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
+}
+
+function  is_actor_stat_bit_set(obj_n, bit_number)
+   local stats = actor_tbl[obj_n]
+   if stats ~= nil then
+      if stats[23 - bit_number] == 1 then
+         return true
+      end
+   end
+
+   return false
+end
+
+g_party_is_warm = false
+
+-- Berry logic
+function actor_is_affected_by_purple_berries(actor_num)
+
+   if actor_num < 16 and timer_get(actor_num*3) > 0 then
+      return true
+   end
+   
+   return false
+end
+
+function actor_is_affected_by_green_berries(actor_num)
+ 
+   if actor_num < 16 and timer_get(actor_num*3+1) > 0 then
+      return true
+   end
+   
+   return false
+end
+
+function actor_is_affected_by_brown_berries(actor_num)
+ 
+   if actor_num < 16 and timer_get(actor_num*3+2) > 0 then
+      return true
+   end
+   
+   return false
+end
+
+function actor_get_purple_berry_count(actor_num)
+   if actor_num < 16 then
+      return timer_get(actor_num*3)
+   end
+   
+   return 0
+end
+
+function actor_get_green_berry_count(actor_num)
+   if actor_num < 16 then
+      return timer_get(actor_num*3+1)
+   end
+   
+   return 0
+end
+
+function actor_get_brown_berry_count(actor_num)
+   if actor_num < 16 then
+      return timer_get(actor_num*3+2)
+   end
+   
+   return 0
+end
+
+function actor_decrement_berry_counter(actor, berry_type)
+   local actor_num = actor.actor_num
+   local count = timer_get(actor_num*3+berry_type)
+   if count > 0 and math.random(1, actor_int_adj(actor) * 4) == 1 then
+      timer_set(actor_num*3+berry_type, count - 1)
+      if (actor_num == 0 and g_in_dream_mode) or 
+         (actor_num ~= 0 and g_in_dream_mode == false) then
+         play_md_sfx(0x32)
+         printl("A_PSYCHIC_POWER_FADES")
+      end
+   end   
+end
+
+function actor_decrement_berry_counters(actor)
+   actor_decrement_berry_counter(actor, 0) --purple
+   actor_decrement_berry_counter(actor, 1) --green
+   actor_decrement_berry_counter(actor, 2) --brown
+end
+
+function actor_increment_berry_counter(actor_num, berry_type)
+   local count = timer_get(actor_num*3+berry_type)
+   if actor_num < 16 and count < 10 then
+      timer_set(actor_num*3+berry_type, count + 1)
+   end
+end
+
+function actor_increment_purple_berry_count(actor_num)
+   actor_increment_berry_counter(actor_num, 0)
+end
+
+function actor_increment_green_berry_count(actor_num)
+   actor_increment_berry_counter(actor_num, 1)
+end
+
+function actor_increment_brown_berry_count(actor_num)
+   actor_increment_berry_counter(actor_num, 2)
+end
+
+function actor_get_blue_berry_counter()
+   return timer_get(16*3)
+end
+
+function actor_set_blue_berry_counter(new_value)
+   timer_set(16*3, new_value)
+end
+
+function actor_clear_berry_counters(actor_num)
+   timer_set(actor_num*3, 0)
+   timer_set(actor_num*3+1, 0)
+   timer_set(actor_num*3+2, 0)
+end
+
+function actor_get_damage(actor)
+   local stat = actor_tbl[actor]
+   if stat ~= nil then
+      return stat[ACTOR_STAT_DMG]
+   end
+
+   return nil
+end
+
+--
+-- actor_init(actor)
+--
+
+function actor_init(actor, alignment)
+
+ local actor_base = actor_tbl[actor.obj_n]
+ if actor_base ~= nil then
+   actor.str = actor_randomise_stat(actor_base[1])
+   actor.dex = actor_randomise_stat(actor_base[2])
+   actor.int = actor_randomise_stat(actor_base[3])
+   actor.hp = actor_randomise_stat(actor_base[4])
+
+   actor.level = 0
+   actor.align = actor_base[5]
+ else
+   actor.str = 15
+   actor.dex = 15
+   actor.int = 15
+   actor.hp = 30
+   actor.level = 1
+   actor.align = ALIGNMENT_CHAOTIC
+ end
+ 
+ if alignment ~= nil and alignment ~= ALIGNMENT_DEFAULT then
+   actor.align = alignment
+ end
+   
+ actor.wt = 8
+ actor.combat_mode = 8
+ actor.mpts = actor.dex
+ actor.exp = 0
+   
+end
+
+
+function subtract_map_movement_pts(actor)
+   local points = map_get_impedence(actor.x, actor.y, actor.z, false) + 5
+   subtract_movement_pts(actor, points)
+end
+
+function actor_divide(actor)
+
+   local random = math.random
+   local from_x, from_y, from_z = actor.x, actor.y, actor.z
+
+   for i=1,8 do
+
+      local new_x = wrap_coord(random(1, 2) + from_x - 1, from_z)
+      local new_y = wrap_coord(random(1, 2) + from_y - 1, from_z)
+
+      if map_can_put(new_x, new_y, from_z) then
+
+         --FIXME need to call sub_2C657 which I think updates the existing actor
+         Actor.clone(actor, new_x, new_y, from_z)
+         printfl("ACTOR_DIVIDES", actor.name)
+         return
+      end
+   end
+end
+
+function defender_update_alignment(attacker, defender, damage)
+   if defender.luatype ~= "actor" then
+      return
+   end
+
+   if defender.align == ALIGNMENT_NEUTRAL and defender.in_party == false and (defender.wt <= 0x10 or defender.wt >= 0x80) then
+      if attacker.wt == WT_PLAYER and is_actor_stat_bit_set(defender.obj_n, 14) and damage > 0 then
+         printfl("ACTOR_ATTACKS", defender.name)
+      end
+
+      if defender.actor_num >= 0xc0 or defender.wt < 0x80 then
+         if attacker.align == ALIGNMENT_GOOD and defender.align ~= ALIGNMENT_EVIL and defender.wt ~= ALIGNMENT_CHAOTIC then
+            defender.align = ALIGNMENT_EVIL
+         end
+
+         if defender.wt >= 0xc0 then
+            defender.wt = 8
+         end
+      else
+         if attacker.wt == WT_PLAYER then
+            defender.wt = 0xa0
+         end
+      end
+   end
+end
+
+function canal_worm_eat_body(worm_actor)
+   --FIXME
+   --only eat if a body was created when the actor was killed.
+end
+
+function actor_handle_damage(defender)
+   if defender.obj_n == 370 or defender.hp == 0 then --OBJ_ROCKWORM_BASE
+      return
+   end
+
+   local hp_level = math.floor(((defender.hp * 4) / defender.max_hp))
+   if hp_level == 0 then
+      printfl("ACTOR_CRITICAL", defender.name)
+      --FIXME giant_maw check
+      local wt = defender.wt
+      if wt == 0xd then
+         defender.wt = 0x11
+         --FIXME if actor qaul ~= 0 then set actor.get(qual).wt = 0x11
+      elseif wt ~= 6 and wt ~= 0xe and wt ~= 2 and wt ~= 1 and wt ~= 0 and wt ~= 0x11 and wt ~= 0x19
+            and ( is_actor_stat_bit_set(defender.obj_n, 7) or is_actor_stat_bit_set(defender.obj_n, 14) ) then
+         if actor_int_adj(defender) >= 5 and defender.obj_n ~= 145 then --OBJ_MONSTER_FOOTPRINTS
+            defender.wt = 7
+         end
+      end
+   elseif hp_level < 4 then
+      local suffix
+      if is_actor_stat_bit_set(defender.obj_n, 14) and is_actor_stat_bit_set(defender.obj_n, 7) then
+         suffix = i18n("DAMAGED")
+      else
+         suffix = i18n("WOUNDED")
+      end
+
+      local damage_type
+      if hp_level == 1 then
+         damage_type = i18n("HEAVILY")
+      elseif hp_level == 2 then
+         damage_type = i18n("LIGHTLY")
+      elseif hp_level == 3 then
+         damage_type = i18n("BARELY")
+      end
+      printfl("ACTOR_HIT_MESSAGE", defender.name, damage_type, suffix)
+
+   end
+end
+
+function actor_take_hit(attacker, defender, max_dmg, damage_mode)
+   if max_dmg == -1 then
+      max_dmg = 1
+   elseif max_dmg > 1 and max_dmg < 255 then
+      max_dmg = math.random(1, max_dmg)
+   end
+
+   local armour_value = 0
+   if damage_mode ~= 2 then
+      if defender.luatype == "actor" then
+         armour_value = actor_get_ac(defender)
+      elseif defender.obj_n == 388 and defender.frame_n == 0 then --OBJ_GLOW_WORM
+         armour_value = 2
+      end
+   end
+
+   if armour_value > 0 and max_dmg < 255 then
+      max_dmg = max_dmg - math.random(1, armour_value)
+   end
+
+   if max_dmg > 0 then
+      if (attacker.align == ALIGNMENT_EVIL or attacker.align == ALIGNMENT_CHAOTIC)
+              and defender.luatype == "actor" and defender.in_party
+              and party_is_in_combat_mode() == false
+              and player_is_in_solo_mode() == false then
+         party_set_combat_mode(true)
+      end
+
+      attacker.exp = attacker.exp + actor_hit(defender, max_dmg, damage_mode)
+   else
+      --FIXME call either sub_19088 or sub_18F7D
+      printfl("ACTOR_GRAZED", defender.name)
+   end
+
+   if defender.luatype == "actor" then
+      --FIXME only call if defender == selected obj
+      defender_update_alignment(attacker, defender, max_dmg)
+      if defender.hp == 0 then
+         if attacker.obj_n == 379 then --OBJ_CANAL_WORM
+            canal_worm_eat_body(attacker)
+         end
+      else
+         if is_actor_stat_bit_set(attacker.obj_n, 2) and math.random(0, 3) == 0 and actor_immune_to_dmg(defender) == false then
+            printfl("ACTOR_PARALYZED", defender.name)
+            defender.paralyzed = true
+         end
+
+         if defender.alive and max_dmg > 0 then
+            actor_handle_damage(defender)
+         end
+      end
+   end
+
+end
+
+function actor_immune_to_dmg(actor)
+   local actor_num = actor.actor_num
+   local obj_n = actor.obj_n
+   if obj_n == 381 or obj_n == 390 or obj_n == 391 or obj_n == 358 or obj_n == 382 then
+      return true
+   end
+
+   if actor_num == 0x5c or actor_num == 0x5d or actor_num == 0x59 or actor_num == 0x5a or actor_num == 0x54 or actor_num == 0x52
+      or actor_num == 0x6d or actor_num == 0x68 or actor_num == 0x67 or actor_num == 0x69 or actor_num == 0x77 or actor_num == 0x78
+      or actor_num == 0x40 or actor_num == 0x3c then
+      return true
+   end
+
+   return false
+end
+
+function actor_print_custom_hit_message(actor)
+   local actor_num = actor.actor_num
+   if actor_num == 0x69 then
+      printfl("ACTOR_CRITICAL", Actor.get(0x19).name)
+   elseif actor_num == 0x3c then
+      printfl("ACTOR_CRITICAL", actor.name)
+   elseif actor_num == 0x52 then
+      printfl("ACTOR_HIT_MESSAGE", actor.name, i18n("HEAVILY"), i18n("WOUNDED"))
+   elseif actor_num == 0x68 then
+      if Actor.get_talk_flag(actor, 2) then
+         printfl("ACTOR_CRITICAL", actor.name)
+      else
+         printfl("ACTOR_HIT_MESSAGE", actor.name, i18n("HEAVILY"), i18n("WOUNDED"))
+      end
+      Actor.set_talk_flag(actor, 5)
+      Actor.talk(actor)
+   else
+      printl("IT_HAS_NO_EFFECT")
+   end
+end
+
+local RED_HIT_TILE = 257
+local BLUE_HIT_TILE = 258
+
+function hit_target(target, hit_tile)
+   if map_is_on_screen(target.xyz) then
+      if target.luatype == "actor" and target.in_party then
+         play_md_sfx(1, PLAY_ASYNC)
+      else
+         play_md_sfx(2, PLAY_ASYNC)
+      end
+      hit_anim(target.x, target.y) --FIXME need to apply hit colour tile param here.
+   end
+
+   if target.luatype == "actor" then
+      --FIXME
+--      les     bx, objlist_unk_1af1_ptr
+--      mov     al, es:[bx+si]
+--      or      al, 8
+--      mov     es:[bx+si], al
+
+      if target.asleep then
+         target.asleep = false
+      end
+   end
+
+end
+
+-- Hit an actor or object
+function actor_hit(defender, max_dmg, damage_mode)
+
+
+   local defender_obj_n = defender.obj_n
+   local exp_gained = 0
+   local player_loc = player_get_location()
+
+   if defender.z ~= player_loc.z or max_dmg < 0 then
+      return 0
+   end
+
+   if defender.luatype == "actor" then
+      print("actor_hit("..defender.actor_num..")\n")
+
+      if defender.actor_num == 0 and defender.hp <= max_dmg and g_current_dream_stage == 0xe0 then
+        max_dmg = defender.hp - 1
+      end
+
+      if damage_mode == 1 then
+         hit_target(defender, BLUE_HIT_TILE)
+      else
+         hit_target(defender, RED_HIT_TILE)
+      end
+
+      if actor_immune_to_dmg(defender) then
+         actor_print_custom_hit_message(defender)
+         defender.hp = 0xff
+         if defender_obj_n == 391 then --OBJ_YOUR_MOTHER
+            local gender_title = ""
+            if player_get_gender() == 0 then
+               gender_title = i18n("MAN")
+            else
+               gender_title = i18n("WOMAN")
+            end
+            printfl("HOW_DARE_YOU_YOUNG_PERSON", gender_title)
+            actor_take_hit(defender, Actor.get(0), 45, 0)
+            actor_take_hit(defender, Actor.get(0), 45, 0)
+            actor_take_hit(defender, Actor.get(0), 45, 0)
+         elseif defender.actor_num == 0x6d or defender.actor_num == 0x67 then
+            Actor.set_talk_flag(Actor.get(0x6b), 3)
+            local dream_actor = Actor.get(0)
+            Actor.move(dream_actor, g_prev_player_x, g_prev_player_y, dream_actor.z)
+         elseif defender.actor_num == 0x40 then --Rasputin
+            --FIXME attack_rasputin()
+         end
+      else
+         if damage_mode == 3 and is_actor_stat_bit_set(defender_obj_n, 3) then
+            printl("IT_HAS_NO_EFFECT")
+            return 0
+         end
+         if is_actor_stat_bit_set(defender_obj_n, 4) then
+            max_dmg = max_dmg * 2
+         end
+
+         if (damage_mode == 0 and actor_num ~= 0) or g_current_dream_stage ~= 0xe0 then --or word_41184 ~= 0xe0
+            if math.random(6, 0x64) <= max_dmg then
+               --FIXME actor_add_blood()
+            end
+            local hp = defender.hp
+            if hp <= max_dmg then
+               --FIXME exp_gained = kill_actor()
+            else
+               defender.hp = hp - max_dmg
+
+               if defender.wt == 9 or defender.wt == 11 then
+                  defender.wt = 8
+               elseif defender.wt == 10 or defender.wt == 12 then
+                  defender.wt = 0x1b
+               end
+
+               if is_actor_stat_bit_set(defender_obj_n, 6) then
+                  actor_divide(defender)
+               end
+            end
+         end
+      end
+   else
+      actor_hit_obj(defender, max_dmg, damage_mode)
+   end
+
+   return exp_gained
+end
+
+function attack_bucket(bucket, damage_mode)
+   if damage_mode == 3 and bucket.frame_n == 2 then
+      printl("THE_ICE_THAWS")
+      bucket.frame_n = 1
+   elseif damage_mode == 1 and bucket.frame_n == 1 then
+      printl("THE_WATER_FREEZES")
+      bucket.frame_n = 2
+   end
+end
+
+function actor_hit_obj(obj, dmg, damage_mode)
+   if obj.qty == 0 or not is_obj_attackable(obj) then
+      if obj.obj_n == 160 then --OBJ_BUCKET
+         attack_bucket(obj, damage_mode)
+      end
+      return
+   end
+
+   if damage_mode == 0 or damage_mode == 3 or is_plant_obj(obj) then
+
+      if damage_mode == 1 then
+         hit_target(obj, BLUE_HIT_TILE)
+      else
+         hit_target(obj, RED_HIT_TILE)
+      end
+
+      if damage_mode == 3 and is_obj_burnable(obj) then
+         dmg = obj.qty
+      end
+
+      if obj.qty <= dmg then
+         if obj.obj_n == 217 then --OBJ_GLASS_PITCHER
+            play_md_sfx(0x1a)
+            obj.obj_n = 218 --OBJ_BROKEN_CRYSTAL
+            obj.frame_n = 0
+            if g_in_dream_mode and g_current_dream_stage == 0x44 then
+               local pitcher
+               for tmp_obj in find_obj_from_area(0x21, 0x33, 2, 0x1c, 0x10) do
+                  if tmp_obj.obj_n == 217 then --OBJ_GLASS_PITCHER
+                     pitcher = tmp_obj
+                  end
+               end
+               if pitcher == nil then
+                  Actor.set_talk_flag(0x54, 6)
+               end
+            end
+         else
+            play_md_sfx(0)
+            Obj.removeFromEngine(obj)
+         end
+      else
+         if obj.obj_n == 307 then --OBJ_DEVIL_POD
+            printl("THE_POD_SPLITS_OPEN")
+            local pod_devil = Actor.new(384, obj.x, obj.y, obj.z)
+
+            actor_init(pod_devil)
+            Actor.move(pod_devil, obj.x, obj.y, obj.z)
+            Obj.removeFromEngine(obj)
+         else
+            if obj.obj_n == 388 then --OBJ_GLOW_WORM
+               obj.frame_n = 0
+               obj.quality = math.random(0xb, 0x12)
+               play_md_sfx(0x22)
+            end
+            obj.qty = obj.qty - dmg
+         end
+
+      end
+
+   end
+
+end
+
+function actor_move(actor, direction, flag)
+   ----dgb("actor_move("..actor.name..", "..direction_string(direction)..", "..flag..") actor("..actor.x..","..actor.y..")\n");
+   local x,y,z = actor.x, actor.y, actor.z
+   if direction == DIR_NORTH then y = y - 1 end
+   if direction == DIR_SOUTH then y = y + 1 end
+   if direction == DIR_EAST then x = x + 1 end
+   if direction == DIR_WEST then x = x - 1 end
+
+   if actor.obj_n ~= 382 then --COKER FIXME need to have an update frame function here.
+      actor.direction = direction
+   end
+
+   local did_move = Actor.move(actor, x, y, z)
+   
+   --FIXME need more logic here.
+   --footprints, bots etc.
+      
+   if did_move then
+      subtract_map_movement_pts(actor)
+      ----dgb("actor_move() did move actor("..actor.x..","..actor.y..")\n");
+   end
+   
+   return did_move
+end
+
+function actor_move_diagonal(actor, x_direction, y_direction)
+   local x,y,z = actor.x, actor.y, actor.z
+   local direction
+
+   if y_direction == DIR_NORTH then
+      y = y - 1
+      direction = x_direction == DIR_EAST and DIR_NORTHEAST or DIR_NORTHWEST
+   end
+   if y_direction == DIR_SOUTH then
+      y = y + 1
+      direction = x_direction == DIR_EAST and DIR_SOUTHEAST or DIR_SOUTHWEST
+   end
+   if x_direction == DIR_EAST then
+      x = x + 1
+      direction = y_direction == DIR_NORTH and DIR_NORTHEAST or DIR_SOUTHEAST
+   end
+   if x_direction == DIR_WEST then
+      x = x - 1
+      direction = y_direction == DIR_NORTH and DIR_NORTHWEST or DIR_SOUTHWEST
+   end
+
+   ----dgb("actor_move_diagonal("..actor.name..", "..direction_string(direction)..")\n");
+   actor.direction = y_direction
+   local did_move = Actor.move(actor, x, y, z)
+
+   if did_move then
+      subtract_map_movement_pts(actor)
+   end
+
+   return did_move and 1 or 0
+end
+
+function actor_update_frame(actor, direction)
+   local obj_n = actor.obj_n
+
+   --actor.direction = direction
+   if obj_n >= 342 or obj_n <= 358 then --human actors
+      --print("actor: "..actor.actor_num.."("..actor.x..","..actor.y..","..actor.z..")")
+      for obj in objs_at_loc(actor.x, actor.y, actor.z) do
+         if obj ~= nil then
+            local tmp_obj_n = obj.obj_n
+            --print("actor:"..actor.actor_num.." obj: " .. tmp_obj_n)
+            if tmp_obj_n == 406 or (tmp_obj_n == 407) or tmp_obj_n == 216 or tmp_obj_n == 289 then
+               --sit here
+               if tmp_obj_n ==  406 then -- OBJ_BENCH
+                  actor.frame_n = 3
+               elseif tmp_obj_n == 407 then -- OBJ_COUCH
+                  actor.frame_n = 4 + 3
+               elseif tmp_obj_n == 289 then -- OBJ_DREAM_MACHINE2
+                  actor.frame_n = 8 + 3
+               else
+                  actor.frame_n = math.floor(direction/2) * 4 + 3
+               end
+
+               return
+            end
+         end
+      end
+      --standing
+
+   end
+end
+
+function revive_avatar()
+   if g_in_dream_mode == true then
+      --FIXME died in dream world. old_player_x == 0
+      --FIXME respawn into dreamworld
+   else
+      -- normal avatar death
+      avatar_falls_unconscious()
+   end
+end
+
+function actor_resurrect(actor)
+   --FIXME do we need to do anything here?
+end
+
+function avatar_falls_unconscious()
+   printl("OVERCOME_BY_YOUR_WOUNDS_YOU_FALL_UNCONSCIOUS")
+   
+   fade_out()
+
+   local input
+   while input == nil do
+      --canvas_update()
+      input = input_poll()
+      if input ~= nil then
+         break
+      end
+   end
+
+   local location
+   local target
+   if Actor.get_talk_flag(0x46, 3) then
+      location = i18n("THE_OLYMPUS_MINE")
+      target={x=0xa4,y=0xc3,z=4}
+   else
+      location = i18n("THE_SPACE_CAPSULE")
+      target={x=0x19d,y=0x278,z=0}
+   end
+   
+   printfl("YOU_AWAKEN_BACK_AT_FEELING_RESTORED", location)
+
+   input_select(nil, true)
+
+   party_resurrect_dead_members()
+   
+   for actor in party_members() do
+      actor.hp = actor.max_hp
+      actor.mpts = actor_dex_adj(actor)
+   end
+   
+   party_move(target)
+   local hour = clock_get_hour()
+   local minutes = clock_get_minute()
+   minutes = 60 - minutes
+   if hour < 7 then
+      hour = 6 - hour
+   else
+      hour = 24 - (hour + 1) + 7
+   end
+   
+   clock_inc(hour * 60 + minutes + math.random(0,59)) --advance time to between 7am and 8am on the next day
+   update_watch_tile()
+   advance_time(0)
+   
+   party_update_leader()
+   party_set_combat_mode(false)
+   party_set_party_mode()
+   
+   local blood = Actor.get(0x12)
+   if blood.alive then
+      Actor.set_talk_flag(blood, 5)
+      Actor.talk(blood)
+   end
+
+   fade_in()
+end
+
+function party_update()
+   local avatar = Actor.get(1)
+   if avatar.hp == 0 or (g_in_dream_mode == true and Actor.get(0).alive == false) then
+      if g_in_dream_mode == true then
+         g_objlist_1d22_unk = 0
+         if g_prev_player_x == 0 then
+            printl("YOU_SHAKE_YOURSELF_AWAKE_FROM_THE_NIGHTMARE")
+            wake_from_dream()
+         else
+            local avatar = Actor.get(1)
+            local dream_actor = Actor.get(0)
+            dream_actor.hp = avatar.max_hp
+            dream_actor.poisoned = false
+            Actor.move(dream_actor, g_prev_player_x, g_prev_player_y, dream_actor.z)
+            party_set_combat_mode(false)
+            printl("YOU_FEEL_YOUR_DREAM_CONSCIOUSNESS_RETURNING")
+            if g_current_dream_stage == 0xc0 then
+               if not Actor.get_talk_flag(0x66, 2)
+                  and Actor.get_talk_flag(0x66, 3)
+                  and Actor.get_talk_flag(0x66, 4)
+                  and not Actor.get_talk_flag(0x66, 5)
+               then
+                  for i=0,0xff do
+                     local maw = Actor.get(i)
+                     if maw.obj_n == 373 and maw.wt == 0x12 and maw.x == 0x87 and maw.y == 0x17 then
+                        Actor.kill(maw, false)
+                     end
+                  end
+                  if map_get_obj(0x7f, 0x18, dream_actor.z, 224) == nil then --OBJ_BRIDGE
+                     local bridge = Obj.new(224, 3)
+                     Obj.moveToMap(bridge, 0x7f, 0x18, dream_actor.z)
+                  end
+               end
+               Actor.set_talk_flag(0x66, 7)
+               local raxachk = Actor.get(0x66)
+               Actor.talk(raxachk)
+            end
+         end
+      else
+         revive_avatar()
+      end
+   end
+   
+end
+
+function actor_update_all()
+   party_update()
+   --pathfinding here.
+   
+   local actor
+   local selected_actor
+   repeat
+      selected_actor = nil
+      local di = 0
+      local dex_6 = 1
+      repeat
+         local player_loc = player_get_location()
+         local var_C = (player_loc.x - 16) - (player_loc.x - 16) % 8
+         local var_A = (player_loc.y - 16) - (player_loc.y - 16) % 8
+         
+         for actor in party_members() do
+            if actor.wt == WT_FOLLOW and actor.mpts < 0 then
+               actor.mpts = 0
+            end
+         end
+         
+         local player_z = player_loc.z
+         for i=0,0xff do
+            local actor = Actor.get(i)
+            --FIXME need to check 11000b not zero on obj_flags
+            if actor.obj_n ~= 0 and actor.z == player_z and actor.mpts > 0 and actor.paralyzed == false and (actor.asleep == false or actor.wt == 0x80) and actor.wt ~= WT_NOTHING and actor.alive == true then
+                  --FIXME need to check map wrapping here.
+                  if abs(actor.x - var_C) > 0x27 or abs(actor.y - var_A) > 0x27 then
+                     if actor.wt >= 0x83 and actor.wt <= 0x86 then
+                        --move actor to schedule location if it isn't on screen
+                        local sched_loc = actor.sched_loc
+                        if map_is_on_screen(sched_loc.x, sched_loc.y, sched_loc.z) == false then
+                           Actor.move(actor, sched_loc.x, sched_loc.y, sched_loc.z)
+                           actor_wt_walk_to_location(actor) --this will cancel the pathfinder and set the new worktype
+                           subtract_movement_pts(actor, 10)
+                           ----dgb("\nActor SCHEDULE TELEPORT "..actor.actor_num.." to ("..sched_loc.x..","..sched_loc.y..","..sched_loc.z..")\n")
+                        end
+                     end
+                  else
+                     if actor.wt ~= WT_FOLLOW then
+                        if actor.wt == 0x80 then
+                           -- actor_set_worktype_from_schedule(actor)
+                           actor.wt = actor.sched_wt
+                        end
+
+                        local dex_adjusted = actor_dex_adj(actor)
+                        local dx = (actor.mpts * dex_6) - dex_adjusted * di
+                        if actor.mpts >= dex_adjusted or dx > 0 or dx == 0 and dex_adjusted > dex_6 then
+                           selected_actor = actor
+                           di = actor.mpts
+                           dex_6 = dex_adjusted
+                        end
+                        
+                        if dex_adjusted <= actor.mpts then
+                           break
+                        end
+                     end
+                  end
+            end
+         end
+         
+         if di <= 0 then
+            for i=0,0xff do
+               local actor = Actor.get(i)
+               local dex_adjusted = actor_dex_adj(actor)
+               if actor.mpts >= 0 then
+                  actor.mpts = dex_adjusted
+               else
+                  actor.mpts = actor.mpts + dex_adjusted
+               end
+            end
+            advance_time(1)
+         end
+         
+      until di > 0
+
+      if selected_actor.wt ~= WT_PLAYER and selected_actor.wt ~= WT_FOLLOW then
+         --print("perform_worktype("..selected_actor.name.."("..selected_actor.actor_num..") dex = "..selected_actor.dex.." mpts = "..selected_actor.mpts..").\n")
+         perform_worktype(selected_actor)
+         party_update()
+         if selected_actor.wt > 1 and selected_actor.wt < 0x1b then
+            --FIXME targetting?? do *(&bjlist_unk_19f1_ptr + actor_num) = actor_num
+         end
+      end
+
+   until selected_actor.obj_n ~= 0 and selected_actor.wt == WT_PLAYER    
+
+   if selected_actor ~= nil then --swap player to next party member with 'command' combat worktype.
+    local old_player = Actor.get_player_actor()
+    player_set_actor(selected_actor)
+    old_player.wt = WT_PLAYER --reset worktype to player as it gets changed to follow in Player::set_actor() :-(
+   end
+ 
+   
+   display_prompt(true)
+end
+
+
+
+local projectile_weapon_tbl = --FIXME weed sprayer and spray gun
+{
+--obj_n = {tile_num, initial_tile_rotation, speed, rotation_amount} --FIXME: all untested
+[40] = {575, 90,4, 0}, -- Cupid's bow and arrows
+[41] = {259, 90,4, 0}, -- derringer --FIXME: tile_num, rot, speed, amount
+[42] = {259, 90,4, 0}, -- revolver --FIXME: rot, speed, amount
+[43] = {262, 90,4, 0}, -- shotgun --FIXME: rot, speed, amount
+[44] = {259, 90,4, 0}, -- rifle --FIXME: rot, speed, amount
+[45] = {259, 90,4, 0}, -- Belgian combine rifle --FIXME: rot, speed, amount (has 3 modes)
+--[45] = {262, 90,4, 0}, -- Belgian combine spread(has two) --FIXME: rot, speed, amount
+[46] = {259, 90,4, 0}, -- elephant gun --FIXME: tile_num, rot, speed, amount
+[47] = {398, 0, 2, 0}, -- sling --FIXME: tile_num, rot, speed, amount
+[48] = {575, 90,4, 0}, -- bow
+[241] = {334, 90,4, 0}, -- heat ray gun --FIXME: rot, speed, amount (has 3 modes)
+[242] = {335, 90,4, 0}, -- freeze ray gun --FIXME: rot, speed, amount (has 3 modes)
+[313] = {267, 90,4, 0}, -- M60 machine gun --FIXME: rot, speed, amount (if even used)
+
+}
+
+armour_tbl =
+{
+--[1] = 0, --cap
+--[2] = 0, --cowboy hat
+[3] = 1, --pith helmet
+[4] = 2, --military helmet
+--[5] = 0, --derby
+--[6] = 0, --kerchief
+--[7] = 0, --silk scarf
+--[8] = 0, --muffler
+--[9] = 0, --man's shoes
+--[10] = 0, --woman's shoes
+[11] = 1, --riding boots
+--[12] = 0, --ruby slippers
+[13] = 2, --thigh boots
+[14] = 3, --hip boots
+--[15] = 0, --winged shoes
+--[17] = 0, --cloth jacket
+--[18] = 0, --wool sweater
+--[19] = 0, --cape
+--[20] = 0, --duster
+[21] = 1, --wool overcoat
+[22] = 2, --sheepskin jacket
+[23] = 2, --arctic parka
+--[25] = 0, --cotton pants
+--[26] = 0, --cotton dress
+[27] = 1, --denim jeans
+--[28] = 0, --wool pants
+--[29] = 0, --wool dress
+[30] = 3, --chaps and jeans
+--[31] = 0, --man's shoes
+--[33] = 0, --lady's silk gloves
+[34] = 1, --driving gloves
+--[35] = 0, --cotton work gloves
+[36] = 2, --work gloves
+--[37] = 0, --wool mittens
+[38] = 1, --rubber gloves
+[39] = 3, --welding gloves
+--[90] = 0, --electric belt?
+--[234] = 0, --martian jewelry
+}
+
+function actor_get_ac(actor)
+   local ac = 0
+
+   for obj in actor_inventory(actor) do
+      if obj.readied then
+
+         local armour = armour_tbl[obj.obj_n]
+         if armour ~= nil then
+            ac = ac + armour
+         end
+      end
+   end
+   return ac
+end
+
+local clothing_warmth_tbl = {
+[1] =    1, -- OBJ_CAP
+[2] =    2, -- OBJ_COWBOY_HAT
+[3] =    3, -- OBJ_PITH_HELMET
+[4] =    3, -- OBJ_MILITARY_HELMET
+[5] =    2, -- OBJ_DERBY
+[6] =    1, -- OBJ_KERCHIEF
+[7] =    1, -- OBJ_SILK_SCARF
+[8] =    2, -- OBJ_MUFFLER
+[9] =    1, -- OBJ_MANS_SHOES
+[10] =   1, -- OBJ_WOMANS_SHOES
+[11] =   2, -- OBJ_RIDING_BOOTS
+[14] =   4, -- OBJ_HIP_BOOTS
+[13] =   3, -- OBJ_THIGH_BOOTS
+[17] =   2, -- OBJ_CLOTH_JACKET
+[18] =   3, -- OBJ_WOOL_SWEATER
+[19] =   3, -- OBJ_CAPE
+[20] =   4, -- OBJ_DUSTER
+[21] =   4, -- OBJ_WOOL_OVERCOAT
+[22] =   3, -- OBJ_SHEEPSKIN_JACKET
+[23] =   5, -- OBJ_ARCTIC_PARKA
+[90] =  12, -- OBJ_ELECTRIC_BELT
+[25] =   2, -- OBJ_COTTON_PANTS
+[26] =   2, -- OBJ_COTTON_DRESS
+[27] =   2, -- OBJ_DENIM_JEANS
+[28] =   3, -- OBJ_WOOL_PANTS
+[29] =   3, -- OBJ_WOOL_DRESS
+[30] =   3, -- OBJ_CHAPS_AND_JEANS
+[33] =   1, -- OBJ_LADYS_SILK_GLOVES
+[34] =   1, -- OBJ_DRIVING_GLOVES
+[35] =   1, -- OBJ_COTTON_WORK_GLOVES
+[36] =   2, -- OBJ_WORK_GLOVES
+[37] =   3, -- OBJ_WOOL_MITTENS
+[38] =   1, -- OBJ_RUBBER_GLOVES
+[39] =   3, -- OBJ_WELDING_GLOVES
+}
+
+function clothing_get_warmth_rating(obj)
+   local rating = clothing_warmth_tbl[obj.obj_n]
+   if rating == nil then
+      rating = 0
+   end
+   
+   return rating
+end
+
+local lit_lightsource_tbl = {
+[110] =  1, -- OBJ_LIT_TORCH
+[112] =  1, -- OBJ_LIT_CANDLE
+[114] =  1, -- OBJ_LIT_CANDELABRA
+[116] =  1, -- OBJ_LIT_OIL_LAMP
+[118] =  1, -- OBJ_LIT_LANTERN
+}
+
+function is_lit_lightsource(obj)
+   if lit_lightsource_tbl[obj.obj_n] ~= nil then
+      return true
+   end
+   
+   return false
+end
+
+function actor_str_adj(actor)
+   local actor_num = actor.actor_num
+   local str = actor.str
+   
+   if actor.hypoxia then
+      str = str - 3
+   end
+   
+   if actor_is_affected_by_purple_berries(actor_num) then
+      str = str - 3
+   end
+   
+   if actor.frenzy then
+      str = str + 3
+      if str > 30 then
+         str = 30
+      end
+   end
+   
+   if str <= 3 then
+      return 1
+   end
+
+   return str
+end
+
+function actor_dex_adj(actor)
+
+   local dex = actor.dex
+   if actor.hypoxia then
+      if dex <= 3 then
+         dex = 1
+      else
+         dex = dex - 3
+      end
+   end
+
+   if actor.frenzy then
+      dex = dex + 3
+      if dex >= 30 then
+         dex = 30
+      end
+   end
+   
+   if actor.asleep then
+      dex = 1
+   end
+   
+   return dex
+end
+
+function actor_int_adj(actor)
+   local int = actor.int
+   
+   if actor.hypoxia == true or (actor.frenzy and actor.actor_num ~= 1) then
+      int = int - 3
+   end
+   
+   if int < 1 then int = 1 end
+   
+   return int
+end
+
+function actor_map_dmg(actor, map_x, map_y, map_z)
+   local obj_n = actor.obj_n
+   local actor_type = actor_tbl[obj_n]
+   local player_loc = player_get_location()
+
+
+   if is_actor_stat_bit_set(obj_n, 8) or is_actor_stat_bit_set(obj_n, 10)
+           or actor.z ~= player_loc.z
+           or actor_find_max_wrapped_xy_distance(actor, player_loc.x, player_loc.y) > 40 then
+      return
+   end
+
+   if actor.alive == false or actor.hit_flag == true then
+      return
+   end
+--print("actor_map_dmg("..actor.actor_num..")\n")
+
+   for obj in objs_at_loc(actor.x, actor.y, actor.z) do
+      local tile_num = obj.tile_num_original
+      if tile_get_flag(tile_num, 3, 2) == false and tile_get_flag(tile_num, 1, 3) == true then --force passable and damaging
+         actor_take_damage_from_obj(actor, obj)
+      end
+
+   end
+
+   actor_update_frame(actor, actor.direction)
+end
+
+function actor_take_damage_from_obj(actor, obj)
+   if actor_immune_to_dmg(actor) or actor.alive == false then
+      return
+   end
+
+   local obj_n = obj.obj_n
+   local damage = 0
+   local damage_mode = 0
+
+   if obj_n == 168 then --OBJ_PORCUPOD
+      damage = math.random(1, 0x14)
+   elseif obj_n == 209 then --OBJ_STEAM_LEAK
+      damage_mode = 3
+      if actor.actor_num ~= 6 then
+         damage = math.random(math.floor(actor.hp / 2), math.floor(actor.max_hp / 2))
+      end
+   elseif obj_n == 215 then --OBJ_POWER_CABLE1
+      play_md_sfx(0x15)
+      damage = math.random(1, 0x14) + math.random(1, 0x14)
+   elseif obj_n == 381 then --OBJ_DUST_DEVIL
+      damage = math.random(1, 0xa) + math.random(1, 0xa)
+   elseif obj_n == 463 then --hidden effect obj
+      --FIXME here
+   end
+
+   actor_hit(actor, damage, damage_mode)
+end
+
+function actor_remove_charm(actor)
+
+   actor.charmed = false;
+   actor.align = actor.old_align
+   
+   if actor.in_party then
+      actor.align = ALIGNMENT_GOOD
+   end
+   
+   if party_is_in_combat_mode() then
+      actor.wt = actor.combat_mode
+   else
+      if player_is_in_solo_mode() then
+         actor.wt = WT_NOTHING
+      else
+         actor.wt = WT_FOLLOW
+      end
+   end
+
+   party_update_leader()
+
+end
+
+function advance_time(num_turns)
+   --FIXME
+   local rand = math.random
+   local hour = clock_get_hour()
+   
+   local quake = Actor.get_talk_flag(0x46, 3) --rasputin
+
+   if quake then
+      if rand(0, 4) == 0 then
+         quake_start(1, 200)
+      end
+   end
+   
+   local max_light = 0
+   
+   local actor_num
+   for actor_num=0,0xff do
+      local actor = Actor.get(actor_num)
+      if actor.alive then
+         if g_in_dream_mode == false and actor.in_party and actor_num ~= 0 then
+            if num_turns > 0 and actor.asleep == false then --FIXME I think we also need to check distance < 0x27 from either mapwindow or player.
+               if actor_num == 6 or Actor.get_talk_flag(0x10, 5) == false or Actor.inv_has_obj_n(actor, 131) then --OBJ_BLOB_OF_OXIUM
+                  if actor.hypoxia then
+                     actor.hypoxia = false
+                     printfl("BREATHES_EASIER", actor.name)
+                  end
+               else
+                  if actor.hypoxia == false then
+                     actor.hypoxia = true
+                     printfl("GASPS_FOR_AIR", actor.name)
+                  end
+               end
+  
+               local warmth_rating = 0
+               local obj
+               for obj in actor_inventory(actor) do
+                  if obj.readied then
+                     warmth_rating = warmth_rating + clothing_get_warmth_rating(obj)
+                     
+                     if is_lit_lightsource(obj) then
+                        if rand(0, 1) == 1 then
+                           if obj.quality <= num_turns then
+                              if obj.obj_num == 116 --OBJ_LIT_OIL_LAMP
+                                 or obj.obj_num == 118 then --OBJ_LIT_LANTERN
+                                 if obj.obj_num == 116 then --OBJ_LIT_OIL_LAMP
+                                    obj.obj_n = 115 --OBJ_OIL_LAMP
+                                 else --OBJ_LIT_LANTERN
+                                    obj.obj_n = 117--OBJ_LANTERN
+                                 end
+                                 obj.quality = 0
+                                 printfl("THE_IS_OUT_OF_FUEL", obj.name)
+                              else
+                                 printfl("WENT_OUT", obj.look_string)
+                                 Obj.removeFromEngine(obj)
+                              end
+                           else
+                              obj.quality = obj.quality - num_turns
+                           end
+                        end
+                     --FIXME update max_light here. probably not needed as light is updated elsewhere in nuvie.
+                     --if max_light < obj.light then
+                     --max_light = obj.light
+                     --end
+                     end
+                  end
+               end
+               
+               if g_party_is_warm or actor.z ~= 0 then
+                  if actor.cold then
+                     actor.cold = false
+                     printfl("FEELS_WARMER", actor.name)
+                  end
+               else
+                  local cold_status = 0
+                  
+                  if hour <= 3 or hour >= 22 then
+                     if warmth_rating >= 10 then
+                        cold_status = 1
+                     else
+                        cold_status = 2
+                     end
+                  elseif hour <= 6 or hour >= 18 then
+                     if warmth_rating < 10 then
+                        cold_status = 1
+                     end
+                  end
+                  
+                  if actor_num == 6 then
+                     cold_status = 0
+                  end
+                  
+                  if cold_status == 0 then
+                     if actor.cold then
+                        actor.cold = false
+                        printfl("FEELS_WARMER", actor.name)
+                     end
+                  else
+                     if actor.cold == false then
+                        actor.cold = true
+                        printfl("IS_FREEZING", actor.name)
+                     end
+                     if num_turns ~= 0 then
+                        for i=1,num_turns do
+                           if rand(0, 1) == 0 then
+                              if cold_status == 2 then
+                                 printfl("IS_FREEZING", actor.name)
+                                 actor_hit(actor, rand(1, 2))
+                              end
+                           else
+                              printfl("IS_FREEZING", actor.name)
+                              actor_hit(actor, rand(1, 2))
+                              if cold_status == 2 then
+                                 actor_hit(actor, rand(1, 2))
+                              end
+                           end
+                        end
+                     end
+                  end
+               end
+
+            end               
+         end
+                  
+         if num_turns ~= 0 then
+            for i=1,num_turns do
+               --FIXME what does  word_4E6FA do?
+
+               --remove battle frenzy from actor when the party exits combat mode
+               if actor.frenzy and not party_is_in_combat_mode() then
+                  actor.frenzy = false
+               end
+               
+               if actor.poisoned then
+                  if rand(0, 25) == 0 then
+                     actor.poisoned = false
+                  end
+               end
+
+               if actor.charmed and rand(0, 0x19) == 0 then
+                  actor_remove_charm(actor)
+               end
+               
+               if actor.paralyzed then
+                  if actor_num == 6 or (rand(0, 3) == 0 and actor.str >= rand(1, 0x1e)) then --FIXME used adjusted str
+                     actor.paralyzed = false
+                  end
+               end
+ 
+               if actor.asleep and actor.wt ~= WT_SLEEP and (not g_party_is_warm or not actor.in_party) then
+                  --FIXME check sub_2B0EC(actor.x,actor.y,actor.z)
+                  if rand(0,0x14) == 0 then
+                     actor.asleep = false
+                     --FIXME bit 3 set on 1af1 flags
+                  end
+               end
+               
+               if actor.poisoned and actor_num ~= 6 and rand(0, 7) == 0 then
+                  actor_hit(actor, 1)
+               end
+               
+               if actor_num < 8 then
+                  actor_decrement_berry_counters(actor)
+                  
+                  for obj in actor_inventory(actor, true) do
+                     local obj_n = obj.obj_n
+                     if obj_n == 160 and obj.frame_n > 1 then --OBJ_EMPTY_BUCKET with ice
+                        if rand(0, 100) < 10 then
+                           printl("SOME_ICE_HAS_MELTED")
+                           obj.frame_n = 1
+                        end
+                     elseif obj_n == 256 then --OBJ_CHUNK_OF_ICE
+                        if rand(0, 100) < 10 then
+                           printl("SOME_ICE_HAS_MELTED")
+                           Obj.removeFromEngine(obj)
+                        end
+                     elseif obj_n == 448 or (obj_n == 449 and actor_num ~= 6 and actor.poisoned == false) then --OBJ_BLOCK_OF_RADIUM, OBJ_CHIP_OF_RADIUM
+                        if obj.in_container == false or obj.parent.obj_n ~= 139 then --OBJ_LEAD_BOX
+                           printfl("IS_POISONED", actor.name)
+                           actor.poisoned = true
+                        end
+                     end
+                  end                       
+               end
+               
+            end
+         end
+
+         actor_map_dmg(actor, actor.x, actor.y, actor.z)
+         actor.hit_flag = false
+      end
+   end
+   
+   local minute = clock_get_minute()
+
+   clock_inc(num_turns)
+
+   if minute + num_turns >= 60 then
+      
+      update_watch_tile()
+      
+      update_actor_schedules()
+      if g_hours_till_next_healing > 0 then
+         g_hours_till_next_healing = g_hours_till_next_healing - 1
+      end
+      
+      update_lamp_posts()
+      
+      local blue_berry_counter = actor_get_blue_berry_counter()
+      if blue_berry_counter > 0 then
+         actor_get_blue_berry_counter(blue_berry_counter - 1)
+      end
+      
+      if not g_party_is_warm and not g_in_dream_mode and Actor.get_talk_flag(0x10, 5) then
+         for actor in party_members() do
+            if actor.actor_num ~= 6 and not actor.asleep then
+               local oxium = Actor.inv_get_obj_n(actor, 131) --OBJ_BLOB_OF_OXIUM
+               if oxium ~= nil then
+                  if oxium.qty > 1 then
+                     oxium.qty = oxium.qty - 1
+                     if actor.hypoxia then
+                        actor.hypoxia = false
+                        printfl("BREATHES_EASIER", actor.name)
+                     end
+                  else
+                     Obj.removeFromEngine(oxium)
+                     if Actor.inv_get_obj_n(actor, 131) ~= nil then
+                        if actor.hypoxia then
+                           actor.hypoxia = false
+                           printfl("BREATHES_EASIER", actor.name)
+                        end
+                     else
+                        if actor.hypoxia == false then
+                           actor.hypoxia = true
+                           printfl("GASPS_FOR_AIR", actor.name)
+                        end
+                     end
+                  end
+               else
+                  if actor.hypoxia == false then
+                     actor.hypoxia = true
+                     printfl("GASPS_FOR_AIR", actor.name)
+                  end
+               end
+            end
+         end
+      end
+      
+   end
+end
+
+function can_get_obj_override(obj)
+   return false
+end
+
+function subtract_movement_pts(actor, points)
+   if actor.actor_num < 16 then
+      if party_is_in_combat_mode() == false then
+         points = points - 2
+      end
+   end
+
+   if points < 1 then
+      points = 1
+   end
+   
+   actor.mpts = actor.mpts - points
+end
+
+function actor_radiation_check(actor, obj)
+   if obj.obj_n == 448 or obj.obj_n == 449 then --OBJ_BLOCK_OF_RADIUM, OBJ_CHIP_OF_RADIUM
+
+      local actor_num = actor.actor_num
+      if actor_num == 6
+         or actor_is_affected_by_purple_berries(actor_num) -- purple berries protect against radiation
+         or Actor.inv_get_readied_obj_n(actor, ARM) == 136 --OBJ_TONGS
+         or Actor.inv_get_readied_obj_n(actor, ARM_2) == 136 then
+         return
+      end
+      
+      actor.poisoned = true
+      printl("OUCH_IT_IS_VERY_HOT")
+   end
+end
+
+function actor_get_obj(actor, obj, container) -- FIXME need to limit inventory slots
+
+   --FIXME handle getting into container.
+
+	if obj.getable == false then
+		printnl("THAT_IS_NOT_POSSIBLE")
+		return false
+	end
+
+   if actor_find_max_wrapped_xy_distance(actor, obj.x, obj.y) > 1 then
+      play_md_sfx(0x32)
+      projectile_anim(obj.tile_num, obj.x, obj.y, actor.x, actor.y, 4, false, 0)
+   end
+
+	if Actor.can_carry_obj_weight(actor, obj) == false then
+		printl("THE_TOTAL_IS_TOO_HEAVY")
+		return false
+	end
+
+   if not Actor.can_carry_obj(actor, obj) then
+      printnl("YOU_ARE_CARRYING_TOO_MUCH_ALREADY")
+      return false
+   end
+
+   subtract_movement_pts(actor, 3)
+
+   actor_radiation_check(actor, obj)
+
+   if obj.obj_n == 256 then -- OBJ_CHUNK_OF_ICE
+      printnl("THE_ICE_IS_MELTING")
+   end
+
+   if obj.obj_n == 110 -- OBJ_LIT_TORCH
+           or obj.obj_n == 112
+           or obj.obj_n == 114
+           or obj.obj_n == 116
+           or obj.obj_n == 118 then
+      if not actor_has_free_arm(actor) then
+         printl("YOUR_HANDS_ARE_FULL")
+         return false
+      end
+
+      Obj.moveToInv(obj, actor.actor_num)
+      Actor.inv_ready_obj(actor, obj)
+      if obj.obj_n == 110 then -- OBJ_LIT_TORCH
+         obj.quality = 0xb4
+      end
+
+      advance_time(0)
+
+      return true
+   end
+
+   if obj.obj_n == 411 -- OBJ_SWITCH_BAR
+           or obj.obj_n == 458 -- OBJ_PANEL
+           or obj.obj_n == 314 -- OBJ_TRACKING_MOTOR
+           or obj.obj_n == 206 then -- OBJ_TIFFANY_LENS
+      if obj.quality % 2 == 0 then
+         printnl("WONT_BUDGE")
+         return false
+      end
+   end
+
+   Obj.moveToInv(obj, actor.actor_num)
+
+	return true
+end
+
+function actor_get_max_hp(actor)
+   if actor.actor_num == 6 then
+      return 0xf0
+   end
+   
+   if actor.in_party then
+      return actor.str * 2 + actor.level * 24
+   end
+   
+   --FIXME return actor max hp from stat table.
+   return 1;
+end
+
+
+
+--function actor_take_hit(actor, damage)
+--   local hp = actor.hp
+--   if damage >= hp and actor.actor_num == 1 then
+--      hit_anim(actor.x, actor.y)
+--      actor.hp = 0
+--   else
+--      Actor.hit(actor, damage)
+--   end
+--end
+
+function kill_actor(actor)
+   actor.hp=0
+   actor_dead(actor)
+end
+
+function actor_dead(actor)
+   --FIXME
+end
+
+function get_portrait_number(actor)
+   local NO_PORTRAIT = 255
+   local idx = actor.actor_num
+   if idx >= 0xa and idx <= 0xf then
+      idx = 0x51
+   end
+
+   if idx >= 0xbf then
+      return NO_PORTRAIT
+   end
+
+   if idx <= 1 then
+      if player_get_gender() == 1 then
+         idx = 0
+      else
+         idx = 1
+      end
+   elseif idx == 6 and Actor.get_talk_flag(actor, 1) then
+      idx = 0x16
+   elseif actor.obj_flag_0 then
+      if player_get_gender() == 1 then
+         idx = 0x73
+      else
+         idx = 0x72
+      end
+   elseif idx == 0x21 and not Actor.get_talk_flag(actor, 2) then
+      idx = 0x61
+   elseif idx == 0x15 or (idx >= 0x47 and idx <= 0x4a) or idx == 0x4e then
+      idx = 0x14
+   elseif idx >= 0x4b and idx <= 0x4d then
+      idx = 0x16
+   elseif idx == 0x1e then
+      idx = 0x18
+   elseif idx == 0x46 then
+      idx = 0x40
+   elseif idx >= 0x50 and idx <= 0x57 then
+      idx = idx - 0x26
+   elseif idx == 0x5e then
+      idx = 0x6
+   elseif idx == 0x68 or idx == 0x77 or idx == 0x78 then
+      idx = 0x67
+   elseif idx == 0x69 then
+      idx = 0x19
+   elseif idx == 0x6d then
+      idx = 0x2
+   end
+
+   return idx
+end
+
+function find_rockworm_actor(obj)
+   if obj ~= nil then
+      if obj.obj_n == 371 or obj.obj_n == 370 then --OBJ_ROCKWORM1, OBJ_ROCKWORM_BASE
+         local actor = Actor.get(obj.quality)
+         if actor.alive then
+            return actor
+         end
+      end
+   end
+
+   return obj
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/combat.lua b/devtools/create_ultima/files/ultima6/scripts/md/combat.lua
new file mode 100644
index 0000000000..f03f6a569f
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/combat.lua
@@ -0,0 +1,529 @@
+-- [objectnum] = range
+local range_weapon_tbl = {
+   [41]  = 4,
+   [42]  = 5,
+   [43]  = 4,
+   [44]  = 9,
+   [45]  = 9,
+   [46]  = 9,
+   [47]  = 4,
+   [48]  = 5,
+   [240] = 6,
+   [241] = 6,
+   [129] = 2,
+   [261] = 2,
+   [313] = 9,
+   [40]  = 6,
+   [366] = 3,
+   [386] = 4,
+   [364] = 3,
+   [384] = 2,
+}
+
+function get_weapon_range(weapon)
+   local range = range_weapon_tbl[weapon.obj_n]
+   if range == nil then
+      range = 1
+   end
+   return range
+end
+
+local weapon_dmg_tbl = {
+   [16] = 30, --bloody saber
+   [40] = 1, --Cupid's bow and arrows (charms)
+   [41] = 15, --derringer
+   [42] = 18, --revolver
+   [43] = 20, --shotgun
+   [44] = 30, --rifle
+   [45] = 30, --Belgian combine
+   [46] = 45, --elephant gun
+   [47] = 8, --sling
+   [48] = 12, --bow
+   [49] = 15, --hatchet
+   [50] = 20, --axe
+   [51] = 10, --ball-peen hammer
+   [52] = 25, --sledge hammer
+   [54] = 10, --knife
+   [55] = 20, --machete
+   [56] = 25, --saber
+   [65] = 15, --pick
+   [66] = 8, --shovel
+   [67] = 10, --hoe
+   [68] = 10, --rake
+   [69] = 15, --pitchfork
+   [70] = 12, --cultivator
+   [71] = 20, --scythe
+   [72] = 10, --saw
+   [102] = 12, --pry bar
+   --[109] = 1, --torch
+   --[110] = 1, --lit torch
+   --[111] = 1, --candlestick
+   --[112] = 1, --lit candle
+   --[113] = 1, --candelabra
+   --[114] = 1, --lit andelabra
+   --[115] = 1, --oil lamp
+   --[116] = 1, --lit oil lamp
+   --[117] = 1, --lantern
+   --[118] = 1, --lit lantern
+   [129] = 60, --weed sprayer -- FIXME: no damage normally. Only effects plants?
+   --[136] = 1, --tongs
+   [241] = 20, --heat ray gun
+   [242] = 10, --freeze ray gun
+   --[243] = 1, --martian ritual pod knife
+   [261] = 60, --spray gun -- FIXME: no damage normally. Only effects plants?
+   [263] = 10, --martian hoe (couldn't be equipped in original)
+   [264] = 20, --martian scythe (couldn't be equipped in original)
+   [265] = 15, --martian pitchfork (couldn't be equipped in original)
+   [266] = 10, --martian rake (couldn't be equipped in original)
+   [267] = 8, --martian shovel (couldn't be equipped in original)
+   [313] = 254, --M60 machine gun (scripted to only attack and kill the big bad)
+   [327] = 15, --martian pick (couldn't be equipped in original)
+   [401] = 12, --pool cue
+}
+
+function get_weapon_damage(weapon)
+   local dmg
+   if weapon.luatype == "actor" then
+      dmg = actor_get_damage(weapon)
+   else
+      dmg = weapon_dmg_tbl[weapon.obj_n]
+   end
+
+   if dmg == nil then
+      dmg = -1
+   end
+
+   return dmg
+end
+
+function sub_1B432(attacker, target)
+
+end
+
+function actor_get_weapon(attacker, target)
+   local int_test = false
+   local selected_weapon = attacker
+   if not actor_has_bad_alignment(attacker) then
+      if math.random(1, 0x1e) <= actor_int_adj(attacker) then
+         int_test = true
+      end
+   end
+   local range = actor_get_combat_range(attacker, target.x, target.y)
+
+   for obj in actor_inventory(actor) do
+      if get_weapon_damage(obj) > 0 and get_weapon_range(obj) >= range then
+         if (obj.obj_n ~= 129 and obj.obj_n ~= 261) --OBJ_WEED_SPRAYER, OBJ_SPRAY_GUN
+                 or (obj.quality ~= 0 and obj.invisible)
+                 or (obj.quality == 0 and (is_plant_obj(target) or (target.luatype=="actor" and (is_actor_stat_bit_set(target.obj_n, 7) and not is_actor_stat_bit_set(target.obj_n, 14))))) then
+
+            local weapon_requires_int = false
+            if obj.obj_n == 240 --OBJ_HEAT_RAY_GUN
+               or obj.obj_n == 241 --OBJ_FREEZE_RAY_GUN
+               or obj.obj_n == 45 then
+               weapon_requires_int = true
+            end
+
+            --if int_test == true and weapon_requires_int == true or obj.obj_n == 43 and not sub_1B432(attacker, target) then --OBJ_SHOTGUN
+         end
+
+      end
+   end
+
+end
+
+function attack_dex_saving_throw(attacker, defender, weapon)
+   if defender == nil or defender.luatype == "obj" then
+      return true
+   end
+
+   local attacker_value
+   if weapon.luatype == "actor" and is_actor_stat_bit_set(weapon.obj_n, 5) then
+      attacker_value = actor_str_adj(attacker)
+   else
+      attacker_value = actor_dex_adj(attacker)
+   end
+
+   local defender_value = actor_dex_adj(defender)
+
+   if math.random(1, 30) >= math.floor((defender_value + 30 - attacker_value) / 2) then
+      return true
+   end
+
+   return false
+end
+
+function out_of_ammo(attacker, weapon, print_message) -- untested function
+
+   local weapon_obj_n = weapon.obj_n
+
+   if ((weapon_obj_n == 41 or weapon_obj_n == 42) and Actor.inv_has_obj_n(attacker, 57) == false) --derringer, revolver, pistol rounds
+           or (weapon_obj_n == 43 and Actor.inv_has_obj_n(attacker, 58) == false) --shotgun, shotgun shell
+           or (weapon_obj_n == 44 and Actor.inv_has_obj_n(attacker, 59) == false) --rifle, rifle round
+           or (weapon_obj_n == 45 and weapon.quality == 0 and (Actor.inv_has_obj_n(attacker, 58) == false or Actor.inv_has_obj_n(attacker, 59) == false)) --belgian combine (combine), shotgun shell, rifle round
+           or (weapon_obj_n == 45 and weapon.quality == 1 and Actor.inv_has_obj_n(attacker, 59) == false) --belgian combine (rifle), rifle round
+           or (weapon_obj_n == 45 and weapon.quality == 2 and Actor.inv_has_obj_n(attacker, 58) == false) --belgian combine (shotgun), shotgun shell
+           or (weapon_obj_n == 46 and Actor.inv_has_obj_n(attacker, 60) == false) --elephant gun, elephant gun round
+           or (weapon_obj_n == 47 and Actor.inv_has_obj_n(attacker, 63) == false) --sling, sling stone
+           or ((weapon_obj_n == 240 or weapon_obj_n == 241 or weapon_obj_n == 129 or weapon_obj_n == 261) and weapon.qty == 0) then --heat ray gun, freeze ray gun, weed sprayer, spray gun
+      if(print_message) then
+         printl("OUT_OF_AMMUNITION")
+         play_md_sfx(5)
+      end
+      return true
+   end
+
+   if weapon_obj_n == 48 and Actor.inv_has_obj_n(attacker, 64) == false then --bow, arrows
+      if(print_message) then
+         printl("OUT_OF_ARROWS")
+         play_md_sfx(5)
+      end
+      return true
+   end
+
+   return false
+end
+
+function attack_with_freezeray(actor, target_actor, damage)
+   if actor_tbl[target_actor.obj_n] ~= nil
+           and (is_actor_stat_bit_set(target_actor.obj_n, 14) or is_actor_stat_bit_set(target_actor.obj_n, 7)) then
+      target_actor.paralyzed = true
+      printfl("ACTOR_PARALYZED", target_actor.name)
+      if not is_actor_stat_bit_set(target_actor.obj_n, 7)
+              or is_actor_stat_bit_set(target_actor.obj_n, 14) then
+         hit_target(target_actor, BLUE_HIT_TILE)
+      else
+         actor_take_hit(actor, target_actor, damage, 1)
+      end
+   else
+      printl("IT_HAS_NO_EFFECT")
+   end
+end
+
+function check_ammo(actor, weapon)
+   local obj_n = weapon.obj_n
+   if obj_n == 47 and not Actor.inv_has_obj_n(actor, 63) then --OBJ_SLING, OBJ_SLING_STONE
+      return 1
+   end
+
+   if (obj_n == 41 or obj_n == 42) and not Actor.inv_has_obj_n(actor, 57) then --OBJ_DERRINGER, OBJ_REVOLVER, OBJ_PISTOL_ROUND
+      return 1
+   end
+
+   if obj_n == 46 and not Actor.inv_has_obj_n(actor, 60) then --OBJ_ELEPHANT_GUN, OBJ_ELEPHANT_GUN_ROUND
+      return 1
+   end
+
+   if obj_n == 44 and not Actor.inv_has_obj_n(actor, 59) then --OBJ_RIFLE, OBJ_RIFLE_ROUND
+      return 1
+   end
+
+   if obj_n == 43 and not Actor.inv_has_obj_n(actor, 58) then --OBJ_SHOTGUN, OBJ_SHOTGUN_SHELL
+      return 1
+   end
+
+   if (obj_n == 129 or obj_n == 261) and weapon.qty ~= 0 then --OBJ_WEED_SPRAYER, OBJ_SPRAY_GUN
+      return 1
+   end
+
+   return 0
+end
+
+function attack_target_with_weapon(actor, target_x, target_y, weapon)
+   local target_range = actor_get_combat_range(actor, target_x, target_y)
+   local weapon_range = get_weapon_range(weapon)
+
+   if target_range > weapon_range then
+      return 2 --out of range
+   end
+
+   local ret = check_ammo(actor, weapon)
+   if ret ~= 0 then
+      return ret
+   end
+
+   local obj_n = weapon.obj_n
+
+
+   local var_10 = 0
+   local var_12 = 0
+   --OBJ_HEAT_RAY_GUN
+   --OBJ_FREEZE_RAY_GUN
+   --OBJ_BELGIAN_COMBINE
+   if obj_n == 240 or obj_n == 241 or obj_n == 45 then
+      if weapon.quality < 2 then
+         var_10= 1
+      end
+
+      if weapon.quality ~= 1 then
+         var_12 = 1
+      end
+
+      if obj_n == 45 then --OBJ_BELGIAN_COMBINE
+         if var_10 ~= 0 then
+            if not Actor.inv_has_obj_n(actor, 59) then --OBJ_RIFLE_ROUND
+               var_10 = 0
+            end
+         end
+         if var_12 ~= 0 then
+            if not Actor.inv_has_obj_n(actor, 58) then --OBJ_SHOTGUN_SHELL
+               var_12 = 0
+            end
+         end
+      else
+         if weapon.qty == 0 then
+            return 1
+         end
+         if weapon.qty < (var_12 * 4) + var_10 then
+            var_12 = 0
+         end
+      end
+
+      if var_10 == 0 and var_12 == 0 then
+         return 1
+      end
+   else
+      if obj_n == 43 then --OBJ_SHOTGUN
+         var_10 = 0
+         var_12 = 1
+      else
+         var_10 = 1
+         var_12 = 0
+      end
+   end
+
+   local damage_mode = 0
+   if obj_n == 240 then --OBJ_HEAT_RAY_GUN
+      damage_mode = 3
+   end
+
+   if obj_n == 241 then --OBJ_FREEZE_RAY_GUN
+      damage_mode = 1
+   end
+
+   g_attack_target = g_selected_obj
+
+   if var_10 == 0 then
+      spread_weapon_damage(actor, target_x, target_y, weapon)
+      return 0
+   end
+
+   local is_ranged_attack = false
+   if target_range > 1 then
+      is_ranged_attack = true
+   end
+
+   if (obj_n >= 40 and obj_n <= 48) --OBJ_CUPIDS_BOW_AND_ARROWS, OBJ_BOW
+      or obj_n == 129 --OBJ_WEED_SPRAYER
+         or obj_n == 261 --OBJ_SPRAY_GUN
+         or obj_n == 240 --OBJ_HEAT_RAY_GUN
+         or obj_n == 241 --OBJ_FREEZE_RAY_GUN
+   then
+      is_ranged_attack = true
+   end
+
+   local damage
+   if weapon.luatype == "actor" then
+      damage = actor_get_damage(actor)
+      if damage == nil then
+         damage = 1
+      end
+   else
+      damage = get_weapon_damage(weapon)
+      if damage < 0 then
+         damage = 1
+      end
+   end
+
+   local does_damage
+
+   local target =  find_rockworm_actor(g_attack_target)
+   if target ~= nil
+           and target.luatype == "actor"
+           and obj_n ~= 129 --OBJ_WEED_SPRAYER
+           and obj_n ~= 261 then --OBJ_SPRAY_GUN
+      does_damage = attack_dex_saving_throw(actor, target, weapon)
+   end
+
+   if is_ranged_attack then
+      fire_range_based_weapon(actor, target_x, target_y, weapon)
+   end
+
+   target = find_rockworm_actor(g_attack_target)
+
+   if not is_ranged_attack and map_is_on_screen(actor.xyz) then
+      play_md_sfx(0)
+   end
+
+   if does_damage == nil then
+      does_damage = true
+      if target ~= nil
+              and target.luatype == "actor"
+              and obj_n ~= 129 --OBJ_WEED_SPRAYER
+              and obj_n ~= 261 then --OBJ_SPRAY_GUN
+         does_damage = attack_dex_saving_throw(actor, target, weapon)
+      end
+   end
+
+   if not does_damage then
+      play_md_sfx(3)
+   end
+
+   if does_damage
+      and target ~= nil
+      and (target.luatype == "obj" or target.actor_num ~= actor.actor_num) then
+      if obj_n == 241 then --OBJ_FREEZE_RAY_GUN
+         if target.obj_n == 160 and target.frame_n == 1 then
+            printl("THE_WATER_FREEZES")
+            target.frame_n = 2
+         else
+            if target.luatype == "actor" then
+               attack_with_freezeray(actor, target, damage)
+            end
+         end
+      elseif obj_n == 129 or obj_n == 261 then --OBJ_WEED_SPRAYER, OBJ_SPRAY_GUN
+         if weapon.quality ~= 0 then
+            if target.luatype == "actor" and target.obj_n == 145 then --OBJ_MONSTER_FOOTPRINTS
+               target.obj_n = 364 --OBJ_PROTO_MARTIAN
+               printfl("BECOMES_VISIBLE", target.name)
+            elseif target.luatype == "obj" and target.invisible then
+               target.invisible = false
+               printfl("BECOMES_VISIBLE", target.name)
+            else
+               printl("IT_HAS_NO_EFFECT")
+            end
+         else
+            if actor_tbl[target.obj_n] ~= nil
+               and not is_actor_stat_bit_set(target.obj_n, 14)
+               and is_actor_stat_bit_set(target.obj_n, 7) then
+                  actor_take_hit(actor, target, damage, 2)
+            else
+               printl("IT_HAS_NO_EFFECT")
+            end
+         end
+      elseif obj_n == 40 then --OBJ_CUPIDS_BOW_AND_ARROWS
+         if target.luatype == "actor" and target.align ~= ALIGNMENT_GOOD then
+            target.old_align = target.align
+            target.align = ALIGNMENT_GOOD
+            target.charmed = true
+            printfl("ACTOR_CHARMED", target.name)
+         end
+      else
+         actor_take_hit(actor, target, damage, damage_mode)
+      end
+
+   end
+
+   if var_12 ~= 0 then
+      spread_weapon_damage(actor, target_x, target_y, weapon)
+   end
+
+   return 0
+end
+
+local spread_weapon_sfx_tbl = {
+   [0x2b]=8,
+   [0x2d]=8,
+   [0xf0]=0xa,
+   [0xf1]=0xa,
+}
+local spread_weapon_tile_num_tbl = {
+   [0x2b]=0x106,
+   [0x2d]=0x106,
+   [0xf0]=0x14e,
+   [0xf1]=0x14f,
+}
+local spread_weapon_damage_tbl = {
+   [0x2b]=0x14,
+   [0x2d]=0x14,
+   [0xf0]=0x19,
+   [0xf1]=0xa,
+}
+
+function spread_weapon_damage(actor, target_x, target_y, weapon)
+   if spread_weapon_sfx_tbl[weapon.obj_n] ~= nil then
+      play_md_sfx(spread_weapon_sfx_tbl[weapon.obj_n])
+   end
+
+   --FIXME spread weapon anim here.
+   local hit_items = projectile_anim_multi (spread_weapon_tile_num_tbl[weapon.obj_n], actor.x, actor.y, {{x=target_x, y=target_y, z=actor.z}, {x=target_x+1, y=target_y-1, z=actor.z}}, 2, 1, 0)
+
+   local k, v
+   for k,v in pairs(hit_items) do
+      if weapon.obj_n == 241 then --OBJ_FREEZE_RAY_GUN
+         if v.obj_n == 160 and v.frame_n == 1 then --OBJ_EMPTY_BUCKET
+            printl("THE_WATER_FREEZES")
+            v.frame_n = 2
+         elseif v.luatype == "actor" then
+            if math.random(1, 0x2d) > actor_dex_adj(v) then
+               attack_with_freezeray(actor, v, 10)
+            else
+               printfl("ACTOR_DODGES", v.name)
+               play_md_sfx(3)
+            end
+         end
+      elseif v.luatype == "obj" or math.random(1, 0x2d) > actor_dex_adj(v) then
+         local dmg_mode = 0
+         if weapon.obj_n == 240 then --OBJ_HEAT_RAY_GUN
+            dmg_mode = 3
+         end
+         actor_take_hit(actor, v, spread_weapon_damage_tbl[weapon.obj_n], dmg_mode)
+      else
+         printfl("ACTOR_DODGES", v.name)
+         play_md_sfx(3)
+      end
+   end
+
+   if weapon.obj_n == 43 or weapon.obj_n == 45 then --OBJ_SHOTGUN, OBJ_BELGIAN_COMBINE
+      Actor.inv_remove_obj_qty(actor, 58, 1) --OBJ_SHOTGUN_SHELL
+   else
+      weapon.qty = weapon.qty - 4
+      if weapon.qty < 0 then
+         weapon.qty = 0
+      end
+   end
+
+end
+
+local projectile_tbl = {
+   [41]={tile_num=0x103, sfx_id=7, ammo_obj_n=57},
+   [42]={tile_num=0x103, sfx_id=7, ammo_obj_n=57},
+   [44]={tile_num=0x103, sfx_id=8, ammo_obj_n=59},
+   [45]={tile_num=0x103, sfx_id=8, ammo_obj_n=59},
+   [46]={tile_num=0x103, sfx_id=8, ammo_obj_n=60},
+   [47]={tile_num=0x23E, sfx_id=6, ammo_obj_n=63},
+   [48]={tile_num=0x23F, sfx_id=6, ammo_obj_n=64},
+   [40]={tile_num=0x23F, sfx_id=6, ammo_obj_n=-3},
+   [240]={tile_num=0x16B, sfx_id=10, ammo_obj_n=-2},
+   [241]={tile_num=0x16A, sfx_id=10, ammo_obj_n=-2},
+   [129]={tile_num=0x10A, sfx_id=6, ammo_obj_n=-2},
+   [261]={tile_num=0x10A, sfx_id=6, ammo_obj_n=-2},
+   [313]={tile_num=0x10B, sfx_id=50, ammo_obj_n=-3},
+   [366]={tile_num=0x16F, sfx_id=34, ammo_obj_n=-3},
+   [386]={tile_num=0x16C, sfx_id=34, ammo_obj_n=-3},
+   [364]={tile_num=0x16D, sfx_id=6, ammo_obj_n=-3},
+   [384]={tile_num=0x16E, sfx_id=6, ammo_obj_n=-3},
+}
+
+function fire_range_based_weapon(attacker, target_x, target_y, weapon)
+   local projectile_info = projectile_tbl[weapon.obj_n]
+   if projectile_info == nil then
+      projectile_info = {tile_num=weapon.tile_num, sfx_id=0, ammo_obj_n=-1 }
+   end
+
+   play_md_sfx(projectile_info.sfx_id)
+
+   projectile_anim(projectile_info.tile_num, attacker.x, attacker.y, target_x, target_y, 4, false, 0)
+
+   if projectile_info.ammo_obj_n > 0 then
+      Actor.inv_remove_obj_qty(attacker, projectile_info.ammo_obj_n, 1)
+   elseif projectile_info.ammo_obj_n == -2 then
+      weapon.qty = weapon.qty - 1
+   elseif projectile_info.ammo_obj_n == -1 and actor_get_combat_range(attacker, target_x, target_y) > 1 then
+      if is_open_water_at_loc(target_x, target_y, attacker.z) then
+         Obj.removeFromEngine(weapon)
+      else
+         Obj.moveToMap(weapon, target_x, target_y, attacker.z)
+      end
+      --FIXME original updated readied weapons here. We might also need to do that.
+   end
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/dreamworld.lua b/devtools/create_ultima/files/ultima6/scripts/md/dreamworld.lua
new file mode 100644
index 0000000000..deb08feaec
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/dreamworld.lua
@@ -0,0 +1,292 @@
+function finish_dream_quest(actor)
+   local schedule = Actor.get_schedule(actor, 0)
+
+   Actor.move(actor, schedule.x, schedule.y, schedule.z)
+
+   local obj = map_get_obj(schedule.x, schedule.y, schedule.z, 461) --OBJ_DREAM_TELEPORTER
+   Obj.removeFromEngine(obj)
+   obj = map_get_obj(schedule.x, schedule.y-1, schedule.z, 292) --OBJ_OBELISK
+   Obj.removeFromEngine(obj)
+   Actor.set_talk_flag(actor, 7)
+
+   if Actor.get_talk_flag(0x56, 7)
+           and Actor.get_talk_flag(0x54, 7)
+           and Actor.get_talk_flag(0x52, 7)
+           and Actor.get_talk_flag(0x55, 7) then
+      Actor.set_talk_flag(0x60, 4)
+   end
+
+   if Actor.get_talk_flag(0x50, 7)
+           and Actor.get_talk_flag(0x51, 7)
+           and Actor.get_talk_flag(0x52, 7)
+           and Actor.get_talk_flag(0x53, 7)
+           and Actor.get_talk_flag(0x54, 7)
+           and Actor.get_talk_flag(0x55, 7)
+           and Actor.get_talk_flag(0x56, 7)
+           and Actor.get_talk_flag(0x57, 7) then
+      Actor.set_talk_flag(0x20, 4)
+   end
+
+end
+
+function wake_from_dream()
+   --FIXME dreamworld_cleanup_state() The original calls this with actor zero as an argument.
+   g_objlist_1d22_unk = 0
+   local minutes = 60 - clock_get_minute()
+   local current_hour = clock_get_hour()
+   current_hour = current_hour + 1
+   if current_hour >= 8 then
+      minutes = minutes + (24 - current_hour + 8) * 60
+   else
+      minutes = minutes + (8 - current_hour) * 60
+   end
+   clock_inc(minutes)
+   --FIXME reset walk_direction_modifier
+
+   for actor in party_members() do
+      actor_clear_berry_counters(actor.actor_num)
+      if actor.poisoned then
+         if actor.hp <= 30 then
+            if actor.hp <= 10 then
+               actor.hp = 1
+            else
+               actor.hp = math.random(1, 10)
+            end
+         else
+            actor.hp = math.random(24, 30)
+         end
+      end
+   end
+   local dream_actor = Actor.get(0)
+   party_set_in_vehicle(false)
+   dream_actor.visible = false
+   party_show_all()
+   party_update_leader()
+   party_set_combat_mode(false)
+   g_in_dream_mode = false
+   map_enable_temp_actor_cleaning(true)
+   printl("YOU_WAKE_UP")
+   unlock_inventory_view()
+   --remove dream actor's inventory
+   for obj in actor_inventory(dream_actor, true) do
+      Obj.removeFromEngine(obj)
+   end
+   local avatar = Actor.get(1)
+   avatar.mpts = avatar.dex
+   avatar.wt = WT_PLAYER
+end
+
+
+function actor_use_dream_machine(actor, dream_quality)
+   if actor.actor_num ~= 1 then
+      --FIXME advance time till dawn.
+      printfl("ACTOR_DREAMS_UNTIL_DAWN_WHILE_THE_PARTY_WAITS", actor.name)
+      actor.asleep = true
+      g_party_is_warm = true
+      advance_time(60 - clock_get_minute())
+      while clock_get_hour() ~= 8 do
+         advance_time(20)
+         script_wait(100)
+      end
+      g_party_is_warm = false
+   else
+      play_midgame_sequence(4)
+      party_set_party_mode()
+      local dream_actor = Actor.get(0)
+
+      local dream_x, dream_y
+      if dream_quality == 1 then
+         dream_x, dream_y = 0x64, 0x3b
+      else
+         dream_x, dream_y = 0x93, 0x34
+      end
+
+      --FIXME need to copy over more data from avatar actor.
+      dream_actor.obj_n = actor.obj_n
+      dream_actor.frame_n = actor.frame_n
+      dream_actor.base_obj_n = actor.base_obj_n
+      dream_actor.wt = WT_PLAYER
+      dream_actor.visible = true
+      dream_actor.hp = actor.max_hp
+
+      Actor.move(dream_actor, dream_x, dream_y, 2)
+      player_set_actor(dream_actor)
+      party_set_in_vehicle(true)
+      party_hide_all()
+      g_in_dream_mode = true
+      map_enable_temp_actor_cleaning(false)
+      g_prev_player_x = 0
+      g_prev_player_y = 0
+      g_current_dream_stage = 0
+      lock_inventory_view(Actor.get(0))
+   end
+end
+
+function cleanup_cliff_fall()
+   local dream_actor = Actor.get(0)
+   local avatar = Actor.get(1)
+   dream_actor.obj_n = avatar.base_obj_n
+   dream_actor.frame_n = 9
+end
+
+local dreamworld_cleanup_tbl = {
+   [5]=function() end,
+   [0x20]=function() end,
+   [0x40]=cleanup_cliff_fall,
+   [0x44]=function() end,
+   [0xa0]=function() end,
+}
+
+function fall_from_cliff()
+   printl("YOU_FALL_OFF_THE_CLIFF")
+   local dream_actor = Actor.get(0)
+   if player_get_gender() == 0 then
+      dream_actor.obj_n = 0x126
+   else
+      dream_actor.obj_n = 0x127
+   end
+   dream_actor.frame_n = 0
+
+   for y=dream_actor.y-8,dream_actor.y do
+      local actor = map_get_actor(dream_actor.x, y, dream_actor.z)
+      if actor ~= nil and actor.obj_n == 391 then --OBJ_YOUR_MOTHER
+         Actor.kill(actor, false)
+      end
+   end
+
+end
+
+local dreamworld_unk_tbl = {
+   [0x4]=function() end,
+   [0x40]=fall_from_cliff,
+   [0x85]=function() end,
+   [0xA1]=function() end,
+   [0xA4]=function() end,
+   [0xC0]=function() end,
+   [0xC1]=function() end,
+   [0xC4]=function() end,
+   [0xC5]=function() end,
+   [0xE0]=function() end,
+}
+
+function spawn_your_mother()
+   local player_loc = player_get_location()
+   local mother = Actor.new(391, player_loc.x, player_loc.y-1,player_loc.z)
+   actor_init(mother)
+   mother.wt = 0x15
+   mother.combat_mode = 0x15
+   mother.visible = true
+   Actor.move(mother, player_loc.x, player_loc.y-1,player_loc.z)
+end
+
+function create_pitcher(x, y, z)
+   local obj = Obj.new(217, math.floor(math.random(0, 5) / 2))
+   obj.qty = 3
+   Obj.moveToMap(obj, x, y, z)
+end
+
+function setup_tiffany_stage()
+   local tiffany = Actor.get(0x54)
+
+   Actor.clear_talk_flag(tiffany, 0)
+   Actor.clear_talk_flag(tiffany, 6)
+
+   local player_loc = player_get_location()
+   local z = player_loc.z
+   for obj in find_obj_from_area(0x21, 0x33, z, 0x1c, 0x10) do
+      local obj_n = obj.obj_n
+      --OBJ_RED_THROW_RUG, OBJ_RED_CAPE, OBJ_GLASS_PITCHER, OBJ_BROKEN_CRYSTAL, OBJ_MINOTAUR
+      if obj_n == 161 or obj_n == 162 or obj_n == 217 or obj_n == 218 or obj_n == 398 then
+         Obj.removeFromEngine(obj)
+      end
+   end
+   local rug = Obj.new(161) --OBJ_RED_THROW_RUG
+   Obj.moveToMap(rug, 0x24, 0x36, z)
+
+   for i=57,65 do
+      if i ~= 0x3e then
+         create_pitcher(0x37, i, z)
+      end
+      if i > 0x3a and i ~= 0x40 then
+         create_pitcher(0x39, i, z)
+      end
+      create_pitcher(0x3b, i, z)
+   end
+
+   create_pitcher(0x38, 0x39, z)
+   create_pitcher(0x38, 0x41, z)
+   create_pitcher(0x3a, 0x39, z)
+   create_pitcher(0x3a, 0x41, z)
+
+   local minotaur = Actor.new(398, 0x3b, 0x41, z)
+
+   actor_init(minotaur)
+   Actor.move(minotaur, 0x3b, 0x41, z)
+   minotaur.wt = 0x16
+
+end
+
+function complete_tiffany_stage()
+   local tiffany = Actor.get(0x54)
+   finish_dream_quest(tiffany)
+   Actor.set_talk_flag(tiffany, 1)
+   Actor.talk(tiffany)
+   wake_from_dream()
+end
+
+local dreamworld_init_tbl = {
+   [0x5]=function() end,
+   [0x20]=function() end,
+   [0x25]=spawn_your_mother,
+   [0x44]=setup_tiffany_stage,
+   [0x60]=function() end,
+   [0xA5]=function() end,
+   [0xC0]=function() end,
+   [0xC4]=function() end,
+   [0xC5]=function() end,
+}
+
+function dreamworld_cleanup_state(obj)
+   local dream_actor = Actor.get(0)
+   local new_stage =  bit32.band(obj.status, 0xe5)
+   if g_current_dream_stage ~= 0 and new_stage ~= 0xa5 and new_stage ~= 0xe5 then
+      if dreamworld_cleanup_tbl[g_current_dream_stage] ~= nil then
+         dreamworld_cleanup_tbl[g_current_dream_stage]()
+      end
+
+   end
+
+--   print("new stage="..new_stage.."\n")
+
+   if new_stage == 1 then
+      g_current_dream_stage = 0
+      return
+   elseif new_stage == 0x24 then
+      wake_from_dream()
+      return
+   elseif g_current_dream_stage ~= 0 and dreamworld_unk_tbl[new_stage] ~= nil then
+      dreamworld_unk_tbl[new_stage]()
+   end
+
+   if new_stage ~= 0xa5 then
+      --FIXME clean up temp objects
+      g_objlist_1d22_unk = 0
+   end
+
+   actor_clear_berry_counters(dream_actor.actor_num)
+   local player_loc = player_get_location()
+   player_move(obj.quality, obj.qty, player_loc.z)
+
+   if new_stage == 0xe5 then
+      if not Actor.get_talk_flag(0x66, 3) then
+         g_objlist_1d22_unk = 6
+      end
+   else
+      if dreamworld_init_tbl[new_stage] ~= nil then
+         dreamworld_init_tbl[new_stage]()
+      end
+
+      g_current_dream_stage = new_stage
+   end
+
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/ending.lua b/devtools/create_ultima/files/ultima6/scripts/md/ending.lua
new file mode 100644
index 0000000000..afed3d11ca
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/ending.lua
@@ -0,0 +1,220 @@
+local lua_file = nil
+
+--load common functions
+lua_file = nuvie_load("common/intro_common.lua"); lua_file();
+
+function play()
+   local gender = player_get_gender()
+   local g_img_tbl = image_load_all("endgame.lzc")
+   local text_tbl = text_load("scenetxt.lzc", 3)
+   local text = sprite_new(nil, 0, 160, true)
+   text.text_color = 4
+   text.text = text_tbl[0]
+   text.text_align_centre = true
+   
+   local bg = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local jack = sprite_new(g_img_tbl[0][gender+1], 155, 151, true)
+   
+   canvas_set_palette("md_title.pal", 0)
+   canvas_set_opacity(0xff);
+   mouse_cursor_visible(false)
+   canvas_set_update_interval(25)
+
+   music_play("mdd_mus.lzc", 11)
+   fade_in()
+   
+   poll_for_key_or_button(150)
+   if should_exit() then return end
+   
+   text.text = text_tbl[1]
+
+   poll_for_key_or_button(150)
+   if should_exit() then return end
+
+   --space capsule rockets away from mars
+      
+   jack.visible = false
+   text.text = text_tbl[2]
+
+   bg.image = g_img_tbl[1][0]
+   
+   local capsule = create_sprite(g_img_tbl[1][1], 105, 112)
+   capsule.visible = false
+   local smoke = sprite_new(g_img_tbl[1][2], 105, 112, false)
+ 
+   local i
+   for i=-1,39 do
+      bg.y = 23 + ((i + 3) % 4)
+      bg.x = ((i + 2) % 5) - 2
+      
+      if i > -1 and i < 13 then
+         capsule.visible = true
+         capsule.x = 105 + (i * i * 2) / 3
+         capsule.y = 112 - i * i
+         capsule.image.scale = (i * i) + 16
+         
+         smoke.image = g_img_tbl[1][2 + math.floor(i/2)]
+         smoke.visible = true
+      else
+         capsule.visible = false
+         smoke.visible = false
+      end
+      
+      poll_for_key_or_button(3)
+      if should_exit() then return end
+   end
+   
+   --capsule lands in the ocean.
+   bg.image = g_img_tbl[2][0]
+   bg.x = 0
+   bg.y = 24
+   
+   capsule.visible = true
+   capsule.x = 170
+   capsule.y = 150
+   
+   text.text = text_tbl[3]
+   
+   for i=0,9 do
+      local j
+      for j=0,3 do
+         capsule.image = g_img_tbl[2][math.abs(2 - j) + 1]
+         if i == 5 then
+            text.text = text_tbl[4]
+         end
+         poll_for_key_or_button(8)
+         if should_exit() then return end
+      end
+   end
+   
+   --ticket tape parade
+   canvas_set_opacity(0);
+   capsule.visible = false
+
+   bg.image = g_img_tbl[3][0]
+   local spector = sprite_new(g_img_tbl[3][gender+1], 190, 151, true)
+   text.text = text_tbl[5]
+   
+   fade_in(6)
+      
+   poll_for_key_or_button(150)
+   if should_exit() then return end
+   
+   
+   --group photo.
+   canvas_set_opacity(0);
+   spector.visible = false
+   
+   bg.image = g_img_tbl[4][0]
+   
+   local moongate_tbl = image_load_all("moongate.lzc")
+   local moongate = sprite_new(moongate_tbl[1][0], 35, 135, true)
+   local group = sprite_new(g_img_tbl[4][gender+1], 195, 151, true)
+   
+   local photographer = sprite_new(g_img_tbl[4][3], 75, 151, true)
+
+   text.text = text_tbl[6]
+
+   fade_in(6)
+      
+   for i=0,79 do
+      if i == 40 then
+         moongate.visible = false
+         group.visible = false
+         photographer.visible = false
+         bg.image = g_img_tbl[4][5]
+         poll_for_key_or_button(2)
+         fade_out(6)
+         bg.image = g_img_tbl[4][0]
+         moongate.visible = true
+         group.visible = true
+         photographer.visible = true
+         canvas_set_opacity(0xff);
+      else
+         moongate.image = moongate_tbl[1][i % 8]
+         if i >= 38 and i <= 42 then
+            photographer.image = g_img_tbl[4][4]
+         else
+            photographer.image = g_img_tbl[4][3]
+         end
+         if i == 41 then
+            text.text = text_tbl[7]
+         end
+         
+         poll_for_key_or_button(3)
+         if should_exit() then return end
+      end
+   end
+  
+   --mars dust storm
+   
+   moongate.visible = false
+   group.visible = false
+   photographer.visible = false
+           
+   bg.image = g_img_tbl[5]
+   
+   local sand = sprite_new(nil, 240, 140, true)
+   local tree = sprite_new(nil, 0, 140, true)
+   
+   local dust = create_sprite(g_img_tbl[6], 0, 24)
+   local dust1 = create_sprite(g_img_tbl[6], 0, 24)
+   local dust2 = create_sprite(g_img_tbl[6], 0, 24)
+   local dust3 = create_sprite(g_img_tbl[6], 0, 24)
+   local dust4 = create_sprite(g_img_tbl[6], 0, 24)
+            
+   dust.visible = true
+   dust1.visible = true
+   dust2.visible = true
+   dust3.visible = true
+   dust4.visible = true
+   
+   text.text = text_tbl[8]
+        
+   for i=0,63 do
+      if math.floor(i / 8) > 4 then
+         sand.image = g_img_tbl[7][4]
+      else
+         sand.image = g_img_tbl[7][math.floor(i / 8)]
+      end
+      if i < 56 then
+         if i - 50 < 0 then
+            tree.image = g_img_tbl[8][0]
+         else
+            tree.image = g_img_tbl[8][i - 50]
+         end
+      else
+         tree.visible = false
+      end
+      
+      dust.x = 340 - (i * 10) - math.random(0, 19)
+      dust.y = 24 - math.random(0, 9)
+      
+      dust1.x = 420 - (i * 20) - math.random(0, 19)
+      dust1.y = 24 - math.random(0, 9)
+
+      dust2.x = 500 - (i * 30) - math.random(0, 19)
+      dust2.y = 24 - math.random(0, 9)
+
+      dust3.x = 580 - (i * 30) - math.random(0, 19)
+      dust3.y = 24 - math.random(0, 9)
+
+      dust4.x = 660 - (i * 20) - math.random(0, 19)
+      dust4.y = 24 - math.random(0, 9)
+      
+      if i == 62 then
+         text.text = text_tbl[9]
+      end
+                              
+      poll_for_key_or_button(2)
+      if should_exit() then return end
+   end
+
+   poll_for_key_or_button(150)
+   if should_exit() then return end
+
+   about_martian_dreams()
+end
+
+
+play()
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/init.lua b/devtools/create_ultima/files/ultima6/scripts/md/init.lua
new file mode 100644
index 0000000000..6a9ca95b77
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/init.lua
@@ -0,0 +1,440 @@
+local lua_file = nil
+
+--load common functions
+lua_file = nuvie_load("common/common.lua"); lua_file();
+
+OBJLIST_OFFSET_HOURS_TILL_NEXT_HEALING  = 0x1cf2
+OBJLIST_OFFSET_PREV_PLAYER_X            = 0x1d03
+OBJLIST_OFFSET_PREV_PLAYER_Y            = 0x1d04
+OBJLIST_OFFSET_1D22_UNK                 = 0x1d22
+OBJLIST_OFFSET_DREAM_MODE_FLAG          = 0x1d29
+
+OBJLIST_OFFSET_BERRY_COUNTERS           = 0x1d2f
+OBJLIST_OFFSET_DREAM_STAGE              = 0x1d53
+
+function dbg(msg_string)
+   io.stderr:write(msg_string)
+end
+
+g_hours_till_next_healing = 0
+g_in_dream_mode = false
+
+local g_selected_obj
+local g_attack_target
+
+function update_watch_tile()
+   local anim_index = get_anim_index_for_tile(616) --616 = watch tile
+   if anim_index ~= nil then
+      local new_watch_tile = 416 + clock_get_hour() % 12
+      anim_set_first_frame(anim_index, new_watch_tile)
+   end
+end
+
+function load_game()
+   g_selected_obj = nil
+   g_attack_target = nil
+
+   objlist_seek(OBJLIST_OFFSET_HOURS_TILL_NEXT_HEALING)
+   g_hours_till_next_healing = objlist_read1()
+   
+   objlist_seek(OBJLIST_OFFSET_DREAM_MODE_FLAG)
+   g_in_dream_mode = bit32.btest(objlist_read2(), 0x10)
+   map_enable_temp_actor_cleaning(not g_in_dream_mode)
+
+   if g_in_dream_mode then
+      lock_inventory_view(Actor.get(0))
+   end
+
+   objlist_seek(OBJLIST_OFFSET_DREAM_STAGE)
+   g_current_dream_stage = objlist_read2()
+
+   objlist_seek(OBJLIST_OFFSET_PREV_PLAYER_X)
+   g_prev_player_x = objlist_read1()
+
+   objlist_seek(OBJLIST_OFFSET_PREV_PLAYER_Y)
+   g_prev_player_y = objlist_read1()
+
+   objlist_seek(OBJLIST_OFFSET_1D22_UNK)
+   g_objlist_1d22_unk = objlist_read1()
+
+   update_watch_tile()
+end
+
+function save_game()
+   objlist_seek(OBJLIST_OFFSET_HOURS_TILL_NEXT_HEALING)
+   objlist_write1(g_hours_till_next_healing)
+   
+   objlist_seek(OBJLIST_OFFSET_DREAM_MODE_FLAG)
+   local bytes = objlist_read2()
+   if g_in_dream_mode then
+      bytes = bit32.bor(bytes, 0x10)
+   else
+      bytes = bit32.band(bytes, 0xFFEF)
+   end
+   objlist_seek(OBJLIST_OFFSET_DREAM_MODE_FLAG)
+   objlist_write2(bytes)
+
+   objlist_seek(OBJLIST_OFFSET_DREAM_STAGE)
+   objlist_write2(g_current_dream_stage)
+
+   objlist_seek(OBJLIST_OFFSET_PREV_PLAYER_X)
+   objlist_write1(g_prev_player_x)
+
+   objlist_seek(OBJLIST_OFFSET_PREV_PLAYER_Y)
+   objlist_write1(g_prev_player_y)
+
+   objlist_seek(OBJLIST_OFFSET_1D22_UNK)
+   objlist_write1(g_objlist_1d22_unk)
+end
+
+
+
+local g_container_obj_tbl = {
+[80]=1, [81]=1, [82]=1,
+[83]=1, [85]=1, [86]=1,
+[87]=1, [89]=1,[304]=1,
+[139]=1,[341]=1,[257]=1,
+[104]=1,[284]=1,[285]=1
+}
+
+function is_blood(obj_num)
+   if obj_num == 334 or obj_num == 335 or obj_num == 336 then --OBJ_BLOOD, OBJ_ICHOR, OBJ_SAP
+      return true
+   end
+
+   return false
+end
+
+function is_container_obj(obj_num)
+   if g_container_obj_tbl[obj_num] ~= nil then
+      return true
+   end
+   return false
+end
+
+--OBJ_CLOSED_DOOR, OBJ_GLOW_WORM, OBJ_DEVIL_POD, OBJ_DEVIL_PLANT, OBJ_GLASS_PITCHER
+local attackable_obj_tbl = {
+   [0xB3]=1,
+   [0x184]=1,
+   [0x133]=1,
+   [0x12C]=1,
+   [0xD9]=1,
+}
+
+function is_obj_attackable(obj)
+   return attackable_obj_tbl[obj.obj_n] ~= nil
+end
+
+--OBJ_VINE, OBJ_TREE, OBJ_PORCUPOD, OBJ_FLOWER, OBJ_HARD_SHELLED_PLANT
+--OBJ_DEVIL_PLANT, OBJ_DEVIL_POD, OBJ_HEDGE
+local plant_obj_tbl = {
+   [0xCD]=1,
+   [0x198]=1,
+   [0xA8]=1,
+   [0xAA]=1,
+   [0xAB]=1,
+   [0x12C]=1,
+   [0x133]=1,
+   [0x12B]=1,
+}
+
+function is_plant_obj(obj)
+   return plant_obj_tbl[obj.obj_n] ~= nil
+end
+
+--OBJ_DOLLAR, OBJ_RUBLE, OBJ_PHOTOGRAPH, OBJ_THREAD, OBJ_BOX_OF_CIGARS
+--OBJ_MATCH, OBJ_BOOK, OBJ_MAP, OBJ_NOTE, OBJ_WORMSBANE_SEED
+--OBJ_SCROLL, OBJ_LIVE_MARTIAN_SEED, OBJ_PILE_OF_COAL
+--OBJ_HUGE_LUMP_OF_COAL, OBJ_CHUNK_OF_ICE
+local burnable_obj_tbl = {
+   [0x18]=1,
+   [0x84]=1,
+   [0x0B9]=1,
+   [0x3E]=1,
+   [0x65]=1,
+   [0x6B]=1,
+   [0x94]=1,
+   [0x96]=1,
+   [0x97]=1,
+   [0x9E]=1,
+   [0x0F3]=1,
+   [0x0FC]=1,
+   [0x1BC]=1,
+   [0x1BF]=1,
+   [0x100]=1,
+}
+
+function is_obj_burnable(obj)
+   return burnable_obj_tbl[obj.obj_n] ~= nil
+end
+
+function is_open_water_at_loc(x, y, z)
+   local tile_num = map_get_tile_num(x, y, z)
+   local is_water = tile_get_flag(tile_num, 1, 0)
+   if not is_water then
+      return false
+   end
+
+   if not tile_get_flag(tile_num, 1, 1) then -- not blocked
+      return false
+   end
+
+   for obj in objs_at_loc(location) do
+      tile_num = obj.tile_num
+      --FIXME original does this too
+      -- sub     ax, word_40FA2
+      if tile_get_flag(tile_num, 3, 1) or tile_get_flag(tile_num, 3, 2) then --SUPPORT_OBJECT or FORCE_PASSABLE
+         return false
+      end
+   end
+
+   return true
+end
+
+function search(obj)
+   if obj.on_map == false then
+      return
+   end
+   
+   local found_obj = false
+   local child
+   local first_loop = true
+   local prev_obj = nil
+   for child in container_objs(obj) do
+      if prev_obj ~= nil then
+         printfl("SEARCH_NEXT_OBJ", prev_obj.look_string)
+         Obj.moveToMap(prev_obj, obj.x, obj.y, obj.z)
+      end
+
+      if first_loop == true then
+         found_obj = true
+         printfl("SEARCHING_HERE_YOU_FIND", child.look_string)
+         Obj.moveToMap(child, obj.x, obj.y, obj.z)
+      else
+         prev_obj = child
+      end
+
+      script_wait(50)
+      first_loop = false
+   end
+   
+   if prev_obj ~= nil then
+      printfl("SEARCH_LAST_OBJ", prev_obj.look_string)
+      Obj.moveToMap(prev_obj, obj.x, obj.y, obj.z)
+   end
+   
+   if found_obj == false then
+      printl("SEARCHING_HERE_YOU_FIND_NOTHING")
+   else
+      print(".\n")
+   end
+   
+end
+
+--tile_num, readied location
+local g_readiable_objs_tbl = {
+-- 0 = head
+[512] = 0, --cap
+[513] = 0, --cowboy hat
+[514] = 0, --pith hat
+[515] = 0, --military hat
+[516] = 0, --derby
+-- 1 = neck
+[517] = 1, --kerchief
+[518] = 1, --silk scarf
+[519] = 1, --muffler
+[1048] = 1, --martian jewelry
+[1049] = 1, --martian jewelry
+[1050] = 1, --martian jewelry
+[1051] = 1, --martian jewelry
+[1052] = 1, --martian jewelry
+[1053] = 1, --martian jewelry
+[1054] = 1, --martian jewelry
+[1055] = 1, --martian jewelry
+-- 3 = 1 handed
+[527] = 3, --bloody saber
+[552] = 3, --derringer
+[553] = 3, --revolver
+[560] = 3, --hatchet
+[561] = 3, --axe
+[562] = 3, --ball-peen hammer
+[565] = 3, --knife
+[566] = 3, --machete
+[567] = 3, --saber
+[622] = 3, --pry bar
+[650] = 3, --weed sprayer
+[667] = 3, --tongs
+[1068] = 3, --martian ritual pod knife
+-- 2 = torso
+[528] = 2, --cloth jacket
+[529] = 2, --wool sweater
+[530] = 2, --cape
+[531] = 2, --duster
+[532] = 2, --wool overcoat
+[533] = 2, --sheepskin jacket
+[534] = 2, --artic parka
+[608] = 2, --electric belt
+-- 3 = shield hand
+[630] = 3, --torch
+[631] = 3, --lit torch
+[632] = 3, --candlestick
+[633] = 3, --lit candlestick
+[634] = 3, --candelabra
+[635] = 3, --lit candelabra
+[636] = 3, --oil lamp
+[637] = 3, --lit oil lamp
+[638] = 3, --lantern
+[639] = 3, --lit lantern
+-- 6 = UNK pants or dress FIXME: putting this here for now
+[536] = 6, --cotton pants
+[537] = 6, --cotton dress
+[538] = 6, --denim jeans
+[539] = 6, --wool pants
+[540] = 6, --wool dress
+[541] = 6, --chaps and jeans
+-- 7 = feet
+[520] = 7, --man's shoes
+[521] = 7, --woman's shoes
+[522] = 7, --riding boots
+[523] = 7, --ruby slippers
+[524] = 7, --thigh boots
+[525] = 7, --hip boots
+[526] = 7, --winged shoes
+[542] = 7, --man's shoes
+-- 4 = two handed
+[551] = 4, --Cupid's bow and arrows
+[554] = 4, --shotgun
+[555] = 4, --rifle
+[556] = 4, --Belgian combine
+[557] = 4, --elephant gun
+[558] = 4, --sling
+[559] = 4, --bow
+[563] = 4, --sledge hammer
+[576] = 4, --pick
+[577] = 4, --shovel
+[578] = 4, --hoe
+[579] = 4, --rake
+[580] = 4, --pitchfork
+[581] = 4, --cultivator
+[582] = 4, --scythe
+[583] = 4, --saw
+[717] = 4, --throw rug
+[718] = 4, --red cape
+[1066] = 4, --heat ray gun
+[1067] = 4, --freeze ray gun
+[1093] = 4, --spray gun
+[1095] = 4, --martian hoe (couldn't be equipped in original)
+[1096] = 4, --martian scythe (couldn't be equipped in original)
+[1097] = 4, --martian pitchfork (couldn't be equipped in original)
+[1098] = 4, --martian rake (couldn't be equipped in original)
+[1099] = 4, --martian shovel (couldn't be equipped in original)
+[1188] = 4, --M60 machine gun
+[1206] = 4, --martian pick (couldn't be equipped in original)
+[1897] = 4, --pool cue
+-- 5 = finger gloves and bracelets FIXME: putting this here for now
+[544] = 5, --lady's silk gloves
+[545] = 5, --driving gloves
+[546] = 5, --cotton work gloves
+[547] = 5, --work gloves
+[548] = 5, --wool mittens
+[549] = 5, --rubber gloves
+[550] = 5 --welding gloves
+}
+
+function wrap_coord(coord, level)
+   local map_stride = 1024
+   if level ~= 0 then
+      map_stride = 256
+   end
+
+   if coord < 0 then
+      return map_stride + coord
+   end
+
+   return coord % map_stride
+end
+
+function can_move_obj(obj, rel_x, rel_y)
+   local z = obj.z
+   return map_can_put_obj(wrap_coord(obj.x+rel_x,z), wrap_coord(obj.y+rel_y,z), z)
+end
+
+function obj_get_readiable_location(obj)
+   if g_readiable_objs_tbl[obj.tile_num] ~= nil then
+      return g_readiable_objs_tbl[obj.tile_num]
+   end
+
+   return -1
+end
+
+function update_lamp_posts()
+   --Turn lamps on/off if we have power and it is dark.
+   local frame_n = 3
+   local hour = clock_get_hour()
+   if Actor.get_talk_flag(0x73, 4) and (hour < 6 or hour > 17) then
+      frame_n = 7
+   end
+   
+   local loc = player_get_location()
+   for obj in find_obj(loc.z, 228) do --OBJ_LAMP_POST
+      if obj ~= nil then
+         obj.frame_n = frame_n
+      end
+   end
+end
+
+local PLAY_ASYNC = true
+function play_md_sfx(sfx_id, play_async)
+   --FIXME
+end
+
+function play_door_sfx()
+   --FIXME
+end
+
+function create_object_needs_quan(obj_n)
+-- obj.stackable is already checked
+   if obj_n == 196 or obj_n == 311 or obj_n == 312 then --OBJ_LEVER, OBJ_SWITCH, OBJ_SWITCH1
+      return true
+   else
+      return false
+   end
+end
+
+function input_select_obj_qty(obj)
+   if not obj.stackable then
+      return 1
+   end
+
+   printl("HOW_MANY")
+   local qty = input_select_integer("0123456789", true)
+   if qty > obj.qty then
+      return obj.qty
+   end
+   return qty
+end
+
+--load actor functions
+local actor_load = nuvie_load("md/actor.lua");
+if type(actor_load) == "function" then
+   actor_load()
+else
+   if type(actor_load) == "string" then
+      io.stderr:write(actor_load);
+   end
+end
+
+look_init = nuvie_load("md/look.lua"); look_init();
+
+combat_init = nuvie_load("md/combat.lua"); combat_init();
+
+-- init usecode
+usecode_init = nuvie_load("md/usecode.lua"); usecode_init();
+
+talk_init = nuvie_load("md/talk.lua"); talk_init();
+
+player_init = nuvie_load("md/player.lua"); player_init();
+
+worktype_init = nuvie_load("md/worktype.lua"); worktype_init();
+
+dreamworld_init = nuvie_load("md/dreamworld.lua"); dreamworld_init();
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/intro.lua b/devtools/create_ultima/files/ultima6/scripts/md/intro.lua
new file mode 100644
index 0000000000..2cf2fdb361
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/intro.lua
@@ -0,0 +1,2036 @@
+local lua_file = nil
+
+--load common functions
+lua_file = nuvie_load("common/intro_common.lua"); lua_file();
+
+local FREUD_STATE_STARING  = 0
+local FREUD_STATE_WRITING  = 1
+
+local function origin_fx_sequence()
+   local g_img_tbl = image_load_all("title.lzc")
+   
+   canvas_set_palette("strax.pal", 0)
+
+   
+   local stars = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local logo_image = image_new(282,82)
+   image_blit(logo_image, g_img_tbl[0][1],0,16)
+   image_blit(logo_image, g_img_tbl[0][2],g_img_tbl[0][1].w,14)
+   image_blit(logo_image, g_img_tbl[0][3],g_img_tbl[0][1].w+g_img_tbl[0][2].w,0)
+   
+   local  logo = sprite_new(logo_image, 20, 70, false)
+   
+   local planet = sprite_new(g_img_tbl[12], 160, 48, true)
+
+   planet.clip_x = 0
+   planet.clip_y = 0
+   planet.clip_w = 320
+   planet.clip_h = 152
+   local players = {}
+   players[1] = create_player_sprite(g_img_tbl[1][0], 58, 118)
+   players[2] = create_player_sprite(g_img_tbl[2][0], 186, 118)
+   players[3] = create_player_sprite(g_img_tbl[3][0], 278, 118)
+   
+   players[4] = create_player_sprite(g_img_tbl[4][0], 58, 126)
+   players[5] = create_player_sprite(g_img_tbl[5][0], 186, 126)
+   players[6] = create_player_sprite(g_img_tbl[6][0], 278, 126)
+   
+   players[7] = create_player_sprite(g_img_tbl[7][0], 58, 134)
+   players[8] = create_player_sprite(g_img_tbl[8][0], 186, 134)
+   players[9] = create_player_sprite(g_img_tbl[9][0], 278, 134)
+   
+   local conductor = sprite_new(g_img_tbl[10][0], 158, 98, true)
+   conductor.clip_x = 0
+   conductor.clip_y = 24
+   conductor.clip_w = 320
+   conductor.clip_h = 128
+
+   music_play("strx_mus.lzc", 0)
+   
+   fade_in()
+     
+   local i = 0
+   for i=0,6,1 do
+      conductor.image = g_img_tbl[10][i]
+
+      update_players(players, g_img_tbl)
+      if poll_for_key_or_button(4) == true then return end
+   end
+   for i=7,13,1 do
+      conductor.image = g_img_tbl[10][i]
+
+      update_players(players, g_img_tbl)
+      if poll_for_key_or_button(4) == true then return end
+   end
+   for i=7,12,1 do
+      conductor.image = g_img_tbl[10][i]
+
+      update_players(players, g_img_tbl)
+      if poll_for_key_or_button(4) == true then return end
+   end
+   local j
+   for i=1,4,1 do
+      for j=13,15,1 do
+         conductor.image = g_img_tbl[10][j]
+         if poll_for_key_or_button(1) == true then return end
+      end
+   
+      conductor.image = g_img_tbl[10][14]
+      if poll_for_key_or_button(2) == true then return end
+      conductor.image = g_img_tbl[10][13]
+      if poll_for_key_or_button(2) == true then return end
+      conductor.image = g_img_tbl[10][16]
+
+      if poll_for_key_or_button(1) == true then return end
+         play_sfx(38, false)
+   end
+   
+   for i=16,20,1 do
+      conductor.image = g_img_tbl[10][i]
+      if poll_for_key_or_button(4) == true then return end
+   end
+   if poll_for_key_or_button(135) == true then return end
+   
+   --play_sfx(12, false)
+   
+   conductor.image = g_img_tbl[10][6]
+   
+   for i=1,21,1 do
+      conductor.y = 98 + i * 12
+      conductor.image.scale = 100 + i * 15
+      
+      for j=1,9,1 do
+         players[j].y = players[j].y + 5
+         players[j].image.scale = 100 + i * 5
+         if j == 1 or j == 4 or j == 7 then
+            players[j].x = players[j].x - 2
+         end
+         if j == 3 or j == 6 or j == 9 then
+            players[j].x = players[j].x + 2
+         end
+      end
+   
+      if poll_for_esc(4) == true then return end
+   end
+   
+   
+   logo.visible = true
+   logo.image.scale = 10   
+   
+   
+   for i=1,18,1 do
+      planet.y = planet.y + 6
+
+      logo.image.scale = logo.image.scale + 5
+      logo.x = math.floor((320 - logo.image.w) / 2)
+      if i < 10 then
+         logo.y = logo.y - 4
+      else
+         logo.y = logo.y + 1
+      end
+   
+      if poll_for_key_or_button(4) == true then return end
+   end
+   
+   if poll_for_esc(45) == true then return end
+   
+   fireworks(g_img_tbl, logo)
+   fade_out()
+end
+
+function show_logos()
+   local g_img_tbl = image_load_all("logos.lzc")
+   local sprite = sprite_new(g_img_tbl[0], 0, 0, true)
+   music_play("mdd_mus.lzc", 0)
+   fade_in()
+
+   poll_for_key_or_button(195)
+   if should_exit() then return end
+   --fade_out()
+   sprite.image = g_img_tbl[1]
+   fade_in()
+   poll_for_key_or_button(195)
+   if should_exit() then return end
+   
+   sprite.image = g_img_tbl[2]
+   sprite.x = 15
+   music_play("mdd_mus.lzc", 1)
+   fade_in()
+   poll_for_key_or_button(175)
+   sprite.visible = false
+end
+
+function flash_effect(image, text_delay)
+   if text_delay == nil then
+      text_delay = 300
+   end
+   
+   canvas_hide_all_sprites()
+
+   local s = sprite_new(image, 0, 0, true)
+   local bg = sprite_new(image_new(320,200,15), 0, 0, true)
+   
+   if poll_for_key_or_button(6) == true then return end
+   
+   local speed = 10
+   local i
+   for i=0x0,0xff,speed do
+      bg.opacity = 0xff - i
+      canvas_update()
+   end
+
+   return poll_for_key_or_button(text_delay)
+end
+
+function show_fair_ground()
+   local g_img_tbl = image_load_all("fair.lzc")
+
+   canvas_hide_all_sprites()
+   
+   local fair_bg = sprite_new(g_img_tbl[0], 0, 24, true)
+   local buildings = sprite_new(g_img_tbl[1][0], 0, 24, true)
+   local buildings1 = sprite_new(g_img_tbl[1][1], 320, 24, true)
+   local wheel = sprite_new(g_img_tbl[2][0], 0, 24, true)
+   local column = sprite_new(g_img_tbl[3], 190, 24, true)
+   local podium = sprite_new(g_img_tbl[4], 240, 24, true)
+   local people = sprite_new(g_img_tbl[5][0], 0, 24, true)
+   local people1 = sprite_new(g_img_tbl[5][1], 320, 24, true)
+   
+   local i
+   for i=0,9 do
+      wheel.image = g_img_tbl[2][i%5]
+      if poll_for_key_or_button(7) == true then return end
+   end
+   
+   for i=0,79 do
+      buildings.x = 0 - i
+      buildings1.x = 320 - i
+      wheel.x = 0 - i * 2
+      wheel.image = g_img_tbl[2][i%5]
+      column.x = 190 - i * 2
+      podium.x = 240 - i * 2
+      people.x = 0 - i * 3
+      people1.x = 320 - i * 3
+      if poll_for_key_or_button(7) == true then return end
+   end
+   
+   if poll_for_key_or_button(15) == true then return end
+
+end
+
+function show_lowell()   
+
+   flash_effect(image_load("credits.lzc", 0))
+
+   canvas_hide_all_sprites()
+   
+   local g_img_tbl = image_load_all("lowell.lzc")
+   local bg = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local lowell = sprite_new(g_img_tbl[0][1], 0, 24, true)
+
+   fade_in()
+   
+   for i=1,20 do
+      lowell.image = g_img_tbl[0][i]
+      if poll_for_key_or_button(5) == true then return end
+   end
+   
+   flash_effect(image_load("credits.lzc", 1))
+   
+   if poll_for_key_or_button(70) == true then return end
+end
+
+function show_fuse()
+   
+   canvas_hide_all_sprites()
+   
+   local g_img_tbl = image_load_all("fuse.lzc")
+   local bg = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local fuse = sprite_new(g_img_tbl[0][1], 0, 24, true)
+   
+   music_play("mdd_mus.lzc", 2)
+      
+   fade_in(4)
+         
+   for i=1,28 do
+      fuse.image = g_img_tbl[0][i]
+      if poll_for_key_or_button(2) == true then return end
+   end
+   
+      flash_effect(image_load("credits.lzc", 2))
+end
+
+function show_flash()
+
+   canvas_hide_all_sprites()
+   
+      local g_img_tbl = image_load_all("fair.lzc")
+
+      canvas_hide_all_sprites()
+      
+      local fair_bg = sprite_new(g_img_tbl[0], 0, 24, true)
+      local buildings = sprite_new(g_img_tbl[1][0], -80, 24, true)
+      local buildings1 = sprite_new(g_img_tbl[1][1], 240, 24, true)
+      local column = sprite_new(g_img_tbl[3], 30, 24, true)
+      local podium = sprite_new(g_img_tbl[4], 80, 24, true)
+   
+   music_play("mdd_mus.lzc", 3)
+   
+   g_img_tbl = image_load_all("flash.lzc")
+
+   fade_in(8)
+   play_sfx(12, false) --explosion FIXME this might not be the correct sfx
+   local s = sprite_new(g_img_tbl[0][0], 80, 24, true)
+   local i
+   for i=0,9 do
+      s.image = g_img_tbl[0][i]
+      if poll_for_key_or_button(7) == true then return end
+   end
+   for i=0,8 do
+      s.image = g_img_tbl[1][i]
+      if poll_for_key_or_button(6) == true then return end
+   end
+   
+   flash_effect(image_load("credits.lzc", 3), 215)
+end
+
+function show_flight()
+   canvas_hide_all_sprites()
+
+   local g_img_tbl = image_load_all("flight.lzc")
+   local bg = sprite_new(g_img_tbl[0], 0, 24, true)
+   music_play("mdd_mus.lzc", 4)
+   fade_in(12)
+   local capsule = create_sprite(g_img_tbl[1], 270, 140)
+
+   local i
+   for i=0,12 do
+      capsule.image.scale = 1 + i * i + (i * 2)
+      capsule.x = 270 - i * 4 * i
+      capsule.y = 140 - i * 2 * i
+      if poll_for_key_or_button(6) == true then return end
+   end
+   
+   if poll_for_key_or_button(98) == true then return end
+   music_stop()
+   if poll_for_key_or_button(8) == true then return end
+
+end
+
+function show_cabin()
+   canvas_hide_all_sprites()
+
+   local g_img_tbl = image_load_all("cabin.lzc")
+
+   local bg = sprite_new(g_img_tbl[0], 0, 24, true)
+   local cloud = sprite_new(g_img_tbl[1][0], 116, 28, true)
+   local cloud1 = sprite_new(g_img_tbl[1][0], 222, 53, true)
+   local man = create_sprite(g_img_tbl[2], 0, 50)
+   local silhouette = create_sprite(g_img_tbl[3], -900, -150)
+   local hat1 = create_sprite(g_img_tbl[4], 62, -150)
+   local hat2 = create_sprite(g_img_tbl[5], 62, 0)
+   local hat3 = create_sprite(g_img_tbl[6], 62, 0)
+             
+   music_play("mdd_mus.lzc", 5)
+   
+   --FIXME rotate sprites.
+   
+   local i
+   for i=0,30 do
+      cloud.image = g_img_tbl[1][(i + 2) % 15]
+      cloud1.image = g_img_tbl[1][i % 15]
+      silhouette.x = i * 64 - 900
+      silhouette.y = i * 16 - 150
+      man.x = 0 - (i * 4)
+      man.y = i * i * 2 + 50
+      man.image.scale = 100 + i * 32
+      hat1.x = i * 32 + 62
+      if i > 6 then
+         hat1.y = i * 4 + 15
+      else
+         hat1.y = i * 8 + 15
+      end
+      
+      hat2.x = i * 32 - 150
+      hat2.y = i * 8
+
+      hat3.x = i * 32 - 500
+      hat3.y = i * 4
+            
+      if poll_for_key_or_button(8) == true then return end
+   end
+   
+   flash_effect(image_load("credits.lzc", 4),250)
+end
+
+function show_mars_flash()
+   canvas_hide_all_sprites()
+
+   local g_img_tbl = image_load_all("mars.lzc")
+   
+   music_play("mdd_mus.lzc", 6)
+   
+   local bg = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local flash = sprite_new(g_img_tbl[0][1], 0, 24, true)
+   
+   fade_in(12)
+   
+   if poll_for_key_or_button(60) == false then
+
+   local i
+   for i=-1,1 do
+      local j
+      for j=0,2 do
+      local k
+         for k=-1,2 do
+            flash.image = g_img_tbl[0][3-math.abs(k)]
+
+            local delay = 3
+            if i == 0 and k == 0 then
+               delay = 10
+            end
+            if poll_for_key_or_button(delay) == true then
+               flash_effect(image_load("credits.lzc", 5))
+               return
+            end
+         end
+
+         if poll_for_key_or_button(5) == true then
+            flash_effect(image_load("credits.lzc", 5))
+            return
+         end
+      end
+      
+      if poll_for_key_or_button(30) == true then
+         flash_effect(image_load("credits.lzc", 5))
+         return
+      end
+   end
+   
+   end
+   
+   poll_for_key_or_button(40)
+   
+   flash_effect(image_load("credits.lzc", 5))
+end
+
+function play_intro()
+
+   show_logos()
+   if should_exit() then return end
+
+   show_fair_ground()
+   if should_exit() then return end
+   
+   show_lowell()
+   if should_exit() then return end
+
+   show_fuse()
+   if should_exit() then return end
+
+   show_flash()
+   if should_exit() then return end
+
+   show_flight()
+   if should_exit() then return end
+    
+   show_cabin()
+   if should_exit() then return end
+ 
+   show_mars_flash()
+   if should_exit() then return end
+   
+end
+
+function show_home()
+   canvas_hide_all_sprites()
+
+   local text_tbl = text_load("scenetxt.lzc", 0)
+   
+   local g_img_tbl = image_load_all("scene1.lzc")
+   
+   local bg = sprite_new(g_img_tbl[0][0], 0, 24, true)
+   local door = sprite_new(g_img_tbl[0][1], 0, 24, true)
+   local avatar = sprite_new(g_img_tbl[1][0], 240, 151, true)
+   local text = sprite_new(nil, 0, 160, true)
+   text.text = text_tbl[1]
+   text.text_color = 14
+   text.text_align_centre = true
+   fade_in()
+   music_play("mdd_mus.lzc", 8)
+   
+   poll_for_key_or_button(75)
+   if should_exit() then return end
+
+   local woman = sprite_new(g_img_tbl[8][0], 0, 151, true)
+   local spector = create_sprite(g_img_tbl[2][0], 60, 151)
+   
+   door.visible = false
+   avatar.image = g_img_tbl[1][1]
+   text.text = text_tbl[2]
+   
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   avatar.image = g_img_tbl[1][3]
+   spector.image = g_img_tbl[2][1]
+   spector.x = 80
+   text.text = text_tbl[3]
+   text.text_color = 2
+      
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   woman.image = g_img_tbl[8][1]
+   text.text = text_tbl[4]
+   text.text_color = 14
+      
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   woman.image = g_img_tbl[8][2]
+   spector.image = g_img_tbl[2][2]
+   spector.x = 100
+   text.text = text_tbl[5]
+   text.text_color = 2
+
+   poll_for_key_or_button(75)
+   if should_exit() then return end
+   
+   woman.image = g_img_tbl[3][0]
+   woman.x = -10
+   woman.y = 155
+   spector.image = g_img_tbl[2][3]
+   spector.x = 145
+   text.text = text_tbl[6]
+   text.text_color = 9
+   
+   poll_for_key_or_button(75)
+   if should_exit() then return end
+      
+   --woman hands spector note
+   text.text = text_tbl[7]
+   local i
+   for i=0,10 do
+      if i <= 9 then
+         woman.image = g_img_tbl[3][i]
+      end
+      spector.image = g_img_tbl[2][i + 5]
+      poll_for_key_or_button(5)
+   end
+   
+   poll_for_key_or_button(50)
+   if should_exit() then return end
+   
+   text.text = text_tbl[8]
+   text.text_color = 2
+   
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   
+   --close up on woman
+   canvas_hide_all_sprites()
+      
+   bg.image = g_img_tbl[7]
+   bg.visible = true
+   text.text = text_tbl[9]
+   text.text_color = 9
+   text.visible = true
+      
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+    
+   --spector, avatar review papers
+   
+   bg.image = g_img_tbl[0][0]
+   avatar.image = g_img_tbl[1][1]
+   avatar.x = 270
+   avatar.visible = true
+   
+   spector.image = g_img_tbl[2][16]
+   spector.x = 193
+   spector.y = 161
+   spector.visible = true
+
+   text.text = text_tbl[10]
+   text.text_color = 2
+
+   poll_for_key_or_button(75)
+   if should_exit() then return end
+          
+   --close up on papers
+   canvas_hide_all_sprites()   
+   bg.image = g_img_tbl[5][0]
+   bg.visible = true
+   
+   local letter = sprite_new(g_img_tbl[5][1], 50, 24, true)
+   local hand = sprite_new(g_img_tbl[4], 235, 78, true)
+   
+   text.text = text_tbl[11]
+   text.text_color = 14
+   text.visible = true
+   
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   hand.visible = false
+   text.text = text_tbl[12]
+   text.text_color = 2
+   
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   --pickup letter
+   letter.image = g_img_tbl[6]
+   letter.x = 0
+   
+   text.text = text_tbl[13]
+   --FIXME need to rotate the letter sprite.
+   for i=0,19 do
+      letter.y = -20 - i
+      poll_for_key_or_button(1)
+   end
+      
+   letter.visible = false
+   text.text = text_tbl[14]
+   text.text_color = 14
+      
+   poll_for_key_or_button(100)
+   if should_exit() then return end
+   
+   fade_out(6)
+end
+
+function show_map()
+
+   local xhair_tbl = {
+      {["x"]=190, ["y"]=80},
+      {["x"]=180, ["y"]=82},
+      {["x"]=170, ["y"]=84},
+      {["x"]=162, ["y"]=81},
+      {["x"]=154, ["y"]=75},
+      {["x"]=145, ["y"]=73},
+      {["x"]=135, ["y"]=73},
+      {["x"]=125, ["y"]=74},
+      {["x"]=115, ["y"]=76},
+      {["x"]=105, ["y"]=78},
+      {["x"]=95, ["y"]=81},
+      {["x"]=86, ["y"]=86}
+   }
+
+   canvas_hide_all_sprites()
+   
+   local bg = sprite_new(image_load("scene2.lzc", 0), 0, 24, true)
+   fade_in(6)
+   
+   poll_for_key_or_button(50)
+   if should_exit() then return end
+
+   local i
+   for i=1,12 do
+      image_draw_line(bg.image, xhair_tbl[i].x-1, xhair_tbl[i].y-24-5, xhair_tbl[i].x+3, xhair_tbl[i].y-24-5, 9)
+      image_draw_line(bg.image, xhair_tbl[i].x+1, xhair_tbl[i].y-1-24-5, xhair_tbl[i].x+1, xhair_tbl[i].y+1-24-5, 9)
+      poll_for_key_or_button(20)
+      if should_exit() then return end
+   end
+   
+   poll_for_key_or_button(50)
+      
+   fade_out(6)
+
+end
+
+function show_hike()
+   canvas_hide_all_sprites()
+   local g_img_tbl = image_load_all("scene2.lzc")
+   
+   local bg = sprite_new(g_img_tbl[1], 0, 24, true)
+   local avatar = sprite_new(g_img_tbl[3][0], -15, 148, true)
+   local spector = sprite_new(g_img_tbl[4][0], -45, 149, true)
+   local fg = sprite_new(g_img_tbl[2], 0, 24, true)
+   
+   fade_in(6)
+   
+   local i
+   for i=0,94 do
+      avatar.image = g_img_tbl[3][i % 12]
+      avatar.x = i * 4 + -15
+      spector.image = g_img_tbl[4][(i+4) % 12]
+      spector.x = i * 4 + -45
+      poll_for_key_or_button(3)
+      if should_exit() then return end      
+   end
+   
+   fade_out(6)
+end
+
+function show_lab_present_day()
+   canvas_hide_all_sprites()
+   local g_img_tbl = image_load_all("scene3.lzc")
+   local text_tbl = text_load("scenetxt.lzc", 1)
+
+   local text = sprite_new(nil, 0, 160, true)
+   text.text = text_tbl[1]
+   text.text_color = 2
+   text.text_align_centre = true
+
+   local moongate_tbl = image_load_all("moongate.lzc")
+         
+   local bg = sprite_new(g_img_tbl[0], 0, 24, true)
+
+   local moongate = create_sprite(moongate_tbl[0][0], 125, 130)
+   moongate.visible = false
+   
+   local spector = sprite_new(g_img_tbl[3][0], 165, 137,true)
+   local table = create_sprite(g_img_tbl[1][0], 151, 82)
+   local avatar = create_sprite(g_img_tbl[2][0], 65, 150)
+
+   --local s = sprite_new(g_img_tbl[4][0], 0, 24,true)
+   music_play("mdd_mus.lzc", 9)
+   
+   fade_in(6)
+   
+   local lab_tbl = {
+      {1, 2,  0, 0, 50},
+      {1, 2,  0, 1, 100},
+      {2, 14, 0, 1, 100},
+      {3, 2,  0, 2, 100},
+      {4, 2, -1, 0, 100},
+      {5, 14,-2, 0, 100},
+      {6, 2, -1, 0, 100},
+      {7, 14, 1, 3, 100},
+      {8, 2,  1, 2, 100},
+      {9, 14, 0, 2, 100}
+
+   }
+   
+   local i
+   for i=1,7 do
+      if lab_tbl[i][3] >= 0 then
+         spector.image = g_img_tbl[3][lab_tbl[i][4]]
+      else
+         spector.visible = false
+         table.visible = false
+         avatar.visible = false
+         bg.image = g_img_tbl[4][math.abs(lab_tbl[i][3])-1]
+      end
+
+      text.text = text_tbl[lab_tbl[i][1]]
+      text.text_color = lab_tbl[i][2]      
+      poll_for_key_or_button(lab_tbl[i][5])
+      if should_exit() then return end
+   end
+   
+   bg.image = g_img_tbl[0]
+   spector.visible = true
+   avatar.visible = true
+   table.visible = true
+   table.image = g_img_tbl[1][1]
+   
+   spector.image = g_img_tbl[3][3]
+   avatar.image = g_img_tbl[2][1]
+   
+   moongate.visible = true
+
+   --moongate rises up from floor
+   for i=0,8 do
+      moongate.image = moongate_tbl[0][i]
+      poll_for_key_or_button(4)
+      if should_exit() then return end
+   end
+   
+   --avatar, spector discuss moongate
+   moongate.image = moongate_tbl[1][0]
+   for i=8,10 do
+      local j
+      for j=0,39 do
+         moongate.image = moongate_tbl[1][j % 8]
+         avatar.image = g_img_tbl[2][lab_tbl[i][3]]
+         spector.image = g_img_tbl[3][lab_tbl[i][4]]
+         text.text = text_tbl[lab_tbl[i][1]]
+         text.text_color = lab_tbl[i][2]  
+               
+         poll_for_key_or_button(4)
+         if should_exit() then return end
+      end
+   end
+   
+   
+   spector.image = moongate_tbl[4][0]
+   for i=0,64 do
+      moongate.image = moongate_tbl[1][i % 8]
+      avatar.image = moongate_tbl[2][math.floor(i/2)]
+      
+      poll_for_key_or_button(4)
+      if should_exit() then return end
+   end
+   
+   avatar.visible = false
+   
+   for i=0,39 do
+      moongate.image = moongate_tbl[1][i % 8]
+      if i ~= 39 then
+         spector.image = moongate_tbl[4][math.floor(i/2)]
+      end
+      
+      poll_for_key_or_button(4)
+      if should_exit() then return end
+   end
+   
+   fade_out(6)
+end
+
+function show_lab_1895()
+   canvas_hide_all_sprites()
+   local scene4a_tbl = image_load_all("scene4a.lzc")
+   local scene4b_tbl = image_load_all("scene4b.lzc")
+   local moongate_tbl = image_load_all("moongate.lzc")
+      
+   local text_tbl = text_load("scenetxt.lzc", 2)
+
+   local text = sprite_new(nil, 0, 160, true)
+   text.text = text_tbl[1]
+   text.text_color = 6
+   text.text_align_centre = true
+   
+   local bg = sprite_new(scene4a_tbl[0], 0, 24, true)
+      
+   local moongate = create_sprite(moongate_tbl[0][0], 140, 125)
+   moongate.visible = false
+      
+   local tesla = sprite_new(scene4a_tbl[6][0], 187, 125, true)
+   local spark = sprite_new(scene4b_tbl[2][0], 32, 24, false)
+
+   local freud_body = create_sprite(scene4a_tbl[4][0], 0, 74)
+   local freud_head = create_sprite(scene4a_tbl[4][2], 23, 100)
+
+   local nellie = sprite_new(scene4b_tbl[1][0], 242, 24, false)
+   
+   local bookcase = sprite_new(scene4a_tbl[1], 242, 24, false)
+      
+   local blood = sprite_new(scene4a_tbl[5][0], 240, 40, true)
+   local garrett = sprite_new(scene4b_tbl[0][0], 270, 45, false)
+   
+   fade_in(6)
+   
+   music_play("mdd_mus.lzc", 10)
+      
+   local i
+   for i=1,2 do
+      text.text = text_tbl[i]
+      local j
+      for j=0,20 do
+         if 10 - math.abs(j-10) > 5 then
+            tesla.image = scene4a_tbl[6][5]
+         else
+            tesla.image = scene4a_tbl[6][10 - math.abs(j-10)]
+         end
+         
+         if j > 4 and j < 16 then
+            --FIXME need spark sfx
+            spark.visible = true
+            spark.image = scene4b_tbl[2][j % 10]
+         else
+            spark.visible = false
+         end 
+                  
+         poll_for_key_or_button(4)
+         if should_exit() then return end
+      end
+      text.text_color = 7
+   end
+   
+   moongate.visible = true
+
+   --moongate rises up from floor
+   tesla.x = 188
+   tesla.y = 128
+   tesla.image = scene4a_tbl[6][6]
+   
+   for i=0,8 do
+      moongate.image = moongate_tbl[0][i]
+      if i == 5 then
+         tesla.image = scene4a_tbl[6][7]
+      end
+      
+      if i == 2 then
+         blood.image = scene4a_tbl[5][1]
+      end
+      
+      poll_for_key_or_button(4)
+      if should_exit() then return end
+   end
+   
+   --avatar walks out of the newly risen moongate
+   local avatar = create_sprite(moongate_tbl[3][0], 80, 150)
+
+   tesla.x = 180
+   tesla.y = 133
+   tesla.image = scene4a_tbl[6][8]
+
+   for i=0,68 do
+      moongate.image = moongate_tbl[1][i % 8]
+      avatar.image = moongate_tbl[3][math.floor(i/2)]
+      if i == 3 then
+         blood.image = scene4a_tbl[5][2]
+      end
+      
+      if i == 4 then
+         freud_head.image = scene4a_tbl[4][3]
+      end
+      
+      if i == 11 then
+         text.text = text_tbl[3]
+         text.text_color = 7
+      end
+      
+      poll_for_key_or_button(3)
+      if should_exit() then return end
+   end
+   
+   --spector walks out of moongate
+   local spector = create_sprite(moongate_tbl[5][0], 140, 130)
+   
+   text.text = text_tbl[4]
+   text.text_color = 14
+
+   for i=0,24 do
+      moongate.image = moongate_tbl[1][i % 8]
+      spector.image = moongate_tbl[5][math.floor(i/2)]
+      
+      poll_for_key_or_button(3)
+      if should_exit() then return end
+   end
+   
+   --spector face closeup shot
+   canvas_hide_all_sprites()
+   
+   bg.image = scene4a_tbl[9][0]
+   bg.visible = true
+   
+   local face = sprite_new(scene4a_tbl[9][1], 0, 24, true)
+   
+   text.text = text_tbl[5]
+   text.text_color = 2
+   text.visible = true
+   
+   poll_for_key_or_button(200)
+   if should_exit() then return end
+   
+   --spector shows note to tesla
+   text.text = text_tbl[6]
+   face.visible = false
+   bg.image = scene4a_tbl[0]
+   
+   tesla.visible = true
+   tesla.image = scene4a_tbl[6][9]
+   
+   blood.visible = true
+
+   freud_head.image = scene4a_tbl[4][2]
+   freud_head.visible = true
+
+   freud_body.visible = true
+   
+   avatar.visible = true
+   avatar.x = 80
+   avatar.y = 150
+   avatar.image = scene4a_tbl[2][1]
+   
+   spector.visible = true
+   spector.x = 145
+   spector.y = 140
+   spector.image = scene4a_tbl[3][1]
+   
+   poll_for_key_or_button(200)
+   if should_exit() then return end
+   
+   --tesla face closeup shot
+   canvas_hide_all_sprites()
+   
+   bg.image = scene4a_tbl[7][0]
+   bg.visible = true
+   
+   face.image = scene4a_tbl[7][1]
+   face.visible = true
+   
+   text.text = text_tbl[7]
+   text.text_color = 7
+   text.visible = true
+      
+   poll_for_key_or_button(200)
+   if should_exit() then return end
+
+   --blood closeup.    
+   canvas_hide_all_sprites()
+   
+   bg.image = scene4a_tbl[8][0]
+   bg.visible = true
+   
+   face.visible = true
+   text.visible = true
+   text.text_color = 4
+   
+   for i=8,9 do
+      face.image = scene4a_tbl[8][i - 7]
+      text.text = text_tbl[i]
+      
+      poll_for_key_or_button(200)
+      if should_exit() then return end
+   end
+   
+   --Tesla calls Mr Garrett.
+   text.text = text_tbl[10]
+   text.text_color = 7
+   face.visible = false
+   bg.image = scene4a_tbl[0]
+   
+   tesla.visible = true
+   tesla.image = scene4a_tbl[6][10]
+   
+   blood.visible = true
+
+   freud_head.visible = true
+   freud_body.visible = true
+   
+   avatar.visible = true
+   avatar.image = scene4a_tbl[2][0]
+   
+   spector.visible = true
+   spector.image = scene4a_tbl[3][0]
+   
+   poll_for_key_or_button(200)
+   if should_exit() then return end
+
+   --Mr Garrett entrance
+   garrett.visible = true
+   spector.x = 150
+   spector.y = 140
+   text.text = text_tbl[11]
+   text.text_color = 9
+   for i=0,31 do
+      if i == 5 then
+         spector.image = scene4a_tbl[3][2]
+      end
+      if i <= 10 then
+         avatar.image = scene4a_tbl[2][i]
+      end
+      
+      garrett.image = scene4b_tbl[0][i]
+      
+      poll_for_key_or_button(3)
+      if should_exit() then return end
+   end
+   
+   --Tesla checks note, talks about mission.
+   
+   spector.image = scene4a_tbl[3][1]
+   spector.x = 155
+   avatar.image = scene4a_tbl[2][10]
+   freud_head.image = scene4a_tbl[4][1]
+
+   local text_color_tbl = {4, 6, 7, 7, 14, 2, 2, 7, 4, 4, 7, 9, 7, 4, 7, 4, 7, 2, 7, 7, 7, 7, 7, 11, 2, 7, 7}
+   
+   for i=12,20 do
+      if i==13 or i==16 or i==20 then
+         face.visible = true
+         tesla.visible = false
+         blood.visible = false
+         freud_head.visible = false
+         freud_body.visible = false
+         avatar.visible = false
+         spector.visible = false
+         garrett.visible = false
+         local idx
+         if i==13 then
+            idx = 8
+         else
+            idx = 7   
+         end
+         bg.image = scene4a_tbl[idx][0]
+         
+         if i==16 then
+            face.image = scene4a_tbl[idx][2]
+         else
+            face.image = scene4a_tbl[idx][1]
+         end 
+      else
+         local idx
+         if i == 14 then
+            spector.image = scene4a_tbl[3][0]
+         end
+         if i == 12 or i == 17 then
+            idx = 9
+         elseif i == 14 or i == 15 then
+            idx = 10
+         else
+            idx = 11
+         end
+         tesla.image = scene4a_tbl[6][idx]
+      end
+      
+      text.text = text_tbl[i]
+      text.text_color = text_color_tbl[i+1]
+      
+      poll_for_key_or_button(200)
+      if should_exit() then return end  
+               
+      face.visible = false
+      tesla.visible = true
+      blood.visible = true
+      freud_head.visible = true
+      freud_body.visible = true
+      avatar.visible = true
+      spector.visible = true
+      garrett.visible = true
+      bg.image = scene4a_tbl[0]
+   end
+   
+   
+   --Nellie walks in
+      
+   tesla.image = scene4a_tbl[6][10]
+   
+   text.text = text_tbl[21]
+   text.text_color = text_color_tbl[22]
+   
+   nellie.visible = true
+   nellie.y = 125         
+   bookcase.visible = true
+   
+   for i=0,31 do
+      if i == 7 then
+         freud_head.image = scene4a_tbl[4][2]
+      end
+      nellie.image = scene4b_tbl[1][i%4]
+      nellie.x = 320 - i * 3
+      if i > 25 then
+         nellie.y = 125 + (i - 26) * 2
+      end
+      
+      local avatar_idx = 20 - i
+      if avatar_idx > 10 then
+      avatar_idx = 10
+      end
+      
+      if avatar_idx < 4 then
+      avatar_idx = 4
+      end
+      avatar.image = scene4a_tbl[2][avatar_idx]
+
+      local garrett_idx = 45 - i
+      if garrett_idx > 31 then
+         garrett_idx = 31
+      end
+      
+      if garrett_idx < 18 then
+         garrett_idx = 18
+      end
+      garrett.image = scene4b_tbl[0][garrett_idx]
+      
+      poll_for_key_or_button(3)
+      if should_exit() then return end
+   end
+   
+   --Nellie shakes hands with Spector, Avatar
+   
+   spector.x = 165
+   nellie.x = 227
+   nellie.y = 135
+   
+   for i=22,26 do
+      if i == 24 then
+         nellie.image = scene4b_tbl[1][7]
+         spector.image = scene4a_tbl[3][3]
+      else
+         if i == 23 then
+            nellie.image = scene4b_tbl[1][6]
+         else
+            nellie.image = scene4b_tbl[1][5]
+         end
+         spector.image = scene4a_tbl[3][0]
+      end
+      
+      if i == 25 then
+         tesla.image = scene4a_tbl[6][9]
+      elseif i == 26 then
+         tesla.image = scene4a_tbl[6][11]
+      else
+         tesla.image = scene4a_tbl[6][12]
+      end
+
+      text.text = text_tbl[i]
+      text.text_color = text_color_tbl[i+1]
+      
+      poll_for_key_or_button(200)
+      if should_exit() then return end
+   end
+   
+end
+
+function run_introduction()
+
+   show_home()
+   if should_exit() then return end
+   
+   show_map()
+   if should_exit() then return end
+
+   show_hike()
+   if should_exit() then return end
+   
+   show_lab_present_day()
+   if should_exit() then return end
+
+   show_lab_1895()
+   if should_exit() then return end
+   
+   fade_out(6)
+end
+
+local char_creation_tbl = {
+   {["text"]=-1, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=-2, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=3,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=4,  ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=5,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -4},
+   {["text"]=6,  ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=7,  ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=8,  ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=9,  ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=10, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=11, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=12, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=13, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=14, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -3},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=15, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=16, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=17, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=18, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=19, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=20, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=21, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=22, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=23, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=24, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=25, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=26, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=27, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=28, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=29, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=30, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=31, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=32, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=33, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=34, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=35, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=36, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=37, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=38, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=39, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=40, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=41, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=42, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=43, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=44, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=45, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=46, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=47, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=48, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=49, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=50, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=51, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=52, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=53, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=54, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=55, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=56, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=57, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=58, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=59, ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -2},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=60, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=61, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=62, ["eye_sprite"]=3, ["can_move_pen"]=true, ["action_code"]= -1},
+   {["text"]=63, ["eye_sprite"]=1, ["can_move_pen"]=false, ["action_code"]= -1},
+   {["text"]=0,  ["eye_sprite"]=2, ["can_move_pen"]=false, ["action_code"]= -1}
+}
+
+local g_player_name = ""
+local gender_answer = ""
+local avatar_str  
+local avatar_dex 
+local avatar_int
+
+function insert_player_name(text)
+   local output = ""
+   local i = string.find(text,"$P")
+   while i ~= nil do
+      output = output .. string.sub(text,1,i-1) .. g_player_name
+      text = string.sub(text,i+2)
+      i = string.find(text, "$P")
+   end
+   output = output .. text
+   
+   return output
+end
+
+local g_keycode_tbl =
+{
+[32]=" ",
+[39]="'",
+[44]=",",
+[45]="-",
+[46]=".",
+[48]="0",
+[49]="1",
+[50]="2",
+[51]="3",
+[52]="4",
+[53]="5",
+[54]="6",
+[55]="7",
+[56]="8",
+[57]="9",
+[65]="A",
+[66]="B",
+[67]="C",
+[68]="D",
+[69]="E",
+[70]="F",
+[71]="G",
+[72]="H",
+[73]="I",
+[74]="J",
+[75]="K",
+[76]="L",
+[77]="M",
+[78]="N",
+[79]="O",
+[80]="P",
+[81]="Q",
+[82]="R",
+[83]="S",
+[84]="T",
+[85]="U",
+[86]="V",
+[87]="W",
+[88]="X",
+[89]="Y",
+[90]="Z",
+
+[97]="a",
+[98]="b",
+[99]="c",
+[100]="d",
+[101]="e",
+[102]="f",
+[103]="g",
+[104]="h",
+[105]="i",
+[106]="j",
+[107]="k",
+[108]="l",
+[109]="m",
+[110]="n",
+[111]="o",
+[112]="p",
+[113]="q",
+[114]="r",
+[115]="s",
+[116]="t",
+[117]="u",
+[118]="v",
+[119]="w",
+[120]="x",
+[121]="y",
+[122]="z",
+}
+
+local g_name_sprite = sprite_new(nil, 120, 184, false)
+g_name_sprite.text_color = 14
+local g_cursor_sprite = sprite_new(nil, 120, 184, false)
+g_cursor_sprite.text = "_"
+g_cursor_sprite.text_color = 14
+local g_cursor_timer = 0
+g_char_index = 0
+
+
+function collect_player_name()
+   local name_text = g_name_sprite.text
+   local len = string.len(name_text)
+   
+   g_name_sprite.visible = true
+   
+   local input = poll_for_input()
+   if input ~= nil then
+      if should_exit() then
+         return false
+      end
+
+      if (input == SDLK_BACKSPACE or input == SDLK_LEFT) and len > 0 then
+         g_name_sprite.text = string.sub(name_text, 1, len - 1)
+         len = len - 1
+         if len == 1 then -- old len
+           g_char_index = 0
+         else
+           g_char_index = string.byte(name_text, len -1)
+         end
+      elseif (input == SDLK_RETURN or input == SDLK_KP_ENTER) and string.len(trim_string(name_text)) > 0 then --return
+         g_name_sprite.visible = false
+         g_cursor_sprite.visible = false
+         g_player_name = trim_string(name_text)
+         return true
+      elseif input == SDLK_UP then --up
+         if g_char_index == 0 then
+           if len > 0 then
+             g_char_index = SDLK_a
+           else
+             g_char_index = 65 --A
+         end
+         elseif g_char_index <= 32 then --gap in characters
+           g_char_index = 48
+         elseif g_char_index >= 57 and  g_char_index < 65 then --gap in characters
+           g_char_index = 65
+         elseif g_char_index >= 90 and g_char_index < 97 then --gap in characters
+           g_char_index = 97
+         elseif g_char_index >= 122 then --last char
+           g_char_index = 32
+         else
+           g_char_index = g_char_index + 1
+         end
+
+         if len > 0 then -- erase char
+           name_text = string.sub(name_text, 1, len - 1)
+         end
+         g_name_sprite.text = name_text..g_keycode_tbl[g_char_index]
+      elseif input == SDLK_DOWN then --down
+         if g_char_index == 0 then
+           if len > 0 then
+             g_char_index = 122 --z
+           else
+             g_char_index = 90 --Z
+           end
+         elseif g_char_index == 65 then --gap in characters
+           g_char_index = 57
+         elseif g_char_index == 97 then --gap in characters
+           g_char_index = 90
+         elseif g_char_index <= 32 then --first char
+           g_char_index = 122
+         elseif g_char_index <= 48 then --gap in characters
+           g_char_index = 32
+         else
+           g_char_index = g_char_index - 1
+         end
+
+         if len > 0 then -- erase char
+           name_text = string.sub(name_text, 1, len - 1)
+         end
+         g_name_sprite.text = name_text..g_keycode_tbl[g_char_index]
+      elseif input == SDLK_RIGHT and len < 13 then --right
+         g_char_index = SDLK_a --a
+         g_name_sprite.text = name_text.."a"
+      elseif g_keycode_tbl[input] ~= nil and len < 13 then
+         g_name_sprite.text = name_text..g_keycode_tbl[input]
+         len = len + 1
+      end
+
+   end
+
+   if len == 13 then
+      g_cursor_sprite.visible = false
+   else
+      g_cursor_sprite.x = 120 + g_name_sprite.text_width
+      if g_cursor_timer == 0 then
+         g_cursor_timer = 8
+         if g_cursor_sprite.visible == true then
+            g_cursor_sprite.visible = false
+         else
+            g_cursor_sprite.visible = true
+         end
+      else
+         g_cursor_timer = g_cursor_timer - 1
+      end
+   end
+   
+   return false
+end
+
+function update_freud(freud)
+   if freud.eyes.blink_timer < 200 then
+      if freud.timer == 0 then
+         freud.timer = math.random(100, 350)
+         if freud.state == FREUD_STATE_STARING then
+            freud.state = FREUD_STATE_WRITING
+         else
+            freud.state = FREUD_STATE_STARING
+         end
+      else
+         freud.timer = freud.timer - 1
+      end
+      
+      local state = freud.state
+      if state == FREUD_STATE_STARING then
+         if freud.can_move_pen == true then
+            freud.eyes.sprite.image = freud.images[0][1]
+         else
+            freud.eyes.sprite.image = freud.images[0][freud.eyes.sprite_idx]
+         end
+      elseif state == FREUD_STATE_WRITING and freud.can_move_pen == true then
+         freud.eyes.sprite.image = freud.images[0][freud.eyes.sprite_idx]
+         if freud.timer % 4 == 0 then
+            freud.pen.sprite.image = freud.images[2][math.random(0,6)]
+            freud.pen.x_off = freud.pen.x_off + math.random(0, 3)
+            if freud.pen.x_off >= 30 then
+               freud.pen.x_off = freud.pen.x_off % 30
+               freud.pen.y_off = (freud.pen.y_off + 2) % 20
+            end
+
+            freud.pen.sprite.x = 128 - freud.pen.x_off
+            freud.pen.sprite.y = 83 + freud.pen.y_off
+         end
+      end
+   end
+   
+   if freud.eyes.blink_timer == 200 then
+      if freud.eyes.sprite_idx == 2 then
+         freud.eyes.sprite.image = freud.images[0][5]
+      else
+         freud.eyes.sprite.image = freud.images[0][4]
+      end
+   elseif freud.eyes.blink_timer == 215 then
+      if state == FREUD_STATE_WRITING or freud.can_move_pen == false then
+         freud.eyes.sprite.image = freud.images[0][freud.eyes.sprite_idx]
+      else
+         freud.eyes.sprite.image = freud.images[0][1]
+      end
+      freud.eyes.blink_timer = -1
+   end
+   freud.eyes.blink_timer = freud.eyes.blink_timer + 1   
+end
+
+function ask_question(question_idx, text, freud)
+   question_idx = question_idx + 1
+   
+   local key_input = nil
+   
+   local text_offset = char_creation_tbl[question_idx].text
+   
+   while text_offset ~= 0 do
+
+      if text_offset < 0 then
+         text.text_color = 4
+      else
+         text.text_color = 6
+      end
+      
+      text.text = insert_player_name(freud.text_tbl[math.abs(text_offset)])
+      
+      freud.eyes.sprite_idx = char_creation_tbl[question_idx].eye_sprite
+      freud.eyes.sprite.image = freud.images[0][freud.eyes.sprite_idx]
+      freud.eyes.blink_timer = 0
+      freud.state = FREUD_STATE_STARING
+      freud.can_move_pen = char_creation_tbl[question_idx].can_move_pen
+      local action = char_creation_tbl[question_idx].action_code
+
+      local continue_loop = true
+      while continue_loop do 
+         if action == -1 then
+            local input = poll_for_input()
+            if input ~= nil then
+               continue_loop = false
+            end
+         elseif action == -2 then
+            -- A, B input
+            local input = poll_for_input()
+            if input ~= nil and (input == SDLK_a or input == SDLK_b) then
+               key_input = input
+               continue_loop = false
+            end
+         elseif action == -3 then
+            local input = poll_for_input()
+            if input ~= nil and (input == SDLK_a or input == SDLK_b or input == SDLK_c) then
+               key_input = input
+               continue_loop = false
+            end
+         elseif action == -4 then
+            if collect_player_name() == true then
+               continue_loop = false
+            end
+         end
+         
+         if should_exit() then
+            return nil
+         end
+         
+         update_freud(freud)
+         canvas_update()
+      end
+      
+      question_idx = question_idx + 1
+      text_offset = char_creation_tbl[question_idx].text
+   end
+   
+   return key_input
+end
+
+function question_1_answer_a(text, freud, rand_high, rand_low)
+      ask_question(18, text, freud)
+      local var_14 = ask_question(20, text, freud)
+      if var_14 == SDLK_a then
+         local var_16 = ask_question(23, text, freud)
+         if var_16 == SDLK_a then
+            local answer = ask_question(29, text, freud)
+            if answer == SDLK_a then
+               avatar_str = rand_high
+               avatar_int = rand_low
+               if gender_answer == SDLK_a then
+                  ask_question(31, text, freud)
+               else
+                  ask_question(34, text, freud)
+               end
+            elseif answer == SDLK_b then
+               avatar_int = rand_high
+               avatar_str = rand_low
+            end
+         elseif var_16 == SDLK_b then
+            local answer = ask_question(37, text, freud)
+            if answer == SDLK_a then
+               avatar_int = rand_high
+               avatar_dex = rand_low
+               ask_question(40, text, freud)              
+            elseif answer == SDLK_b then
+               avatar_dex = rand_high
+               avatar_int = rand_low
+               ask_question(43, text, freud)
+            end
+         end
+      elseif var_14 == SDLK_b then
+         local var_16 = ask_question(26, text, freud)
+         if var_16 == SDLK_a then
+            local answer = ask_question(46, text, freud)
+            if answer == SDLK_a then
+               avatar_str = rand_high
+               avatar_dex = rand_low               
+               if gender_answer == SDLK_a then
+                  ask_question(49, text, freud)
+               else
+                  ask_question(52, text, freud)
+               end               
+            elseif answer == SDLK_b then
+               avatar_dex = rand_high
+               avatar_str = rand_low               
+               if gender_answer == SDLK_a then
+                  ask_question(58, text, freud)
+               else
+                  ask_question(55, text, freud)
+               end                
+            end
+         elseif var_16 == SDLK_b then
+            local answer = ask_question(61, text, freud)
+            if answer == SDLK_a then
+               avatar_int = rand_high
+               avatar_dex = rand_low
+               ask_question(64, text, freud)
+            elseif answer == SDLK_b then
+               avatar_dex = rand_high
+               avatar_int = rand_low
+               ask_question(66, text, freud)               
+            end
+         end
+      end
+end
+
+function question_1_answer_b(text, freud, rand_high, rand_low)
+   local var_14 = ask_question(26, text, freud)
+   if var_14 == SDLK_a then
+      local var_16 = ask_question(23, text, freud)
+      if var_16 == SDLK_a then
+         local answer = ask_question(29, text, freud)
+         if answer == SDLK_a then
+            avatar_str = rand_high
+            avatar_int = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(31, text, freud)
+            else
+               ask_question(34, text, freud)
+            end 
+         elseif answer == SDLK_b then
+            avatar_int = rand_high
+            avatar_str = rand_low            
+         end
+      elseif var_16 == SDLK_b then
+         local answer = ask_question(37, text, freud)
+         if answer == SDLK_a then
+            avatar_int = rand_high
+            avatar_dex = rand_low
+            ask_question(40, text, freud)
+         elseif answer == SDLK_b then
+            avatar_dex = rand_high
+            avatar_int = rand_low
+            ask_question(43, text, freud)            
+         end
+      end
+   elseif var_14 == SDLK_b then
+      local var_16 = ask_question(20, text, freud)
+      if var_16 == SDLK_a then
+         local answer = ask_question(72, text, freud)
+         if answer == SDLK_a then
+            avatar_int = rand_high
+            avatar_str = rand_low
+            ask_question(75, text, freud)
+         elseif answer == SDLK_b then
+            avatar_str = rand_high
+            avatar_int = rand_low
+            ask_question(78, text, freud)         
+         end
+      elseif var_16 == SDLK_b then
+         local answer = ask_question(46, text, freud)
+         if answer == SDLK_a then
+            avatar_str = rand_high
+            avatar_dex = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(49, text, freud)
+            else
+               ask_question(52, text, freud)
+            end 
+         elseif answer == SDLK_b then
+            avatar_dex = rand_high
+            avatar_str = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(58, text, freud)
+            else
+               ask_question(55, text, freud)
+            end            
+         end         
+      end
+   end
+end
+
+function question_1_answer_c(text, freud, rand_high, rand_low)
+   ask_question(81, text, freud)
+   local var_14 = ask_question(23, text, freud)
+   if var_14 == SDLK_a then
+      local var_16 = ask_question(26, text, freud)
+      if var_16 == SDLK_a then
+         local answer = ask_question(46, text, freud)
+         if answer == SDLK_a then
+            avatar_str = rand_high
+            avatar_dex = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(49, text, freud)
+            else
+               ask_question(52, text, freud)
+            end           
+         elseif answer == SDLK_b then
+            avatar_dex = rand_high
+            avatar_str = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(58, text, freud)
+            else
+               ask_question(55, text, freud)
+            end              
+         end
+      elseif var_16 == SDLK_b then
+         local answer = ask_question(37, text, freud)
+         if answer == SDLK_a then
+            avatar_int = rand_high
+            avatar_dex = rand_low
+            ask_question(40, text, freud)
+         elseif answer == SDLK_b then
+            avatar_dex = rand_high
+            avatar_int = rand_low
+            ask_question(43, text, freud)            
+         end         
+      end
+   elseif var_14 == SDLK_b then
+      local var_16 = ask_question(20, text, freud)
+      if var_16 == SDLK_a then
+         local answer = ask_question(29, text, freud)
+         if answer == SDLK_a then
+            avatar_str = rand_high
+            avatar_int = rand_low
+            if gender_answer == SDLK_a then
+               ask_question(31, text, freud)
+            else
+               ask_question(34, text, freud)
+            end 
+         elseif answer == SDLK_b then
+            avatar_int = rand_high
+            avatar_str = rand_low
+         end
+      elseif var_16 == SDLK_b then
+         local answer = ask_question(84, text, freud)
+         if answer == SDLK_a then
+            avatar_dex = rand_high
+            avatar_str = rand_low
+            ask_question(87, text, freud)
+         elseif answer == SDLK_b then
+            avatar_str = rand_high
+            avatar_dex = rand_low
+            ask_question(90, text, freud)               
+         end
+      end
+   end
+end
+
+function create_character()
+   canvas_hide_all_sprites()
+   local create_tbl = image_load_all("create.lzc")
+   
+   local text_tbl = text_load("scenetxt.lzc", 5)
+
+   local text = sprite_new(nil, 0, 160, true)
+   text.text = text_tbl[0]
+   text.text_color = 2
+   text.text_align_centre = true
+   
+   local bg = sprite_new(create_tbl[0][0], 0, 24, true)
+   local eyes_sprite = sprite_new(create_tbl[0][4], 0, 24, true)
+   local pen_sprite = sprite_new(create_tbl[2][0], 128, 83, true)
+   local clipboard = sprite_new(create_tbl[1], 89, 109, true)
+   
+   local eyes ={["sprite"]=eyes_sprite, ["sprite_idx"]=4, ["blink_timer"]=0}
+   local pen = {["sprite"]=pen_sprite,["x_off"]=0,["y_off"]=0,["sprite_idx"]=0,["timer"]=0,}
+   local freud = {["eyes"]=eyes, ["pen"]=pen, ["state"]=FREUD_STATE_STARING, ["timer"] = 0, ["can_move_pen"] = false, ["images"]=create_tbl, ["text_tbl"]=text_tbl}
+   
+   music_play("mdd_mus.lzc", 7)
+
+   local rand_high = math.random(24,26)
+   local rand_low = math.random(22,24)
+   local stat_base = math.random(18,22)
+   
+   avatar_str = stat_base
+   avatar_dex = stat_base
+   avatar_int = stat_base
+   
+   local gender
+   
+   gender_answer = ask_question(0, text, freud)
+   if gender_answer == SDLK_a then
+      gender = 0 --male
+      ask_question(8, text, freud)
+   elseif gender_answer == SDLK_b then
+      gender = 1 --female
+      ask_question(11, text, freud)
+   end
+   
+   local answer = ask_question(14, text, freud)
+   
+   if answer == SDLK_a then
+      question_1_answer_a(text, freud, rand_high, rand_low)
+   elseif answer == SDLK_b then
+      question_1_answer_b(text, freud, rand_high, rand_low)
+   elseif answer == SDLK_c then
+      question_1_answer_c(text, freud, rand_high, rand_low)
+   end
+   
+   if should_exit() then
+      return false
+   end
+   
+   ask_question(69, text, freud)
+   
+   config_set("config/newgame", true)
+   config_set("config/newgamedata/name", g_player_name)
+   config_set("config/newgamedata/gender", gender)
+   config_set("config/newgamedata/str", avatar_str)
+   config_set("config/newgamedata/dex", avatar_dex)
+   config_set("config/newgamedata/int", avatar_int)
+   
+   --wait_for_input()
+   fade_out(6)
+   
+   return true
+end
+
+function journey_onward()
+end
+
+local g_menu_idx = 0
+local g_menu_cursor_sprite = nil
+local g_menu_bg_sprite = nil
+
+function execute_menu_item(cursor_pos)
+   if cursor_pos ~= nil then
+      set_menu_cursor_pos(cursor_pos)
+   end
+   
+   hide_mouse_cursor()
+   
+   if g_menu_idx == 0 then -- story so far
+      run_introduction()
+   elseif g_menu_idx == 1 then -- create char
+      if create_character() == true then
+         return "J" -- starting new game
+      end
+   elseif g_menu_idx == 2 then -- journey onward
+      journey_onward()
+      return "J"
+   elseif g_menu_idx == 3 then -- about md
+      about_martian_dreams()
+   end
+   
+   clear_should_exit_flag()
+   canvas_hide_all_sprites()
+   canvas_set_opacity(0xff)
+   music_stop()
+   g_menu_bg_sprite.visible = true
+   g_menu_cursor_sprite.visible = true
+
+   return "";
+end
+
+function update_menu_cursor()
+   local box_y_tbl = {[0]=130,[1]=147,[2]=164,[3]=181}
+   g_menu_cursor_sprite.y = box_y_tbl[g_menu_idx]
+end
+
+function set_menu_cursor_pos(new_pos)
+   g_menu_idx = new_pos
+   update_menu_cursor()
+end
+
+function menu_cursor_down()
+   g_menu_idx = (g_menu_idx + 1) % 4
+   update_menu_cursor()
+end
+
+function menu_cursor_up()
+   g_menu_idx = g_menu_idx - 1
+   if g_menu_idx < 0 then
+      g_menu_idx = 3
+   end
+   update_menu_cursor()
+end
+
+local g_mouse_cursor_visible = false
+
+function show_mouse_cursor()
+   if g_mouse_cursor_visible == false then
+      mouse_cursor_set_pointer(9)
+      mouse_cursor_visible(true)
+      g_mouse_cursor_visible = true
+   end
+end
+
+function hide_mouse_cursor()
+   if g_mouse_cursor_visible == true then
+      mouse_cursor_visible(false)
+      g_mouse_cursor_visible = false
+   end
+end
+
+function main_menu()
+   canvas_hide_all_sprites()
+   music_stop()
+   clear_should_exit_flag()
+   local g_img_tbl = image_load_all("mdmenu.lzc")
+
+   g_menu_bg_sprite = sprite_new(g_img_tbl[0][0], 0, 0, true)
+
+   fade_in()
+
+   g_menu_cursor_sprite = sprite_new(g_img_tbl[0][2], 26, 0, true)
+   update_menu_cursor()
+
+   while true do
+      canvas_update()
+      local input = input_poll(true)
+      if input ~= nil then
+         if input == SDLK_q then -- q
+            return "Q"
+         elseif input == SDLK_RETURN or input == SDLK_SPACE or input == KP_ENTER then -- space or return
+            if execute_menu_item() == "J" then
+               return "J"
+            end
+         elseif input == SDLK_r or input == SDLK_i then -- Run Introduction
+            execute_menu_item(0)
+         elseif input == SDLK_c then -- c (create char)
+            if execute_menu_item(1) == "J" then
+               return "J" -- starting new game
+            end
+         elseif input == SDLK_j or input == SDLK_g then -- j, g (journey onward, continue Game)
+            execute_menu_item(2)
+            return "J"
+         elseif input == SDLK_a then -- a (about MD)
+            execute_menu_item(3)
+         elseif input == SDLK_DOWN or input == SDL_KP2 then -- down key
+            menu_cursor_down()
+         elseif input == SDLK_UP or input == SDL_KP8 then -- up key
+            menu_cursor_up()
+         elseif input == MOUSE_MOTION or input == MOUSE_CLICK then --mouse movement
+            show_mouse_cursor()
+            local x = get_mouse_x()
+            local y = get_mouse_y()
+            if x > 57 and x < 260 and y > 130 then
+               if y > 130 and y < 148 then -- run introduction
+                  set_menu_cursor_pos(0)
+               elseif y > 147 and y < 164 then -- create new char
+                  set_menu_cursor_pos(1)
+               elseif y > 163 and y < 181 then -- continue game
+                  set_menu_cursor_pos(2)
+               elseif y > 180 then -- about MD
+                  set_menu_cursor_pos(3)
+               end
+               if input == MOUSE_CLICK then
+                  if execute_menu_item() == "J" then
+                     return "J"
+                  end
+               end
+            end
+         end
+      end
+   end
+
+end
+
+
+mouse_cursor_visible(false)
+canvas_set_update_interval(25)
+canvas_set_bg_color(0)
+canvas_set_opacity(0)
+
+origin_fx_sequence()
+
+canvas_set_palette("md_title.pal", 0)
+canvas_hide_all_sprites()
+play_intro()
+
+if main_menu() == "Q" then -- returns "Q" for quit or "J" for Journey Onward
+   hide_mouse_cursor()
+   fade_out(6)
+   config_set("config/quit", true)
+end
+
+music_stop()
+canvas_hide()
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/lang/en/game.lua b/devtools/create_ultima/files/ultima6/scripts/md/lang/en/game.lua
new file mode 100644
index 0000000000..9a5d644fdb
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/lang/en/game.lua
@@ -0,0 +1,264 @@
+return {
+PASS="Pass!\n",
+YOU_SEE="you see %s",
+ON="On - ",
+TO="To - ",
+NOTHING="nothing!\n",
+NO_EFFECT="\nNo effect\n",
+AARGH="Aargh!\n",
+BLOCKED="Blocked!\n",
+HOW_MANY="How many? ",
+YOU_ARE_CARRYING_TOO_MUCH_ALREADY="You are carrying too much already.\n",
+YOU_PRIED_THE_NAILS_OUT_OF_THE_CRATE="You pried the nails out of the crate.\n",
+YOU_NAIL_THE_CRATE_SHUT="You nail the crate shut.\n",
+IT_HAS_NO_EFFECT="It has no effect.\n",
+IT_IS_NAILED_SHUT="It is nailed shut.\n",
+IT_IS_LOCKED="It is locked.\n",
+IS_NOT_STRONG_ENOUGH="%s is not strong enough.\n",
+NOT_WHILE_UNDERGROUND="Not while underground.\n",
+YOU_ARE_SOMEWHERE_NEAR="You are somewhere near",
+YOU_CANT_DIG_ANY_DEEPER="You can't dig any deeper.\n",
+IT_IS_STUCK="It is stuck.\n",
+THE_CONTROL_PANEL_OPERATES_THE_DREAM_MACHINE="The control panel operates the dream machine.\n",
+YOU_NEED_TO_USE_PLIERS_TO_ATTACH_THE_CABLE="You need to use pliers to attach the cable.",
+YOU_WILL_CHEW_IT_INSTINCTIVELY="You will chew it instinctively.\n",
+THE_PLATE_IN_THE_CAMERA_HAS_ALREADY_BEEN_EXPOSED="The plate in the camera has already been exposed.\n",
+YOU_MUST_USE_A_SHOVEL_TO_MOVE_THAT="You must use a shovel to move that.\n",
+YOU_CANT_DETERMINE_HOW_TO_READ_THE_TIME="You can't determine how to read the time.\n",
+THE_BERRIES_ARE_NOT_EDIBLE="The berries are not edible.\n",
+YOU_DONT_KNOW_HOW_IT_WORKS="You don't know how it works.\n",
+THE_GROUND_IS_NOT_CLEAR_FOR_DIGGING="The ground is not clear for digging.\n",
+YOU_CANT_DIG_HERE="You can't dig here.\n",
+YOU_FILLED_IN_THE_HOLE="You filled in the hole.\n",
+YOU_MAY_USE_THE_RUBY_SLIPPERS_TO_GO_HOME="You may use the ruby slippers to go home. If you choose to, you may now view the Grand Finale.\n\n*Afterwards, you will exit to DOS. You will be able to resume play from your last saved game.\n\n*Would you like to see the Grand Finale now? If so, press Y. To resume play now, hit N: (Y N)\n",
+CLICK="Click.\n",
+NOT_WHILE_IN_SOLO_MODE="Not while in solo mode!\n",
+SOMETHING="something",
+SEARCHING_HERE_YOU_FIND="Searching here, you find %s",
+SEARCHING_HERE_YOU_FIND_NOTHING="Searching here, you find nothing.\n",
+SEARCH_NEXT_OBJ=", %s",
+SEARCH_LAST_OBJ=" and %s",
+YOU_CANT_SLEEP_IN_A_DREAM="You can't sleep in a dream.\n",
+TENT_OBJ_IN_THE_WAY="The %s is in the way.\n",
+THE_GROUND_IS_NOT_FLAT_ENOUGH="The ground is not flat enough.\n",
+REST="Rest",
+NOT_WHILE_IN_COMBAT_MODE="Not while in combat mode!\n",
+NOT_WHILE_FOES_ARE_NEAR=" - Not while foes are near!\n",
+IS_TOO_NEAR_TO_SETUP_CAMP=" - %s is too near to set up camp.\n",
+IS_POISONED="\n%s is poisoned!",
+DO_YOU_REALLY_WANT_TO_SLEEP="\nDo you really want to sleep anyway? ",
+REST_UNTIL="\nRest until %s?",
+SUNRISE="sunrise",
+SUNSET="sunset",
+HOW_MANY_HOURS="\nHow many hours? ",
+HAS_A_DREAM="\n%s has a dream...\n\n",
+SEES_THREE_STONE_OBELISKS="%s sees three stone obelisks, one inscribed with a book, one a heart, and one a sword.\n\n*",
+FEELS_DRAWN_TO_ONE_OF_THE_OBELISKS="%s feels drawn to one of the obelisks.\n\n",
+DOES_TOUCH_THE_OBELISK="Does %s touch the obelisk with the @book, the @heart, or the @sword?\n",
+WHICH_BHS="Which (B H S):\n",
+FEELS_BETTER="%s feels better.\n",
+THE_TONGS_WILL_NOW_PROTECT_YOUR_HANDS="The tongs will now protect your hands.\n",
+THEY_WONT_COME_OFF="They won't come off!\n",
+OUCH_IT_IS_VERY_HOT="OUCH. It is very hot.\n",
+COMPLAINS_OF_TOO_MUCH_LIGHT_AND_INANIMATE="\n%s complains of too much light and inanimate things keep talking.*\n",
+COMPLAINS_OF_INANIMATE_THINGS_TALKING="\n%s complains of inanimate things talking.*\n",
+COMPLAINS_OF_TOO_MUCH_LIGHT="\n%s complains of too much light.*\n",
+YOU_CANT_SLEEP="\nYou can't sleep.\n",
+NOBODY_CAN_SLEEP="\nNobody can sleep.\n",
+A_MECHANICAL_PERSON_CANT_EAT_BERRIES="A mechanical person can't eat berries!\n",
+YOU_EAT_A_MARTIAN_BERRY_YOU_FEEL_AN_INCREASE_IN_THE_STRANGE="You eat a Martian berry. You feel an increase in the strange ",
+YOU_EAT_A_MARTIAN_BERRY_YOU_FEEL_A_STRANGE="You eat a Martian berry. You feel a strange ",
+RELATIONSHIP_WITH_THINGS_AROUND_YOU="relationship with things around you.\n",
+SENSITIVITY_TO_THE_FEELINGS_OF_OBJECTS_AROUND_YOU="sensitivity to the feelings of objects around you.\n",
+SENSE_OF_YOUR_SPATIAL_LOCATION="sense of your spatial location.\n",
+SUDDEN_FLUSH_DIZZINESS_AND_NAUSEA="sudden flush, dizziness, and nausea.\n",
+BREATHES_EASIER="%s breathes easier!\n",
+GASPS_FOR_AIR="%s gasps for air!\n",
+THE_IS_OUT_OF_FUEL="The %s is out of fuel.\n",
+WENT_OUT="%s went out.\n",
+FEELS_WARMER="%s feels warmer!\n",
+IS_FREEZING="%s is freezing!\n",
+A_PSYCHIC_POWER_FADES="A psychic power fades...\n",
+SOME_ICE_HAS_MELTED="Some ice has melted.\n",
+THE_ICE_IS_MELTING="The ice is melting.\n",
+THAT_WOULD_BE_A_WASTE_OUTSIDE_OF_COMBAT="That would be a waste outside of combat.\n",
+ENTERS_A_BATTLE_FRENZY="%s enters a battle frenzy!\n",
+YOU_SPIT_INTO_THE_SPITTOON="You spit into the spittoon.\n",
+YOUR_MOUTH_IS_TOO_DRY="Your mouth is too dry.\n",
+CHING="Ching!\n",
+SHING="Shing!\n",
+WHEEEEZE="Wheeeeze\n",
+THUMP_THUMP="Thump! Thump!\n",
+GONG="GONG!!!!\n",
+YOU_PLAY_THE="You play the %s.\n",
+THE_TIME_IS="\n\nThe time is ",
+TIME_AM="%d:%02d A.M.\n",
+TIME_PM="%d:%02d P.M.\n",
+THE_CANNON_WILL_FIRE_STEEL_CANNON_BALLS="The cannon will fire steel cannon balls.\n",
+IT_IS_EMPTY="It is empty.\n",
+DIRT="dirt",
+ROCK="rock",
+IRON_ORE="iron ore",
+COAL="coal",
+IT_HAS_1_LOAD_OF="It has 1 load of %s.\n",
+IT_HAS_N_LOADS_OF="It has %d loads of %s.\n",
+IT_HAS_A_HEARTSTONE="It has a heartstone.\n",
+IT_IS_GROWING="It is growing.\n",
+IT_IS_RIPE="It is ripe.\n",
+IT_IS_NOT_GROWING="It is not growing.\n",
+IT_IS_READY_TO_USE="It is ready to use.\n",
+THE_RUBBER_IN_THE_SPRAYER_SYSTEM_IS_NOT_FLESH_COLORED="The rubber in the sprayer system is not flesh-colored.\n",
+THERE_IS_NO_RUBBER_IN_THE_SPRAYER_SYSTEM="There is no rubber in the sprayer system.\n",
+IT_IS_ALSO_NOT_FLESH_COLORED="It is also not flesh-colored.\n",
+CABINET_1="It appears to control a mechanical system.\n",
+CABINET_2="It appears to control a valve system.\n",
+CABINET_3="It appears to control an electrical system.\n",
+CABINET_4="It appears to control this dream machine.\n",
+CABINET_5="It appears to control this spray system.\n",
+CABINET_6="It appears to control the ruby lens system.\n",
+CABINET_7="It appears to control the cistern valves.\n",
+YOU_CANNOT_DECIPHER_WHAT_IT_CONTROLS="You cannot decipher what it controls.\n",
+IT_APPEARS_TO_BE_LOOSE="It appears to be loose.\n",
+IT_APPEARS_TO_BE_BROKEN="It appears to be broken.\n",
+THESE_APPEAR_TO_BE_MECHANICAL_CONTROLS="These appear to be mechanical controls.\n",
+THESE_APPEAR_TO_BE_VALVE_CONTROLS="These appear to be valve controls.\n",
+THESE_APPEAR_TO_BE_ELECTRICAL_CONTROLS="These appear to be electrical controls.\n",
+IT_APPEARS_TO_CONTROL_A_DREAM_MACHINE="It appears to control a dream machine.\n",
+IT_APPEARS_TO_CONTROL_A_SPRAY_SYSTEM="It appears to control a spray system.\n",
+IT_APPEARS_TO_CONTROL_THE_RUBY_LENS_SYSTEM="It appears to control the ruby lens system.\n",
+IT_APPEARS_TO_CONTROL_THE_CISTERN_VALVES="It appears to control the cistern valves.\n",
+YOU_CANNOT_DECIPHER_ITS_PURPOSE="You cannot decipher its purpose.\n",
+THE_PANEL_IS_LOOSE="The panel is loose.\n",
+THE_PANEL_IS_BROKEN="The panel is broken.\n",
+THE_PANEL_IS_NOT_INSTALLED="The panel is not installed.\n",
+IT_IS_LOADED_WITH="It's loaded with %s",
+AND_HAS_1_CHARGE_LEFT=", and has 1 charge left.\n",
+AND_HAS_N_CHARGES_LEFT=", and has %d charges left.\n",
+COMBINATION="Combination",
+RIFLE="Rifle",
+SHOTGUN="Shotgun",
+IT_IS_SET_TO="It is set to '%s'",
+IT_SEEMS_TO_BE_LOOSE="\nIt seems to be loose.\n",
+IT_IS_NOT_INSTALLED="\nIt is not installed.\n",
+PLENTY_OF="\nPlenty of ",
+IT_HAS_N_MORE_MINUTES_OF="\nIt has %d more minutes of ",
+ITS_ALMOST_OUT_OF="\nIt's almost out of \n",
+NO="\nNo ",
+FUEL="fuel.\n",
+WICK="wick.\n",
+IT_IS_APPARENTLY_RUSTED_SHUT="It is apparently rusted shut.\n",
+IT_IS_APPARENTLY_LOCKED="It is apparently locked.\n",
+THE_SWITCH_IS_FASTENED="The switch is fastened.\n",
+THIS_SWITCH_CANNOT_BE_FIXED="This switch cannot be fixed.\n",
+THE_SWITCH_IS_LOOSE="The switch is loose.\n",
+THE_DRILL_MUST_BE_INSTALLED_ONTO_A_DRILL_CART="The drill must be installed onto a drill cart.\n",
+THE_DRILLS_POWER_IS_CONNECTED="The drill's power is connected.\n",
+IT_MUST_BE_REPAIRED_FIRST="It must be repaired first.\n",
+PANELS_ARE_ONLY_INSTALLED_ONTO_CABINETS="Panels are only installed onto cabinets.\n",
+THIS_CABINET_REQUIRES_A_DIFFERENT_TYPE_OF_PANEL="This cabinet requires a different type of panel.\n",
+THE_PANEL_IS_FASTENED="The panel is fastened.\n",
+YOU_GET_TWO_HANDFULS_OF_OXIUM_FROM_THE_BIN="You get two handfuls of oxium from the bin.\n",
+WHICH_SECTION_OF_RAIL_NEEDS_FIXING="Which section of rail needs fixing -\n",
+THE_WORK_IS_TO_PRECISE_TO_PERFORM_TELEKINETICALLY="The work is too precise to perform telekinetically.\n",
+THE_CABLE_DOES_NOT_NEED_REPLACEMENT="The cable does not need replacement.\n",
+OUT_OF_AMMUNITION="Out of ammunition!\n",
+OUT_OF_ARROWS="Out of arrows!\n",
+OVERCOME_BY_YOUR_WOUNDS_YOU_FALL_UNCONSCIOUS="\nOvercome by your wounds, you fall unconscious..... \n",
+YOU_AWAKEN_BACK_AT_FEELING_RESTORED="\n....You awaken back at %s, feeling restored.\n",
+THE_SPACE_CAPSULE="the space capsule",
+THE_OLYMPUS_MINE="the Olympus mine",
+IT_WONT_GO_IN_THAT_DIRECTION="It won't go in that direction!\n",
+IT_TURNS_LOOSELY="It turns loosely.\n",
+THERE_IS_NOTHING_TO_DRILL_INTO="There is nothing to drill into.\n",
+THERE_IS_NO_ROOM_LEFT_FOR_THE_ORE="There is no room left for the ore.\n",
+YOU_PUT_THE_ORE_INTO_THE_WHEELBARROW="You put the %s into the wheelbarrow.\n",
+YOU_PUT_THE_ORE_INTO_THE_RAIL_CAR="You put the %s into the rail car.\n",
+THERE_IS_NO_MORE_ROOM="There is no more room.\n",
+YOU_CANT_MIX_DIFFERENT_THINGS_IN_THE_SAME_LOAD="You can't mix different things in the same load!\n",
+THERE_IS_NOTHING_TO_UNLOAD="There is nothing to unload.\n",
+THE_COAL_BEGINS_MOVING_DOWN_THE_BELT="The coal begins moving down the belt.\n",
+OOOPS_THESE_ROLLERS_CAN_NEVER_BE_FIXED="Ooops. These rollers can never be fixed!\n",
+STOKERS_PATH_IS_BLOCKED="Stoker's path is blocked!\n",
+THE_CONVEYOR_BELT_STOPS="The conveyor belt stops.\n",
+ACTOR_DIVIDES="%s divides!\n",
+ACTOR_CRITICAL="`%s critical!\n",
+ACTOR_HEAVILY_WOUNDED="`%s heavily wounded.\n",
+MAN="man",
+WOMAN="woman",
+HOW_DARE_YOU_YOUNG_PERSON="How dare you, young %s!\n",
+ACTOR_GRAZED="`%s grazed.\n",
+ACTOR_ATTACKS="`%s attacks!\n",
+ACTOR_PARALYZED="`%s paralyzed!\n",
+ACTOR_CHARMED="%s charmed!\n",
+ACTOR_DODGES="%s dodges!\n",
+BECOMES_VISIBLE="`%s becomes visible!\n",
+HEAVILY="heavily",
+LIGHTLY="lightly",
+BARELY="barely",
+DAMAGED="damaged",
+WOUNDED="wounded",
+ACTOR_HIT_MESSAGE="`%s %s %s.\n",
+OUT_OF_RANGE="Out of range!\n",
+YOUR_HANDS_ARE_FULL="\nYour hands are full.\n",
+WONT_BUDGE="Won't budge !\n",
+THE_TOTAL_IS_TOO_HEAVY="\nThe total is too heavy.\n",
+THAT_IS_NOT_POSSIBLE="That is not possible.\n",
+AFFIDAVIT="--Affidavit--\n\nThe undersigned do hereby vouch for the trust-\nworthiness of %s, who bears this chit, commending same to the members of the Olympus Mons outpost.\n\n*Signed:\n%s\n*",
+YOU_CANT_READ_IT="You can't read it.\n",
+YOU_NEED_A_POOL_CUE="You need a cue stick in your hands.\n",
+GOOD_SHOT_OLD_BEAN="Good shot, old bean!\n",
+THE_ROBOT_ALREADY_HAS_A_HEARTSTONE="The robot already has a heartstone.\n",
+THE_HEARTSTONE_IS_INSTALLED="The heartstone is installed.\n",
+THE_ALIEN_DEVICE_DOESNT_SEEM_TO_BE_FUNCTIONING="The alien device doesn't seem to be functioning.\n",
+NOTHING_APPEARS_TO_HAPPEN="Nothing appears to happen.\n",
+YOU_MUST_BE_IN_PARTY_MODE_TO_ENTER="You must be in party mode to enter.\n",
+YOU_MUST_BE_IN_PARTY_MODE_TO_LEAVE="You must be in party mode to leave.\n",
+THIS_DOOR_IS_NOT_RUSTED="This door is not rusted.\n",
+THE_DOOR_IS_UNSTUCK="The door is unstuck.\n",
+YOU_SEE_YOURSELF="You see yourself.\n",
+YOU_RECEIVE_A_MOMENTARY_IMPRESSION="You receive a momentary impression of a house falling on you.\n",
+THIS_WAS_WORN_LAST_BY_A_DYING_MAN="This was worn last by a dying man.\n",
+THIS_WAS_USED_BY_A_MARTIAN_MEASURING_TIME="This was used by a Martian whose entire life focussed on measuring time.\n",
+THIS_JEWELRY_WAS_WORN_BY="This jewelry was worn by a distinguished Martian, a mayor or \"Agrarian&.\n",
+THESE_FOOTBAGS_WERE_WORN_BY="These footbags were worn by an elderly, distinguished Martian whose job, \"Gatherer&, has no human analog - a combination of undertaker, dustman, and treasurer.\n",
+THIS_SAW_WAS_USED_BY="This saw was used by a Martian doctor, or \"Arborist&, for surgery.\n",
+THIS_DEVICE_WAS_USED_BY="This device was used by a Martian doctor, or \"Arborist&, on patients.\n",
+THIS_SCULPTURE_HAD_GREAT_RITUAL_OR_RELIGIOUS_SIGNIFICANCE="This sculpture had great ritual or religious significance to a city, or \"Grove&, of Martians.  The image is of \"very proud soil&.",
+YOU_RECIEVE_NO_PSYCHIC_IMPRESSIONS="You receive no psychic impressions.\n",
+THE_RADIUM_HAS_BEEN_INSTALLED="The radium has been installed.\n",
+RADIUM_HAS_ALREADY_BEEN_INSTALLED="Radium has already been installed.\n",
+THE_OBJ_IS_FULLY_CHARGED="The %s is fully charged.\n",
+THE_OBJ_ONLY_NEEDED_N_RADIUM_BLOCKS="The %s only needed %d radium blocks.\n",
+THE_HEADGEAR_IS_INSTALLED="The headgear is installed.\n",
+YOU_ARE_COMPLETELY_UNSURE_WHAT_YOU_JUST_DID="You are completely unsure what you just did.\n",
+LIGHTS_FLASH_AND_CHANGE_COLOR_BUT_NOTHING_ELSE_HAPPENS="Lights flash and change color but nothing else happens.\n",
+STATUS_LIGHTS_CHANGE_BUT_YOU_SEE_NO_OTHER_EFFECT="Status lights change but you see no other effect.\n",
+YOU_ACTUATE_THE_MECHANISM_TO_NO_APPARENT_EFFECT="You actuate the mechanism to no apparent effect.\n",
+THE_DREAM_MACHINES_SEEM_TO_HAVE_CEASED_FUNCTIONING="The dream machines seem to have ceased functioning.\n",
+THE_MACHINE_DOES_NOT_WORK="The machine does not work.\n",
+THERE_IS_NOBODY_SITTING_IN_THE_MACHINE="There is nobody sitting in the machine.\n",
+ACTOR_DREAMS_UNTIL_DAWN_WHILE_THE_PARTY_WAITS="%s dreams until dawn while the party waits.\n",
+YOU_TRY_TO_WAKE_YOURSELF_UP="You try to wake yourself up.\n",
+YOU_WAKE_UP="You wake up.\n",
+YOU_ARENT_YET_THAT_INSANE="You aren't yet that insane.\n",
+NO_BACKTALK_FROM_YOU_YOUNG_MAN="No backtalk from you, young man!\n",
+NO_BACKTALK_FROM_YOU_YOUNG_WOMAN="No backtalk from you, young man!\n",
+YOU_FALL_OFF_THE_CLIFF="You fall off the cliff!\n",
+YOU_SHAKE_YOURSELF_AWAKE_FROM_THE_NIGHTMARE="You shake yourself awake from the nightmare.\n",
+YOU_FEEL_YOUR_DREAM_CONSCIOUSNESS_RETURNING="You feel your dream consciousness returning.\n",
+WHAT_AN_ODD_LEVER="What an odd lever!\n",
+STRANGELY_NOTHING_HAPPENS="Strangely, nothing happens.\n",
+STRANGELY_IT_DOESNT_MOVE="Strangely, it doesn't move.\n",
+THE_POD_SPLITS_OPEN="The pod splits open!\n",
+THE_ICE_THAWS="The ice thaws.\n",
+THE_WATER_FREEZES="The water freezes.\n",
+ATTACK_WITH_BARE_HANDS="Attack with bare hands-",
+ATTACK_WITH_WEAPON="Attack with %s-",
+FASTER="...faster!\n",
+YOU_IMAGINE="You imagine ",
+SPRAY_GUN_GREEN_PAINT="The spray gun now contains 20 charges of green paint.\n",
+SPRAY_GUN_WEED_KILLER="The spray gun now contains 10 charges of weed killer.\n",
+SPRAY_GUN_10_MORE_CHARGES="The spray gun has 10 more charges.\n",
+THERE_IS_NOTHING_IN_THE_GUN="There is nothing in the gun.\n",
+YOU_KILLED_THE_PLANT="You killed the plant.\n",
+}
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/lang/it/game.lua b/devtools/create_ultima/files/ultima6/scripts/md/lang/it/game.lua
new file mode 100644
index 0000000000..62aa9af7bc
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/lang/it/game.lua
@@ -0,0 +1,8 @@
+return {
+YOU_SEE="guardare %s",
+ON="Su - ",
+TO="A - ",
+NOTHING="nessuna cosa!\n",
+NO_EFFECT="\nNessun effetto\n",
+IT_IS_STUCK="Si e bloccato.\n"
+}
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/look.lua b/devtools/create_ultima/files/ultima6/scripts/md/look.lua
new file mode 100644
index 0000000000..8465ddaa58
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/look.lua
@@ -0,0 +1,405 @@
+function look_pocketwatch(obj)
+   printl("THE_TIME_IS")
+   local am = true
+   local hour = clock_get_hour()
+   local minute = clock_get_minute()
+   if hour >= 12 then
+   am = false
+   end
+   if hour > 12 then
+   hour = hour - 12
+   end
+   local time = "TIME_AM"
+   if am == false then
+   time = "TIME_PM"
+   end
+   
+   printfl(time, hour, minute)
+end
+
+function look_cannon(obj)
+   if obj.quality ~= 0 then
+      printl("THE_CANNON_WILL_FIRE_STEEL_CANNON_BALLS")
+   end
+end
+
+function look_barrow(obj)
+   if obj.qty == 0 then
+      printl("IT_IS_EMPTY")
+      return
+   end
+   
+   local quality = obj.quality
+   local material
+   if quality == 1 then
+      material = i18n("DIRT")
+   elseif quality == 2 then
+      material = i18n("ROCK")
+   elseif quality == 3 then
+      material = i18n("IRON_ORE")
+   elseif quality == 4 then
+      material = i18n("COAL")
+   end
+   
+   if obj.qty == 1 then
+      printfl("IT_HAS_1_LOAD_OF", material)
+   else
+      printfl("IT_HAS_N_LOADS_OF", obj.qty, material)
+   end
+end
+
+function get_lat_long_string(x, y)
+   local lat_str = "N"
+   local long_str = "W"
+   
+   local lat = math.modf(((y - 512) * 240) / 1024)
+   local long = math.modf(((x - 512) * 360) / 1024)
+   
+   if lat > 0 then
+      lat_str = "S"
+   else
+      if lat == 0 then
+         lat_str = " "
+      end
+   end
+   
+   if long == 180 or long == -180 or long == 0 then
+      long_str = " "
+   else
+      if long < 0 then
+         long_str = "E"
+      end
+   end
+   
+   lat = math.abs(lat)
+   long = 180 - math.abs(long)
+   
+   return lat..lat_str.." "..long..long_str
+end
+
+function look_marker_flag(obj)
+   local names = {
+   [1]="Coprates Chasma",
+   [2]="Arsia Mons",
+   [3]="Pavonis Mons",
+   [4]="Ascraeus Mons",
+   [5]="Alber Tholus",
+   [6]="Elysium Mons",
+   [7]="Hecates Tholus",
+   [8]="Terra Sirenum",
+   [9]="Noctis Labyrinthus",
+   [10]="Deuteronicus Mensae",
+   [11]="Syrtis Major Planum",
+   [12]="Olympus Mons",
+   }
+
+   if obj.z == 0 then
+      if obj.quality <= 12 then
+         if obj.quality ~= 0 then
+            print(names[obj.quality])
+            print(" "..get_lat_long_string(obj.x,obj.y).."\n")
+         end
+      else
+         printl("AARGH")
+      end
+   end
+end
+
+function look_broken_strap(obj)
+   local spector = Actor.get(2)
+   Actor.set_talk_flag(spector, 6)
+   Actor.talk(spector)
+end
+
+function look_metal_woman(obj)
+   if obj.quality ~= 0 then
+      printl("IT_HAS_A_HEARTSTONE")
+   end
+end
+
+function look_covered_martian_seed(obj)
+   if obj.frame_n < 4 then
+      local quality = obj.quality
+      if quality == 15 then
+         printl("IT_IS_GROWING")
+      elseif quality == 16 then
+         printl("IT_IS_RIPE")
+      else
+         printl("IT_IS_NOT_GROWING")
+      end
+   end
+end
+
+function look_sprayer_system(obj)
+   local quality = obj.quality
+   
+   if bit32.btest(quality, 1) then
+      local actor = Actor.get(0x3e)
+      if Actor.get_talk_flag(actor, 5) == true then
+         if bit32.btest(quality, 2) then
+            printl("IT_IS_READY_TO_USE")
+         else
+            printl("THE_RUBBER_IN_THE_SPRAYER_SYSTEM_IS_NOT_FLESH_COLORED")
+         end
+      else
+         printl("IT_IS_READY_TO_USE")
+      end
+   else
+      printl("THERE_IS_NO_RUBBER_IN_THE_SPRAYER_SYSTEM")
+      if Actor.get_talk_flag(actor, 5) == true and bit32.btest(quality, 2) == false then
+         printl("IT_IS_ALSO_NOT_FLESH_COLORED")
+      end
+   end
+end
+
+function look_cabinet(obj)
+   local quality = obj.quality
+   if quality == 0 or quality > 7 then
+      printl("YOU_CANNOT_DECIPHER_WHAT_IT_CONTROLS")
+   else
+      printl("CABINET_"..quality)
+   end
+end
+
+function look_tracking_motor(obj)
+   local quality = obj.quality
+   
+   if bit32.btest(quality, 1) and obj.on_map == true then
+      printl("IT_APPEARS_TO_BE_LOOSE")
+   end
+   
+   if bit32.btest(quality, 2) then
+      printl("IT_APPEARS_TO_BE_BROKEN")
+   end
+   
+end
+
+function look_panel(obj)
+   local qty = obj.qty
+   if qty == 0 then
+      local frame_n = obj.frame_n
+      if frame_n == 0 then
+         printl("THESE_APPEAR_TO_BE_MECHANICAL_CONTROLS")
+      elseif frame_n == 1 then
+         printl("THESE_APPEAR_TO_BE_VALVE_CONTROLS")
+      elseif frame_n == 2 then
+         printl("THESE_APPEAR_TO_BE_ELECTRICAL_CONTROLS")
+      end    
+   elseif qty == 4 then
+      printl("IT_APPEARS_TO_CONTROL_A_DREAM_MACHINE")
+   elseif qty == 5 then
+      printl("IT_APPEARS_TO_CONTROL_A_SPRAY_SYSTEM")
+   elseif qty == 6 then
+      printl("IT_APPEARS_TO_CONTROL_THE_RUBY_LENS_SYSTEM")
+   elseif qty == 7 then
+      printl("IT_APPEARS_TO_CONTROL_THE_CISTERN_VALVES")   
+   else
+      printl("YOU_CANNOT_DECIPHER_ITS_PURPOSE")
+   end
+   
+   local quality = obj.quality
+   if bit32.btest(quality, 1) and obj.on_map == true then
+      printl("THE_PANEL_IS_LOOSE")
+   end
+   
+   if bit32.btest(quality, 2) then
+      printl("THE_PANEL_IS_BROKEN")
+   end
+end
+
+function print_number_of_charges(qty)
+   if qty == 1 then
+      printl("AND_HAS_1_CHARGE_LEFT")
+   else
+      printfl("AND_HAS_N_CHARGES_LEFT", qty)
+   end
+end
+
+function look_portable_sprayer(obj)
+   local contents
+   if obj.quality == 0 then
+      contents = tile_get_description(649)
+   else
+      contents = tile_get_description(640)      
+   end
+   
+   printfl("IT_IS_LOADED_WITH", contents)
+   print_number_of_charges(obj.qty)
+end
+
+function get_weapon_mode_string(obj)
+   local mode
+   local quality = obj.quality
+   if quality == 0 then
+      mode = i18n("COMBINATION")
+   elseif quality == 1 then
+      mode = i18n("RIFLE")
+   else
+      mode = i18n("SHOTGUN")
+   end
+   
+   return mode
+end
+
+function look_ray_gun(obj)
+   printfl("IT_IS_SET_TO", get_weapon_mode_string(obj))
+   print_number_of_charges(obj.qty)
+end
+
+function look_belgian_combine(obj)
+   printfl("IT_IS_SET_TO", get_weapon_mode_string(obj))
+   print(".\n")
+end
+
+function look_switch_bar(obj)
+   local quality = obj.quality
+   if quality == 1 then
+      printl("IT_SEEMS_TO_BE_LOOSE")
+   elseif quality == 2 then
+      printl("IT_IS_NOT_INSTALLED")
+   end
+end
+
+function look_light_source(obj)
+   local obj_n = obj.obj_n
+   local qty = obj.qty
+   local quality = obj.quality
+   
+   if (obj_n == 109 or obj_n == 110) and qty > 1 then
+      return
+   end
+   
+   if quality > 30 then
+      printl("PLENTY_OF")
+   elseif quality > 6 and quality <= 30 then
+      printfl("IT_HAS_N_MORE_MINUTES_OF", quality)
+   elseif quality > 0 and quality <= 6 then
+      printl("ITS_ALMOST_OUT_OF")
+   elseif obj_n == 115 or obj_n == 117 or obj_n == 116 or obj_n == 118 then
+      printl("NO")
+   else
+      printl("PLENTY_OF")
+   end
+   
+   if obj_n == 115 or obj_n == 117 or obj_n == 116 or obj_n == 118 then
+      printl("FUEL")
+   else
+      printl("WICK")
+   end
+   
+end
+
+function look_door(obj)
+   local quality = obj.quality
+   if quality >= 128 then
+      quality = quality - 128
+      if quality >= 64 then
+         printl("IT_IS_APPARENTLY_RUSTED_SHUT")
+      else
+         printl("IT_IS_APPARENTLY_LOCKED")
+      end
+   end
+end
+
+function look_obelisk(obj)
+   if obj.quality == 0 then
+      return
+   end
+   
+   local ui_style = game_get_ui_style()
+   
+   canvas_show()
+   canvas_hide_all_sprites()
+   canvas_set_opacity(0xff);
+   canvas_set_update_interval(25)
+   canvas_rotate_game_palette(true)
+   
+   local obelisk = sprite_new(nil, 184, 0, true)
+   
+   local text_sprite
+   --local text_sprite_bg
+   
+   if ui_style == UI_STYLE_ORIG then
+      canvas_set_solid_bg(false)
+   else
+      text_sprite = sprite_new(nil, 8, 164, true)
+      text_sprite.text_align_centre = true
+      text_sprite.text_color = 15
+      text_sprite.text = "Obelisk."
+      obelisk.x = 96
+      obelisk.y = 41
+   end
+   
+   obelisk.image = image_load("mdream.lzc", obj.quality-1)
+   
+   local input = nil
+   while input == nil do
+      canvas_update()
+      input = input_poll()
+      if input ~= nil then
+         break
+      end
+   end
+
+   canvas_set_solid_bg(true)
+   canvas_rotate_game_palette(false)
+   canvas_hide()
+end
+
+local look_usecode = {
+[45]=look_belgian_combine,
+[91]=look_pocketwatch,
+[98]=look_pocketwatch,
+[109]=look_light_source, -- OBJ_TORCH
+[110]=look_light_source, -- OBJ_LIT_TORCH
+[111]=look_light_source, -- OBJ_CANDLESTICK
+[112]=look_light_source, -- OBJ_LIT_CANDLE
+[113]=look_light_source, -- OBJ_CANDELABRA
+[114]=look_light_source, -- OBJ_LIT_CANDELABRA
+[115]=look_light_source, -- OBJ_OIL_LAMP
+[116]=look_light_source, -- OBJ_LIT_OIL_LAMP
+[117]=look_light_source, -- OBJ_LANTERN
+[118]=look_light_source, -- OBJ_LIT_LANTERN
+[129]=look_portable_sprayer, --OBJ_WEED_SPRAYER
+[172]=look_marker_flag,
+[179]=look_door, --OBJ_CLOSED_DOOR
+[227]=look_door, --OBJ_DOOR3
+[240]=look_ray_gun, --OBJ_HEAT_RAY_GUN
+[241]=look_ray_gun, --OBJ_FREEZE_RAY_GUN
+[251]=look_covered_martian_seed,
+[261]=look_portable_sprayer, --OBJ_SPRAY_GUN
+[268]=look_barrow, --OBJ_MARTIAN_WHEEL_BARROW
+[276]=look_sprayer_system,
+[287]=look_metal_woman,
+[292]=look_obelisk,
+[314]=look_tracking_motor,
+[333]=look_cannon,
+[410]=look_barrow, --OBJ_RAIL_CAR
+[411]=look_switch_bar,
+[457]=look_cabinet,
+[458]=look_panel,
+[460]=look_broken_strap,
+}
+
+function look_obj(obj)
+   printfl("YOU_SEE", obj.look_string);
+   
+   --FIXME usecode look description should be lua code.
+   if usecode_look(obj) then
+      print("\n")
+      return false
+   end
+   
+   print(".\n\n");
+   
+   if look_usecode[obj.obj_n] ~= nil then
+      look_usecode[obj.obj_n](obj)
+      print("\n")
+   end
+   
+   if is_container_obj(obj.obj_n) then
+      search(obj)
+   end
+   
+   return false
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/player.lua b/devtools/create_ultima/files/ultima6/scripts/md/player.lua
new file mode 100644
index 0000000000..4b8084ed0c
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/player.lua
@@ -0,0 +1,349 @@
+local PLAYER_CAN_MOVE = 0
+local PLAYER_BLOCKED = 1
+local PLAYER_FORCE_MOVE = 2
+
+local map_entrance_tbl = {
+    {x=0x43,  y=0x51,  z=0x1},
+    {x=0x80,  y=0x8D,  z=0x0},
+    {x=0x76,  y=0x0F2, z=0x3},
+    {x=0x7A,  y=0x0C,  z=0x3},
+    {x=0x9A,  y=0x41,  z=0x4},
+    {x=0x2B2, y=0x1CC, z=0x0},
+    {x=0x73,  y=0x40,  z=0x4},
+    {x=0x29D, y=0x1CE, z=0x0},
+    {x=0x0B3, y=0x0E1, z=0x4},
+    {x=0x27B, y=0x1F1, z=0x0},
+    {x=0x0C3, y=0x70,  z=0x1},
+    {x=0x0CB, y=0x1D1, z=0x0},
+    {x=0x24,  y=0x0F1, z=0x1},
+    {x=0x31A, y=0x232, z=0x0},
+    {x=0x5C,  y=0x0F1, z=0x1},
+    {x=0x34C, y=0x25A, z=0x0},
+    {x=0x7C,  y=0x28,  z=0x4},
+    {x=0x13E, y=0x118, z=0x0},
+    {x=0x0A,  y=0x61,  z=0x5},
+    {x=0x3B7, y=0x1C4, z=0x0},
+    {x=0x5C,  y=0x0B1, z=0x5},
+    {x=0x3DC, y=0x1DD, z=0x0},
+    {x=0x5E,  y=0x29,  z=0x4},
+    {x=0x227, y=0x1ab, z=0x0}
+}
+
+local pod_teleport_tbl = {
+    {x=0xCA,  y=0x295},
+    {x=0x34D, y=0x295},
+    {x=0x13A, y=0x17A},
+    {x=0x2CD, y=0x1FA}
+}
+
+function player_pass()
+    printl("PASS")
+    update_conveyor_belt(true)
+end
+
+--returns true if the player can move to rel_x, rel_y
+function player_before_move_action(rel_x, rel_y)
+    if rel_x ~= 0 and rel_y ~= 0 then
+        return PLAYER_CAN_MOVE
+    end
+
+    local player_loc = player_get_location()
+
+    if rel_x == 0 and rel_y == 1 then
+        local tile_num = map_get_tile_num(player_loc)
+        -- Fall off cliff logic
+        if tile_num >= 384 and tile_num <= 387 then
+            return PLAYER_FORCE_MOVE
+        end
+    end
+
+    local z = player_loc.z
+    local x = wrap_coord(player_loc.x+rel_x,z)
+    local y = wrap_coord(player_loc.y+rel_y,z)
+
+    for obj in objs_at_loc(x, y, z) do
+        local obj_n = obj.obj_n
+        if obj_n == 268 then --wheelbarrow
+        move_wheelbarrow(obj, rel_x, rel_y)
+        if can_move_obj(obj, rel_x, rel_y) then
+            obj.x = obj.x + rel_x
+            obj.y = obj.y + rel_y
+        end
+        elseif obj_n == 410 and can_move_obj(obj, rel_x, rel_y) then --railcar
+        move_rail_cart(obj, rel_x, rel_y)
+        elseif obj_n == 441 then --assembled drill
+        move_drill(obj, rel_x, rel_y) --update drill direction
+        if can_move_drill(obj, rel_x, rel_y) then
+            obj.x = obj.x + rel_x
+            obj.y = obj.y + rel_y
+        end
+        end
+    end
+
+    return PLAYER_CAN_MOVE
+end
+
+function update_objects_around_party()
+    local loc = player_get_location()
+    for obj in find_obj_from_area(wrap_coord(loc.x - 5, loc.z), wrap_coord(loc.y - 5, loc.z), loc.z, 11, 11) do
+        local obj_n = obj.obj_n
+        if (obj_n == 227 and Actor.get_talk_flag(0x73, 2)) or --OBJ_DOOR3
+                (obj_n == 179 and Actor.get_talk_flag(0x73, 4)) then --OBJ_CLOSED_DOOR
+            if bit32.band(obj.quality, 0x80) == 0 then -- check if the door is stuck
+                local base_frame = bit32.band(obj.frame_n, 2)
+                local actor = map_get_actor(obj.xyz)
+                if actor ~= nil then
+                    if map_is_on_screen(obj.xyz) then
+                        play_door_sfx()
+                    end
+                    obj.frame_n = base_frame + 9
+                else
+                    actor = map_get_actor(obj.x + movement_offset_x_tbl[base_frame + 1], obj.y + movement_offset_y_tbl[base_frame + 1], obj.z)
+                    if actor == nil then
+                        actor = map_get_actor(obj.x + movement_offset_x_tbl[base_frame + 4 + 1], obj.y + movement_offset_y_tbl[base_frame + 4 + 1], obj.z)
+                    end
+
+                    if actor ~= nil and map_is_on_screen(obj.xyz) then
+                        play_door_sfx()
+                        if obj.frame_n < 4 then
+                            obj.frame_n = (base_frame) + 5
+                        elseif obj.frame_n < 8 then
+                            obj.frame_n = (base_frame) + 1
+                        else
+                            obj.frame_n = (base_frame) + 5
+                        end
+                    else
+                        if obj.frame_n == 5 then
+                            obj.frame_n = 1
+                        elseif obj.frame_n == 7 then
+                            obj.frame_n = 3
+                        end
+
+                    end
+                end
+            end
+        elseif obj_n == 301 then --OBJ_REFLECTIVE_SURFACE
+            if obj.frame_n < 3 then
+                local actor = map_get_actor(obj.x, obj.y + 1, obj.z)
+                if actor ~= nil then
+                    local actor_num = actor.actor_num
+                    if actor_num >= 0x70 or actor_num == 0x5d or (actor_num >= 0x6a and actor_num <= 0x6c) then
+                        obj.frame_n = 0
+                    elseif (actor_num < 0x20 and actor_num ~= 6)
+                            or (actor_num >= 0x2a and actor_num <= 0x5c)
+                            or actor_num == 0x60 or actor_num == 0x69 or actor_num == 0x6d then
+                        obj.frame_n = 1
+                    else
+                        obj.frame_n = 2
+                    end
+                else
+                    obj.frame_n = 0
+                end
+            end
+        end
+
+    end
+
+end
+
+function player_post_move_action(did_move)
+    local player_loc = player_get_location()
+
+    if did_move then
+        if map_get_tile_num(player_loc, true) == 0x6f then
+            printl("FASTER")
+            --FIXME update falling brick animation speed here.
+        end
+
+        update_conveyor_belt(true)
+        update_objects_around_party()
+
+        for obj in objs_at_loc(player_loc) do
+            local obj_n = obj.obj_n
+            if (obj_n == 175 or obj_n == 163 or obj_n == 180 or obj_n == 178 or (obj_n == 197 and obj.frame_n == 3) or obj_n == 210) then
+                if  player_is_in_solo_mode() then
+                    if obj_n == 163 or obj_n == 178 then
+                        printl("YOU_MUST_BE_IN_PARTY_MODE_TO_LEAVE")
+                    else
+                        printl("YOU_MUST_BE_IN_PARTY_MODE_TO_ENTER")
+                    end
+                    return
+                end
+                if obj_n == 175 then --Mine entry
+                    for transfer_obj in objs_at_loc(player_loc.x, player_loc.y-1, player_loc.z) do
+                        transfer_obj.x = map_entrance_tbl[obj.quality].x
+                        transfer_obj.y = map_entrance_tbl[obj.quality].y-1
+                        transfer_obj.z = map_entrance_tbl[obj.quality].z
+                    end
+                elseif obj_n == 163 then --Mine exit
+                    for transfer_obj in objs_at_loc(player_loc.x, player_loc.y+1, player_loc.z) do
+                        transfer_obj.x = map_entrance_tbl[obj.quality].x
+                        transfer_obj.y = map_entrance_tbl[obj.quality].y+2
+                        transfer_obj.z = map_entrance_tbl[obj.quality].z
+                    end
+                elseif obj_n == 197 then
+                    if Actor.get_talk_flag(0x73, 4) then
+                        if obj.quality == 0 then
+                            printl("NOTHING_APPEARS_TO_HAPPEN")
+                        elseif obj.quality <= 4 then
+                            local pod_exit = pod_teleport_tbl[obj.quality]
+                            advance_time(0)
+                            party_use_entrance(player_loc.x, player_loc.y, player_loc.z, pod_exit.x, pod_exit.y, 0)
+                        end
+                    else
+                        printl("THE_ALIEN_DEVICE_DOESNT_SEEM_TO_BE_FUNCTIONING")
+                    end
+                    return
+                end
+                advance_time(0)
+                party_use_entrance(player_loc.x, player_loc.y, player_loc.z, map_entrance_tbl[obj.quality])
+            elseif obj_n == 461 then --OBJ_DREAM_TELEPORTER
+                --FIXME add logic here.
+                local obelisk = map_get_obj(player_loc.x, player_loc.y - 1, player_loc.z, 292, true)
+                if obelisk ~= nil then
+                    --FIXME fade here.
+                end
+                local dream_actor = Actor.get(0)
+                if bit32.band(obj.status, 0xe5) ~= 0xa5 or dream_actor.hp > 4 then
+                    if bit32.band(obj.status, 0xe5) == 0 then
+                        player_move(obj.quality, obj.qty, player_loc.z)
+                        advance_time(0)
+                    else
+                        dreamworld_cleanup_state(obj)
+                    end
+
+                end
+            elseif obj_n == 462 then --OBJ_DREAM_TELEPORTER1 Walk on walls object
+                local dream_actor = Actor.get(0)
+                if obj.quality == 0 then
+                    dream_actor.frame_n = dream_actor.old_frame_n
+                    dream_actor.obj_n = dream_actor.base_obj_n
+                else
+                    dream_actor.frame_n = 0
+                    if player_get_gender() == 0 then
+                        dream_actor.obj_n = 318
+                    else
+                        dream_actor.obj_n = 319
+                    end
+                end
+            elseif obj_n == 465 then --direction control modifier
+                --FIXME
+            end
+        end
+    else
+        actor_map_dmg(Actor.get_player_actor(), player_loc.x, player_loc.y, player_loc.z)
+        play_md_sfx(0)
+    end
+
+end
+
+function can_move_drill(drill, rel_x, rel_y)
+    if can_move_obj(drill, rel_x, rel_y) then
+        return true
+    end
+
+    local z = drill.z
+    local x = wrap_coord(drill.x+rel_x,z)
+    local y = wrap_coord(drill.y+rel_y,z)
+
+    if map_get_obj(x, y, z, 175, true) == nil then --mine entrance
+    return false
+    end
+
+    for obj in objs_at_loc(x, y, z) do
+        if is_blood(obj.obj_n) == false then
+            return false
+        end
+    end
+
+    return true
+end
+
+local player_readied_weapons
+function weapon_select()
+    player_readied_weapons = {}
+    local player = Actor.get_player_actor()
+    for obj in actor_inventory(player) do
+        if obj.readied and get_weapon_damage(obj) > 0 then
+            player_readied_weapons[#player_readied_weapons+1] = obj
+        end
+    end
+
+    if #player_readied_weapons == 0 then
+        printl("ATTACK_WITH_BARE_HANDS")
+        return player
+    else
+        local weapon = player_readied_weapons[1]
+        table.remove(player_readied_weapons, 1)
+        printfl("ATTACK_WITH_WEAPON", weapon.name)
+        return weapon
+    end
+end
+
+function select_next_weapon()
+    if #player_readied_weapons == 0 then
+        return nil
+    end
+
+    local weapon = player_readied_weapons[1]
+    table.remove(player_readied_weapons, 1)
+    if weapon ~= nil then
+        print("\n")
+        printfl("ATTACK_WITH_WEAPON", weapon.name)
+    end
+    return weapon
+end
+
+function select_attack_target()
+    local target_loc = get_target()
+    g_selected_obj = get_actor_or_obj_from_loc(target_loc)
+
+    local name
+    if g_selected_obj ~= nil then
+        name = g_selected_obj.name
+    else
+        name = tile_get_description(map_get_tile_num(target_loc))
+    end
+    print(name..".\n")
+
+    return target_loc
+end
+
+function player_attack()
+    local weapon = weapon_select()
+
+    repeat
+        local target_loc = select_attack_target()
+        if target_loc == nil then
+            printl("WHAT")
+            return
+        end
+
+        player_attack_with_weapon(weapon, target_loc)
+        weapon = select_next_weapon()
+    until weapon == nil
+end
+
+function player_attack_with_weapon(weapon, target_loc)
+    local player = Actor.get_player_actor()
+    local obj_n = weapon.obj_n
+
+    if out_of_ammo(player, weapon, true) then
+        return
+    end
+
+    if obj_n == 313 then --OBJ_M60_MACHINE_GUN
+        --FIXME MACHINE GUN LOGIC HERE
+    else
+        local result = attack_target_with_weapon(player, target_loc.x, target_loc.y, weapon)
+        if result == 2 then
+            printl("OUT_OF_RANGE")
+            play_md_sfx(5)
+        elseif result == 3 then
+            printl("THAT_IS_NOT_POSSIBLE")
+            play_md_sfx(5)
+        end
+
+    end
+
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/talk.lua b/devtools/create_ultima/files/ultima6/scripts/md/talk.lua
new file mode 100644
index 0000000000..b1196f19f0
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/talk.lua
@@ -0,0 +1,184 @@
+function open_gates_at_olympus_mons()
+   local gate = map_get_obj(0x2c3, 0x1f3, 0, 181) -- OBJ_GATE
+   if gate ~= nil then
+      gate.x = 0x2c2
+      gate.frame_n = 3
+   else
+      printl("AARGH")
+   end
+   
+   gate = map_get_obj(0x2c4, 0x1f3, 0, 181) -- OBJ_GATE
+   if gate ~= nil then
+      gate.frame_n = 7
+   else
+      printl("AARGH")
+   end
+   
+end
+
+function open_dream_machine_door()
+   local door = map_get_obj(0x2c7, 0x1dc, 0, 152) --OBJ_DOOR
+   if door ~= nil then
+      door.frame_n = 7
+   end
+end
+
+function talk_script_fix_panels()
+   local numPanels = 0
+   for actor in party_members() do
+      for obj in actor_inventory(actor) do
+         if obj.obj_n == 458 then --OBJ_PANEL
+            numPanels = numPanels + 1
+            play_md_sfx(4)
+            obj.quality = bit32.band(obj.quality, 0xfd)
+            obj.qty = 4
+         end
+      end
+   end
+
+   if numPanels <= 1 then
+      Actor.clear_talk_flag(0x39, 3)
+   else
+      Actor.set_talk_flag(0x39, 3)
+   end
+
+end
+
+function talk_script_spawn_monster_footprints()
+   g_objlist_1d22_unk = 0
+   local player_loc = player_get_location()
+   for i=0,5 do
+      local monster = Actor.new(145, player_loc.x, player_loc.y, player_loc.z) --OBJ_MONSTER_FOOTPRINTS
+
+      actor_init(monster)
+      toss_actor(monster, player_loc.x, player_loc.y, player_loc.z, 0)
+      monster.wt = 0x8
+      g_objlist_1d22_unk = g_objlist_1d22_unk + 1
+   end
+end
+
+local talk_script_tbl = {
+   [1]=talk_script_fix_panels,
+   [6]=open_gates_at_olympus_mons,
+   [7]=open_dream_machine_door,
+   [9]=function() talk_script_status = 9 end,
+   [0xA]=function() talk_script_status = 0xA end,
+   [0x35]=talk_script_spawn_monster_footprints,
+}
+
+function talk_script(script_number)
+   if talk_script_tbl[script_number] ~= nil then
+      talk_script_tbl[script_number]()
+   else
+      print("Attempting to run talk script #"..script_number.."\n")
+   end
+end
+
+local talk_script_status = -1
+
+local talk_script_post_action_tbl = {
+   [0x9]=function() play_end_sequence() end,
+   [0xA]=function() end,
+   [0x34]=wake_from_dream,
+   [0x36]=wake_from_dream,
+   [0x38]=function() end,
+   [0x65]=function() end,
+   [0x66]=function() end,
+   [0x67]=function() end,
+   [0x68]=function() end,
+   [0x69]=function() end,
+}
+
+function talk_to_actor(actor)
+   local actor_num = actor.actor_num
+
+   if actor_num < 2 then
+      if g_in_dream_mode then
+         printl("YOU_TRY_TO_WAKE_YOURSELF_UP")
+         local player_loc = player_get_location()
+         if player_loc.z ~= 3 then
+            wake_from_dream()
+         end
+      elseif player_is_in_solo_mode() then
+         printl("NOT_WHILE_IN_SOLO_MODE")
+      else
+         printl("YOU_ARENT_YET_THAT_INSANE")
+      end
+      return true
+   end
+
+   if actor.obj_n == 391 then --your mother
+      if player_get_gender() == 0 then
+         printl("NO_BACKTALK_FROM_YOU_YOUNG_MAN")
+      else
+         printl("NO_BACKTALK_FROM_YOU_YOUNG_WOMAN")
+      end
+      return true
+   end
+
+   print(actor.name.."\n")
+   Actor.talk(actor_num)
+   print("\n")
+
+   if talk_script_post_action_tbl[talk_script_status] ~= nil then
+      talk_script_post_action_tbl[talk_script_status]()
+   end
+   talk_script_status = -1
+
+   return true
+end
+
+function talk_conveyor()
+   talk_to_actor(Actor.get(0x72))
+end
+
+function talk_tower()
+   talk_to_actor(Actor.get(0x73))
+end
+
+function talk_dream_machine()
+   talk_to_actor(Actor.get(0x74))
+end
+
+local talk_obj_tbl = {
+   [0xC] = function() printl("YOU_RECEIVE_A_MOMENTARY_IMPRESSION") end,
+   [0x5C] = function() printl("THIS_WAS_WORN_LAST_BY_A_DYING_MAN") end,
+   [0x64] = talk_dream_machine,
+   [0xBC] = talk_conveyor,
+   [0xBF] = talk_conveyor,
+   [0xC0] = talk_conveyor,
+   [0xC8] = talk_tower,
+   [0xC9] = talk_tower,
+   [0xD6] = talk_tower,
+   [0xD7] = talk_tower,
+   [0xE7] = function() printl("THIS_WAS_USED_BY_A_MARTIAN_MEASURING_TIME") end,
+   [0xEA] = function() printl("THIS_JEWELRY_WAS_WORN_BY") end,
+   [0xF6] = function() printl("THESE_FOOTBAGS_WERE_WORN_BY") end,
+   [0xF7] = function() printl("THIS_SAW_WAS_USED_BY") end,
+   [0xF9] = function() printl("THIS_DEVICE_WAS_USED_BY") end,
+   [0x113] = function() printl("THIS_SCULPTURE_HAD_GREAT_RITUAL_OR_RELIGIOUS_SIGNIFICANCE") end,
+   [0x120] = talk_dream_machine,
+   [0x121] = talk_dream_machine,
+   [0x122] = talk_dream_machine,
+
+}
+
+function talk_to_obj(obj)
+
+   local player = Actor.get_player_actor()
+   if actor_is_affected_by_green_berries(player.actor_num) then
+      if bit32.band(obj.status, 1) == 1 then
+         local talk_function = talk_obj_tbl[obj.obj_n]
+         if talk_function ~= nil then
+            talk_function()
+            return true
+         end
+      else
+         printl("YOU_RECIEVE_NO_PSYCHIC_IMPRESSIONS")
+      end
+   else
+      printl("NOTHING")
+   end
+
+   return false
+end
\ No newline at end of file
diff --git a/devtools/create_ultima/files/ultima6/scripts/md/usecode.lua b/devtools/create_ultima/files/ultima6/scripts/md/usecode.lua
new file mode 100644
index 0000000000..df0e77f10e
--- /dev/null
+++ b/devtools/create_ultima/files/ultima6/scripts/md/usecode.lua
@@ -0,0 +1,2460 @@
+local USE_EVENT_USE = 0x01
+local USE_EVENT_MOVE = 0x40
+local USE_EVENT_READY = 0x0100
+
+function search_container(obj)
+	local child
+	for child in container_objs(obj) do
+		Obj.moveToMap(child, obj.x, obj.y, obj.z)
+	end
+end
+
+function use_door(obj, actor)
+	if bit32.btest(obj.quality, 0x80) then
+	  printl("IT_IS_LOCKED")
+	  return
+	end
+
+   if map_get_actor(obj.x, obj.y, obj.z) ~= nil then
+      printl("BLOCKED")
+      return
+   end
+	
+   obj.frame_n = bit32.bxor(obj.frame_n, 2)
+
+end
+
+function use_crate(obj, target_obj, actor)
+	if target_obj.frame_n == 2 then
+		target_obj.frame_n = 1
+		printl("YOU_PRIED_THE_NAILS_OUT_OF_THE_CRATE")
+	else
+		if target_obj.frame_n == 1 and obj.obj_n == 273 then
+			target_obj.frame_n = 2
+			printl("YOU_NAIL_THE_CRATE_SHUT")
+		else
+			printl("IT_HAS_NO_EFFECT")
+		end
+	end
+end
+
+function use_container(obj, actor)
+	if obj.frame_n == 2 then
+		if obj.obj_n == 86 or obj.obj_n == 284 then
+			printl("IT_IS_NAILED_SHUT")
+		else
+			printl("IT_IS_LOCKED")
+		end
+	else
+		if obj.frame_n == 1 then
+			obj.frame_n = 0
+			search_container(obj)
+		else
+			obj.frame_n = 1
+		end
+	end
+end
+
+function use_hammer_on_oxium_geode(obj, target_obj, actor)
+   if target_obj.frame_n ~= 0 then
+      printl("IT_HAS_NO_EFFECT")
+      return
+   end
+
+   play_md_sfx(0x20)
+   target_obj.frame_n = 1 --break the geode open
+
+   if target_obj.on_map then
+      local oxium = Obj.new(131) --OBJ_BLOB_OF_OXIUM
+      oxium.qty = math.random(1, 50) + math.random(1, 50)
+      Obj.moveToMap(oxium, target_obj.x, target_obj.y, target_obj.z)
+   else
+      --FIXME add to actor's inventory
+      local oxium = Actor.inv_get_obj_n(actor, 131) --OBJ_BLOB_OF_OXIUM
+      local qty = math.random(1, 50) + math.random(1, 50)
+      if oxium ~= nil then
+         oxium.qty = oxium.qty + qty
+      else
+         oxium = Obj.new(131, 0, 0, qty) --OBJ_BLOB_OF_OXIUM
+         Actor.inv_add_obj(actor, oxium)
+      end
+   end
+   
+end
+
+function use_prybar_on_hatch(obj, target_obj, actor)
+
+	if actor.actor_num ~= 1 then
+		printfl("IS_NOT_STRONG_ENOUGH", actor.name)
+		return
+	end
+	
+	local tesla = Actor.get(16)
+	if Actor.get_talk_flag(tesla, 4) == false then
+		Actor.set_talk_flag(tesla, 2)
+		Actor.talk(tesla)
+	else
+		play_midgame_sequence(1)
+		
+		Actor.set_talk_flag(tesla, 5)
+		target_obj.obj_n = 428
+		target_obj.frame_n = 0;
+		target_obj.x = target_obj.x + 1
+		target_obj.y = target_obj.y + 1
+		
+		local blood = Actor.get(18)
+		Actor.set_talk_flag(blood, 3)
+		Actor.set_talk_flag(blood, 6)
+		Actor.talk(blood)
+	end
+end
+
+function use_sextant(obj, actor)
+	if actor.z ~= 0 then
+		printl("NOT_WHILE_UNDERGROUND")
+		return
+	end
+
+	local lat_str = "N"
+	local long_str = "W"
+	
+	local lat = math.modf(((actor.y - 512) * 240) / 1024)
+	local long = math.modf(((actor.x - 512) * 360) / 1024)
+	
+	if lat > 0 then
+		lat_str = "S"
+	else
+		if lat == 0 then
+			lat_str = " "
+		end
+	end
+	
+	if long == 180 or long == -180 or long == 0 then
+		long_str = " "
+	else
+		if long < 0 then
+			long_str = "E"
+		end
+	end
+	
+	lat = math.abs(lat)
+	long = 180 - math.abs(long)
+	printl("YOU_ARE_SOMEWHERE_NEAR")
+	print(" \nLat:" ..lat.." "..lat_str.."\nLong:"..long.." "..long_str.."\n")
+end
+
+function use_berry(obj, actor)
+   local actor_num = actor.actor_num
+   if actor_num == 6 then
+      printl("A_MECHANICAL_PERSON_CANT_EAT_BERRIES")
+      return
+   end
+   
+   play_md_sfx(0x32)
+   local berry_type = obj.obj_n - 73 --OBJ_BERRY
+   local first_berry = true
+   
+   if (berry_type == 0 and actor_is_affected_by_purple_berries(actor_num))
+      or (berry_type == 1 and actor_is_affected_by_green_berries(actor_num))
+      or (berry_type == 2 and actor_is_affected_by_brown_berries(actor_num)) then
+      printl("YOU_EAT_A_MARTIAN_BERRY_YOU_FEEL_AN_INCREASE_IN_THE_STRANGE")
+   else
+      printl("YOU_EAT_A_MARTIAN_BERRY_YOU_FEEL_A_STRANGE")
+   end
+
+   if berry_type == 0 then
+      printl("RELATIONSHIP_WITH_THINGS_AROUND_YOU")
+      actor_increment_purple_berry_count(actor_num)
+   elseif berry_type == 1 then
+      printl("SENSITIVITY_TO_THE_FEELINGS_OF_OBJECTS_AROUND_YOU")
+      actor_increment_green_berry_count(actor_num)
+   elseif berry_type == 2 then
+      printl("SENSE_OF_YOUR_SPATIAL_LOCATION")
+      actor_increment_brown_berry_count(actor_num)
+   elseif berry_type == 3 then
+      printl("SUDDEN_FLUSH_DIZZINESS_AND_NAUSEA")
+      actor.poisoned = false
+      Actor.hit(actor, math.random(5, 0x14) + math.random(5, 0x14))
+      local counter = actor_get_blue_berry_counter()
+      actor_set_blue_berry_counter(counter + math.random(1, 2))
+   end
+   
+   if obj.qty == 1 then
+      Obj.removeFromEngine(obj)
+   else
+      obj.qty = obj.qty - 1
+   end
+end
+
+function use_misc_text(obj)
+
+	local obj_n = obj.obj_n
+	if obj_n == 65 or obj_n == 66 or obj_n == 67 or obj_n == 263 or obj_n == 267 or obj_n == 327 then
+		printl("YOU_CANT_DIG_ANY_DEEPER")
+	elseif obj_n == 427 then
+		printl("IT_IS_STUCK")
+	elseif obj_n == 288 then
+		printl("THE_CONTROL_PANEL_OPERATES_THE_DREAM_MACHINE")
+	elseif obj_n == 199 then
+		printl("YOU_NEED_TO_USE_PLIERS_TO_ATTACH_THE_CABLE")
+	elseif obj_n == 131 then
+		printl("YOU_WILL_CHEW_IT_INSTINCTIVELY")
+	elseif obj_n == 184 then
+		printl("THE_PLATE_IN_THE_CAMERA_HAS_ALREADY_BEEN_EXPOSED")
+	elseif obj_n == 442 or obj_n == 443 or obj_n == 444 then
+		printl("YOU_MUST_USE_A_SHOVEL_TO_MOVE_THAT")
+	elseif obj_n == 293 then
+		printl("YOU_CANT_DETERMINE_HOW_TO_READ_THE_TIME")
+	elseif obj_n == 77 or obj_n == 78 then
+		printl("THE_BERRIES_ARE_NOT_EDIBLE")
+	elseif obj_n == 323 then
+		printl("YOU_DONT_KNOW_HOW_IT_WORKS")
+	else
+		printl("IT_HAS_NO_EFFECT")
+	end
+end
+
+function get_pile_obj_num(map_tile)
+	if (map_tile >= 32 and map_tile <= 36) or map_tile == 12 or map_tile == 13 or (map_tile >= 40 and map_tile <= 63) then
+		return 258 --OBJ_DIRT_PILE
+	elseif map_tile == 124 or map_tile == 125 or map_tile == 127 then
+		return 256 --OBJ_CHUNK_OF_ICE
+	end
+
+	return 0 --CANNOT DIG HERE 
+end
+
+function get_free_location_around_actor(actor)
+	local x_tbl = {-1,0,1,1,1,0,-1,-1}
+	local y_tbl = {-1,-1,-1,0,1,1,1,0}
+	local pos = {}
+	local i
+
+	pos.z = actor.z
+	
+	for i=1,8 do
+		pos.x = actor.x + x_tbl[i]
+		pos.y = actor.y + y_tbl[i]
+		if map_can_put(pos.x,pos.y,pos.z) == true and map_get_obj(pos.x,pos.y,pos.z) == nil then
+			return pos
+		end
+	end
+	
+	return nil
+end
+
+function use_tool_on_ground(obj, target_obj, actor, target_x, target_y, target_z)
+	if target_obj ~= nil then
+		--check tile flag here.
+		printl("THE_GROUND_IS_NOT_CLEAR_FOR_DIGGING")
+		return
+	end
+		
+	local map_tile = map_get_tile_num(target_x, target_y, target_z)
+	
+	local pile_obj_num = get_pile_obj_num(map_tile)
+	
+	if pile_obj_num == 0 then
+		printl("IT_HAS_NO_EFFECT")
+		return
+	end
+
+	local hole_obj_num = 257
+	
+	if pile_obj_num == 256 then
+		hole_obj_num = 255
+	end
+	
+	local hole = Obj.new(hole_obj_num)
+	hole.temporary = true
+	Obj.moveToMap(hole, target_x, target_y, target_z)
+
+	local loc = get_free_location_around_actor(actor)
+	
+	if loc ~= nil then
+		local pile = Obj.new(pile_obj_num)
+		pile.temporary = true
+		Obj.moveToMap(pile, loc.x, loc.y, loc.z)
+	else
+		Obj.removeFromEngine(hole)
+		printl("YOU_CANT_DIG_HERE")
+	end
+end
+
+function use_shovel_on_pile_to_hole(obj, target_obj, to_obj, actor)
+	Obj.removeFromEngine(target_obj)
+	Obj.removeFromEngine(to_obj)
+
+	play_md_sfx(0x1b)
+   play_md_sfx(0x1b)
+	printl("YOU_FILLED_IN_THE_HOLE")
+end
+
+function use_shovel_on_ore_to_container(obj, target_obj, to_obj, actor)
+   print("\n")
+   local ore_quality = get_ore_container_quality(target_obj.obj_n)
+   if to_obj.obj_n == 268 then --OBJ_MARTIAN_WHEEL_BARROW
+      if to_obj.qty ~= 1 then
+         play_md_sfx(0x1b)
+         to_obj.qty = 1
+         to_obj.quality = ore_quality
+         printfl("YOU_PUT_THE_ORE_INTO_THE_WHEELBARROW", target_obj.name)
+         Obj.removeFromEngine(target_obj)
+      else
+         printl("THERE_IS_NO_MORE_ROOM")
+         play_md_sfx(5)
+         return false
+      end
+   elseif to_obj.obj_n == 410 then --OBJ_RAIL_CAR
+      local qty = to_obj.qty
+      if to_obj.qty < 7 then
+         if to_obj.qty > 0 and to_obj.quality ~= ore_quality then
+            printl("YOU_CANT_MIX_DIFFERENT_THINGS_IN_THE_SAME_LOAD")
+            play_md_sfx(5)
+            return false
+         else
+            to_obj.quality = ore_quality
+            to_obj.qty = to_obj.qty + 1
+            if to_obj.qty == 1 or to_obj.qty == 7 then
+               to_obj.frame_n = to_obj.frame_n + 2
+            end
+            printfl("YOU_PUT_THE_ORE_INTO_THE_RAIL_CAR", target_obj.name)
+            Obj.removeFromEngine(target_obj)
+         end
+      else
+         printl("THERE_IS_NO_MORE_ROOM")
+         play_md_sfx(5)
+         return false
+      end
+   end
+   
+   return true
+end
+
+function use_shovel_to_unload_container(obj, target_obj, to_obj, actor)
+   if target_obj.qty == 0 then
+      printl("THERE_IS_NOTHING_TO_UNLOAD")
+      play_md_sfx(5)
+      return
+   end
+   
+   local ore = Obj.new(get_obj_num_from_ore_quality(target_obj.quality))
+   
+   --FIXME if to_obj == nil do something
+   
+   local success_flag = false
+   if to_obj.obj_n == 268 or to_obj.obj_n == 410 then --OBJ_MARTIAN_WHEEL_BARROW
+      success_flag = use_shovel_on_ore_to_container(obj, ore, to_obj, actor)
+   elseif to_obj.obj_n == 233 then --OBJ_FURNACE
+      success_flag = use_shovel_on_ore_to_furnace(obj, ore, to_obj, actor)
+   elseif to_obj.obj_n == 257 then --OBJ_HOLE
+      --FIXME need to wire up this logic.
+   else
+      --FIXME need to implement burying logic
+   end
+   
+   if success_flag then
+      target_obj.qty = target_obj.qty - 1
+      if target_obj.obj_n == 410 then --OBJ_RAIL_CAR
+         if target_obj.qty == 6 or target_obj.qty == 0 then
+            target_obj.frame_n = target_obj.frame_n - 2
+         end
+      end
+   end 
+end
+
+function use_shovel_on_ore_to_furnace(obj, target_obj, to_obj, actor)
+   local obj_n = target_obj.obj_n
+   
+   play_md_sfx(0x1b)
+   
+   Obj.removeFromEngine(target_obj)
+   if obj_n == 444 then --OBJ_PILE_OF_COAL
+      if to_obj.frame_n < 4 then
+         activate_power_system()
+      end
+   else
+      printl("IT_HAS_NO_EFFECT")
+   end
+   
+   return true
+end
+
+function activate_power_system()
+   printl("THE_COAL_BEGINS_MOVING_DOWN_THE_BELT")
+   Actor.set_talk_flag(0x73, 2)
+   Actor.set_talk_flag(0x71, 3)
+   activate_power_update_tiles()
+   update_conveyor_belt(false)
+end
+
+function activate_power_update_tiles()
+   anim_play(9)
+   anim_play(10)
+   anim_play(11)
+   anim_play(12)
+   local loc = player_get_location()
+   for obj in find_obj(loc.z, 208) do --OBJ_CRACK
+      if obj ~= nil then
+         if map_get_obj(obj.x, obj.y, obj.z, 209) == nil then
+            local steam = Obj.new(209, 1)
+            Obj.moveToMap(steam, obj.x, obj.y+1, obj.z)
+         end
+      end
+   end
+
+   for obj in find_obj(loc.z, 233) do --OBJ_FURNACE
+      if obj ~= nil then
+         local frame_n = obj.frame_n
+         if frame_n == 1 or frame_n == 3 then
+            obj.frame_n = frame_n + 4
+         end
+      end
+   end
+
+   for obj in find_obj(loc.z, 154) do --OBJ_LAMP
+      if obj ~= nil then
+         obj.frame_n = 1
+      end
+   end
+   for obj in find_obj(4, 154) do --OBJ_LAMP
+      if obj ~= nil then
+         obj.frame_n = 1
+      end
+   end
+end
+
+function shutdown_power_update_tiles()
+   anim_stop(9)
+   anim_stop(10)
+   anim_stop(11)
+   anim_stop(12)
+   local loc = player_get_location()
+   for obj in find_obj(loc.z, 209) do --OBJ_STEAM_LEAK
+      if obj ~= nil then
+         Obj.removeFromEngine(obj)
+      end
+   end
+
+   for obj in find_obj(loc.z, 233) do --OBJ_FURNACE
+      if obj ~= nil then
+         local frame_n = obj.frame_n
+         if frame_n == 5 or frame_n == 7 then
+            obj.frame_n = frame_n - 4
+         end
+      end
+   end
+
+   for obj in find_obj(loc.z, 154) do --OBJ_LAMP
+      if obj ~= nil then
+         obj.frame_n = 0
+      end
+   end
+   for obj in find_obj(4, 154) do --OBJ_LAMP
+      if obj ~= nil then
+         obj.frame_n = 0
+      end
+   end
+end
+
+function update_conveyor_belt(can_stop)
+   if Actor.get_talk_flag(0x73, 2) == false then
+      return
+   end
+   local player_loc = player_get_location()
+   
+   if player_loc.z ~= 5 then
+      return
+   end
+
+   --NOTE. The original game used generalised logic to search for conveyors.
+   -- I haven't used that here as there is only one conveyor in the game.
+
+   local x = 0x3c
+   local y = 0x63
+   local z = 5
+   
+   local conveyor = map_get_obj(x, y, z, 188) --OBJ_CONVEYOR_BELT
+   
+   while conveyor ~= nil do
+      if conveyor.frame_n == 2 then
+         local seam = map_get_obj(x, y, z, 189) --OBJ_CONVEYOR_BELT1
+         if seam ~= nil then
+            Obj.removeFromEngine(seam)
+         end
+      elseif conveyor.frame_n == 0 then
+         if conveyor.qty == 0 then
+            local seam = Obj.new(189)
+            Obj.moveToMap(seam, x, y, z)
+            conveyor.qty = 4
+         end
+         conveyor.qty = conveyor.qty - 1
+      end
+      
+      local seam = map_get_obj(x, y, z, 189) --OBJ_CONVEYOR_BELT1
+      if seam ~= nil then
+         seam.x = seam.x + 1
+      end
+
+      for obj in objs_at_loc(x, y, z) do
+         if obj.obj_n == 447 or obj.weight > 0 then --OBJ_HUGE_LUMP_OF_COAL
+            obj.x = obj.x + 1
+         end
+      end
+
+      local actor = map_get_actor(x, y, z)
+      if actor ~= nil then
+         Actor.move(actor, x+1, y, z)
+      end
+
+      x = x - 1
+      conveyor = map_get_obj(x, y, z, 188) --OBJ_CONVEYOR_BELT
+   end
+   
+   
+   if can_stop and Actor.get_talk_flag(0x71, 3) then
+      if math.random(0, 6) == 0 then
+         printl("THE_CONVEYOR_BELT_STOPS")
+         Actor.clear_talk_flag(0x73, 2)
+         Actor.clear_talk_flag(0x71, 3)
+         shutdown_power_update_tiles()
+      end
+   end
+   
+   
+end
+
+function midgame_cutscene_2()
+   play_midgame_sequence(2)
+   
+   for tower in find_obj(0, 201) do --OBJ_TOWER_TOP
+      if tower.x >= 0x3d0 and tower.x <= 0x3f0 and tower.y >= 0x1d0 and tower.y <= 0x1e7 then
+         tower.frame_n = 4 + (tower.frame_n % 4)
+      end
+   end
+   
+   for cable in find_obj(0, 214) do --OBJ_POWER_CABLE
+      if cable.x >= 0x3d0 and cable.x <= 0x3f0 and cable.y >= 0x1d0 and cable.y <= 0x1e7 then
+         cable.obj_n = 215
+      end
+   end   
+end
+
+function use_fixed_belt_on_bare_rollers(obj, target_obj, actor)
+   local start_obj = nil
+   local rollers = target_obj
+   while rollers ~= nil do
+      if rollers.frame_n == 0 then
+         start_obj = rollers
+         break
+      end
+      rollers = map_get_obj(rollers.x-1,rollers.y,rollers.z, rollers.obj_n)
+   end
+   
+   if start_obj == nil then
+      printl("OOOPS_THESE_ROLLERS_CAN_NEVER_BE_FIXED")
+      return
+   end
+   
+   rollers = start_obj
+   local i = 4
+   while rollers ~= nil do
+      rollers.obj_n = 188
+      if i == 0 then
+         i = 4
+         local belt_join_obj = Obj.new(189)
+         Obj.moveToMap(belt_join_obj, rollers.x, rollers.y, rollers.z)
+      else
+         i = i - 1
+      end
+      rollers = map_get_obj(rollers.x+1,rollers.y,rollers.z, 192) --OBJ_BARE_ROLLERS
+   end
+   
+   Obj.removeFromEngine(obj)
+   Actor.set_talk_flag(0x72, 2)
+end
+
+function use_ruby_slippers(obj, actor)
+   if obj.readied == false then
+      --FIXME check that we can ready this object.
+      Obj.removeFromEngine(obj)
+      Actor.inv_ready_obj(actor, obj)
+      return
+   end
+   
+   if obj.quality == 2 then
+      printl("YOU_MAY_USE_THE_RUBY_SLIPPERS_TO_GO_HOME")
+      local input = input_select("yn", false)
+      if input == "Y" then
+         play_end_sequence()
+      else
+         play_midgame_sequence(13)
+      end
+   else
+      printl("CLICK")
+      obj.quality = obj.quality + 1
+   end
+end
+
+function foes_are_nearby()
+   local loc = player_get_location()
+   local i
+   for i=1,0xff do
+      local actor = Actor.get(i)
+      if actor.alive and (actor.align == ALIGNMENT_EVIL or actor.align == ALIGNMENT_CHAOTIC) and actor.z == loc.z then
+         if get_wrapped_dist(actor.x, loc.x) < 40 and get_wrapped_dist(actor.y, loc.y) < 40 then
+            return true
+         end
+      end
+   end
+   
+   return false
+end
+
+function is_target_visible_to_actor(actor, target)
+   --FIXME
+   return true
+end
+
+function npcs_are_nearby()
+   local loc = player_get_location()
+   local i
+   local player = Actor.get_player_actor()
+   for i=1,0xff do
+      local actor = Actor.get(i)
+      if actor.alive and actor.asleep == false and actor.in_party == false and actor.z == loc.z then
+         if get_wrapped_dist(actor.x, loc.x) < 6 and get_wrapped_dist(actor.y, loc.y) < 6 and is_target_visible_to_actor(player, actor) then
+            return actor
+         end
+      end
+   end
+
+   return nil
+end
+
+function is_actor_able_to_talk_to_player(actor)
+   local player = Actor.get_player_actor()
+   local loc = player_get_location()
+   if actor.alive and actor.asleep == false and actor.z == loc.z then
+      if get_wrapped_dist(actor.x, loc.x) < 6 and get_wrapped_dist(actor.y, loc.y) < 6 and is_target_visible_to_actor(player, actor) then
+         return true
+      end
+   end
+   
+   return false
+end
+
+function rest_heal_party(hours_to_rest)
+   local actor
+   for actor in party_members() do
+      local hp = math.random(3,8) + math.random(3,8) * math.floor(hours_to_rest / 2)
+      local max_hp = actor_get_max_hp(actor)
+      if actor.hp + hp > max_hp then
+         actor.hp = max_hp
+      else
+         actor.hp = actor.hp + hp
+      end
+   end
+end
+
+function rest_level_up_actor(actor)
+   if actor.actor_num > 15 then
+      return
+   end
+   
+   local exp_level_tbl = {
+   [0] = 0,
+   [1] = 100,
+   [2] = 200,
+   [3] = 400,
+   [4] = 800,
+   [5] = 1600,
+   [6] = 3200,
+   [7] = 6400,
+   [8] = 32767,
+}
+
+   if actor.exp <= exp_level_tbl[actor.level] then
+      return
+   end
+   
+   actor.level = actor.level + 1
+   
+   local max_hp = actor_get_max_hp(actor)
+   if actor.hp + 30 > max_hp then
+      actor.hp = max_hp
+   else
+      actor.hp = actor.hp + 30
+   end
+   
+   Actor.show_portrait(actor)
+   
+   local obj_n = actor.obj_n
+   local gender = math.random(0,1)
+   if obj_n == 342 or obj_n == 343 or obj_n == 345 or (obj_n >= 347 and obj_n <= 353) then
+      gender = 0
+   elseif obj_n == 344 or obj_n == 346 or (obj_n >= 354 and obj_n <= 357) then
+      gender = 1
+   end
+   
+   local gender_pronoun = "He"
+   if gender == 1 then
+      gender_pronoun = "She"
+   end
+   
+   printfl("HAS_A_DREAM", actor.name)
+   printfl("SEES_THREE_STONE_OBELISKS", gender_pronoun)
+   printfl("FEELS_DRAWN_TO_ONE_OF_THE_OBELISKS", gender_pronoun)
+   printfl("DOES_TOUCH_THE_OBELISK", actor.name)
+   printl("WHICH_BHS")
+
+   local answer = input_select("bhs", false)
+   
+   if answer == "B" then
+      if actor.int < 30 then
+         actor.int = actor.int + 1
+      end
+   elseif answer == "H" then
+      if actor.dex < 30 then
+         actor.dex = actor.dex + 1
+      end   
+   elseif answer == "S" then
+      if actor.str < 30 then
+         actor.str = actor.str + 1
+      end  
+   end
+   
+end
+
+function use_tent(obj, actor)
+   if player_is_in_solo_mode() then
+      printl("NOT_WHILE_IN_SOLO_MODE")
+      play_md_sfx(5)
+      return
+   end
+
+   if g_in_dream_mode then
+     printl("YOU_CANT_SLEEP_IN_A_DREAM")
+     play_md_sfx(5)
+     return
+  end
+  
+   local tent_loc = {}
+  
+   if obj.on_map then
+      tent_loc.x = obj.x
+      tent_loc.y = obj.y
+      tent_loc.z = obj.z
+   else
+      tent_loc = player_get_location()
+   end
+   
+   local x, y
+   
+   for y = tent_loc.y - 2, tent_loc.y do
+      for x = tent_loc.x - 1, tent_loc.x + 1 do
+         local map_obj = map_get_obj(x,y,tent_loc.z)
+         if map_obj ~= nil and map_obj.obj_n ~= 106 then
+            if tile_get_flag(map_obj.tile_num, 3, 4) == false then
+               printfl("TENT_OBJ_IN_THE_WAY", map_obj.name)
+               play_md_sfx(5)
+               return
+            end
+         end
+      end
+   end
+
+   for y = tent_loc.y - 2, tent_loc.y do
+      for x = tent_loc.x - 1, tent_loc.x + 1 do
+         if tile_get_flag(map_get_tile_num(x,y,tent_loc.z), 1, 1) == true then --if map tile is impassible
+            printl("THE_GROUND_IS_NOT_FLAT_ENOUGH")
+            play_md_sfx(5)
+            return
+         end
+      end
+   end
+   
+   printl("REST")
+   
+   if party_is_in_combat_mode() then
+      print(" - ")
+      printl("NOT_WHILE_IN_COMBAT_MODE")
+      play_md_sfx(5)
+      return
+   end
+   
+   if foes_are_nearby() then
+      printl("NOT_WHILE_FOES_ARE_NEAR")
+      play_md_sfx(5)
+      return
+   end
+
+   local npc = npcs_are_nearby()
+   if npc ~= nil then
+      printfl("IS_TOO_NEAR_TO_SETUP_CAMP", npc.name)
+      play_md_sfx(5)
+      return
+   end   
+   
+   --poison check
+
+   local actor
+   local poisoned = false
+   for actor in party_members() do
+      if actor.poisoned then
+         poisoned = true
+         printfl("IS_POISONED", actor.name)
+      end
+   end
+   
+   if poisoned then
+      printl("DO_YOU_REALLY_WANT_TO_SLEEP")
+      local answer = input_select("yn", false)
+      if answer == "N" or answer == "n" then
+         return
+      end
+   end
+
+   local party_is_using_berries = false
+   for actor in party_members() do
+      local actor_num = actor.actor_num
+      local green = actor_is_affected_by_green_berries(actor_num)
+      local brown = actor_is_affected_by_brown_berries(actor_num)
+      
+      if brown or green then
+         party_is_using_berries = true
+         if brown and green then
+            printfl("COMPLAINS_OF_TOO_MUCH_LIGHT_AND_INANIMATE", actor.name)
+         elseif brown then
+            printfl("COMPLAINS_OF_TOO_MUCH_LIGHT", actor.name)
+         else --green
+            printfl("COMPLAINS_OF_INANIMATE_THINGS_TALKING", actor.name)            
+         end  
+      end
+      
+   end
+   
+   if party_is_using_berries then
+      if party_get_size() == 1 then
+         printl("YOU_CANT_SLEEP")
+      else
+         printl("NOBODY_CAN_SLEEP")
+      end
+      
+      return
+   end
+   
+   local player = Actor.get_player_actor()
+   player.x = tent_loc.x
+   player.y = tent_loc.y
+   
+   local tent = Obj.new(134, 3)
+   Obj.moveToMap(tent, player.x, player.y-1, player.z)
+   
+   tent = Obj.new(134, 5)
+   Obj.moveToMap(tent, player.x+1, player.y-1, player.z)
+
+   tent = Obj.new(134, 6)
+   Obj.moveToMap(tent, player.x-1, player.y, player.z)
+
+   tent = Obj.new(134, 9)
+   Obj.moveToMap(tent, player.x+1, player.y, player.z)
+
+   tent = Obj.new(134, 8)
+   Obj.moveToMap(tent, player.x, player.y, player.z)
+            
+   party_move(player.x, player.y, player.z)
+   
+   script_wait(500)
+   
+   party_hide_all()
+   
+   tent.frame_n = 7
+   
+   local hour = clock_get_hour()
+   local time
+   local hours_to_rest
+   
+   if hour < 7 or hour > 16 then
+      time = i18n("SUNRISE")
+      if hour < 7 then
+         hours_to_rest = 7 - hour
+      else
+         hours_to_rest = 24 - hour + 7
+      end
+   elseif hour <= 16 then
+      time = i18n("SUNSET")
+      hours_to_rest = 18 - hour
+   end
+   
+   printfl("REST_UNTIL", time)
+   local answer = input_select("yn", false)
+   
+   if answer == "N" or answer == "n" then
+      printl("HOW_MANY_HOURS")
+      hours_to_rest = input_select_integer("0123456789", true)
+   end
+   
+   g_party_is_warm = true
+   
+   if g_hours_till_next_healing == 0 and hours_to_rest > 4 then
+      rest_heal_party(hours_to_rest)
+      g_hours_till_next_healing = 6
+   end
+   
+   local can_level_up = false
+   if hours_to_rest * 3 > party_get_size() then
+      can_level_up = true
+   end
+   
+   local i
+   for i=0,hours_to_rest*3-1 do
+      advance_time(20)
+      script_wait(100)
+      if i < party_get_size() then
+         local actor = party_get_member(i)
+         rest_level_up_actor(actor)
+      end
+   end
+
+   local actor
+   local poisoned = false
+   for actor in party_members() do
+      if actor.poisoned then
+         if math.random(1, 8) + math.random(1, 8) >= 15 then
+            actor.poisoned = false
+            printfl("FEELS_BETTER", actor.name)
+         else
+            if actor.hp < hours_to_rest * 2 + 5 then
+               actor.hp = 5
+            else
+               actor.hp = actor.hp - (hours_to_rest * 2 + 5)
+            end
+         end
+      end
+   end
+
+
+   tent.frame_n = 8 --Open the tent flap
+   party_show_all()
+         
+   party_move(player.x, player.y + 1, player.z)
+
+   script_wait(500)
+   
+   --remove tent from map
+   local z = player.z
+   for tent in find_obj(z, 134) do
+      if tent ~= nil and 
+      ((tent.x == tent_loc.x and tent.y == tent_loc.y-1) or
+       (tent.x == wrap_coord(tent_loc.x+1,z) and tent.y == tent_loc.y-1) or
+       (tent.x == wrap_coord(tent_loc.x-1,z) and tent.y == tent_loc.y) or
+       (tent.x == wrap_coord(tent_loc.x+1,z) and tent.y == tent_loc.y) or
+       (tent.x == tent_loc.x and tent.y == tent_loc.y))
+      then
+         Obj.removeFromEngine(tent)
+      end
+   end
+
+   g_party_is_warm = false
+end
+
+function use_red_berry(obj, actor)
+   if not party_is_in_combat_mode() then
+      printl("THAT_WOULD_BE_A_WASTE_OUTSIDE_OF_COMBAT")
+      return
+   end
+   
+   if actor.frenzy == false then
+      printfl("ENTERS_A_BATTLE_FRENZY", actor.name)
+      play_md_sfx(0x32)
+   end
+   
+   actor.frenzy = true
+   
+   local qty = obj.qty
+   
+   if qty > 1 then
+      obj.qty = qty - 1
+   else
+      Obj.removeFromEngine(obj)
+   end
+end
+
+function use_spittoon(obj, actor)
+   if not actor.hypoxia then
+      printl("YOU_SPIT_INTO_THE_SPITTOON")
+   else
+      printl("YOUR_MOUTH_IS_TOO_DRY")
+   end
+end
+
+function use_gong(obj, target_obj, actor)
+   printl("GONG")
+   play_md_sfx(0xf) 
+end
+
+function use_musical_instrument(obj, actor)
+
+   local obj_n = obj.obj_n
+   
+   if obj_n == 280 then --OBJ_CYMBALS
+      printl("CHING")
+      play_md_sfx(0x36)
+   elseif obj_n == 281 then --OBJ_TAMBORINE
+      printl("SHING")
+      play_md_sfx(0x35)
+   elseif obj_n == 282 then --OBJ_DRUM
+      printl("THUMP_THUMP")
+      play_md_sfx(0x34)
+      script_wait(100)
+      play_md_sfx(0x34)
+   elseif obj_n == 283 then --OBJ_ACCORDION
+      printl("WHEEEEZE")
+      play_md_sfx(0x37)
+   else
+      printfl("YOU_PLAY_THE", obj.name)
+   end
+end
+
+function use_wrench_on_switchbar(obj, target_obj, actor)
+   if target_obj.quality == 1 then
+      if target_obj.on_map then
+         local turntable = map_get_obj(target_obj.x-1, target_obj.y-1, target_obj.z, 413)
+         if turntable ~= nil then
+            target_obj.frame_n = turntable.frame_n
+            target_obj.quality = 0
+            printl("THE_SWITCH_IS_FASTENED")
+            play_md_sfx(0x1f)
+            return
+         end   
+      end
+      printl("THIS_SWITCH_CANNOT_BE_FIXED")
+      play_md_sfx(0x5)
+   else
+      printl("THE_SWITCH_IS_LOOSE")
+      play_md_sfx(0x1f)
+      target_obj.quality = 1
+   end
+end
+
+function use_wrench_on_drill(obj, target_obj, actor)
+   local drill_cart
+   if target_obj.on_map then
+      drill_cart = map_get_obj(target_obj.x, target_obj.y, target_obj.z, 439)
+   end
+   
+   if drill_cart ~= nil then
+      local drill = Obj.new(441,1) --assembled drill
+      Obj.moveToMap(drill, target_obj.x, target_obj.y, target_obj.z)
+      Obj.removeFromEngine(target_obj)
+      Obj.removeFromEngine(drill_cart)
+      printl("THE_DRILLS_POWER_IS_CONNECTED")
+      play_md_sfx(0x1f)
+   else
+      printl("THE_DRILL_MUST_BE_INSTALLED_ONTO_A_DRILL_CART")
+   end
+end
+
+function use_wrench_on_panel(obj, target_obj, actor)
+   if target_obj.on_map == false then
+      printl("IT_HAS_NO_EFFECT")
+      return
+   end
+   
+   local quality = target_obj.quality
+   local panel_qty = target_obj.qty
+   if quality == 0 then
+      target_obj.quality = 1
+      printl("THE_PANEL_IS_LOOSE")
+      play_md_sfx(0x1f)
+   elseif bit32.btest(quality, 2) then
+      printl("IT_MUST_BE_REPAIRED_FIRST")
+      play_md_sfx(0x5)
+   else
+      local cabinet = map_get_obj(target_obj.x, target_obj.y, target_obj.z, 457)
+      if cabinet == nil then
+         printl("PANELS_ARE_ONLY_INSTALLED_ONTO_CABINETS")
+         play_md_sfx(0x5)
+      else
+         quality = cabinet.quality
+         if (quality == 0 and panel_qty ~= 0) or
+            (quality ~= 0 and quality <= 3 and panel_qty == 0 and target_obj.frame_n ~= (quality - 1) ) or
+            (quality ~= 0 and (quality > 3 or panel_qty ~= 0) and quality ~= panel_qty) then
+            printl("THIS_CABINET_REQUIRES_A_DIFFERENT_TYPE_OF_PANEL")
+            play_md_sfx(0x5)
+         else
+            target_obj.quality = target_obj.quality - 1
+            printl("THE_PANEL_IS_FASTENED")
+            play_md_sfx(0x1f)
+            if target_obj.quality == 3 then
+               Actor.set_talk_flag(0x74, 3)
+               if Actor.get_talk_flag(0x74, 0) then
+                  Actor.set_talk_flag(0x60, 2)
+               end
+            end
+         end
+      end
+   end
+   
+end
+
+function use_oxium_bin(obj, actor)
+   if map_can_reach_point (actor.x, actor.y, obj.x, obj.y, obj.z) == false then
+      printl("BLOCKED")
+      return
+   end
+   
+   local oxium = Obj.new(131) --OBJ_BLOB_OF_OXIUM
+   oxium.qty = 20
+   
+   if Actor.can_carry_obj(actor, oxium) then
+      Actor.inv_add_obj(actor, oxium, STACK_OBJECT_QTY)
+      printl("YOU_GET_TWO_HANDFULS_OF_OXIUM_FROM_THE_BIN")
+      Actor.set_talk_flag(0x12, 4)
+   else
+      printl("YOU_ARE_CARRYING_TOO_MUCH_ALREADY")
+   end
+end
+
+function use_sledge_hammer_on_replacement_track_to_broken_track(obj, target_obj, to_obj, actor)
+   play_md_sfx(0x20)
+   printl("WHICH_SECTION_OF_RAIL_NEEDS_FIXING")
+   Obj.removeFromEngine(target_obj)
+   to_obj.obj_n = 414 --OBJ_TRACK
+end
+
+function use_pliers_on_spool_to_tower(obj, target_obj, to_obj, actor)
+
+    if actor_find_max_wrapped_xy_distance(actor, to_obj.x, to_obj.y) > 1 then
+      printl("THE_WORK_IS_TO_PRECISE_TO_PERFORM_TELEKINETICALLY")
+      return
+   end
+
+   if Actor.get_talk_flag(0x73, 2) == false or Actor.get_talk_flag(0x71, 3) == true then
+      printl("THE_CABLE_DOES_NOT_NEED_REPLACEMENT")
+      return
+   end
+   
+   if actor_is_holding_obj(actor, 38) == false then --OBJ_RUBBER_GLOVES
+      Actor.hit(actor, math.random(0, math.floor(actor.max_hp/2)))
+      local spector = Actor.get(2)
+      if is_actor_able_to_talk_to_player(spector) then
+         Actor.set_talk_flag(spector, 2)
+         Actor.talk(spector)
+      end
+   else
+      play_md_sfx(0x1f)
+      Obj.removeFromEngine(target_obj)
+      Actor.set_talk_flag(0x73, 4)
+      play_midgame_sequence(3)
+      for obj in find_obj_from_area(0x3d0, 0x1d0, 0, 32, 17) do
+         if obj.obj_n == 215 then -- OBJ_POWER_CABLE1
+            obj.obj_n = 214 -- OBJ_POWER_CABLE
+         end
+      end
+
+      for obj in find_obj(0, 315) do --OBJ_CHAMBER1
+         Obj.removeFromEngine(obj)
+      end
+   end
+   
+end
+
+function use_gate(obj, actor)
+   if bit32.btest(obj.quality, 128) == true then
+      printl("IT_IS_APPARENTLY_LOCKED")
+      return
+   end
+
+   local frame_n = obj.frame_n
+   if frame_n == 0 or frame_n == 1 then
+      obj.frame_n = 3
+      obj.x = obj.x - 1
+   elseif frame_n == 2 or frame_n == 3 then
+      obj.frame_n = 1
+      obj.x = obj.x + 1
+   elseif frame_n == 4 or frame_n == 5 then
+      obj.frame_n = 7
+   elseif frame_n == 6 or frame_n == 7 then
+      obj.frame_n = 5
+   end
+   
+   
+end
+
+function use_switch_bar(obj, actor)
+   if obj.frame_n == 0 then
+      obj.frame_n = 1
+   else
+      obj.frame_n = 0
+   end
+   
+   if obj.on_map == false or map_get_obj(obj.x-1,obj.y-1,obj.z, 413) == nil then
+      printl("IT_HAS_NO_EFFECT")
+      return
+   end
+   
+   if obj.quality == 1 then
+      printl("IT_TURNS_LOOSELY")
+      return
+   end
+   
+   local turntable = map_get_obj(obj.x-1,obj.y-1,obj.z, 413)
+   turntable.frame_n = obj.frame_n
+   
+   local railcar = map_get_obj(obj.x-1,obj.y-1,obj.z, 410)
+   if railcar ~= nil then
+      railcar.frame_n = railcar.frame_n - (railcar.frame_n % 2)
+      railcar.frame_n = railcar.frame_n + turntable.frame_n
+   end
+end
+
+function use_reading_material(obj, actor)
+   if obj.quality == 0 then
+      local signatures = ""
+      if Actor.get_talk_flag(5, 3) == true then
+         signatures = signatures .. " Richard Sherman"
+      end
+      signatures = signatures .. "\n"
+
+      if Actor.get_talk_flag(0x19, 3) == true then
+         signatures = signatures .. "  Capt. Gregory Duprey"
+      end
+      signatures = signatures .. "\n"
+
+      if Actor.get_talk_flag(0x1a, 3) == true then
+         signatures = signatures .. "  Doctor David Yellin"
+      end
+      signatures = signatures .. "\n"
+
+      display_text_in_scroll_gump(i18nf("AFFIDAVIT", player_get_name(), signatures))
+   else
+      local text = load_text_from_lzc("mdtext.lzc", obj.quality - 1)
+      if text ~= nil then
+         display_text_in_scroll_gump(text)
+      else
+         printl("YOU_CANT_READ_IT")
+      end
+   end
+
+end
+
+function use_pool_table(obj, actor)
+   if Actor.inv_get_readied_obj_n(actor, ARM) ~= 401 then --OBJ_POOL_CUE
+      printl("YOU_NEED_A_POOL_CUE")
+      return
+   end
+   local pool_table1 = map_get_obj(wrap_coord(obj.x - 1, obj.z), obj.y, obj.z, 400) -- OBJ_UNK_400
+   local rand = math.random
+   if pool_table1 == nil then
+      pool_table1 = Obj.new(400, rand(0, 6))
+      Obj.moveToMap(pool_table1, wrap_coord(obj.x - 1, obj.z), obj.y, obj.z)
+   end
+
+   local pool_table2 = map_get_obj(obj.x, obj.y, obj.z, 400) -- OBJ_UNK_400
+   if pool_table2 == nil then
+      pool_table2 = Obj.new(400, rand(0, 6))
+      Obj.moveToMap(pool_table2, wrap_coord(obj.x - 1, obj.z), obj.y, obj.z)
+   end
+
+   for i=1,10 do
+      if i~= 1 then


Commit: e65685cf76dc17334832a78ccfd0ad34421d30fa
    https://github.com/scummvm/scummvm/commit/e65685cf76dc17334832a78ccfd0ad34421d30fa
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-03-08T13:27:02-07:00

Commit Message:
ULTIMA8: Removal of deprecated HIDManager and bindings

Changed paths:
  R devtools/create_ultima/files/ultima8/u8bindings.ini
  R engines/ultima/ultima8/gumps/bind_gump.cpp
  R engines/ultima/ultima8/gumps/bind_gump.h
  R engines/ultima/ultima8/kernel/hid_manager.cpp
  R engines/ultima/ultima8/kernel/hid_manager.h
    engines/ultima/module.mk
    engines/ultima/ultima8/gumps/controls_gump.cpp
    engines/ultima/ultima8/misc/debugger.cpp
    engines/ultima/ultima8/misc/debugger.h
    engines/ultima/ultima8/ultima8.cpp
    engines/ultima/ultima8/ultima8.h


diff --git a/devtools/create_ultima/files/ultima8/u8bindings.ini b/devtools/create_ultima/files/ultima8/u8bindings.ini
deleted file mode 100644
index 2c9c68e352..0000000000
--- a/devtools/create_ultima/files/ultima8/u8bindings.ini
+++ /dev/null
@@ -1,38 +0,0 @@
-[bindings]
-escape=MenuGump::showMenu
-backspace=GUIApp::closeItemGumps
-e=GUIApp::togglePaintEditorItems
-h=GUIApp::toggleShowTouchingItems
-i=MainActor::useBackpack
-c=MainActor::toggleCombat
-r=MainActor::useRecall
-k=MainActor::useKeyring
-b=MainActor::useBedroll
-t=GUIApp::engineStats
-z=MainActor::useInventory
-m=MiniMapGump::toggle
-F1=GUIApp::saveGame QuickSave
-f4=GUIApp::toggleFullscreen
-f5=GUIApp::saveGame
-f7=GUIApp::loadGame
-f10=GUIApp::toggleAvatarInStasis
-f11=ShapeViewerGump::U8ShapeViewer
-f12=Kernel::toggleFrameByFrame
-space=Kernel::advanceFrame
-up=QuickAvatarMoverProcess::startMoveUp
-down=QuickAvatarMoverProcess::startMoveDown
-left=QuickAvatarMoverProcess::startMoveLeft
-right=QuickAvatarMoverProcess::startMoveRight
-home=QuickAvatarMoverProcess::startAscend
-end=QuickAvatarMoverProcess::startDescend
-<Release> up=QuickAvatarMoverProcess::stopMoveUp
-<Release> down=QuickAvatarMoverProcess::stopMoveDown
-<Release> left=QuickAvatarMoverProcess::stopMoveLeft
-<Release> right=QuickAvatarMoverProcess::stopMoveRight
-<Release> home=QuickAvatarMoverProcess::stopAscend
-<Release> end=QuickAvatarMoverProcess::stopDescend
-insert=QuickAvatarMoverProcess::toggleClipping
-tab=GameMapGump::toggleHighlightItems
-<Release> tab=GameMapGump::toggleHighlightItems
-left-bracket=GameMapGump::decrementSortOrder
-right-bracket=GameMapGump::incrementSortOrder
diff --git a/engines/ultima/module.mk b/engines/ultima/module.mk
index f9786dbec3..a7a4f22461 100644
--- a/engines/ultima/module.mk
+++ b/engines/ultima/module.mk
@@ -395,7 +395,6 @@ MODULE_OBJS := \
 	ultima8/graphics/fonts/tt_font.o \
 	ultima8/gumps/ask_gump.o \
 	ultima8/gumps/bark_gump.o \
-	ultima8/gumps/bind_gump.o \
 	ultima8/gumps/book_gump.o \
 	ultima8/gumps/container_gump.o \
 	ultima8/gumps/controls_gump.o \
@@ -434,7 +433,6 @@ MODULE_OBJS := \
 	ultima8/kernel/core_app.o \
 	ultima8/kernel/delay_process.o \
 	ultima8/kernel/hid_keys.o \
-	ultima8/kernel/hid_manager.o \
 	ultima8/kernel/kernel.o \
 	ultima8/kernel/memory_manager.o \
 	ultima8/kernel/mouse.o \
diff --git a/engines/ultima/ultima8/gumps/bind_gump.cpp b/engines/ultima/ultima8/gumps/bind_gump.cpp
deleted file mode 100644
index af4af69fa0..0000000000
--- a/engines/ultima/ultima8/gumps/bind_gump.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ultima/ultima8/misc/pent_include.h"
-#include "ultima/ultima8/gumps/bind_gump.h"
-
-#include "ultima/ultima8/graphics/fonts/font.h"
-#include "ultima/ultima8/graphics/render_surface.h"
-#include "ultima/ultima8/gumps/widgets/text_widget.h"
-#include "ultima/ultima8/kernel/mouse.h"
-
-#include "ultima/ultima8/kernel/hid_manager.h"
-
-#include "ultima/ultima8/filesys/idata_source.h"
-#include "ultima/ultima8/filesys/odata_source.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-DEFINE_RUNTIME_CLASSTYPE_CODE(BindGump, ModalGump)
-
-BindGump::BindGump(istring *b, Gump *g): ModalGump(0, 0, 160, 80), _binding(b), _invoker(g) {
-}
-
-BindGump::~BindGump() {
-}
-
-void BindGump::InitGump(Gump *newparent, bool take_focus) {
-	ModalGump::InitGump(newparent, take_focus);
-
-	//! English ! - TODO: Externalize string.
-	Std::string bindtext = "Press any key or button.\n\nPress ESCAPE to cancel\nor BACKSPACE to clear";
-	Gump *widget = new TextWidget(0, 0, bindtext, true, 6, 0, 0,
-	                              Font::TEXT_CENTER);
-	widget->InitGump(this);
-	widget->setRelativePosition(TOP_CENTER, 0, 8);
-}
-
-
-void BindGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
-	uint32 rgb = 0x000000;
-	surf->Fill32(rgb, 0, 0, _dims.w, _dims.h);
-
-	Gump::PaintThis(surf, lerp_factor, scaled);
-}
-
-bool BindGump::OnKeyDown(int key, int mod) {
-	if (key != Common::KEYCODE_ESCAPE && _binding) {
-		HIDManager *hidmanager = HIDManager::get_instance();
-		if (key == Common::KEYCODE_BACKSPACE) {
-			hidmanager->unbind(*_binding);
-		}
-		if (_invoker)
-			_invoker->ChildNotify(this, UPDATE);
-	}
-	Close();
-	return true;
-}
-
-Gump *BindGump::OnMouseDown(int button, int32 mx, int32 my) {
-	//istring control = GetMouseButtonName(static_cast<MouseButton>(button));
-//	HIDManager * hidmanager = HIDManager::get_instance();
-//	if (binding)
-//		hidmanager->bind(control, *binding);
-	if (_invoker)
-		_invoker->ChildNotify(this, UPDATE);
-	Close();
-	return this;
-}
-
-bool BindGump::loadData(IDataSource *ids) {
-	CANT_HAPPEN_MSG("Trying to load ModalGump");
-	return true;
-}
-
-void BindGump::saveData(ODataSource *ods) {
-	CANT_HAPPEN_MSG("Trying to save ModalGump");
-}
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/gumps/bind_gump.h b/engines/ultima/ultima8/gumps/bind_gump.h
deleted file mode 100644
index 03c041528a..0000000000
--- a/engines/ultima/ultima8/gumps/bind_gump.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ULTIMA8_GUMPS_BINDGUMP_H
-#define ULTIMA8_GUMPS_BINDGUMP_H
-
-#include "ultima/ultima8/gumps/modal_gump.h"
-#include "ultima/ultima8/misc/p_dynamic_cast.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-class ControlsGump;
-
-class BindGump : public ModalGump {
-public:
-	ENABLE_RUNTIME_CLASSTYPE()
-
-	BindGump(istring *b, Gump *g);
-	~BindGump() override;
-
-	// Init the gump, call after construction
-	void InitGump(Gump *newparent, bool take_focus = true) override;
-
-	// Paint the Gump
-	void PaintThis(RenderSurface *, int32 lerp_factor, bool scaled) override;
-
-	bool OnKeyDown(int key, int mod) override;
-	Gump   *OnMouseDown(int button, int32 mx, int32 my) override;
-
-	bool loadData(IDataSource *ids);
-
-	enum Message {
-		// We should really define these messages elsewhere
-		UPDATE = 10
-	};
-protected:
-	void saveData(ODataSource *ods) override;
-	istring *_binding;
-	Gump *_invoker;
-};
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
-
-#endif
diff --git a/engines/ultima/ultima8/gumps/controls_gump.cpp b/engines/ultima/ultima8/gumps/controls_gump.cpp
index 4f2cb12bd2..0b4f6cf3aa 100644
--- a/engines/ultima/ultima8/gumps/controls_gump.cpp
+++ b/engines/ultima/ultima8/gumps/controls_gump.cpp
@@ -27,9 +27,7 @@
 #include "ultima/ultima8/gumps/desktop_gump.h"
 #include "ultima/ultima8/gumps/widgets/button_widget.h"
 #include "ultima/ultima8/gumps/widgets/text_widget.h"
-#include "ultima/ultima8/gumps/bind_gump.h"
 #include "ultima/ultima8/gumps/paged_gump.h"
-#include "ultima/ultima8/kernel/hid_manager.h"
 
 #include "ultima/ultima8/filesys/idata_source.h"
 #include "ultima/ultima8/filesys/odata_source.h"
@@ -103,6 +101,7 @@ void ControlEntryGump::init() {
 }
 
 void ControlEntryGump::ChildNotify(Gump *child, uint32 message) {
+#ifdef TODO
 	ObjId cid = child->getObjId();
 	if (message == ButtonWidget::BUTTON_CLICK) {
 		if (cid == _button->getObjId()) {
@@ -113,6 +112,7 @@ void ControlEntryGump::ChildNotify(Gump *child, uint32 message) {
 	} else if (message == BindGump::UPDATE) {
 		_parent->ChildNotify(child, message);
 	}
+#endif
 }
 
 DEFINE_RUNTIME_CLASSTYPE_CODE(ControlsGump, Gump)
@@ -144,6 +144,7 @@ void ControlsGump::addEntry(const char *binding, const char *name, int &x, int &
 }
 
 void ControlsGump::ChildNotify(Gump *child, uint32 message) {
+#ifdef TODO
 	if (message == BindGump::UPDATE) {
 		Std::list<Gump *>::iterator it;
 		for (it = _children.begin(); it != _children.end(); ++it) {
@@ -152,6 +153,7 @@ void ControlsGump::ChildNotify(Gump *child, uint32 message) {
 				g->init();
 		}
 	}
+#endif
 }
 
 void ControlsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
diff --git a/engines/ultima/ultima8/kernel/hid_manager.cpp b/engines/ultima/ultima8/kernel/hid_manager.cpp
deleted file mode 100644
index 4860d67df6..0000000000
--- a/engines/ultima/ultima8/kernel/hid_manager.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ultima/ultima8/misc/pent_include.h"
-#include "ultima/ultima8/kernel/hid_manager.h"
-#include "ultima/ultima8/conf/setting_manager.h"
-#include "ultima/ultima8/misc/debugger.h"
-#include "ultima/ultima8/misc/util.h"
-#include "ultima/ultima8/conf/config_file_manager.h" // temporary!
-
-namespace Ultima {
-namespace Ultima8 {
-
-HIDManager *HIDManager::_hidManager = 0;
-
-HIDManager::HIDManager() {
-	_hidManager = this;
-	debugN(MM_INFO, "Creating HIDManager...\n");
-
-	resetBindings();
-}
-
-HIDManager::~HIDManager() {
-	Std::vector<Debugger::ArgvType *>::iterator it;
-	debugN(MM_INFO, "Destroying HIDManager...\n");
-
-	for (it = _commands.begin(); it != _commands.end(); ++it) {
-		if (*it) {
-			delete *it;
-		}
-	}
-	_commands.clear();
-
-	_hidManager = 0;
-}
-
-bool HIDManager::handleEvent(HID_Key key, HID_Events events) {
-	bool handled = false;
-	uint32 keyEvent = (uint32)key | ((uint32)events << 16);
-
- 	if (_bindings.contains(keyEvent)) {
-		g_debugger->executeCommand(*_bindings[keyEvent]);
-		handled = true;
-	}
-
-	return handled;
-}
-
-void HIDManager::resetBindings() {
-	Std::vector<Debugger::ArgvType *>::iterator it;
-
-	_bindings.clear();
-
-	for (it = _commands.begin(); it != _commands.end(); ++it) {
-		if (*it) {
-			delete *it;
-		}
-	}
-	_commands.clear();
-}
-
-void HIDManager::loadBindings() {
-	Debugger::ArgsType args;
-
-	debugN(MM_INFO, "Loading HIDBindings...\n");
-
-	SettingManager *settings = SettingManager::get_instance();
-	KeyMap keys;
-	keys = settings->listDataValues("keys");
-
-	KeyMap::iterator i = keys.begin();
-	KeyMap::iterator end = keys.end();
-
-	if (i == end) {
-		debugN(MM_INFO, "Loading default HIDBindings...\n");
-		ConfigFileManager *config = ConfigFileManager::get_instance();
-		keys = config->listKeyValues("bindings/bindings");
-		i = keys.begin();
-		end = keys.end();
-	}
-
-	while (i != keys.end()) {
-		args = i->_value.c_str();
-		bind(i->_key, args);
-		++i;
-	}
-}
-
-void HIDManager::saveBindings() {
-	uint16 key, events;
-	SettingManager *settings = SettingManager::get_instance();
-	istring section = "keys/";
-	istring confkey;
-
-	for (Bindings::iterator it = _bindings.begin(); it != _bindings.end(); ++it) {
-		key = it->_key & 0xffff;
-		events = it->_key >> 16;
-
-		confkey = section + HID_GetEventsName((HID_Events)events) + ' ' +
-			HID_GetKeyName((HID_Key) key);
-
-		Debugger::ArgsType command;
-		ArgvToString(*(it->_value), command);
-		settings->set(confkey, command);
-//		settings->unset(confkey);
-	}
-}
-
-void HIDManager::bind(const istring &control, const Debugger::ArgvType &argv) {
-	HID_Key key = HID_LAST;
-	HID_Events event = HID_EVENT_DEPRESS;
-	Std::vector<istring> ctrl_argv;
-
-	StringToArgv(control, ctrl_argv);
-	if (ctrl_argv.size() == 1) {
-		key = HID_GetKeyFromName(ctrl_argv[0]);
-	} else if (ctrl_argv.size() > 1) {
-		// we have a event
-		key = HID_GetKeyFromName(ctrl_argv[1]);
-		event = HID_GetEventFromName(ctrl_argv[0]);
-	}
-
-	bind(key, event, argv);
-}
-
-void HIDManager::bind(const istring &control, const Debugger::ArgsType &args) {
-	Debugger::ArgvType argv;
-	StringToArgv(args, argv);
-	bind(control, argv);
-}
-
-void HIDManager::bind(HID_Key key, HID_Events event, const Debugger::ArgvType &argv) {
-	uint32 keyEvent = (uint32)key | ((uint32)event << 16);
-
-	Debugger::ArgvType *command = 0;
-	if (! argv.empty()) {
-		Std::vector<Debugger::ArgvType *>::iterator it;
-		for (it = _commands.begin(); it != _commands.end(); ++it) {
-			if (argv == (**it)) {
-				// Change from iterator to pointer
-				command = *it;
-				break;
-			}
-		}
-
-		if (!command) {
-			command = new Debugger::ArgvType(argv);
-			_commands.push_back(command);
-		}
-	}
-
-	assert(command);
-	_bindings[keyEvent] = command;
-}
-
-void HIDManager::bind(HID_Key key, HID_Events event, const Debugger::ArgsType &args) {
-	Debugger::ArgvType argv;
-	StringToArgv(args, argv);
-	bind(key, event, argv);
-}
-
-void HIDManager::unbind(const istring &control) {
-	// bind to an empty control
-	Debugger::ArgvType command;
-	bind(control, command);
-}
-
-void HIDManager::listBindings() {
-	uint16 key, event;
-	Debugger::ArgsType command;
-
-	for (Bindings::iterator it = _bindings.begin(); it != _bindings.end(); ++it) {
-		key = it->_key & 0xffff;
-		event = it->_key >> 16;
-		ArgvToString(*(it->_value), command);
-
-		if (event == HID_EVENT_DEPRESS) {
-			g_debugger->debugPrintf("%s = %s\n", HID_GetKeyName((HID_Key)key), command.c_str());
-		} else {
-			g_debugger->debugPrintf("%s", HID_GetEventsName((HID_Events)event));
-			g_debugger->debugPrintf(" %s = %s\n", HID_GetKeyName((HID_Key)key), command.c_str());
-		}
-	}
-}
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/kernel/hid_manager.h b/engines/ultima/ultima8/kernel/hid_manager.h
deleted file mode 100644
index 052bbbf340..0000000000
--- a/engines/ultima/ultima8/kernel/hid_manager.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ULTIMA8_KERNEL_HIDMANAGER_H
-#define ULTIMA8_KERNEL_HIDMANAGER_H
-
-#include "ultima/shared/std/containers.h"
-#include "ultima/ultima8/kernel/hid_keys.h"
-#include "ultima/ultima8/misc/debugger.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-//! Responsible to loading the keybindings and storing them
-class HIDManager {
-private:
-	static HIDManager *_hidManager;
-	Std::vector<Debugger::ArgvType *> _commands;
-	typedef Common::HashMap<uint32, Debugger::ArgvType *> Bindings;
-	Bindings _bindings;
-public:
-	HIDManager();
-	~HIDManager();
-
-	//! obtain the singleton instance of the HIDManager
-	static HIDManager *get_instance() {
-		return _hidManager;
-	}
-
-	void listBindings();
-
-	//! execute the Console command associated with the event
-	//! \param key a HID_KEY used to find an appropriate Console command
-	//! \param events is a bitset of event/flags
-	//! \return true if a console command is executed
-	bool handleEvent(HID_Key key, HID_Events events);
-
-	//! Reset the keybindings
-	void resetBindings();
-
-	//! loads the keybindings from the configuration
-	void loadBindings();
-
-	//! saves the keybindings to the configuration
-	void saveBindings();
-
-	//! loads a single keybinding
-	//! \param control a key or button to bind
-	//! \param bindingName name of the HIDBinding
-	void bind(const istring &control, const Debugger::ArgvType &argv);
-
-	void bind(const istring &control, const Debugger::ArgsType &args);
-	void bind(HID_Key key, HID_Events event, const Debugger::ArgvType &argv);
-	void bind(HID_Key key, HID_Events event, const Debugger::ArgsType &args);
-
-	//! removes all controls to a HIDBinding or the binding to one specified key
-	//! \param bindingName name of a HIDBinding or the name of key
-	void unbind(const istring &control);
-};
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
-
-#endif
diff --git a/engines/ultima/ultima8/misc/debugger.cpp b/engines/ultima/ultima8/misc/debugger.cpp
index 990cd3b347..eee8347eff 100644
--- a/engines/ultima/ultima8/misc/debugger.cpp
+++ b/engines/ultima/ultima8/misc/debugger.cpp
@@ -36,7 +36,6 @@
 #include "ultima/ultima8/gumps/shape_viewer_gump.h"
 #include "ultima/ultima8/gumps/menu_gump.h"
 #include "ultima/ultima8/kernel/allocator.h"
-#include "ultima/ultima8/kernel/hid_manager.h"
 #include "ultima/ultima8/kernel/kernel.h"
 #include "ultima/ultima8/kernel/memory_manager.h"
 #include "ultima/ultima8/kernel/object_manager.h"
@@ -100,11 +99,6 @@ Debugger::Debugger() : Shared::Debugger() {
 	registerCmd("GameMapGump::incrementSortOrder", WRAP_METHOD(Debugger, cmdIncrementSortOrder));
 	registerCmd("GameMapGump::decrementSortOrder", WRAP_METHOD(Debugger, cmdDecrementSortOrder));
 
-	registerCmd("HIDManager::bind", WRAP_METHOD(Debugger, cmdBind));
-	registerCmd("HIDManager::unbind", WRAP_METHOD(Debugger, cmdUnbind));
-	registerCmd("HIDManager::listbinds", WRAP_METHOD(Debugger, cmdListbinds));
-	registerCmd("HIDManager::save", WRAP_METHOD(Debugger, cmdSave));
-
 	registerCmd("Kernel::processTypes", WRAP_METHOD(Debugger, cmdProcessTypes));
 	registerCmd("Kernel::processInfo", WRAP_METHOD(Debugger, cmdProcessInfo));
 	registerCmd("Kernel::listProcesses", WRAP_METHOD(Debugger, cmdListProcesses));
@@ -877,61 +871,6 @@ bool Debugger::cmdDecrementSortOrder(int argc, const char **argv) {
 }
 
 
-bool Debugger::cmdBind(int argc, const char **argv) {
-	Debugger::ArgvType argv2;
-	Debugger::ArgvType::const_iterator it;
-	if (argc < 3) {
-		debugPrintf("Usage: %s <key> <action> [<arg> ...]: binds a key or button to an action\n",
-			argv[0]);
-		return true;
-	} else {
-		HIDManager *hid = HIDManager::get_instance();
-
-		istring control(argv[1]);
-		Common::Array<istring> args;
-		for (int i = 2; i < argc; ++i)
-			args.push_back(argv[i]);
-
-		it = args.begin();
-		++it;
-		++it;
-		argv2.assign(it, args.end());
-
-		hid->bind(control, argv2);
-		return false;
-	}
-}
-
-bool Debugger::cmdUnbind(int argc, const char **argv) {
-	if (argc != 2) {
-		debugPrintf("Usage: %s <key>: unbinds a key or button\n", argv[0]);
-		return true;
-	} else {
-		HIDManager *hid = HIDManager::get_instance();
-
-		istring control(argv[1]);
-
-		hid->unbind(control);
-		return false;
-	}
-}
-
-bool Debugger::cmdListbinds(int argc, const char **argv) {
-	HIDManager *hid = HIDManager::get_instance();
-	hid->listBindings();
-	return true;
-}
-
-bool Debugger::cmdSave(int argc, const char **argv) {
-	HIDManager *hid = HIDManager::get_instance();
-	hid->saveBindings();
-
-	SettingManager *settings = SettingManager::get_instance();
-	settings->write();
-	return false;
-}
-
-
 bool Debugger::cmdProcessTypes(int argc, const char **argv) {
 	Kernel::get_instance()->processTypes();
 	return true;
diff --git a/engines/ultima/ultima8/misc/debugger.h b/engines/ultima/ultima8/misc/debugger.h
index 49fe280252..78fc5997e6 100644
--- a/engines/ultima/ultima8/misc/debugger.h
+++ b/engines/ultima/ultima8/misc/debugger.h
@@ -169,12 +169,6 @@ private:
 	bool cmdIncrementSortOrder(int argc, const char **argv);
 	bool cmdDecrementSortOrder(int argc, const char **argv);
 
-	// HID Manager
-	bool cmdBind(int argc, const char **argv);
-	bool cmdUnbind(int argc, const char **argv);
-	bool cmdListbinds(int argc, const char **argv);
-	bool cmdSave(int argc, const char **argv);
-
 	// Kernel
 	bool cmdProcessTypes(int argc, const char **argv);
 	bool cmdListProcesses(int argc, const char **argv);
diff --git a/engines/ultima/ultima8/ultima8.cpp b/engines/ultima/ultima8/ultima8.cpp
index 60a52f85ef..6281e39323 100644
--- a/engines/ultima/ultima8/ultima8.cpp
+++ b/engines/ultima/ultima8/ultima8.cpp
@@ -41,7 +41,6 @@
 #include "ultima/ultima8/games/start_u8_process.h"
 #include "ultima/ultima8/graphics/fonts/font_manager.h"
 #include "ultima/ultima8/kernel/memory_manager.h"
-#include "ultima/ultima8/kernel/hid_manager.h"
 #include "ultima/ultima8/graphics/render_surface.h"
 #include "ultima/ultima8/graphics/texture.h"
 #include "ultima/ultima8/graphics/fonts/fixed_width_font.h"
@@ -120,7 +119,7 @@ DEFINE_RUNTIME_CLASSTYPE_CODE(Ultima8Engine, CoreApp)
 
 Ultima8Engine::Ultima8Engine(OSystem *syst, const Ultima::UltimaGameDescription *gameDesc) :
 		Shared::UltimaEngine(syst, gameDesc), CoreApp(gameDesc), _saveCount(0), _game(0),
-		_kernel(0), _objectManager(0), _hidManager(0), _mouse(0), _ucMachine(0), _screen(0),
+		_kernel(0), _objectManager(0), _mouse(0), _ucMachine(0), _screen(0),
 		_fontManager(0), _paletteManager(0), _gameData(0), _world(0), _desktopGump(0),
 		_gameMapGump(0), _avatarMoverProcess(0), _frameSkip(false), _frameLimit(true),
 		_interpolate(true), _animationRate(100), _avatarInStasis(false), _paintEditorItems(false),
@@ -138,7 +137,6 @@ Ultima8Engine::~Ultima8Engine() {
 	FORGET_OBJECT(_events);
 	FORGET_OBJECT(_kernel);
 	FORGET_OBJECT(_objectManager);
-	FORGET_OBJECT(_hidManager);
 	FORGET_OBJECT(_audioMixer);
 	FORGET_OBJECT(_ucMachine);
 	FORGET_OBJECT(_paletteManager);
@@ -264,8 +262,6 @@ void Ultima8Engine::startup() {
 
 	GraphicSysInit();
 
-	_hidManager = new HIDManager();
-
 	// Audio Mixer
 	_audioMixer = new AudioMixer(_mixer);
 
@@ -290,23 +286,6 @@ void Ultima8Engine::startupGame() {
 
 	_gameData = new GameData(_gameInfo);
 
-	Std::string bindingsfile;
-	if (GAME_IS_U8) {
-		bindingsfile = "@data/u8bindings.ini";
-	} else if (GAME_IS_REMORSE) {
-		bindingsfile = "@data/remorsebindings.ini";
-	}
-	if (!bindingsfile.empty()) {
-		// system-wide config
-		if (_configFileMan->readConfigFile(bindingsfile,
-			"bindings", true))
-			debug(MM_INFO, "%s... Ok", bindingsfile.c_str());
-		else
-			debug(MM_MINOR_WARN, "%s... Failed", bindingsfile.c_str());
-	}
-
-	_hidManager->loadBindings();
-
 	if (GAME_IS_U8) {
 		_ucMachine = new UCMachine(U8Intrinsics, 256);
 	} else if (GAME_IS_REMORSE) {
@@ -717,7 +696,6 @@ void Ultima8Engine::enterTextMode(Gump *gump) {
 		if (_down[key]) {
 			_down[key] = false;
 			_lastDown[key] = false;
-			_hidManager->handleEvent((HID_Key)key, HID_EVENT_RELEASE);
 		}
 	}
 
@@ -801,11 +779,6 @@ void Ultima8Engine::handleEvent(const Common::Event &event) {
 		break;
 	}
 
-	if (_mouse->dragging() == Mouse::DRAG_NOT && evn == HID_EVENT_DEPRESS) {
-		if (_hidManager->handleEvent(key, HID_EVENT_PREEMPT))
-			return;
-	}
-
 	// Text mode input. A few hacks here
 	Gump *gump = 0;
 
@@ -908,14 +881,9 @@ void Ultima8Engine::handleEvent(const Common::Event &event) {
 	}
 
 	if (_mouse->dragging() == Mouse::DRAG_NOT && !handled) {
-		if (_hidManager->handleEvent(key, evn))
-			handled = true;
 		if (evn == HID_EVENT_DEPRESS) {
 			_down[key] = true;
-			if (now - _lastDown[key] < DOUBLE_CLICK_TIMEOUT &&
-				_lastDown[key] != 0) {
-				if (_hidManager->handleEvent(key, HID_EVENT_DOUBLE))
-					handled = true;
+			if (now - _lastDown[key] < DOUBLE_CLICK_TIMEOUT && _lastDown[key] != 0) {
 				_lastDown[key] = 0;
 			} else {
 				_lastDown[key] = now;
@@ -939,7 +907,6 @@ void Ultima8Engine::handleDelayedEvents() {
 		if (now - _lastDown[key] > DOUBLE_CLICK_TIMEOUT &&
 			_lastDown[key] != 0 && !_down[key]) {
 			_lastDown[key] = 0;
-			_hidManager->handleEvent((HID_Key)key, HID_EVENT_CLICK);
 		}
 	}
 
diff --git a/engines/ultima/ultima8/ultima8.h b/engines/ultima/ultima8/ultima8.h
index 4970d53878..7ecca762f4 100644
--- a/engines/ultima/ultima8/ultima8.h
+++ b/engines/ultima/ultima8/ultima8.h
@@ -68,7 +68,6 @@ class GameData;
 class World;
 class ObjectManager;
 class FontManager;
-class HIDManager;
 class Mouse;
 class AvatarMoverProcess;
 class IDataSource;
@@ -94,7 +93,6 @@ private:
 	Kernel *_kernel;
 	MemoryManager *_memoryManager;
 	ObjectManager *_objectManager;
-	HIDManager *_hidManager;
 	UCMachine *_ucMachine;
 	RenderSurface *_screen;
 	Mouse *_mouse;


Commit: c99302c7b6d8beadf00cd7b843ad0ee50b3cf316
    https://github.com/scummvm/scummvm/commit/c99302c7b6d8beadf00cd7b843ad0ee50b3cf316
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-03-08T13:51:52-07:00

Commit Message:
ULTIMA8: Remove now deprecated settings/controls gumps

Changed paths:
  R engines/ultima/ultima8/gumps/controls_gump.cpp
  R engines/ultima/ultima8/gumps/controls_gump.h
  R engines/ultima/ultima8/gumps/options_gump.cpp
  R engines/ultima/ultima8/gumps/options_gump.h
    engines/ultima/module.mk
    engines/ultima/ultima8/gumps/menu_gump.cpp


diff --git a/engines/ultima/module.mk b/engines/ultima/module.mk
index a7a4f22461..c80c42e095 100644
--- a/engines/ultima/module.mk
+++ b/engines/ultima/module.mk
@@ -397,7 +397,6 @@ MODULE_OBJS := \
 	ultima8/gumps/bark_gump.o \
 	ultima8/gumps/book_gump.o \
 	ultima8/gumps/container_gump.o \
-	ultima8/gumps/controls_gump.o \
 	ultima8/gumps/credits_gump.o \
 	ultima8/gumps/desktop_gump.o \
 	ultima8/gumps/fast_area_vis_gump.o \
@@ -413,7 +412,6 @@ MODULE_OBJS := \
 	ultima8/gumps/mini_stats_gump.o \
 	ultima8/gumps/modal_gump.o \
 	ultima8/gumps/movie_gump.o \
-	ultima8/gumps/options_gump.o \
 	ultima8/gumps/paged_gump.o \
 	ultima8/gumps/paperdoll_gump.o \
 	ultima8/gumps/quit_gump.o \
diff --git a/engines/ultima/ultima8/gumps/controls_gump.cpp b/engines/ultima/ultima8/gumps/controls_gump.cpp
deleted file mode 100644
index 0b4f6cf3aa..0000000000
--- a/engines/ultima/ultima8/gumps/controls_gump.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ultima/ultima8/misc/pent_include.h"
-#include "ultima/ultima8/gumps/controls_gump.h"
-
-#include "ultima/ultima8/graphics/render_surface.h"
-#include "ultima/ultima8/gumps/desktop_gump.h"
-#include "ultima/ultima8/gumps/widgets/button_widget.h"
-#include "ultima/ultima8/gumps/widgets/text_widget.h"
-#include "ultima/ultima8/gumps/paged_gump.h"
-
-#include "ultima/ultima8/filesys/idata_source.h"
-#include "ultima/ultima8/filesys/odata_source.h"
-#include "ultima/ultima8/misc/p_dynamic_cast.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-static const int font = 9;
-
-class ControlEntryGump : public Gump {
-public:
-	ENABLE_RUNTIME_CLASSTYPE()
-	ControlEntryGump(int x_, int y_, int width, const char *binding, const char *name);
-	~ControlEntryGump() override;
-	void InitGump(Gump *newparent, bool take_focus = true) override;
-	void ChildNotify(Gump *child, uint32 message) override;
-	void init();
-protected:
-	istring _bindingName;
-	Std::string _displayedName;
-	Gump *_button;
-};
-
-DEFINE_RUNTIME_CLASSTYPE_CODE(ControlEntryGump, Gump)
-
-ControlEntryGump::ControlEntryGump(int x_, int y_, int width, const char *binding, const char *name)
-	: Gump(x_, y_, width, 5), _bindingName(binding), _displayedName(name) {
-}
-
-ControlEntryGump::~ControlEntryGump() {
-}
-
-void ControlEntryGump::InitGump(Gump *newparent, bool take_focus) {
-	Gump::InitGump(newparent, take_focus);
-
-	init();
-}
-
-void ControlEntryGump::init() {
-	// close all children so we can simply use this method to re init
-	Std::list<Gump *>::iterator it;
-	for (it = _children.begin(); it != _children.end(); ++it) {
-		Gump *g = *it;
-		if ( !g->IsClosing())
-			g->Close();
-	}
-
-	Std::vector<const char *> controls;
-
-	Rect rect;
-	_button = new ButtonWidget(0, 0, _displayedName, true, font, 0x80D000D0);
-	_button->InitGump(this);
-	_button->GetDims(rect);
-
-	_dims.h = rect.h;
-
-	//HIDManager * hidmanager = HIDManager::get_instance();
-	//hidmanager->getBindings(bindingName, controls);
-	/*  int x = 120;
-	    Std::vector<const char *>::iterator i;
-	    for (i = controls.begin(); i != controls.end(); ++i)
-	    {
-	        Gump * widget;
-	        widget = new TextWidget(x, 0, *i, true, font);
-	        widget->InitGump(this, false);
-	        widget->GetDims(rect);
-	        x += rect.w + 5;
-	    }
-	*/
-}
-
-void ControlEntryGump::ChildNotify(Gump *child, uint32 message) {
-#ifdef TODO
-	ObjId cid = child->getObjId();
-	if (message == ButtonWidget::BUTTON_CLICK) {
-		if (cid == _button->getObjId()) {
-			ModalGump *gump = new BindGump(&_bindingName, _parent);
-			gump->InitGump(0);
-			gump->setRelativePosition(CENTER);
-		}
-	} else if (message == BindGump::UPDATE) {
-		_parent->ChildNotify(child, message);
-	}
-#endif
-}
-
-DEFINE_RUNTIME_CLASSTYPE_CODE(ControlsGump, Gump)
-
-ControlsGump::ControlsGump(): Gump(0, 0, 5, 5) {
-}
-
-ControlsGump::~ControlsGump() {
-}
-
-void ControlsGump::InitGump(Gump *newparent, bool take_focus) {
-	Gump::InitGump(newparent, take_focus);
-
-	_dims.w = 220;
-	_dims.h = 120;
-
-	Gump *widget = new TextWidget(0, 0, "Controls", true, font);
-	widget->InitGump(this, false);
-	widget = new TextWidget(120, 0, "Keys", true, font);
-	widget->InitGump(this, false);
-}
-
-void ControlsGump::addEntry(const char *binding, const char *name, int &x, int &y) {
-	Rect rect;
-	Gump *widget = new ControlEntryGump(x, y, _dims.w - x, binding, name);
-	widget->InitGump(this);
-	widget->GetDims(rect);
-	y += rect.h;
-}
-
-void ControlsGump::ChildNotify(Gump *child, uint32 message) {
-#ifdef TODO
-	if (message == BindGump::UPDATE) {
-		Std::list<Gump *>::iterator it;
-		for (it = _children.begin(); it != _children.end(); ++it) {
-			ControlEntryGump *g =  p_dynamic_cast<ControlEntryGump *>(*it);
-			if (g)
-				g->init();
-		}
-	}
-#endif
-}
-
-void ControlsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
-	Gump::PaintThis(surf, lerp_factor, scaled);
-}
-
-bool ControlsGump::OnKeyDown(int key, int mod) {
-	return false;
-}
-
-//static
-void ControlsGump::showEngineMenu(PagedGump *pagedgump) {
-	ControlsGump *gump = new ControlsGump();
-	gump->InitGump(pagedgump, false);
-	int x = 4;
-	int y = 12;
-	gump->addEntry("quickSave", "Quick Save", x, y);
-	gump->addEntry("quickLoad", "Quick Load", x, y);
-	gump->addEntry("avatarInStasis", "Stasis Mode", x, y);
-	gump->addEntry("engineStats", "Engine Stats", x, y);
-	gump->addEntry("paintEditorItems", "View Editor Items", x, y);
-	gump->addEntry("itemLocator", "Locate Item", x, y);
-	gump->addEntry("toggleFrameByFrame", "Single Frame Mode", x, y);
-	gump->addEntry("advanceFrameByFrame", "Next Frame", x, y);
-	gump->addEntry("toggleConsole", "Console", x, y);
-
-	pagedgump->addPage(gump);
-}
-
-// static
-void ControlsGump::showU8Menu(PagedGump *pagedgump) {
-	ControlsGump *gump = new ControlsGump();
-	gump->InitGump(pagedgump, false);
-	int x = 4;
-	int y = 12;
-	gump->addEntry("toggleCombat", "Combat Mode", x, y);
-	gump->addEntry("openInventory", "Open Inventory", x, y);
-	gump->addEntry("openBackpack", "Open Backpack", x, y);
-	gump->addEntry("recall", "Recall", x, y);
-	gump->addEntry("runFirstEgg", "First Scene", x, y);
-	gump->addEntry("runExecutionEgg", "Execution Scene", x, y);
-	gump->addEntry("u8ShapeViewer", "Shape Viewer", x, y);
-	gump->addEntry("showMenu", "Menu", x, y);
-	gump->addEntry("quit", "Quit", x, y);
-
-	pagedgump->addPage(gump);
-}
-
-bool ControlsGump::loadData(IDataSource *ids) {
-	return true;
-}
-
-void ControlsGump::saveData(ODataSource *ods) {
-}
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/gumps/controls_gump.h b/engines/ultima/ultima8/gumps/controls_gump.h
deleted file mode 100644
index 1138420831..0000000000
--- a/engines/ultima/ultima8/gumps/controls_gump.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ULTIMA8_GUMPS_CONTROLSGUMP_H
-#define ULTIMA8_GUMPS_CONTROLSGUMP_H
-
-#include "ultima/ultima8/gumps/gump.h"
-#include "ultima/ultima8/misc/p_dynamic_cast.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-class PagedGump;
-
-class ControlsGump : public Gump {
-public:
-	ENABLE_RUNTIME_CLASSTYPE()
-
-	ControlsGump();
-	~ControlsGump() override;
-
-	// Init the gump, call after construction
-	void InitGump(Gump *newparent, bool take_focus = true) override;
-
-	// Paint the Gump
-	void PaintThis(RenderSurface *, int32 lerp_factor, bool scaled) override;
-
-	bool OnKeyDown(int key, int mod) override;
-	void ChildNotify(Gump *child, uint32 message) override;
-
-	static void showEngineMenu(PagedGump *pagedgump);
-	static void showU8Menu(PagedGump *pagedgump);
-	void addEntry(const char *binding, const char *name, int &x, int &y);
-
-	bool loadData(IDataSource *ids);
-protected:
-	void saveData(ODataSource *ods) override;
-};
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
-
-#endif
diff --git a/engines/ultima/ultima8/gumps/menu_gump.cpp b/engines/ultima/ultima8/gumps/menu_gump.cpp
index cdbf81bb68..68a88de4b0 100644
--- a/engines/ultima/ultima8/gumps/menu_gump.cpp
+++ b/engines/ultima/ultima8/gumps/menu_gump.cpp
@@ -31,8 +31,6 @@
 #include "ultima/ultima8/gumps/widgets/button_widget.h"
 #include "ultima/ultima8/gumps/widgets/text_widget.h"
 #include "ultima/ultima8/gumps/quit_gump.h"
-#include "ultima/ultima8/gumps/controls_gump.h"
-#include "ultima/ultima8/gumps/options_gump.h"
 #include "ultima/ultima8/gumps/paged_gump.h"
 #include "ultima/ultima8/games/game.h"
 #include "ultima/ultima8/world/actors/main_actor.h"
@@ -230,14 +228,9 @@ void MenuGump::selectEntry(int entry) {
 	case 3: // Read/Write Diary
 		U8SaveGump::showLoadSaveGump(this, entry == 3);
 		break;
-	case 4: { // Options
-		PagedGump *gump = new PagedGump(34, -38, 3, gumpShape);
-		gump->InitGump(this);
-
-		OptionsGump *options = new OptionsGump();
-		options->InitGump(gump, false);
-		gump->addPage(options);
-		gump->setRelativePosition(CENTER);
+	case 4: {
+		// Options
+		// TODO: Show options
 	}
 	break;
 	case 5: // Credits
diff --git a/engines/ultima/ultima8/gumps/options_gump.cpp b/engines/ultima/ultima8/gumps/options_gump.cpp
deleted file mode 100644
index 5ec3d93cec..0000000000
--- a/engines/ultima/ultima8/gumps/options_gump.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "ultima/ultima8/misc/pent_include.h"
-#include "ultima/ultima8/gumps/options_gump.h"
-
-#include "ultima/ultima8/graphics/render_surface.h"
-#include "ultima/ultima8/gumps/desktop_gump.h"
-#include "ultima/ultima8/gumps/widgets/button_widget.h"
-#include "ultima/ultima8/gumps/widgets/text_widget.h"
-#include "ultima/ultima8/gumps/controls_gump.h"
-#include "ultima/ultima8/gumps/paged_gump.h"
-
-#include "ultima/ultima8/filesys/idata_source.h"
-#include "ultima/ultima8/filesys/odata_source.h"
-#include "common/events.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-static const int font = 0;
-
-DEFINE_RUNTIME_CLASSTYPE_CODE(OptionsGump, Gump)
-
-OptionsGump::OptionsGump(): Gump(0, 0, 5, 5) {
-}
-
-OptionsGump::~OptionsGump() {
-}
-
-void OptionsGump::InitGump(Gump *newparent, bool take_focus) {
-	Gump::InitGump(newparent, take_focus);
-
-	_dims.w = 220;
-	_dims.h = 120;
-
-	int x_ = _dims.w / 2 + 14;
-	int y_ = 4;
-	Gump *widget;
-
-#if 0
-	widget = new ButtonWidget(x_, y_, "1. Video", true, font, 0x804000B0);
-	widget->InitGump(this);
-	widget->SetIndex(1);
-#endif
-	y_ += 14;
-
-#if 0
-	widget = new ButtonWidget(x_, y_, "2. Audio", true, font, 0x804000B0);
-	widget->InitGump(this);
-	widget->SetIndex(2);
-#endif
-	y_ += 14;
-
-	widget = new ButtonWidget(x_, y_, "3. Controls", true, font, 0x804000B0);
-	widget->InitGump(this);
-	widget->SetIndex(3);
-	y_ += 14;
-
-#if 0
-	widget = new ButtonWidget(x_, y_, "4. Gameplay", true, font, 0x804000B0);
-	widget->InitGump(this);
-	widget->SetIndex(4);
-#endif
-	y_ += 14;
-}
-
-void OptionsGump::ChildNotify(Gump *child, uint32 message) {
-	if (message == ButtonWidget::BUTTON_CLICK) {
-		selectEntry(child->GetIndex());
-	}
-}
-
-void OptionsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
-	Gump::PaintThis(surf, lerp_factor, scaled);
-}
-
-static const int gumpShape = 35;
-
-bool OptionsGump::OnKeyDown(int key, int mod) {
-	if (key == Common::KEYCODE_ESCAPE) {
-		_parent->Close();
-	} else if (key >= Common::KEYCODE_1 && key <= Common::KEYCODE_9) {
-		// Minor hack.
-		selectEntry(key - Common::KEYCODE_1 + 1);
-		return true;
-	}
-	return true;
-}
-
-void OptionsGump::selectEntry(int entry) {
-	switch (entry) {
-	case 1: {
-		// Video
-	} break;
-	case 2: {
-		// Audio
-	} break;
-	case 3: {
-		// Controls
-		PagedGump *gump = new PagedGump(34, -38, 3, gumpShape);
-		gump->InitGump(this);
-
-		ControlsGump::showEngineMenu(gump);
-		ControlsGump::showU8Menu(gump);
-
-		// The parent to this gump is actually  a PagedGump,
-		// and this gump does not cover the entire parent.
-		gump->setRelativePosition(CENTER);
-	}
-	break;
-	case 4: {
-		// Gameplay
-	} break;
-	case 5: {
-	} break;
-	case 6: {
-	} break;
-	default:
-		break;
-	}
-}
-
-bool OptionsGump::loadData(IDataSource *ids) {
-	return true;
-}
-
-void OptionsGump::saveData(ODataSource *ods) {
-}
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
diff --git a/engines/ultima/ultima8/gumps/options_gump.h b/engines/ultima/ultima8/gumps/options_gump.h
deleted file mode 100644
index a30499caca..0000000000
--- a/engines/ultima/ultima8/gumps/options_gump.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef ULTIMA8_GUMPS_OPTIONSGUMP_H
-#define ULTIMA8_GUMPS_OPTIONSGUMP_H
-
-#include "ultima/ultima8/gumps/gump.h"
-#include "ultima/ultima8/misc/p_dynamic_cast.h"
-
-namespace Ultima {
-namespace Ultima8 {
-
-class OptionsGump : public Gump {
-public:
-	ENABLE_RUNTIME_CLASSTYPE()
-
-	OptionsGump();
-	~OptionsGump() override;
-
-	// Init the gump, call after construction
-	void InitGump(Gump *newparent, bool take_focus = true) override;
-
-	// Paint the Gump
-	void PaintThis(RenderSurface *, int32 lerp_factor, bool scaled) override;
-
-	bool OnKeyDown(int key, int mod) override;
-	void ChildNotify(Gump *child, uint32 message) override;
-
-	bool loadData(IDataSource *ids);
-protected:
-	void saveData(ODataSource *ods) override;
-
-	virtual void selectEntry(int entry);
-};
-
-} // End of namespace Ultima8
-} // End of namespace Ultima
-
-#endif




More information about the Scummvm-git-logs mailing list