{"id":985,"date":"2021-03-17T01:52:19","date_gmt":"2021-03-17T00:52:19","guid":{"rendered":"https:\/\/ofp-faguss.com\/blog\/?p=985"},"modified":"2021-03-29T21:26:03","modified_gmt":"2021-03-29T19:26:03","slug":"ofp-game-schedule-march-2021-update","status":"publish","type":"post","link":"https:\/\/ofp-faguss.com\/blog\/ofp-game-schedule-march-2021-update\/","title":{"rendered":"OFP Game Schedule &#8211; March 2021 Update"},"content":{"rendered":"<p>I keep making updates to the <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/fwatch\/116test\" target=\"_blank\">Fwatch 1.16<\/a> \/ <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/\" target=\"_blank\">OFP Game Schedule<\/a> and I felt like writing about the more important changes.<\/p>\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"island-cutscenes\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">Island Cutscenes<\/h2>\n<p>Operation Flashpoint (also known as Arma: Cold War Assault) has a nice feature where it will display a premade cutscene for the currently loaded island. <\/p>\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-1024x576.jpg\" alt=\"\" class=\"wp-image-993\" srcset=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-1024x576.jpg 1024w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-300x169.jpg 300w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-768x432.jpg 768w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-1536x864.jpg 1536w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-642x362.jpg 642w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene-128x72.jpg 128w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/islandcutscene.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<p>The blunder (one among many) is that the cutscene has to be in an external location instead of being packed in the same addon. So either you store it in the <em>dta\\scripts.pbo<\/em> (which you do not always want to replace) or in one of the game directories (usually <em>addons<\/em>) which complicates the installation process and creates a mess.<\/p>\n<p>Up until now my solution to this problem was to store the cutscene in a modfolder and change the island&#8217;s configuration so that it will read cutscene from that mod. The shortcoming of this fix is that the cutscene is now locked to a specific modfolder and you can&#8217;t change the mod&#8217;s name. Also I have to investigate and edit addons which is time-consuming.<\/p>\n<p>Ro\u017cek suggested to simply move data from the mod to the game directories (when the mod is loaded) just like I already do it with missions (since Fwatch 1.14 from 2015). I&#8217;ve implemented this and now cutscenes are moved from the <em>mod\\IslandCutscenes<\/em> to the <em>addons<\/em> folder.<\/p>\n<p>I appreciate the tip but I don&#8217;t appreciate that I had to went back and revert changes in <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=f4f9e26f,8539472c,c721b652,559d7b3a,456397ce,fd15fd15,798313d3,e49a0e26&amp;onlychangelog=1\" target=\"_blank\">8 mods<\/a> &#x1f609; Still, this is much better because I don&#8217;t have to modify addons anymore which means less work and less confusion when identifying addon versions.<\/p>\n<p>I was surprised by this idea because I haven&#8217;t thought of it and it made me wonder what other simple things I&#8217;m not seeing.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"modfolder-missions\"><\/a><\/p>\n<h4 class=\"wp-block-heading\">Modfolder Missions<\/h4>\n<p>While coding this feature I thought that I might as well handle other types of missions: the ones for the Mission Wizard (I don&#8217;t think anybody ever used them but just in case) and for the Mission Editor.<\/p>\n<p class=\"has-small-font-size\">See <a href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#missions\">list of folders<\/a> that Fwatch moves.<\/p>\n<p>This is convenient because:<\/p>\n<ul class=\"wp-block-list\">\n<li>missions are easier to access<\/li>\n<li>you can segregate them and reduce mess<\/li>\n<li>all the necessary files are contained within the modfolder so it&#8217;s easier to transfer it to other computers<\/li>\n<\/ul>\n<p>Mods are truly modular now and I&#8217;m really happy about it.<\/p>\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"correcting-pbos\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">Correcting PBOs<\/h2>\n<p>While reverting changes to the islands I&#8217;ve noticed that addons wouldn&#8217;t match. Apparently Mikero&#8217;s MakePbo.exe 1.75 DLL 3.52 shifts modification dates by one hour while packing files into a PBO archive. At first I thought every user would have different files but after an investigation it turned out it shifts timestamps exactly the same way everywhere &#8211; it&#8217;s not time zone dependent (thanks to Seth Barcello for testing).<\/p>\n<p>As long as every user follows the same installation scripts from the GS website then there&#8217;s no cause for concern but I&#8217;ve still implemented a fix:<\/p>\n<ul class=\"wp-block-list\">\n<li>Addon Installer will correct timestamps when using <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#makepbo\" target=\"_blank\">MAKEPBO<\/a> command<\/li>\n<li>Fwatch 1.16 will correct timestamps when using <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/fwatch\/command\/exe_makepbo\" target=\"_blank\">:exe makepbo<\/a> command<\/li>\n<li>It can be done manually via <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/pbofilelist\" target=\"_blank\">PBOfilelist<\/a> program<\/li>\n<\/ul>\n<p>I revisited all the installation scripts that ever used MAKEPBO command and redone the PBO packing in <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=b5677145,b7360a9f,1d4076ae,1e401281,798313d3,66131dda,e49a0e26,456397ce,c721b652,67e5dc4f&amp;onlychangelog=1\" target=\"_blank\">1<\/a><a href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=b5677145,b7360a9f,1d4076ae,1e401281,798313d3,66131dda,e49a0e26,456397ce,c721b652,67e5dc4f&amp;onlychangelog=1\" target=\"_blank\" rel=\"noreferrer noopener\">0<\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=b5677145,b7360a9f,1d4076ae,1e401281,798313d3,66131dda,e49a0e26,456397ce,c721b652,67e5dc4f&amp;onlychangelog=1\" target=\"_blank\"> mods<\/a>.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"why-is-having-completely-identical-pbos-important\"><\/a><\/p>\n<h4 class=\"wp-block-heading\">Why is having completely identical PBOs important?<\/h4>\n<p>I probably wouldn&#8217;t pay attention to this issue if it wasn&#8217;t for Ro\u017cek using <code>checkfiles[]<\/code> feature on his dedicated server which can be used to identify cheaters. If player&#8217;s PBO is different from the server&#8217;s PBO then a message will show up informing that this user has modified files. It will appear even if the files inside a PBO are identical but timestamps aren&#8217;t (because the file hash will be different).<\/p>\n<p>Another benefit is that players won&#8217;t have to download missions from the server if they already have them on their own computers and you can start playing the game much sooner.<\/p>\n<p>It&#8217;s also convenient when you&#8217;re investigating contents of the addons and comparing versions. Different file dates cause a confusion: <em>why is modification time different if the contents are identical?<\/em><\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"timestamps-in-installation-scripts\"><\/a><\/p>\n<h4 class=\"wp-block-heading\">Timestamps in Installation Scripts<\/h4>\n<p>To make files identical on every computer Addon Installer will set the file modification date (when using <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#edit\" target=\"_blank\">EDIT<\/a> and <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#makepbo\" target=\"_blank\">MAKEPBO<\/a> commands) to the date the particular mod version was added.<\/p>\n<p>I&#8217;ve recently added <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#filedate\" target=\"_blank\">FILEDATE<\/a> command so that you can control timestamps manually.<\/p>\n<p>While working on the PBO timestamps issue I&#8217;ve noticed there was a bug in the GS: when you&#8217;ve added a version jump then Addon Installer would use the date of that jump instead of the date of the version being jumped to. It&#8217;s fixed now.<\/p>\n<p>However, there is a problem with applying future changes to a version jump that includes EDIT and MAKEPBO commands. If I add a new version of the mod and modify the existing version jump to link to that new version then Addon Installer will set different timestamps and new users won&#8217;t have identical PBOs anymore. Obvious solution is to modify the script and add FILEDATE after every EDIT and MAKEPBO but it&#8217;s easy to forget about this! I could make the website do this automatically but it only creates further problems:<\/p>\n<ul class=\"wp-block-list\">\n<li>if you want update the addon in the future the don&#8217;t forget to remove the FILEDATE command<\/li>\n<li>the same installation script can&#8217;t be shared between sequential updates and version jumps<\/li>\n<\/ul>\n<p>I&#8217;m not sure yet how I&#8217;m going to tackle this issue.<\/p>\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"localization\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">Localization<\/h2>\n<p>OFP Game Schedule is now available in Polish. While translating I&#8217;ve noticed that my English writings on the website were overly terse and probably confusing for the users so I&#8217;ve elaborated some phrases and I hope it&#8217;s clearer now.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"character-encoding\"><\/a><\/p>\n<h4 class=\"wp-block-heading\">Character Encoding<\/h4>\n<p>The unfortunate reality of OFP is that it&#8217;s an old game that&#8217;s not Unicode compatible (now that I think about it even COD4 from 2007 wasn&#8217;t). Languages have their own coding, different files, they&#8217;re not compatible with each other and now you need to handle it somehow (or don&#8217;t if you&#8217;re smart and have moved to ARMA).<\/p>\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/im-not-a-smart-man.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/im-not-a-smart-man.jpg\" alt=\"\" class=\"wp-image-990\" width=\"236\" height=\"177\" srcset=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/im-not-a-smart-man.jpg 472w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/im-not-a-smart-man-300x225.jpg 300w\" sizes=\"(max-width: 236px) 100vw, 236px\" \/><\/a><\/figure>\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Unicode\" target=\"_blank\">Unicode<\/a> characters that users input on the website have to be converted to the <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_code_page\" target=\"_blank\">Windows code page<\/a> before sending them to the game. Second problem is that non-Russian users won&#8217;t see Cyrillic alphabet because they have different set of fonts.<\/p>\n<p>The approach I took in 2019 was to <a rel=\"noreferrer noopener\" href=\"https:\/\/youtu.be\/n-VIbaaLcuE?t=78\" data-type=\"URL\" data-id=\"https:\/\/youtu.be\/n-VIbaaLcuE?t=78\" target=\"_blank\">convert cyrillic to the English phonemes<\/a>. Now that there are three localizations every language has to have its own conversion key. When the user requests information from the website, current language setting (from <em>flashpoint.cfg<\/em> or <em>ColdWarAssault.cfg<\/em>) is sent along and afterwards the site responds in the following manner:<\/p>\n<ul class=\"wp-block-list\">\n<li>English players receive Russian in English phonemes and Polish stripped of diacritics<\/li>\n<li>Russian players receive English without changes and Polish stripped of diacritics<\/li>\n<li>Polish players receive English without changes and Russian phonetically in Polish<\/li>\n<\/ul>\n<p>Surprisingly I had fun coding this. It&#8217;s a niche that I believe few care about and I like filling it by making the game more comfortable for people from other countries. Also coming up with phonemes was amusing.<\/p>\n<p class=\"has-small-font-size\">See <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/Faguss\/OFP-Game-Schedule\/blob\/1213b10f5286781ef8ba518458568a67b1d5d3d6\/common.php#L2532\" target=\"_blank\">source code<\/a> of the function.<\/p>\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"conversion-in-the-installation-scripts\"><\/a><\/p>\n<h4 class=\"wp-block-heading\">Conversion in the Installation Scripts<\/h4>\n<p>While adding <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=25f5fe1b\" target=\"_blank\">ECP<\/a> mod to the database I had a need for the installation script to contain Windows code page characters. I&#8217;ve typed them as html entities and made the website decode it when serving a request. It&#8217;s not a great solution but it will do for now. Would have been more convenient if conversion was done automatically but what if you want to have both Unicode and Windows code page in the same text? For example Unicode Cyrillic as a comment in an OFP script and <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Windows-1251\" target=\"_blank\">Windows-1251<\/a> Cyrillic as a string for the game. I&#8217;m not sure yet how I&#8217;m going to tackle this issue.<\/p>\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"automatic-update-check\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">Automatic Update Check<\/h2>\n<p>Alex Mercer had a feature request to check for mod updates when you launch the game. This is done through <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/fwatch\/extras\" target=\"_blank\">dta\\anims.pbo<\/a> replacement. If applied the game will show how many mod updates there are, whether new Fwatch build is available and current installation status.<\/p>\n<p class=\"has-small-font-size\">I&#8217;ve updated <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=66131dda,b7360a9f,76c3522b,559d7b3a,fd94c19d,52070a39,55050ba5,b5677145,1e401281,c803832d&amp;onlychangelog=1\" target=\"_blank\">10 mods<\/a> so that they&#8217;ll get the new file. For vanilla replace it <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/fwatch\/download\/anims_fwatch.7z\" target=\"_blank\">manually<\/a> or use <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/fwatch\/116test\" target=\"_blank\">installer<\/a>.<\/p>\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"187\" src=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates-1024x187.jpg\" alt=\"\" class=\"wp-image-992\" srcset=\"https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates-1024x187.jpg 1024w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates-300x55.jpg 300w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates-768x140.jpg 768w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates-1536x280.jpg 1536w, https:\/\/ofp-faguss.com\/blog\/wp-content\/uploads\/2021\/03\/availablemodupdates.jpg 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<p>The challenge I had with this part was that processing downloaded information would cause the game to freeze for a second or two. This is not pleasant so I moved the code from SQF to SQS making the work done across multiple frames rather than all of it in a single frame (but with less convenient syntax). That&#8217;s an improvement but it would still stutter so I&#8217;ve added a sleep line to the script (aka intentionally slowed it down) when performing automated check (but not when user is doing it manually through the menu).<\/p>\n<p>Now the FPS is fine but it takes a few seconds for the message to show up. As the number of mods on the website increases I might perform this calculation on the server-side in the future.<\/p>\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n<p><a class=\"mwm-aal-item\" name=\"addon-installer\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">Addon Installer<\/h2>\n<p>As my ideas for the installation standard change the code has to follow and so I&#8217;ve done a major restructuring which I&#8217;m proud of. This is more relevant to me than to other users but nevertheless some practical changes have been made.<\/p>\n<p>Mirror URLs can now be placed between curly brackets so that it&#8217;s more convenient to edit them. In my installation scripts (<a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/show.php?mod=c803832d\" target=\"_blank\">example<\/a>) I&#8217;ve made <a rel=\"noreferrer noopener\" href=\"https:\/\/files.ofpisnotdead.com\/\" target=\"_blank\">files.ofpisnotdead.com<\/a> a top domain. This site is hosted by retrocz and it&#8217;s fast and reliable. Thanks!<\/p>\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#auto_installation\" target=\"_blank\">Automatic installation<\/a> algorithm has been upgraded. Folders that were previously ignored will now be processed. Mission type detection was improved and they&#8217;ll be sorted into appropriate folders. Of course it doesn&#8217;t handle every case but I think it should work for most of the addon \/ mod packages that were made.<\/p>\n<p class=\"has-small-font-size\">See <a rel=\"noreferrer noopener\" href=\"https:\/\/ofp-faguss.com\/schedule\/install_scripts#changelog\" target=\"_blank\">changelog<\/a> for more details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep making updates to the Fwatch 1.16 \/ OFP Game Schedule and I felt like writing about the more important changes. Island Cutscenes Operation Flashpoint (also known as Arma: Cold War Assault) has a nice feature where it will display a premade cutscene for the currently loaded island. The blunder (one among many) is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1001,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49,3,50],"tags":[],"class_list":["post-985","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ofp","category-pc-gaming","category-programming"],"_links":{"self":[{"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/posts\/985"}],"collection":[{"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/comments?post=985"}],"version-history":[{"count":23,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/posts\/985\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/posts\/985\/revisions\/1017"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/media\/1001"}],"wp:attachment":[{"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/media?parent=985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/categories?post=985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofp-faguss.com\/blog\/wp-json\/wp\/v2\/tags?post=985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}