How to set up a retro in 2021 (IIS) (Nitro HTML5) - (Part 2)

Object

?
Nov 10, 2017
229
107
As my tutorial is exceeding the max allowed chars per thread I've decided to split it into a series instead!

This is part 2 of the: How to set up a retro (IIS) - In this part we will be focusing on setting up Cosmic CMS and the Nitro converter.

What will we cover in part 2:
Cosmic CMS
Node
Nitro Converter

Cosmic set up:
It's finally time to set up Cosmic CMS! this is the part where things start to get a little exciting, as we will get to see our website start functioning.

The first step of our road to set up Cosmic CMS will be to enable the PHP extensions required by Cosmic to function properly and to do just that head to C:\Program Files\PHP scroll down until you find a file named "php" which is of file type "INI"
You must be registered for see images attach


Open the file in your preferred editor (Mine will be Visual Studio Code)

Scroll to the bottom of the file which should show the following lines of code
Code:
[PHP_CURL]
extension=php_curl.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
[PHP_MBSTRING]
extension=php_mbstring.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[PHP_SOAP]
extension=php_soap.dll
[PHP_XMLRPC]
extension=php_xmlrpc.dll

Beneath the
Code:
[PHP_XMLRPC]
extension=php_xmlrpc.dll

Add the following
Code:
extension=php_gd.dll
extension=php_pdo_mysql.dll

The next step
* If you have the URL Rewrite extension installed already, skip to the next step.

If you didn't install the URL Rewrite extension in part one, you'll have to install it now - . Simply click "Install this extension" and go through the setup process

Clone Cosmic:
Now we will have to clone the Cosmic repository and to do that you'll have to open your git bash application and enter the following:
Code:
cd C:/inetpub/wwwroot
press "enter" and then write
Code:
git clone https://git.krews.org/Raizer/Cosmic.git
and press enter once again. Cosmic will then be cloned into your C:/inetpub/wwwroot in a folder named "Cosmic"

Dependencies installation:
Next up, we will have to install all the dependencies that Cosmic CMS relies on, and to do that write
Code:
cd Cosmic
inside your git bash application, which will bring you into the following path: C:/inetpub/wwwroot/Cosmic

When you're in the root path of Cosmic enter the following command
Code:
composer install

This will install all the required composer dependencies for you.

We will then proceed to clone the necessary database files for Cosmic as well as the WebKit plugin for Arcturus that Cosmic will make use of.

Clone Cosmic assets:
To clone the necessary Cosmic assets, open up a new git bash session and write
Code:
cd desktop
And press "enter"

Once you're at the desktop path inside of your git bash application, write
Git:
git clone https://git.krews.org/Raizer/cosmic-assets.git
this will leave you with a folder on your desktop named "cosmic-assets".

Import the .SQL files:
Open your DBeaver application and just like previously, right-click on your database, hover "tools" and click "restore database".

Click on the orange folder icon next to the "Input File:" field and head to your desktop. Open up "cosmic-assets" -> Database and then double click on the "2.6" SQL file . Once the 2.6.sql file has been selected your "Input File:" field should say the following: C:\Users\YourUsername\Desktop\cosmic-assets\Database\2.6.sql

Press "Start" and then repeat the same for the "upload_fix_and_mailservice" SQL.

Here's a gif on how to do it:

Connect Cosmic with IIS:
The time has come! We will now be connecting Cosmic with IIS to make us able to browse our site with Cosmic CMS.

Step one:
Open up your Internet Information Services application and expand the VMIxxxx and then the "sites". Right-click on the "Default website" and then "remove".

You will then have to add a new site to IIS and to do that, right-click yet again on the "sites" and click "Add Website...". In the "Site name:" field enter whatever name you might like. In my case, I will just enter my domain name.

Next click the 3 dots next to the "Physical path:" field and browse into the "public" folder inside Cosmic. Once you have clicked on the "public" folder, click the "OK" button.

When you have selected the correct path to the public folder, you'll have to connect as your Administrator user to allow full permissions to Cosmic, and to do that, click the "Connect as ..." then click the "Specific user" and then "Set..." a new popup should now appear to which you have to fill in your VPS username & password. Once the credentials have been set click "OK" - To make sure you have entered the correct information click on "Test Settings..." A popup should now appear with 2 green checkmarks and then just click "Close".

Once you have done all of the above your "Add website" popup should look like this:
You must be registered for see images attach


If that is the case simply click "OK".

The next thing we will have to do is to add a server variable used by Cosmic and to do that, click on your site to left and then double click on "URL Rewrite". Once you're inside the URL Rewrite module, you should be able to click "View Server Variables..." on the right side. Click on the "View Server Variables..." and then "Add..." A new popup should appear in which you'll have to enter
Code:
REMOTE_ADDR
and then click "OK".

Step two:
To make Cosmic CMS able to communicate with our database, we'll have to set the correct credentials, and to do that, open the .ENV file located in the root of the Cosmic folder, and fill in your database credentials as well as the correct database name.

The last step:
We're finally at the last step! before we'll be able to browse our site!

Browse into
Code:
C:\inetpub\wwwroot\Cosmic\public
and edit the "web" configuration file with your prefered editor.
You must be registered for see images attach


Mark all the code inside of the file and replace it with the following code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <system.webServer>
      <rewrite>
         <rules>
            <rule name="habbo-imaging" stopProcessing="true">
               <match url="^habbo-imaging/avatarimage$" ignoreCase="false" />
               <action type="Rewrite" url="habbo-imaging/avatarimage.php" appendQueryString="true" />
            </rule>
            <rule name="Imported Rule 1" stopProcessing="true">
               <match url="^(.*)$" ignoreCase="false" />
               <conditions logicalGrouping="MatchAll">
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
               </conditions>
               <action type="Rewrite" url="index.php?{R:1}" appendQueryString="true" />
            </rule>
            <rule name="Rule1">
               <match url=".*" />
               <serverVariables>
                  <set name="REMOTE_ADDR" value="{HTTP_CF_Connecting_IP}" />
               </serverVariables>
               <action type="None" />
            </rule>
         </rules>
      </rewrite>
      <staticContent>
         <mimeMap fileExtension="." mimeType="text/xml" />
      </staticContent>
   </system.webServer>
</configuration>

Save the file and search for your domain name in your browser. You should now be able to browse around on your fully functional CMS!

Download the default assets:
For us to be able to actually have fun and play the hotel, we will need the default assets, that we will later be converting from .swf to .nitro files.

The pack that we will be cloning has been put together by me, so we won't have to download files from 3 different places in order to get the most updated and enjoyable hotel possible (with publicly released files).

The asset pack contains:
  • A huge & updated clothing pack -
  • The most up2date public catalog -
  • and then all the default assets from the "default swf pack" for Arcturus morningstar -

Let's get started:
It's time to get started and to do just that, open your Command Prompt and copy-paste the following
Code:
cd C:/inetpub/wwwroot/Cosmic/Public && git clone https://github.com/ObjectRetros/arcturus-base-pack.git client/flash

The command above will navigate into Cosmic's "public" folder and at the same time clone the assets we need into public -> client -> flash (the cloning might take a while).

Once everything has been cloned, we will have to update our catalogue with the included SQLs inside of the "Catalog-SQLS" folder, and just as you have done a few times now, open your DBeaver, right-click on your database and hover the "Tools" then select "Restore database" - Click the orange folder icon next to the "Input File:" field and navigate into the "C:\inetpub\wwwroot\Cosmic\public\client\flash\Catalog-SQLS", once you're inside the "Catalog-SQLS" folder start from the "catalog_clothing" SQL and all the way down to the bottom. Once you're at the bottom go into the "UPDATES" folder and run the SQLs from there from top to bottom as well.

Here's a GIF showing some of the process of importing the SQLs:

That's it for this section, next up will be to set up the Nitro converter, so that we can convert all our assets into usable nitro assets.

Nitro converter setup:
Alright, the time has come to convert all of our assets into usable nitro assets, and luckily for us the Nitro team has made a converter, which we will be using.

Step one:
The first step will be to install Node as we will be using the npm package manager, to install the necessary dependencies for the nitro converter, later on.

To install Node, simply head to and press on the "Windows installer", and go through the setup process.

Step two:
Head into your "C:\inetpub\wwwroot\Cosmic\public\client" and create a new folder called "html5" next inside of the "html5" folder create a new folder named "nitro-assets" - That's it you can now head to step three.

Step three:
The second step will be to clone the converter and to do that open your Command Prompt and navigate yourself into your desktop, usually, all you have to do is to write
Code:
cd desktop
and press enter.

Next, enter the following:
Code:
git clone https://git.krews.org/nitro/nitro-converter.git

Once the converter has been cloned, open the "nitro-converter" folder on your desktop and head to the "src" folder inside of it, and rename the "configuration.json.example" to "configuration.json", once you have renamed the configuration file, you'll have to set it up, so that it knows where to grab the files, that it should convert.

If you have been following along since part one of this series, and done everything 1:1 then linking everything will be easy for you, as I have already prepared the entire configuration, which you can copy below.
JSON:
{
  "output.folder": "C:/inetpub/wwwroot/Cosmic/public/client/html5/nitro-assets/",
  "flash.client.url": "http://localhost/client/flash",
  "gamedata.url": "${flash.client.url}/gamedata",
  "furnidata.load.url": "${gamedata.url}/furnidata.xml",
  "productdata.load.url": "${gamedata.url}/productdata.txt",
  "figuredata.load.url": "${gamedata.url}/figuredata.xml",
  "figuremap.load.url": "${gamedata.url}/figuremap.xml",
  "effectmap.load.url": "${gamedata.url}/effectmap.xml",
  "dynamic.download.pet.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
  "dynamic.download.figure.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
  "dynamic.download.effect.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
  "flash.dynamic.download.url": "${flash.client.url}/dcr/hof_furni",
  "dynamic.download.furniture.url": "${flash.dynamic.download.url}/%className%.swf",
  "external.variables.url": "${gamedata.url}/external_variables.txt",
  "external.texts.url": "${gamedata.url}/external_flash_texts.txt",
  "convert.figure": "1",
  "convert.effect": "1",
  "convert.furniture": "1",
  "convert.pet": "1",
  "misc.log_download_urls": "0"
}

Replace everything inside of your original configuration.json with the code above.

Once you have set up your configuration correctly, open your Command Prompt and navigate into the nitro-converter folder by entering the following:
Code:
cd C:\Users\YOUR-VPS-USERNAME\Desktop\nitro-converter

Once you're inside of the nitro-converter folder, in your command prompt, write "npm install" and press enter, once the dependencies have been installed it should look something like the image below.
You must be registered for see images attach


Now when the necessary dependencies have been installed, you can start converting your assets, and to do that, write:
Code:
npm run start
and press enter. The converter will then do its magic and convert all of your assets into usable nitro assets - This will take a while, so be patient and wait until it has finished.

Once all your assets has been converted, your converter should look something the image below:
You must be registered for see images attach


You have now successfully converted all of your assets into nitro assets.

The next part will be to set up the Arcturus Morningstar emulator. Which you can read more about in the part 3, which will be the last and final part of this series!

Good job! The next part will be how to set up:
Java
Arcturus Emulator
Latest Nitro version (as of 16th January 2022) - Yes we will be using the very new release v1.2
Nitro Imager for your CMS

To learn how to do all of the above, head to the part 3 of this series, which will be the last and final part🥳


Did I miss anything?
Please let me know if I missed anything, as the guide contains a lot of information.
 

Attachments

  • 1638741067299.png
    1638741067299.png
    24.4 KB · Views: 65
Last edited:

TheRealJayhorn

New Member
Dec 7, 2021
5
0
I'd need more info than that, is it IIS or cosmic that throws the error. eventually a screenshot will do
Yeah let me just log into the box real quick, it's when I try to load the website
9041870e6d85c7fb3a9765356ec9c9fd.png

 

Object

?
Nov 10, 2017
229
107
Yeah let me just log into the box real quick, it's when I try to load the website
9041870e6d85c7fb3a9765356ec9c9fd.png

Your database password seems to be incorrect - Make sure to edit the .env file with the correct credentials (My bad for forgetting to include this part in the thread. I have now corrected it.

"To make Cosmic CMS able to communicate with our database, we'll have to set the correct credentials, and to do that, open the .ENV file located in the root of the Cosmic folder, and fill in your database credentials as well as the correct database name."
 
Last edited:

Object

?
Nov 10, 2017
229
107
Alright, I got that fixed, but when I go to load into the hotel it's just stuck on an endless loading with the login, do you know how to fix that?
Not exactly no. Everything should be covered in the thread (to what I can remember on top of my head), so I feel like if everything has been done without any issues it should be fine. You can try and open dev tool (f12) and go to network and once u login, let me know if it gives u any error
 

TheRealJayhorn

New Member
Dec 7, 2021
5
0
Not exactly no. Everything should be covered in the thread (to what I can remember on top of my head), so I feel like if everything has been done without any issues it should be fine. You can try and open dev tool (f12) and go to network and once u login, let me know if it gives u any error
It's not giving me any errors with dev tool, everythings working fine on the website it's just the client being weird.
0cc7610f58db6039d6fe1a6a5ae3c753.png


It goes to load and restarts.
 

Object

?
Nov 10, 2017
229
107
It's not giving me any errors with dev tool, everythings working fine on the website it's just the client being weird.
0cc7610f58db6039d6fe1a6a5ae3c753.png


It goes to load and restarts.
Oh, the tutorial hasn't been finished yet as it stated at the very beginning of this thread, anything after the cosmic cms setup has yet to be explained. If you're trying to add the client yourself and seem to be stuck. I'd recommend that you head to the help section and ask there :D
Post automatically merged:

The thread has just been updated to contain the process of setting up the nitro converter as well!
 
Last edited:

Jamescool12

Member
Jan 17, 2014
139
12

2 "output.folder": "C:/inetpub/wwwroot/Cosmic/public/client/html5/nitro-assets/",
~
src/Main.ts:3:23 - error TS1005: ';' expected.

3 "flash.client.url": " ",
~
src/Main.ts:4:19 - error TS1005: ';' expected.

4 "gamedata.url": "${flash.client.url}/gamedata",
~
src/Main.ts:5:25 - error TS1005: ';' expected.

5 "furnidata.load.url": "${gamedata.url}/furnidata.xml",
~
src/Main.ts:6:27 - error TS1005: ';' expected.

6 "productdata.load.url": "${gamedata.url}/productdata.txt",
~
src/Main.ts:7:26 - error TS1005: ';' expected.

7 "figuredata.load.url": "${gamedata.url}/figuredata.xml",
~
src/Main.ts:8:25 - error TS1005: ';' expected.

8 "figuremap.load.url": "${gamedata.url}/figuremap.xml",
~
src/Main.ts:9:25 - error TS1005: ';' expected.

9 "effectmap.load.url": "${gamedata.url}/effectmap.xml",
~
src/Main.ts:10:31 - error TS1005: ';' expected.

10 "dynamic.download.pet.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:11:34 - error TS1005: ';' expected.

11 "dynamic.download.figure.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:12:34 - error TS1005: ';' expected.

12 "dynamic.download.effect.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:13:33 - error TS1005: ';' expected.

13 "flash.dynamic.download.url": "${flash.client.url}/dcr/hof_furni",
~
src/Main.ts:14:37 - error TS1005: ';' expected.

14 "dynamic.download.furniture.url": "${flash.dynamic.download.url}/%className%.swf",
~
src/Main.ts:15:29 - error TS1005: ';' expected.

15 "external.variables.url": "${gamedata.url}/external_variables.txt",
~
src/Main.ts:16:25 - error TS1005: ';' expected.

16 "external.texts.url": "${gamedata.url}/external_flash_texts.txt",
~
src/Main.ts:17:21 - error TS1005: ';' expected.

17 "convert.figure": "1",
~
src/Main.ts:18:21 - error TS1005: ';' expected.

18 "convert.effect": "1",
~
src/Main.ts:19:24 - error TS1005: ';' expected.

19 "convert.furniture": "1",
~
src/Main.ts:20:18 - error TS1005: ';' expected.

20 "convert.pet": "1",
~
src/Main.ts:21:29 - error TS1005: ';' expected.

21 "misc.log_download_urls": "0"
~
 

Object

?
Nov 10, 2017
229
107
2 "output.folder": "C:/inetpub/wwwroot/Cosmic/public/client/html5/nitro-assets/",
~
src/Main.ts:3:23 - error TS1005: ';' expected.

3 "flash.client.url": " ",
~
src/Main.ts:4:19 - error TS1005: ';' expected.

4 "gamedata.url": "${flash.client.url}/gamedata",
~
src/Main.ts:5:25 - error TS1005: ';' expected.

5 "furnidata.load.url": "${gamedata.url}/furnidata.xml",
~
src/Main.ts:6:27 - error TS1005: ';' expected.

6 "productdata.load.url": "${gamedata.url}/productdata.txt",
~
src/Main.ts:7:26 - error TS1005: ';' expected.

7 "figuredata.load.url": "${gamedata.url}/figuredata.xml",
~
src/Main.ts:8:25 - error TS1005: ';' expected.

8 "figuremap.load.url": "${gamedata.url}/figuremap.xml",
~
src/Main.ts:9:25 - error TS1005: ';' expected.

9 "effectmap.load.url": "${gamedata.url}/effectmap.xml",
~
src/Main.ts:10:31 - error TS1005: ';' expected.

10 "dynamic.download.pet.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:11:34 - error TS1005: ';' expected.

11 "dynamic.download.figure.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:12:34 - error TS1005: ';' expected.

12 "dynamic.download.effect.url": "${flash.client.url}/gordon/PRODUCTION/%className%.swf",
~
src/Main.ts:13:33 - error TS1005: ';' expected.

13 "flash.dynamic.download.url": "${flash.client.url}/dcr/hof_furni",
~
src/Main.ts:14:37 - error TS1005: ';' expected.

14 "dynamic.download.furniture.url": "${flash.dynamic.download.url}/%className%.swf",
~
src/Main.ts:15:29 - error TS1005: ';' expected.

15 "external.variables.url": "${gamedata.url}/external_variables.txt",
~
src/Main.ts:16:25 - error TS1005: ';' expected.

16 "external.texts.url": "${gamedata.url}/external_flash_texts.txt",
~
src/Main.ts:17:21 - error TS1005: ';' expected.

17 "convert.figure": "1",
~
src/Main.ts:18:21 - error TS1005: ';' expected.

18 "convert.effect": "1",
~
src/Main.ts:19:24 - error TS1005: ';' expected.

19 "convert.furniture": "1",
~
src/Main.ts:20:18 - error TS1005: ';' expected.

20 "convert.pet": "1",
~
src/Main.ts:21:29 - error TS1005: ';' expected.

21 "misc.log_download_urls": "0"
~
?
 

kimzyyyy

New Member
Mar 3, 2020
13
2
So i am trying to converting the assets but i keep getting error
 

Object

?
Nov 10, 2017
229
107
So i am trying to converting the assets but i keep getting error
How does your IIS site binding look like? However you can also just change localhost in the config to your domain, and it should be all good to go
 

kimzyyyy

New Member
Mar 3, 2020
13
2
How does your IIS site binding look like? However you can also just change localhost in the config to your domain, and it should be all good to go
7afd7c19c86f32290f96e8c36c01add2.png


 

Users who are viewing this thread

Top