Foundation как установить карту

Обновлено: 03.07.2024

This guide will go step by step through the process of creating all the required files, folders, and settings to put a simple object into the game. This is a very basic guide to just get things started.

Posted by RaisinMuffin on Jan 23rd, 2020 (updated 29d ago)

Step 3b - Mod.lua file - Monuments

If you would like this to be a monument style collection, some changes need to be made to the "BUILDING" asset.

In the below example, we have the same code from above but with 3 differences:

  1. Another registered asset ID
  2. An extra "BUILDING_PART"
  3. The "BuildingPartSetList" added to our "BUILDING"

Within the "BuildingPartSetList" you would then just put the different "BUILDING_PART" objects. This list can have many different objects and we can even have multiple lists within the "BuildingPartSetList" for better organization.

Shown below, "BUILDING_PART_MONUMENT_POLE" would be the default "AssetCoreBuildingPart" that is used in the base game if you don't want to make your own.

You only need one asset in the list to make it a monument, however don't use the same asset for your core part as one that also on the list or you'll have some strange issues.

There is a lot more you can do in this step from something simple like adding resource costs, desirability, and splendor gains, or even something more complicated like workplaces. For this guide however, we're going to keep it relatively simple.

Want to learn how to mod in Foundation? You've come to the right place!

Before we get started, I'm going to mention the programs I use to mod. There are of course other options for these 3 but this is what I personally use.

Below is an (optional) complete downloadable version of this mod. Also included inside the zip is an original .blend file for reference.

RaisinMuffin's Modding Tutorial - Beginners

Notes to V1.3

You can now preview your map in 3d: menu>>view>>3d preview

You can let the editor predict starting tiles: menu>>view>>show starting tiles

Improved loading function

Improved Import function: Import any png in any size

Notes to V1.5

Due to changes made to Iron Ore / mineral deposits. all custom maps will not load properly with the Update to V1.6. I implemented a placement option for mineral deposits, so you can now easily place them on the map. with the release of V1.5.1 most bugs of the prerelease are gone and it can be used more or less savely.

Besides the obvious change for the Minerals update, I also added ramps/plateaus to the editor, which allows to add ramps and plateaus to the heightmap. just set the height for each waypoint and (all waypoints at the same height, if you want a plateau). the editor will calculate a ramp along the waypoints and will overlay it with a fractal noise layer to let it look more natural. create perfect spots for castles, mansions and keeps.

UPDATE MAPS: you can open a project regularily, set the mineral deposits and cook it. the ore map should not be copied to the cooked folder. alternativly import heightmap to new project with the post filter set to 0, place mineral deposits, place alibi villagepath, set height an waterlevel correctly and cook it. then you can copy the spawnlist from the mod.lua file and delete the iron density map references from the mod.lua

Contact & Help

Thank you for reading through my tutorial, I hope it helped and I look forward to seeing your new mods in-game.

5 фев. 2019 в 6:16

so i have finally just noticed the *mods* option in the menu.

also a youtuber *krellis*. said he got a *don't leave* mod (where villagers never leave)

How/where to get them plz?

Hello , i am one of the modders . you can find them on mod.io or in the mod browser tab. But i have personnaly delete my mods for a week .. during the first steps of this game in Early access. Using a mod do not allow you to success quests , and quests are an easy way to learn how to expend your city. Do not have access to the quests will raise the number of " how you" or " why . " thread here and on the discord channel .
Because i love this game i don't want to create difficulties to a dev team that have great fealing about modders and that have already gave us an amazing game engine .
5 фев. 2019 в 6:56

Hello, this youtuber is talking about the "happiness" mod I believe. It makes villagers never leave your city from unhappiness. There aren't many mods so you should easily find it!

BTW: By dragging your cursor and clicking on the happiness counter on the top left of your screen, you will see the reasons why your villagers are unhappy.

I would advise you to try and find a solution to your unhappiness issue before using that mod.

Ratings are calculated using Evan Miller's method (based on a Wilson score confidence interval) that is self-correcting. This means that the % of positive ratings & number of ratings decide a mods position on the top charts. The benefit of this approach is a mod with 2 positive ratings will not outrank one with 10 positive ratings but 2 negative. Nor will a mod with tons of rankings outrank everything unless most of the ratings are positive.

Rating levels

Ratings range from overwhelmingly positive to overwhelmingly negative. The color changes depending where on the scale the mod fits.

title2.jpg

title1.jpg

Getting Started - Guide

This is a simple getting started guide and will not introduce all parameters in detail for now. Heights in the heightmap are 0…65535, for more practical use, I scaled it to 0-1000. If you already have a heightmap, hop down to step 7.

Step 1: create a new Workspace

First create a new Workspace by clicking File>>New Workspace. When creating a new Workspace, the Map Info window opens. Here you can enter a map name, an id, your name and a description.

Step 2: create a baseline map

To get a natural plain area, you can build a map upon, click build baseline map. The parameters are set to default, so you don’t need to worry about them now.

Step 3: how to add a river:

To add a river to the menu bar and click Add>>River.

A River Menu appears in the left and an empty preview in the preview part. Now you can change the starting and ending waypoint coordinates. The map has the size 1024,1024, so your input should correspond, x=0, y=0 is in the top left corner, 1023/1023 is the bottom right. You can go outside the window with negative values and values above 1023.

You can also add more waypoints to the river and more rivers to the map. To make it easier to predict, where everything goes, all rivers and mountains are previewed as polylines on the main screen.

When you are done, click generate to get a preview and create the river information for the heightmap.

Step 4: how to add a mountain

To add a mountain, click Add>>Mountain.

A mountain menu appears in the left and an empty preview in the preview part. Change coordinates like in the river description.

Step 5: How to add a dip

A dip is just a negative mountain, so change the height to a negative value.

Step 6: generating a heightmap

go to the top menu: generator>>build heightmap. All rivers and mountains will be combined to one map: now you have your heightmap! Please note that no matter how high or deep you map is, it is always rescaled to 0…65535 Steps. Foundation will determine the final height and depth from the Height and Water Level parameters in the Map Info window: File>>Map Info
skip step 7.

Step 7: Importing a heightmap

Only do this step, if you skipped 1-6. You can Import your own heightmap (actually you can import any 1024x1024 png as a heightmap) by clicking the button import heightmap or file>>import heightmap.

set the post sigma value (the filter radius) to zero and do step 6.

Step 8: generating a Material Mask

Now that you have a heightmap, change the view back to view>>priority>>assets, the assets parameters expand.

Clicking the build material mask button will get you a material mask, experiment with the height to get it the way you want it. You can also use the mouse over the main screen to get the height of each pixel.

Step 9: generating resource maps

Resource maps are berries, rocks, iron and fish. From the height of the material map you can now predict the min height, if you want resources up to the beach. To not have resources in steep areas, the steepness parameter can be used. 10. 40 are good values to experiment with. Density is the chance that in the areas, where placement is allowed, a resource is placed. Group is the chance that a larger group is placed (in %) .

Step 10: adding Trees

Use the Add>>Trees function to add a tree map. Similar to resources, you can set steepness, min height and max height, sigma applies a filter to smoothen out the edges. You can also add more tree types and configure them. Tree types define, what trees are planted with the tree map, what color they have and what size range they have. When changing colors, keep in mind, that clear white colors them the way they are, overly saturated colors color the whole tree like that, so if you just want to add a nice touch, use less saturated values. I have added a few color presets that canbe selected from a list in v1.2

Step 11: adding village paths

Use add>>village path to add entry and exit points. (buginfo: I have not yet inverted the y axis) the main screen shows entry points with a green marker and exit points with a red marker, also if activated, a dotted line connects the two markers.

Step 12: define the height scale

In the mod.lua file that comes with the map, the ingame height and the water level are defined. normally maps scale around 100 but that heavily depends on your map. Open the map info (File>>MapInfo). here you can set the height and the water level. From version 1.2 you get a cut-through preview of the map, that should help you find good values for the height and the water level. after cooking the map, you have to check ingame, if it fits. Afterwards you can either change the values in the mod.lua file or re-cook it in the editor. please note, that in the lua file its not a height and a water level parameter, but a top and bottom parameter(max/min).

Step 13: cooking the map

Use generate >> cook map to open the cook map window. Don't bother the options that are not marked / logged (unmark what you don't want to rebuild). If the Cook button is not disabled, you can cook your map. When finished, the cooked folder opens and you can copy all files to the Foundation mod folder.

This Project is programmed in python 3 and open source. all scripts provided on the Github Repository

Файлы для Foundation - трейнеры, моды, сохранения, патчи

Когда игра ни в какую не поддается и кажется непроходимой, на помощь приходят специальные программы - читы, скины, моды, трейнеры для игр и т. д. С их помощью игрок может получить преимущество: дополнительные ресурсы, много денег, бессмертие, повышенную скорость и многое другое.

Если вы хотите облегчить прохождение Foundation, то можете воспользоваться нашим файловым архивом. Здесь собраны только проверенные и работоспособные файлы для игр, которые можно скачать бесплатно.

При скачивании файлов нужно обратить внимание на версию игры, для которой он предназначен. Трейнеры для игр, например, не всегда совместимы со всеми версиями игры, так как разработчики, выпуская обновления, могут менять архитектуру игры и принципы работы тех или иных ее механик. Обычно версия, с которой совместим файл, указывается прямо в его названии.

Video Guides:

the videos are from before V1.5 but can give you an overview how the editor works. I hope I can update the videos soon

Getting Started:

Importing Heightmaps:

Map Guide by Ash:

the guide by Polymorph was taken down due to the changes in map making

Notes to V1.4

Translations added: if you want to change language, open the options.json file and adjust the language option.

Languages available: English(100%), German(90%), Korean(10%), French(90%)

for drag and drop: click, to mark waypoint with red circle, click and hold to move.

Step 6 - Packaging mod for upload

You now have your mod completed and you want to share it with the rest of the community?

The upload process is pretty straight forward, the only thing I'm going to cover here is the zip file.

After you load your mod for the first time, a new file named "generated_ids.lua" will be created. It is updated automatically upon loading your mod in-game. Only the mod creator can generate this file so this is an important file to include in the upload along with anything else inside your mods folder. You don't want to zip up the main folder, only the contents of it as shown below. I personally use Winrar for this step and there are of course other options to use as well.


Step 1 - Creating the mod folder

Starting with the easiest part first, we'll create a new folder and name it whatever you'd like the mod to be called. We'll then create a couple of empty files and folders for now.

  • mod.lua
  • mod.json
  • models folder
  • localization folder

We'll come back to these a little later so, for now, go ahead and put the whole folder in your foundation mods directory as shown below. In this example mine is named "Cubes".


Notes to V1.2 and easy mode

easy mode changes all input boxes to scales, that allow you to pick values in a specific range. So its easier to pick "good" values. Easy Mode also hides some parameters that work just fine on their defaults. If you don't want to use Easy mode, go to View>>EasyMode and deselect it.

Step 4 - Mod.json file

This file is for the details about your mod like the name or description. This is where we also include any additional languages. For now, we'll only worry about English just to keep it simple.

For convenience I've included other common language codes below in case you'd like to use a different language. Just make sure to name your localization folder that same way.

Step 3a - Mod.lua file - Single Building Asset

Now we're on to the slightly harder part. Once you understand the Lua language creating mods will be a piece of cake.

For all the coding parts I personally use Visual Studio Code but you can also use Notepad++ or the regular windows notepad if you prefer.

  • The Asset Id - An ID for your model
  • The Building - The main monument building
  • The Building Part - The separate assets within the building

The first line of code is needed to create the mod. You can change "Tutorial" to whatever you would like just make sure they are all the same.

The second line of code is where we register the asset id. Change the .fbx name to whatever you named it when you exported earlier. Remember earlier when I said the name of the empty axis will be important? This will go after / Prefab/.

Everything is case sensitive so make sure your file names match the code and vice versa . For simplicity just change all the "cube" in my code to whichever name you want.

The below example is only for making a single object. For a monument style collection skip the code below and go to part 3b.

Since this is only for a single building, the "AssetCoreBuildingPart" is just going to be the ID of the single "BUILDING_PART" you have registered.

Step 5 - Localization file

Within this folder will be all of our language files. Start by making a new folder and name it "en" with no quotes. Within this new folder, we need a new file that we will call text.json.

For any other languages just create a different folder and use the language codes I posted above.


Congratulations! You just created your very first mod for foundation, all we need to do now is boot up Foundation, start a new game, and pick your mod from the list. The new model should show up under the decorations tab.





Step 2 - Exporting the model

This guide assumes you know a little about basic 3d modeling, I'm mainly going to explain the export settings.

Once you have your model the way you like it we'll then have to do a couple of things first to make sure the model will show up in-game.

First is to create a new empty axes and then make sure the model is a child of that empty axes as shown below in the red box. You can then name the empty axes something, this will be important later on when we go to code everything. In my example, I made 2 objects which I'm naming "Cube_Part" and "Cube_Large_Part".

I also included in the screenshot, as seen near the bottom, how the texture should be set up so the game can read it. Just simply plug a texture node into the base color of the principled BSDF shader node and select your texture.


Second is when we go to export the .fbx file, a couple of settings should be changed. Make sure the x-axis is forward and apply transform is checked as shown below. After that go ahead and export it into the "models" folder we created earlier. Also in that same folder is where we need to put the textures that will be used for the mod. Don't worry about the "meta" file now, it will be created automatically later on when we go to load the mod in-game.

export

Читайте также: