1
Fork 0
mirror of https://github.com/Quackster/Minerva.git synced 2025-06-29 21:07:45 +00:00
Minerva/README.md

122 lines
3.9 KiB
Markdown
Raw Normal View History

2023-01-13 08:46:18 +10:00
# Minerva
2023-01-14 15:54:01 +10:00
Imager for Habbo Hotel releases Shockwave and Flash. It uses the two projects (Badger, and Avatara) as libraries combined into one, to make the web server.
It supports rendering both figures/avatars and group badges.
When used, the following endpoints will be available:
``/habbo-imaging/avatarimage``
``/habbo-imaging/badge/{badge-code}.gif``
(This is for the client **only** due to the way Shockwave handles transparency)
``/habbo-imaging/badge-fill/{badge-code}.gif``
2023-01-12 22:14:16 +10:00
2023-01-14 16:23:47 +10:00
## Download
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
The latest builds for Linux and Windows are found on the [latest](https://github.com/Quackster/Minerva/releases/tag/latest) tag.
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
| OS | Download |
|---|---|
| Linux (64-bit) | [Minerva-linux-x64.zip](https://github.com/Quackster/Minerva/releases/download/latest/Minerva-linux-x64.zip) |
| Windows (64-bit) | [Minerva-windows-x64.zip](https://github.com/Quackster/Minerva/releases/download/latest/Minerva-windows-x64.zip) |
2023-01-12 22:17:20 +10:00
2023-01-14 16:23:47 +10:00
## Setup
To run Minerva, you need to install .NET 6 [runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) for your operating system.
2023-01-14 15:54:01 +10:00
Once downloaded, you may execute ``./Minerva`` (Linux) or ``Minerva.exe`` (Windows).
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
As soon as it starts, it will extract all the SWFS in /figuredata/ and build the XML and image files, all this will be located in /xml/ and /images/ inside /figuredata/.
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
Once that's done, you should see the following console output.
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
```
Loading flash assets...
9762 flash assets loaded
Loading figure data...
301 figure sets loaded
11 figure set types loaded
3 figure palettes loaded
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path...
```
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
The the following path should give the expected output:
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
```
http://localhost:5000/habbo-imaging/avatarimage?figure=hd-180-1.hr-100-61.ch-210-66.lg-270-82.sh-290-80&size=b&direction=4&head_direction=4&crr=0&gesture=sml&frame=1
```
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
![image](https://user-images.githubusercontent.com/1328523/212457834-67011df8-db85-41da-ad71-129bd1fadd33.png)
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
By default the port it listens on will be 5000 but this can be changed to 8080 (or any other port for your liking) with the command line arguments ``--urls=http://*:8080/``
2023-01-12 22:24:55 +10:00
2023-01-14 16:23:47 +10:00
#### Group badges in-client setup
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
Minerva has a special path to use for the Shockwave client, ensure that "badge-fill" is being used.
2023-01-12 22:24:55 +10:00
2023-01-14 15:54:01 +10:00
In external_texts.txt (yes, the client reads from this file...)
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
Make sure the line is (with port 5000 being changed to what you are using):
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
```
group_logo_url_template=http://localhost:5000/habbo-imaging/badge-fill/%imagerdata%.gif
```
2023-01-12 22:17:20 +10:00
2023-01-14 15:54:01 +10:00
**Note:** if you are using Havana with the latest version (at minimum, released 14th Janurary 2023), then set as line below:
```
group_logo_url_template=http://localhost/habbo-imaging/badge-fill/%imagerdata%.gif
```
Group badges should now work in-game.
![image](https://user-images.githubusercontent.com/1328523/212458081-6f3d390b-48de-4401-bb56-8beab3250269.png)
2023-01-14 16:23:47 +10:00
### Adding custom clothes
2023-01-14 15:54:01 +10:00
1. Adding more clothes is easy, ensure /xml/ and /images/ are either empty or don't exist in /figuredata/
2. Put the SWFs that have these clothes inside /figuredata/compiled/
3. Update figuredata.xml with the one that has the new clothes inside of it
Run Minerva and it should be supported.
2023-01-12 22:17:20 +10:00
2023-01-14 16:23:47 +10:00
### How do I use it for my site written in a different language?
2023-01-12 22:26:21 +10:00
You can proxy it.
An example in PHP:
```php
<?php
header ('Content-Type: image/png');
echo file_get_contents("http://127.0.0.1:8090/?" . $_SERVER['QUERY_STRING']);
?>
```
2023-01-14 16:23:47 +10:00
### Cloning this repository
2023-01-12 22:14:16 +10:00
```
2023-01-13 08:46:40 +10:00
$ git clone --recursive https://github.com/Quackster/Minerva
2023-01-12 22:14:16 +10:00
```
**or**
```
2023-01-13 08:46:40 +10:00
$ git clone https://github.com/Quackster/Minerva
2023-01-12 22:14:16 +10:00
$ git submodule update --init --recursive