A quick one for all who are curious what seed they are playing with, i.e. which random generated number was used to create the world.
There is only one folder relevant for us which includes three files (all will be edited):
"..\Stonehearth\mods\stonehearth\ui\shell\loading_screen"
** Adjusting “loading_screen.html”:**
Simply add a placeholder to display the seed and some text, let’s give it the ID “seed”:
...
<div id="message">{{i18n stonehearth:loading_map}}</div>
<div id="seed"></div> // ADD THIS LINE
</div>
...
** Adjusting “loading_screen.less”:**
In this file we only have to add some CSS-details on how to display / format the text, e.g.:
#seed {
.controlFont;
position: absolute;
top: 125px;
width: 100%;
color: #fff;
font-size: 18px;
}
** Adjust “loading_screen.js”:**
Finally we have to do two changes in the JavaScript-file. First locate the line:
var seed = Math.floor(Math.random() * 10000);
… and delete “var” at the beginning which will turn the local variable into a global one (probably not the nicest solution, but works ). We need to access the variable “seed” in another method. Look for the following entry:
$('#randomScreen').css('background-image', 'url(' + imageUrl + ')');
… and add just behind that one this line:
$('#seed').html('Map Seed: ' + seed);
If you start a new game you should see now on the loading screen which seed is used to generate the world.