Browsing and discovery
Players install what they can find. A clear search box, filters that match how your community thinks about mods, and a curated front page are what turn a catalog into installs.
Everything a player sees before installing comes from CurseForge: search results, mod details, screenshots, ratings, categories and curated highlights. Your game asks for it and decides how to show it. None of these requests needs the player signed in.
The curated front page is yours to run. Your team arranges featured mods, banners and themed collections in the Developer Portal, and players see the change without a game update.
If you use the prebuilt mod browser, it already does all of this. See Mod browser.
Three ways to ask
| Shape | Calls | Use it for |
|---|---|---|
| Search | SearchMods | Browse grids, a search box, category listings. Filtered, sorted and paged |
| Lookup by id | GetMods | Turning mod ids you already hold into full mod details. GetMod takes one id |
| Highlights | GetModsHighlightsV3 | A front page whose layout your team edits in the Developer Portal |
All of them are on ICFCore.Api, and each takes a success delegate and a failure delegate that receives an ApiResponseError. The SDK adds your game id to every search, category and highlights request for you.
Searching the catalogue
How it works
- Build a
SearchModsFilterwith the text, category and sort order the player chose. - Build an
ApiRequestPaginationfor the page you want. - Call
SearchMods. - Show
response.Data, a list ofMod, and useresponse.Paginationto offer the next page.
using System.Collections.Generic;
using Overwolf.CFCore.Base;
using Overwolf.CFCore.Base.Api.Common;
using Overwolf.CFCore.Base.Api.Models;
using Overwolf.CFCore.Base.Api.Models.Enums;
using Overwolf.CFCore.Base.Api.Models.Filters;
using UnityEngine;
public class ModSearch : MonoBehaviour {
public void Search(ICFCore core, string text, uint page) {
SearchModsFilter filter = new SearchModsFilter {
SearchFilter = text,
SortField = ModsSearchSortField.Popularity,
SortOrder = SortOrder.desc,
PremiumType = PremiumFilterType.FreeAndPremium
};
uint pageSize = ApiRequestPagination.kMaxPageSize;
ApiRequestPagination pagination = new ApiRequestPagination {
Index = page * pageSize,
PageSize = pageSize
};
core.Api.SearchMods(
filter,
pagination,
(ApiResponseWithPagination<List<Mod>> response) => {
foreach (Mod mod in response.Data) {
Debug.Log($"{mod.Id}: {mod.Name}");
}
ApiResponsePagination info = response.Pagination;
Debug.Log($"Showing {info.ResultCount} of {info.TotalCount}");
},
(ApiResponseError error) => Debug.LogError(error.Description));
}
}
Prebuilt UI: CFUnity.Catalog.SearchAndDownloadMods.
Search filter fields
Every field of SearchModsFilter is optional. Leave a field unset to not filter on it.
| Field | Type | What it filters on |
|---|---|---|
SearchFilter | string | Free text |
ClassId | uint? | A class, the top level of your game's categories |
CategoryId | uint? | One category |
CategoryIds | List<int> | Several categories |
GameVersion | string | A game version |
GameVersionTypeId | uint? | A game version type |
ModLoaderType | ModLoaderType? | A mod loader |
PremiumType | PremiumFilterType? | Free mods, premium mods, or both |
SortField | ModsSearchSortField? | The sort key |
SortOrder | SortOrder? | Ascending or descending |
ModsSearchEnhancedFeatures | ModsSearchEnhancedFeatures? | Extra search behaviors |
To filter by game version type, set GameVersionTypeId here. The field of the same name in Settings is not applied to searches. Game versions and their types are on Game info and versions.
Sort, premium and search options
ModsSearchSortField | Value |
|---|---|
None | 0 |
Featured | 1 |
Popularity | 2 |
LastUpdated | 3 |
Name | 4 |
Author | 5 |
TotalDownloads | 6 |
Category | 7 |
GameVersion | 8 |
EarlyAccess | 9 |
FeaturedReleased | 10 |
ReleasedDate | 11 |
Rating | 12 |
SortOrder has two values, written in lowercase: asc and desc.
PremiumFilterType | Returns |
|---|---|
FreeAndPremium | Every mod. The value is 0 |
PremiumOnly | Premium mods only |
FreeOnly | Free mods only |
ModsSearchEnhancedFeatures is a flags enum. Its one feature, ExtractModId, makes the server try to return the matching mod when the search text is a mod id. Use it when players paste mod ids into your search box.
Paging
ApiRequestPagination takes an item offset, not a page number.
| Field | Default | What it does |
|---|---|---|
Index | 0 | The zero-based index of the first item to return |
PageSize | 20 | How many items to return |
ApiRequestPagination.kMaxPageSize holds the default page size, 20. For page n, set Index to n times the page size.
The response's Pagination is an ApiResponsePagination:
| Field | Type | What it holds |
|---|---|---|
Index | uint | The index of the first returned item |
PageSize | uint | The page size you requested |
ResultCount | uint | How many items this page holds |
TotalCount | ulong? | How many items match in total |
Prebuilt UI: CFUnity.Catalog.SearchAndDownloadMods takes a page number in startPage and computes the offset for you.
Looking up mods by id
| Call | Takes | Returns |
|---|---|---|
GetMod | One mod id, a uint | ApiResponse<Mod> |
GetMods | A GetModsByIdsListRequestDto | ApiResponse<List<Mod>> |
GetMods | A GetModsFilter | ApiResponse<List<Mod>> |
Use the GetModsByIdsListRequestDto overload to resolve a list of ids, for example a player's favorites. The GetModsFilter overload adds options for game servers. See Multiplayer and servers.
using System.Collections.Generic;
using Overwolf.CFCore.Base;
using Overwolf.CFCore.Base.Api.Common;
using Overwolf.CFCore.Base.Api.Models;
using Overwolf.CFCore.Base.Api.Models.Requests;
using UnityEngine;
public class ModLookup : MonoBehaviour {
public void Resolve(ICFCore core, List<uint> modIds) {
GetModsByIdsListRequestDto request = new GetModsByIdsListRequestDto {
ModIds = modIds
};
core.Api.GetMods(
request,
(ApiResponse<List<Mod>> response) => {
foreach (Mod mod in response.Data) {
Debug.Log($"{mod.Name} by {mod.Authors?[0]?.Name}");
}
},
(ApiResponseError error) => Debug.LogError(error.Description));
}
}
Prebuilt UI: CFUnity.Catalog.DownloadMods, which skips mods it already holds unless you pass forceDownload.
Mod descriptions
The mod returned by search or lookup carries a short Summary. The full description is a separate call, GetModDescription, which takes the mod id and the format you want:
DescriptionResponseType | Format |
|---|---|
HTML | HTML |
UnityRichText | Unity rich text |
Raw | The raw description text |
GetModDescriptionAsync is the same call returning a Task. When it fails, awaiting it throws an ApiResponseException, whose Error property holds the ApiResponseError.
Prebuilt UI: CFUnity.Catalog.GetModDescription, which requests HTML.
Categories
Your game's categories are grouped into classes. A class is a top-level category, such as a type of content, and each other category belongs to a class.
How it works
- Call
GetCategorieswith aGetCategoriesFilter. Leave itsClassIdunset to get every class and category, or set it to get one class's categories. - A
CategorywithIsClassset totrueis a class. - Every other category belongs to the class in its
ClassId. - Pass a class id to
SearchModsFilter.ClassId, or a category id toCategoryId, to list its mods.
Field of Category | Type | What it holds |
|---|---|---|
Id | uint | The category id |
Name | string | The display name |
Slug | string | The name used in web addresses |
IconUrl | string | The category icon |
IsClass | bool? | Whether this is a class |
ClassId | uint? | The class this category belongs to |
ParentCategoryId | uint? | The parent category |
DisplayIndex | int? | The display order |
Prebuilt UI: CFUnity.Catalog.DownloadCategories fetches every category and groups them by class.
The mod model
Mod is what search and lookup return. These are the fields a browse screen uses most:
| Field | Type | What it holds |
|---|---|---|
Id | uint | The mod id |
Name | string | The display name |
Summary | string | A short description |
Logo | ModAsset | The mod's logo image |
Screenshots | List<ModAsset> | Screenshot images |
Videos | List<ModAsset> | Videos |
Authors | List<ModAuthor> | The mod's authors |
Categories | List<Category> | The mod's categories |
ClassId | uint | The class the mod belongs to |
PrimaryCategoryId | uint | The main category, chosen by the author |
DownloadCount | double | Total downloads |
RatingDetails | RatingDetails | Ratings. See below |
PremiumDetails | PremiumDetails | Price and trial details for premium mods |
MainFileId | uint | The id of the mod's main file |
LatestFiles | List<File> | The mod's latest files |
IsAvailable | bool | Whether the mod is available |
DateModified | DateTime | When the mod last changed |
DateReleased | DateTime | When the mod was released |
Links | ModLinks | Website, wiki, issues and source addresses |
Each ModAsset has Title, Description, ThumbnailUrl and Url. Use ThumbnailUrl in grids and Url on detail pages. Each ModAuthor has an Id, a Name and a Url.
RatingDetails holds Rating, TotalRatings, PositiveRatings and Score. Score is a RatingScore, from NotEnoughReviews through OverwhelminglyPositive to OverwhelminglyNegative, which you can show as a label. Rating a mod is on Ratings and reporting. Premium details are on Monetization.
The file model
A mod has one or more files, each an uploaded version of the mod. File describes one:
| Field | Type | What it holds |
|---|---|---|
Id | uint | The file id |
ModId | uint | The mod the file belongs to |
DisplayName | string | The name to show for this version |
FileName | string | The uploaded file's name |
ReleaseType | FileReleaseType | Release, beta or alpha |
FileDate | DateTime | When the file was uploaded |
FileLength | ulong | The download size in bytes |
FileSizeOnDisk | ulong | The installed size in bytes |
GameVersions | List<string> | The game versions it supports |
Dependencies | List<FileDependency> | Other mods this file relates to |
Hashes | List<FileHash> | Hashes of the file |
Modules | List<FileModule> | The file's modules |
IsAvailable | bool | Whether the file is available |
File shares its name with System.IO.File. In a script that uses both namespaces, qualify one of them. Dependencies, hashes and modules are covered on Mod dependencies.
Building a Discover surface with highlights
GetModsHighlightsV3 returns a front page in one call: a carousel, a list of shelves and themed pages. Your team configures the promoted content in the Developer Portal at console.curseforge.com.
ICFCore.Api also has GetModsHighlights, which returns an older shape. Use GetModsHighlightsV3, which is what the prebuilt browser uses.
The highlights filter
GetModsHighlightsFilter has two fields. ExcludedModIds lists mods to leave out, for example mods the player already installed. Filters is a GetModsHighlightsFilters, a set of switches for what to include:
| Switch | Default |
|---|---|
Carousel | true |
Banners | true |
Categories | true |
Latest | false |
MostDownloaded | false |
Premium | false |
Trending | false |
ThemePages | false |
The response
ModsHighlightsV3 has three lists:
| Field | Type | What it holds |
|---|---|---|
Carousel | List<CarouselItem> | The rotating items at the top of the page |
Shelves | List<Shelf> | The rows of the page. Sort them by DisplayIndex |
ThemePages | List<ThemePage> | Themed collections of mods |
Each Shelf has a Type, a Name, a DisplayIndex for its position, which the prebuilt browser sorts by, a Content, a Destination and a SeeAllButton flag. Its type decides which part of Content is filled:
ShelfType | Filled part of Content |
|---|---|
Category | Categories, a list of categories |
Generated | Mods, a list of mods |
Custom | Mods, a list of mods |
Banner | Banner, one carousel item |
When SeeAllButton is true, the shelf offers a "see all" link:
| Shelf type | Where "see all" leads |
|---|---|
Generated | A search built from the shelf's QueryParams, the query that produced the shelf |
Custom | The shelf's Destination, a mod or a theme page |
To build a Generated shelf's "see all" page, copy the QueryParams values into a SearchModsFilter and call SearchMods. This is what the prebuilt browser does.
Shelf mods are HighlightsMod objects, a lighter shape than Mod. They hold Id, Name, Logo, Authors, RatingDetails, PremiumDetails, DownloadCount and FileSize. HighlightsMod.Id is an int, so cast it to uint before passing it to GetMod.
Carousel items and destinations
A CarouselItem holds what a banner shows: MainTitle, SubTitle, MainImageUrl, TitleImageUrl, CustomTag, CtaText for the button label, and a Layout. Its Destination says where the item leads:
CarouselItemDestinationType | Destination.Value holds |
|---|---|
None | Nothing. The item is not a link |
Mod | A mod id. Open that mod's page |
ThemePage | A theme page id. Open that theme page |
CarouselItemLayout is Default, SaleView or SmallSaleView, so your interface can style sale items differently.
A ThemePage has an Id, a BannerUrl, a MainTitle, a SubTitle and ModIds, the mods in the collection. Resolve them with GetMods.
using Overwolf.CFCore.Base;
using Overwolf.CFCore.Base.Api.Common;
using Overwolf.CFCore.Base.Api.Models.Enums;
using Overwolf.CFCore.Base.Api.Models.Filters;
using Overwolf.CFCore.Base.Api.Models.Highlights;
using UnityEngine;
public class FrontPage : MonoBehaviour {
public void Load(ICFCore core) {
GetModsHighlightsFilter filter = new GetModsHighlightsFilter {
Filters = new GetModsHighlightsFilters { ThemePages = true }
};
core.Api.GetModsHighlightsV3(
filter,
(ApiResponse<ModsHighlightsV3> response) => {
foreach (Shelf shelf in response.Data.Shelves) {
if (shelf.Type == ShelfType.Generated || shelf.Type == ShelfType.Custom) {
Debug.Log($"{shelf.Name}: {shelf.Content.Mods.Count} mods");
}
}
},
(ApiResponseError error) => Debug.LogError(error.Description));
}
}
Prebuilt UI: CFUnity.Catalog.GetModsHighlights, which takes a DiscoveryType flags value and sets the matching switches.
Reporting discovery analytics
The SDK can report what players see and click in your browser, so you can measure how browsing turns into installs. See Analytics.
Where to get help
To set up the carousel, banners, shelves and theme pages for your game, use the Developer Portal at console.curseforge.com. For questions about search behavior, contact cfforstudios@overwolf.com.