- Import package.
- Go to tab MFPS > Addons > BattlePass > Enable.
- Add this snippet to bl_UserMetaData.cs in RawData class:
public SeasonInfo SeasonData = new SeasonInfo();
- Add this snippet to ShopProductData.cs. You don’t need to add first m_IconTexture line if you already did this step for Challenges Addon.
public Texture2D m_IconTexture = null;
public int CoinType;
- Run integration by going MFPS > Addons > BattlePass > Integrate and follow the steps.
- Upload Season.php in Assets/Addons/SeasonBundle/BattlePass/Scripts/Php/ to your ULogin php files.
- Import vip_pass.sql found in same location to your database.
Battle Pass XP
The formula to calculate how many XPs a user should be granted for Battle Pass depends on how your game works. There will be constant base XP which can be set in BattlePassData config. And you can set additional XPs along with that. Here’s an example of how you include additional XPs for headshots:
// Calculate Battle Pass XP
int hsScore = bl_GameManager.Instance.Headshots * bl_GameData.Instance.ScoreReward.ScorePerHeadShot;
int newXP = BattlePassData.Instance.BaseXP + hsScore;
BattlePassData.Instance.AddPassXP(newXP);