Implement Ad

Make sure you checked the Getting started section and setup you mod folders.

Create the ModInfo Asset

Create Data Asset

The ModInfo asset is the core of your Mod. It tells the game which mods are in the package and how it should use them.

You can create it my right-clicking in the content browser window of your new mod folder. In the context menu select Miscellaneous → DataAsset. In the popup select ModInfo as asset type. This newly created asset should be named ModInfo and placed in the root folder of your Mod folder.

If you open the data asset you will see several sections:

  • Tools: This section is used for testing and publishing your mod

  • General: You can add meta data for your mod, what is the name of the mod, who created it, where can user find more info about the mod...

  • Content: This is used to tell the game what your mod contains

 

Setup Add Mod Data

Mod Info Content

To add an Ad mod add an entry to the "Bus Ad" Map. This will give you access to several settings:

  • Name: Give your ad a unique name, if 2 ads use the same name they might not be loaded correctly.

  • Display Text: This text will be shown to the player.

  • Cost: How much it costs to apply this ad to a bus in cents.

  • Revenue Per Week: How much the player earns in cents each payday by having a bus with this add handling stops.

  • Texture: The wrap texture your created before.This texture needs to be imported into the mod folder.

  • Preview Top Left/BottomRight: Defines what part of your wrap should be used as preview image.

Test and Publish

Make sure you checked Mod Kit configuration section before you start before you start.

For testing and publishing you need the Tools section in the ModInfo.

  • Cook Mod: this will take all assets in your mod folder and package them into a file that can be loaded in the game

  • Copy to game directory: copies the packaged mod file into your game folder, which allows you to test your mod ingame. This will only work in single player. The mod file will be copied to %installFolder%\BusSimulator21\Mods\.

  • Delete from game directory: removes your mod again from the game folder.

Â