Skip to main content

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​

ShapeCallsUse it for
SearchSearchModsBrowse grids, a search box, category listings. Filtered, sorted and paged
Lookup by idGetModsTurning mod ids you already hold into full mod details. GetMod takes one id
HighlightsGetModsHighlightsV3A 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

  1. Build a SearchModsFilter with the text, category and sort order the player chose.
  2. Build an ApiRequestPagination for the page you want.
  3. Call SearchMods.
  4. Show response.Data, a list of Mod, and use response.Pagination to 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.

FieldTypeWhat it filters on
SearchFilterstringFree text
ClassIduint?A class, the top level of your game's categories
CategoryIduint?One category
CategoryIdsList<int>Several categories
GameVersionstringA game version
GameVersionTypeIduint?A game version type
ModLoaderTypeModLoaderType?A mod loader
PremiumTypePremiumFilterType?Free mods, premium mods, or both
SortFieldModsSearchSortField?The sort key
SortOrderSortOrder?Ascending or descending
ModsSearchEnhancedFeaturesModsSearchEnhancedFeatures?Extra search behaviors
note

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​

ModsSearchSortFieldValue
None0
Featured1
Popularity2
LastUpdated3
Name4
Author5
TotalDownloads6
Category7
GameVersion8
EarlyAccess9
FeaturedReleased10
ReleasedDate11
Rating12

SortOrder has two values, written in lowercase: asc and desc.

PremiumFilterTypeReturns
FreeAndPremiumEvery mod. The value is 0
PremiumOnlyPremium mods only
FreeOnlyFree 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.

FieldDefaultWhat it does
Index0The zero-based index of the first item to return
PageSize20How 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:

FieldTypeWhat it holds
IndexuintThe index of the first returned item
PageSizeuintThe page size you requested
ResultCountuintHow many items this page holds
TotalCountulong?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​

CallTakesReturns
GetModOne mod id, a uintApiResponse<Mod>
GetModsA GetModsByIdsListRequestDtoApiResponse<List<Mod>>
GetModsA GetModsFilterApiResponse<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:

DescriptionResponseTypeFormat
HTMLHTML
UnityRichTextUnity rich text
RawThe 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

  1. Call GetCategories with a GetCategoriesFilter. Leave its ClassId unset to get every class and category, or set it to get one class's categories.
  2. A Category with IsClass set to true is a class.
  3. Every other category belongs to the class in its ClassId.
  4. Pass a class id to SearchModsFilter.ClassId, or a category id to CategoryId, to list its mods.
Field of CategoryTypeWhat it holds
IduintThe category id
NamestringThe display name
SlugstringThe name used in web addresses
IconUrlstringThe category icon
IsClassbool?Whether this is a class
ClassIduint?The class this category belongs to
ParentCategoryIduint?The parent category
DisplayIndexint?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:

FieldTypeWhat it holds
IduintThe mod id
NamestringThe display name
SummarystringA short description
LogoModAssetThe mod's logo image
ScreenshotsList<ModAsset>Screenshot images
VideosList<ModAsset>Videos
AuthorsList<ModAuthor>The mod's authors
CategoriesList<Category>The mod's categories
ClassIduintThe class the mod belongs to
PrimaryCategoryIduintThe main category, chosen by the author
DownloadCountdoubleTotal downloads
RatingDetailsRatingDetailsRatings. See below
PremiumDetailsPremiumDetailsPrice and trial details for premium mods
MainFileIduintThe id of the mod's main file
LatestFilesList<File>The mod's latest files
IsAvailableboolWhether the mod is available
DateModifiedDateTimeWhen the mod last changed
DateReleasedDateTimeWhen the mod was released
LinksModLinksWebsite, 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:

FieldTypeWhat it holds
IduintThe file id
ModIduintThe mod the file belongs to
DisplayNamestringThe name to show for this version
FileNamestringThe uploaded file's name
ReleaseTypeFileReleaseTypeRelease, beta or alpha
FileDateDateTimeWhen the file was uploaded
FileLengthulongThe download size in bytes
FileSizeOnDiskulongThe installed size in bytes
GameVersionsList<string>The game versions it supports
DependenciesList<FileDependency>Other mods this file relates to
HashesList<FileHash>Hashes of the file
ModulesList<FileModule>The file's modules
IsAvailableboolWhether 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:

SwitchDefault
Carouseltrue
Bannerstrue
Categoriestrue
Latestfalse
MostDownloadedfalse
Premiumfalse
Trendingfalse
ThemePagesfalse

The response​

ModsHighlightsV3 has three lists:

FieldTypeWhat it holds
CarouselList<CarouselItem>The rotating items at the top of the page
ShelvesList<Shelf>The rows of the page. Sort them by DisplayIndex
ThemePagesList<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:

ShelfTypeFilled part of Content
CategoryCategories, a list of categories
GeneratedMods, a list of mods
CustomMods, a list of mods
BannerBanner, one carousel item

When SeeAllButton is true, the shelf offers a "see all" link:

Shelf typeWhere "see all" leads
GeneratedA search built from the shelf's QueryParams, the query that produced the shelf
CustomThe 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.

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:

CarouselItemDestinationTypeDestination.Value holds
NoneNothing. The item is not a link
ModA mod id. Open that mod's page
ThemePageA 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.