{"id":55,"date":"2021-07-27T05:13:58","date_gmt":"2021-07-27T05:13:58","guid":{"rendered":"https:\/\/blogs.scummvm.org\/ayyg\/?p=55"},"modified":"2021-07-27T05:13:58","modified_gmt":"2021-07-27T05:13:58","slug":"the-beginning-of-the-end-2-progress-report","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/ayyg\/2021\/07\/27\/the-beginning-of-the-end-2-progress-report\/","title":{"rendered":"The Beginning of The End 2 (Progress Report)"},"content":{"rendered":"\n<p>Good morning\/afternoon\/evening. With saves implemented and most warnings dealt with we&#8217;re one step closer to the final stage. The game is should be mostly playable at the moment, but the only way to verify that is to actually test it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Debug Commands<\/h2>\n\n\n\n<p>In order to facilitate our endeavors, it is useful to create lots of debug commands (I&#8217;ve explained how to implement them in the last post).<\/p>\n\n\n\n<p>Here is the full list of commands added so far:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Input: &lt;None&gt;. Kills the center actor\nbool cmdKillProtag(int argc, const char **argv);\n\n\/\/ Input: &lt;Actor ID&gt;. Kills an actor\nbool cmdKill(int argc, const char **argv);\n\n\/\/ Input: &lt;Object ID&gt;. Prints an object's name\nbool cmdObjName(int argc, const char **argv);\n\n\/\/ Input: &lt;Name Index&gt;. Prints an ObjectID corresponding to the name index.\nbool cmdObjNameIndexToID(int argc, const char **argv);\n\n\/\/ Input: &lt;Object Name&gt;. Prints a list of objects containing the string in their name\nbool cmdSearchObj(int argc, const char **argv);\n\n\/\/ Input: &lt;Object ID&gt;. Adds the object to the center actor's inventory.\nbool cmdAddObj(int argc, const char **argv);\n\n\/\/ Input: &lt;1\/0&gt;. Sets godmode\nbool cmdGodmode(int argc, const char **argv);\n\n\/\/ Input: &lt;1\/0&gt;. Sets whether the position coordinates show\nbool cmdPosition(int argc, const char **argv);\n\n\/\/ Input: &lt;1\/0&gt;. Sets whether an item's stats show when holding it\nbool cmdStats(int argc, const char **argv);\n\n\/\/ Input: &lt;1\/0&gt;. Sets whether you can teleport by clicking on the screen\nbool cmdTeleportOnClick(int argc, const char **argv);\n\n\/\/ Input: &lt;u&gt; &lt;v&gt; &lt;z&gt;. Teleports the center character to the given position\nbool cmdTeleport(int argc, const char **argv);\n\n\/\/ Input: &lt;Actor ID&gt;. Teleports the character to the npc\nbool cmdTeleportToNPC(int argc, const char **argv);\n\n\/\/ Input: &lt;Actor ID&gt; &lt;u&gt; &lt;v&gt; &lt;z&gt;. Teleports the npc to the given coordinate\nbool cmdTeleportNPC(int argc, const char **argv);\n\n\/\/ Input: &lt;Actor ID&gt;. Teleports the npc to the center actor\nbool cmdTeleportNPCHere(int argc, const char **argv);\n\n\/\/ Input: &lt;None&gt;. Saves the current location in a variable\nbool cmdSaveLoc(int argc, const char **argv);\n\n\/\/ Input: &lt;None&gt;. Teleports the center actor to the saved location\nbool cmdLoadLoc(int argc, const char **argv);\n\n\/\/ Input: &lt;Place ID&gt;. Teleports to the given place\nbool cmdGotoPlace(int argc, const char **argv);\n\n\/\/ Input: &lt;None&gt;. Lists all of the place names along with their IDs\nbool cmdListPlaces(int argc, const char **argv);\n\n\/\/ Input: &lt;Map Scale Multiplier&gt;. Dumps the map into a png.\nbool cmdDumpMap(int argc, const char **argv);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Method<\/h2>\n\n\n\n<p>I&#8217;ve used the <a href=\"https:\/\/www.youtube.com\/watch?v=FNTdx4aSaHw&amp;list=PLT0Vf_mchC9Pbv7nb3sshM66VMFtknuOk\">playlist by Sinatar<\/a> as a basis of what a normal gameplay would look like (also helps me keep track of the normal course of the story).  With that open, I proceed along the gameplay with ScummVM and if there&#8217;s something specific I wish to check, I open DOSBox and compare the two. <em>Having backwards compatible saves here helps a lot.<\/em><\/p>\n\n\n\n<p>One of the first things I wished to check was whether I could reach an ending. I did some research and took notice that I needed three <em>Golden Apples<\/em> to open the passage to the underworld.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-2.png\" alt=\"\" class=\"wp-image-56\" srcset=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-2.png 640w, https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-2-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Opening the passage to the Underworld.<\/figcaption><\/figure><\/div>\n\n\n\n<p>Once there we can teleport the final boss, <em>Sariloth<\/em> to us with <code>teleport_npc_here 32977<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-3.png\" alt=\"\" class=\"wp-image-57\" srcset=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-3.png 640w, https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-3-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>The final fight?<\/figcaption><\/figure><\/div>\n\n\n\n<p>Defeating Sariloth on DOSBox caused one of the endings to play, but here on ScummVM it only made the <em>New Game<\/em> dialog pop up.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-4.png\" alt=\"\" class=\"wp-image-58\" srcset=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-4.png 640w, https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-4-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure><\/div>\n\n\n\n<p>Comparing the source code for playing the endings we can see that some code got lost in the reformatting.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tromode.cpp:\nvoid setLostroMode(void) {\n\tallPlayerActorsDead = false;\n\tif (GameMode::newmodeFlag)\n\t\tGameMode::update();\n\n\tif (!abortFlag) {\n...<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>original\/tromode.cpp\nvoid setLostroMode( void )\n{\n\twaitForVideoFile( \"INTRO.SMK\");\n\tallPlayerActorsDead = FALSE;\n\tif (GameMode::newmodeFlag)\n\t\tGameMode::update();\n\n\tif (!abortFlag)\n\t{\n...<\/code><\/pre>\n\n\n\n<p><code>abortFlag<\/code> is set to <code>false<\/code> inside of <code>waitForVideoFile<\/code>, so we fix that by adding a <code>abortFlag = false;<\/code> at the top of <code>setLostroMode<\/code> (this code is candidate for some more code reformatting, though).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"407\" src=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-5.png\" alt=\"\" class=\"wp-image-59\" srcset=\"https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-5.png 537w, https:\/\/blogs.scummvm.org\/ayyg\/wp-content\/uploads\/sites\/7\/2021\/07\/image-5-300x227.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><figcaption><em>We got one of the bad endings&#8230;<\/em> <em>Spoiler warning?<\/em><\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Bugs<\/h2>\n\n\n\n<p>Other than that, by following the walkthrough I took notice of some lesser bugs as well. Here is a list of the bugs I&#8217;ve annotated so far:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Bug<\/td><td class=\"has-text-align-center\" data-align=\"center\">Steps to reproduce<\/td><td class=\"has-text-align-center\" data-align=\"center\">Explanation<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Speech is too quiet (compared to music\/sound effects)<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Music does not loop when it finishes<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">It loops periodically on the original<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Music does not disappear completely when volume is set to zero<\/td><td class=\"has-text-align-center\" data-align=\"center\">Set the music to zero<\/td><td class=\"has-text-align-center\" data-align=\"center\">You can hear it faintly even when the slider is fully on the left<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Music does not restart<\/td><td class=\"has-text-align-center\" data-align=\"center\">After setting the music to zero, raise it once again<\/td><td class=\"has-text-align-center\" data-align=\"center\">It should restart on the original<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Music Volume not reflected to what is on the config when the game starts<\/td><td class=\"has-text-align-center\" data-align=\"center\">Set the volume to 0, restart game<\/td><td class=\"has-text-align-center\" data-align=\"center\">The volume will be at 0 in the options but music will be blasting at full volume<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Arrow sprite not changing when reading scroll<\/td><td class=\"has-text-align-center\" data-align=\"center\">Open the scroll in the Padavis Inn<\/td><td class=\"has-text-align-center\" data-align=\"center\">The arrow sprite should change to an up arrow when hovering on the upper part and vice-versa for the lower part on the original<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Close parchment button not working<\/td><td class=\"has-text-align-center\" data-align=\"center\">Open the parchments on the notices board in Padavis Inn<\/td><td class=\"has-text-align-center\" data-align=\"center\">The close button does not work (although clicking outside the parchment closes it)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Speech not finishing before dialog to buy beer starts<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pavilion Bar &#8211; buy beer with Riddenbutter<\/td><td class=\"has-text-align-center\" data-align=\"center\">On the original, the buy dialog should appear after the speech ends<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Crash on reading Kaidar&#8217;s book<\/td><td class=\"has-text-align-center\" data-align=\"center\">cmd: add_obj 274 and read book in chest<\/td><td class=\"has-text-align-center\" data-align=\"center\">The book is readable on the original<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Crash on saving\/loading when spells are present<\/td><td class=\"has-text-align-center\" data-align=\"center\">Go to the Underworld and save when the Wraiths are casting spells, then load the save<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Crash on Credits (options menu)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Click on the credits button<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Fade-in not working when loading a world with WorldID &gt; 0 from the launcher<\/td><td class=\"has-text-align-center\" data-align=\"center\">Load a save from the Underworld from the launcher<\/td><td class=\"has-text-align-center\" data-align=\"center\">The screen flickers and the fade-in does work properly<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>From now on the development will consist mostly of playtesting and solving bugs. After that I suspect refactoring, solving warnings on other platforms and creating documentation may become of more importance. Thankfully I only have two weeks of school left, so in the worst case scenario I still have plenty of time after that. Let&#8217;s hope this project ends in success!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good morning\/afternoon\/evening. With saves implemented and most warnings dealt with we&#8217;re one step closer to the final stage. The game is should be mostly playable at the moment, but the only way to verify that is to actually test it. Debug Commands In order to facilitate our endeavors, it is useful to create lots of [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/posts\/55\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/ayyg\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}