Automatic installation with Vortex was not tested. According to the wiki for Vortex, mod is well packaged but if anyone has any issue report it please.
Custom Dev Point Maps
Idk at what level I actually need to explain this so I'm just gonna give an example. Let's say you want the following behavior: - By default don't award attribute points; - By default award 1 perk point; - Award 2 attribute points at level 5, 10, 15, 20, 25, 30, 35, 40, 45 and 50; - Award 3 skill points at level 10, 20, 30, 40, 50;
Implementation (by order listed above):
If you're wondering why, for instance, the value 9 is used and not 10 on 'this.customSkillPointsMap[9] = 3;' it's because array starts counting on 0. So if you want to change awarded value on level 33 you need to put 32 there.
If anyone wants to just copy past this, feel free. It's based on Siasix1's preset, but I corrected/ fixed it. will give +19 bonus Attribute and skill points by level 60, but in a way similar to typical human skill growth, pseudo-logarithmically. You will gain more points at lower levels and fewer and fewer at the higher levels. (Open the sdppl_settings.reds file and delete everything from it first.)
module SDPPL.Settings public class SDPPLSettings { private let perkPointsOnSkillLevelUp : Int32; private let useConditionalPointGain : Bool; private let useCustomAttributePointsMap : Bool; private let customAttributePointsMap : array<Int32>; private let customAttributePointsMapDefaultValue : Int32; private let useCustomPerkPointsMap : Bool; private let customPerkPointsMap : array<Int32>; private let customPerkPointsMapDefaultValue : Int32; private let attributePointsOnCharacterLevelUp : Int32; private let perkPointsOnCharacterLevelUp : Int32; public func SetupSettings() -> Void { // ------ Settings Start ------ // Perk points gained on every skill level up. Compounds with perks gained from skill progression. // Default = 0 this.perkPointsOnSkillLevelUp = 0; // Flag to enable/disable conditional point gain on character level up. This flag also applies to custom maps. // Default = false this.useConditionalPointGain = false; // Flag to enable/disable use of new attribute point map. You can define overrides on a level by level basis below. // Default = false this.useCustomAttributePointsMap = true; // Attribute points custom map default value. // Default = 1 this.customAttributePointsMapDefaultValue = 1; // Flag to enable/disable use of new Perk point map. You can define overrides on a level by level basis below. // Default = false this.useCustomPerkPointsMap = true; // Perk points custom map default value. // Default = 1 this.customPerkPointsMapDefaultValue = 1; // Attribute points gained on character level up. Ignored if using custom map. // Default = 1 this.attributePointsOnCharacterLevelUp = 1; // Perk points gained on character level up. Ignored if using custom map. // Default = 1 this.perkPointsOnCharacterLevelUp = 1; // ------ Settings End ------ this.SetupNewPointMaps(); } private func SetupNewPointMaps() -> Void { if this.useCustomAttributePointsMap { this.SetupAtttributePointMap(); } if this.useCustomPerkPointsMap { this.SetupPerkPointMap(); } } // Attribute point map setup. private func SetupAtttributePointMap() -> Void { let i : Int32 = 0; while i < 60 { ArrayPush(this.customAttributePointsMap, this.customAttributePointsMapDefaultValue); i += 1; } // ------ Attribute Points Map Overrides Starts ------ this.customAttributePointsMap[2] = 2; this.customAttributePointsMap[4] = 2; this.customAttributePointsMap[6] = 2; this.customAttributePointsMap[8] = 2; this.customAttributePointsMap[10] = 2; this.customAttributePointsMap[12] = 2; this.customAttributePointsMap[14] = 2; this.customAttributePointsMap[16] = 2; this.customAttributePointsMap[18] = 2; this.customAttributePointsMap[20] = 2; this.customAttributePointsMap[23] = 2; this.customAttributePointsMap[26] = 2; this.customAttributePointsMap[29] = 2; this.customAttributePointsMap[30] = 2; this.customAttributePointsMap[34] = 2; this.customAttributePointsMap[36] = 2; this.customAttributePointsMap[40] = 2; this.customAttributePointsMap[45] = 2; this.customAttributePointsMap[50] = 2; // ------ Attribute Points Map Overrides Ends ------ } // Perk point map setup. private func SetupPerkPointMap() -> Void { let i : Int32 = 0; while i < 60 { ArrayPush(this.customPerkPointsMap, this.customPerkPointsMapDefaultValue); i += 1; } // ------ Perk Points Map Overrides Starts ------ this.customPerkPointsMap[2] = 2; this.customPerkPointsMap[4] = 2; this.customPerkPointsMap[6] = 2; this.customPerkPointsMap[8] = 2; this.customPerkPointsMap[10] = 2; this.customPerkPointsMap[12] = 2; this.customPerkPointsMap[14] = 2; this.customPerkPointsMap[16] = 2; this.customPerkPointsMap[18] = 2; this.customPerkPointsMap[20] = 2; this.customPerkPointsMap[23] = 2; this.customPerkPointsMap[26] = 2; this.customPerkPointsMap[29] = 2; this.customPerkPointsMap[30] = 2; this.customPerkPointsMap[34] = 2; this.customPerkPointsMap[36] = 2; this.customPerkPointsMap[40] = 2; this.customPerkPointsMap[45] = 2; this.customPerkPointsMap[50] = 2; this.customPerkPointsMap[55] = 2; // ------ Perk Points Map Overrides Ends ------ } public func GetIsEnabled() -> Bool { return true; } public func GetAttributePointsOnCharacterLevelUp(level: Int32) -> Int32 { if this.GetUseCustomAttributePointsMap() { return this.customAttributePointsMap[level]; } return this.attributePointsOnCharacterLevelUp; } public func GetPerkPointsOnCharacterLevelUp(level: Int32) -> Int32 { if this.GetUseCustomPerkPointsMap() { return this.customPerkPointsMap[level]; } return this.perkPointsOnCharacterLevelUp; } public func GetPerkPointsOnSkillLevelUp() -> Int32 { return this.perkPointsOnSkillLevelUp; } public func GetUseCustomAttributePointsMap() -> Bool { return this.useCustomAttributePointsMap; } public func GetUseCustomPerkPointsMap() -> Bool { return this.useCustomPerkPointsMap; } public func GetUseConditionalPointGain() -> Bool { return this.useConditionalPointGain; } // With this condition player is awarded points if level is even. public func GetShouldAwardPoints(level : Int32) -> Bool { if level % 2 == 0 { return true; } return false; } }
Not working for me. Nothing in the modding console. // Attribute points gained on character level up. Ignored if using custom map. // Default = 1 this.attributePointsOnCharacterLevelUp = 3;
// Perk points gained on character level up. Ignored if using custom map. // Default = 1 this.perkPointsOnCharacterLevelUp = 2;In a new game, I have a save just before i get out of the care and gain the first level up but only get 1 point on both. Tried clearing the cache, restarting. tried installing cybercmd(its mentioned on page 4 or 5 of this thread) Its frustrating as other mods are working.
module SDPPL.Base import SDPPL.Settings.SDPPLSettings public class SDPPL extends ScriptableSystem { private let player: ref<PlayerPuppet>; private let statsSystem: ref<StatsSystem>; private let levelUpListener: ref<LevelChangedListener>; private let playerDevelopmentData: ref<PlayerDevelopmentData>; private let settings: ref<SDPPLSettings>; private let currentLevel: Int32;
private func OnPlayerAttach(request: ref<PlayerAttachRequest>) -> Void { this.player = GameInstance.GetPlayerSystem(request.owner.GetGame()).GetLocalPlayerMainGameObject() as PlayerPuppet; this.playerDevelopmentData = PlayerDevelopmentSystem.GetData(this.player); this.RegisterListeners(); this.settings = new SDPPLSettings(); this.settings.SetupSettings(); this.getlvl(); } private final func OnPlayerDetach(request: ref<PlayerDetachRequest>) -> Void { this.statsSystem.UnregisterListener(Cast<StatsObjectID>(this.player.GetEntityID()), this.levelUpListener); } private func RegisterListeners() -> Void { this.statsSystem = GameInstance.GetStatsSystem(this.GetGameInstance()); this.levelUpListener = new LevelChangedListener(); this.levelUpListener.sdppl = this; this.statsSystem.RegisterListener(Cast<StatsObjectID>(this.player.GetEntityID()), this.levelUpListener); } private func getlvl() -> Void { this.currentLevel = Cast<Int32>(this.statsSystem.GetStatValue(Cast<StatsObjectID>(this.player.GetEntityID()), gamedataStatType.Level)); } private func OnLevelUpRequest(request: ref<HandleLevelUpRequest>) -> Void { if !this.settings.GetIsEnabled() { return; } if Equals(request.newLevel, 1) { return; } if Equals(request.statType, gamedataStatType.Level) { this.HandlePlayerLevelUp(request.newLevel); } else { this.HandleSkillLevelUp(); } } private func HandlePlayerLevelUp(newLevel: Int32) -> Void { let levelsGained: Int32 = newLevel - this.currentLevel; // FTLog(ToString(this.currentLevel)); // FTLog(ToString(levelsGained)); // FTLog(ToString(newLevel)); if levelsGained > 0 { let i: Int32 = 1; while i <= levelsGained { this.ApplyLevelUpBonus(this.currentLevel + i); i += 1; } } this.currentLevel = newLevel; // FTLog(ToString(this.currentLevel)); } private func ApplyLevelUpBonus(level: Int32) -> Void { let attributePointsDelta: Int32 = 0; let perkPointsDelta: Int32 = 0; if this.settings.GetUseConditionalPointGain() && !this.settings.GetShouldAwardPoints(level) { attributePointsDelta = -1; perkPointsDelta = -1; } else { attributePointsDelta = this.settings.GetAttributePointsOnCharacterLevelUp(level); perkPointsDelta = this.settings.GetPerkPointsOnCharacterLevelUp(level); } if attributePointsDelta != 0 { this.playerDevelopmentData.AddDevelopmentPoints(attributePointsDelta, gamedataDevelopmentPointType.Attribute); } if perkPointsDelta != 0 { this.playerDevelopmentData.AddDevelopmentPoints(perkPointsDelta, gamedataDevelopmentPointType.Primary); } } private func HandleSkillLevelUp() -> Void { let perkPointsToAdd: Int32 = this.settings.GetPerkPointsOnSkillLevelUp(); if perkPointsToAdd > 0 { this.playerDevelopmentData.AddDevelopmentPoints(perkPointsToAdd, gamedataDevelopmentPointType.Primary); } } public static func IsStatASkill(statType: gamedataStatType) -> Bool { switch statType { case statType.CoolSkill: case statType.IntelligenceSkill: case statType.ReflexesSkill: case statType.StrengthSkill: case statType.TechnicalAbilitySkill: return true; } return false; } } public class HandleLevelUpRequest extends ScriptableSystemRequest { public let statType: gamedataStatType; public let newLevel: Int32; } public class LevelChangedListener extends ScriptStatsListener { public let sdppl: ref<SDPPL>; public func OnStatChanged(ownerID: StatsObjectID, statType: gamedataStatType, diff: Float, total: Float) -> Void { let request: ref<HandleLevelUpRequest>; if Equals(statType, gamedataStatType.Level) || SDPPL.IsStatASkill(statType) { request = new HandleLevelUpRequest(); request.statType = statType; request.newLevel = Cast<Int32>(total); if IsDefined(this.sdppl) { this.sdppl.QueueRequest(request); } } } }
Replace the content of the "sdppl_base.reds" with this and it will also level up multiple level at once correctly.
i made a little preset , can i publish it as separate mod ? didn't know how to write to you directly so i am asking it here ill leave here the link Set Dev Points Per Level Preset
Idk what Im doing wrong but the mod just dont work for me. Would be nice if the author created some presets for those who are not familiar with codes, not everyone can code...
It's working perfectly fine. Just change two settings in the sdppl_settings.reds file. The value(s) you want to change are going to be:
// Attribute points gained on character level up. Ignored if using custom map. // Default = 1 this.attributePointsOnCharacterLevelUp = 2; // Perk points gained on character level up. Ignored if using custom map. // Default = 1 this.perkPointsOnCharacterLevelUp = 2; // ------ Settings End ------
This will give you 2 attribute and 2 perk points per level instead of 1. Just tested this on a new game myself.
138 comments
Custom Dev Point Maps
Idk at what level I actually need to explain this so I'm just gonna give an example.
Let's say you want the following behavior:
- By default don't award attribute points;
- By default award 1 perk point;
- Award 2 attribute points at level 5, 10, 15, 20, 25, 30, 35, 40, 45 and 50;
- Award 3 skill points at level 10, 20, 30, 40, 50;
Implementation (by order listed above):
If you're wondering why, for instance, the value 9 is used and not 10 on 'this.customSkillPointsMap[9] = 3;' it's because array starts counting on 0. So if you want to change awarded value on level 33 you need to put 32 there.
module SDPPL.Settings
public class SDPPLSettings {
private let perkPointsOnSkillLevelUp : Int32;
private let useConditionalPointGain : Bool;
private let useCustomAttributePointsMap : Bool;
private let customAttributePointsMap : array<Int32>;
private let customAttributePointsMapDefaultValue : Int32;
private let useCustomPerkPointsMap : Bool;
private let customPerkPointsMap : array<Int32>;
private let customPerkPointsMapDefaultValue : Int32;
private let attributePointsOnCharacterLevelUp : Int32;
private let perkPointsOnCharacterLevelUp : Int32;
public func SetupSettings() -> Void {
// ------ Settings Start ------
// Perk points gained on every skill level up. Compounds with perks gained from skill progression.
// Default = 0
this.perkPointsOnSkillLevelUp = 0;
// Flag to enable/disable conditional point gain on character level up. This flag also applies to custom maps.
// Default = false
this.useConditionalPointGain = false;
// Flag to enable/disable use of new attribute point map. You can define overrides on a level by level basis below.
// Default = false
this.useCustomAttributePointsMap = true;
// Attribute points custom map default value.
// Default = 1
this.customAttributePointsMapDefaultValue = 1;
// Flag to enable/disable use of new Perk point map. You can define overrides on a level by level basis below.
// Default = false
this.useCustomPerkPointsMap = true;
// Perk points custom map default value.
// Default = 1
this.customPerkPointsMapDefaultValue = 1;
// Attribute points gained on character level up. Ignored if using custom map.
// Default = 1
this.attributePointsOnCharacterLevelUp = 1;
// Perk points gained on character level up. Ignored if using custom map.
// Default = 1
this.perkPointsOnCharacterLevelUp = 1;
// ------ Settings End ------
this.SetupNewPointMaps();
}
private func SetupNewPointMaps() -> Void {
if this.useCustomAttributePointsMap {
this.SetupAtttributePointMap();
}
if this.useCustomPerkPointsMap {
this.SetupPerkPointMap();
}
}
// Attribute point map setup.
private func SetupAtttributePointMap() -> Void {
let i : Int32 = 0;
while i < 60 {
ArrayPush(this.customAttributePointsMap, this.customAttributePointsMapDefaultValue);
i += 1;
}
// ------ Attribute Points Map Overrides Starts ------
this.customAttributePointsMap[2] = 2;
this.customAttributePointsMap[4] = 2;
this.customAttributePointsMap[6] = 2;
this.customAttributePointsMap[8] = 2;
this.customAttributePointsMap[10] = 2;
this.customAttributePointsMap[12] = 2;
this.customAttributePointsMap[14] = 2;
this.customAttributePointsMap[16] = 2;
this.customAttributePointsMap[18] = 2;
this.customAttributePointsMap[20] = 2;
this.customAttributePointsMap[23] = 2;
this.customAttributePointsMap[26] = 2;
this.customAttributePointsMap[29] = 2;
this.customAttributePointsMap[30] = 2;
this.customAttributePointsMap[34] = 2;
this.customAttributePointsMap[36] = 2;
this.customAttributePointsMap[40] = 2;
this.customAttributePointsMap[45] = 2;
this.customAttributePointsMap[50] = 2;
// ------ Attribute Points Map Overrides Ends ------
}
// Perk point map setup.
private func SetupPerkPointMap() -> Void {
let i : Int32 = 0;
while i < 60 {
ArrayPush(this.customPerkPointsMap, this.customPerkPointsMapDefaultValue);
i += 1;
}
// ------ Perk Points Map Overrides Starts ------
this.customPerkPointsMap[2] = 2;
this.customPerkPointsMap[4] = 2;
this.customPerkPointsMap[6] = 2;
this.customPerkPointsMap[8] = 2;
this.customPerkPointsMap[10] = 2;
this.customPerkPointsMap[12] = 2;
this.customPerkPointsMap[14] = 2;
this.customPerkPointsMap[16] = 2;
this.customPerkPointsMap[18] = 2;
this.customPerkPointsMap[20] = 2;
this.customPerkPointsMap[23] = 2;
this.customPerkPointsMap[26] = 2;
this.customPerkPointsMap[29] = 2;
this.customPerkPointsMap[30] = 2;
this.customPerkPointsMap[34] = 2;
this.customPerkPointsMap[36] = 2;
this.customPerkPointsMap[40] = 2;
this.customPerkPointsMap[45] = 2;
this.customPerkPointsMap[50] = 2;
this.customPerkPointsMap[55] = 2;
// ------ Perk Points Map Overrides Ends ------
}
public func GetIsEnabled() -> Bool {
return true;
}
public func GetAttributePointsOnCharacterLevelUp(level: Int32) -> Int32 {
if this.GetUseCustomAttributePointsMap() {
return this.customAttributePointsMap[level];
}
return this.attributePointsOnCharacterLevelUp;
}
public func GetPerkPointsOnCharacterLevelUp(level: Int32) -> Int32 {
if this.GetUseCustomPerkPointsMap() {
return this.customPerkPointsMap[level];
}
return this.perkPointsOnCharacterLevelUp;
}
public func GetPerkPointsOnSkillLevelUp() -> Int32 {
return this.perkPointsOnSkillLevelUp;
}
public func GetUseCustomAttributePointsMap() -> Bool {
return this.useCustomAttributePointsMap;
}
public func GetUseCustomPerkPointsMap() -> Bool {
return this.useCustomPerkPointsMap;
}
public func GetUseConditionalPointGain() -> Bool {
return this.useConditionalPointGain;
}
// With this condition player is awarded points if level is even.
public func GetShouldAwardPoints(level : Int32) -> Bool {
if level % 2 == 0 {
return true;
}
return false;
}
}
// Attribute points gained on character level up. Ignored if using custom map.
In a new game, I have a save just before i get out of the care and gain the first level up but only get 1 point on both. Tried clearing the cache, restarting. tried installing cybercmd(its mentioned on page 4 or 5 of this thread)// Default = 1
this.attributePointsOnCharacterLevelUp = 3;
// Perk points gained on character level up. Ignored if using custom map.
// Default = 1
this.perkPointsOnCharacterLevelUp = 2;
Its frustrating as other mods are working.
module SDPPL.Base
import SDPPL.Settings.SDPPLSettings
public class SDPPL extends ScriptableSystem {
private let player: ref<PlayerPuppet>;
private let statsSystem: ref<StatsSystem>;
private let levelUpListener: ref<LevelChangedListener>;
private let playerDevelopmentData: ref<PlayerDevelopmentData>;
private let settings: ref<SDPPLSettings>;
private let currentLevel: Int32;
private func OnPlayerAttach(request: ref<PlayerAttachRequest>) -> Void {
this.player = GameInstance.GetPlayerSystem(request.owner.GetGame()).GetLocalPlayerMainGameObject() as PlayerPuppet;
this.playerDevelopmentData = PlayerDevelopmentSystem.GetData(this.player);
this.RegisterListeners();
this.settings = new SDPPLSettings();
this.settings.SetupSettings();
this.getlvl();
}
private final func OnPlayerDetach(request: ref<PlayerDetachRequest>) -> Void {
this.statsSystem.UnregisterListener(Cast<StatsObjectID>(this.player.GetEntityID()), this.levelUpListener);
}
private func RegisterListeners() -> Void {
this.statsSystem = GameInstance.GetStatsSystem(this.GetGameInstance());
this.levelUpListener = new LevelChangedListener();
this.levelUpListener.sdppl = this;
this.statsSystem.RegisterListener(Cast<StatsObjectID>(this.player.GetEntityID()), this.levelUpListener);
}
private func getlvl() -> Void {
this.currentLevel = Cast<Int32>(this.statsSystem.GetStatValue(Cast<StatsObjectID>(this.player.GetEntityID()), gamedataStatType.Level));
}
private func OnLevelUpRequest(request: ref<HandleLevelUpRequest>) -> Void {
if !this.settings.GetIsEnabled() {
return;
}
if Equals(request.newLevel, 1) {
return;
}
if Equals(request.statType, gamedataStatType.Level) {
this.HandlePlayerLevelUp(request.newLevel);
}
else {
this.HandleSkillLevelUp();
}
}
private func HandlePlayerLevelUp(newLevel: Int32) -> Void {
let levelsGained: Int32 = newLevel - this.currentLevel;
// FTLog(ToString(this.currentLevel));
// FTLog(ToString(levelsGained));
// FTLog(ToString(newLevel));
if levelsGained > 0 {
let i: Int32 = 1;
while i <= levelsGained {
this.ApplyLevelUpBonus(this.currentLevel + i);
i += 1;
}
}
this.currentLevel = newLevel;
// FTLog(ToString(this.currentLevel));
}
private func ApplyLevelUpBonus(level: Int32) -> Void {
let attributePointsDelta: Int32 = 0;
let perkPointsDelta: Int32 = 0;
if this.settings.GetUseConditionalPointGain() && !this.settings.GetShouldAwardPoints(level) {
attributePointsDelta = -1;
perkPointsDelta = -1;
}
else {
attributePointsDelta = this.settings.GetAttributePointsOnCharacterLevelUp(level);
perkPointsDelta = this.settings.GetPerkPointsOnCharacterLevelUp(level);
}
if attributePointsDelta != 0 {
this.playerDevelopmentData.AddDevelopmentPoints(attributePointsDelta, gamedataDevelopmentPointType.Attribute);
}
if perkPointsDelta != 0 {
this.playerDevelopmentData.AddDevelopmentPoints(perkPointsDelta, gamedataDevelopmentPointType.Primary);
}
}
private func HandleSkillLevelUp() -> Void {
let perkPointsToAdd: Int32 = this.settings.GetPerkPointsOnSkillLevelUp();
if perkPointsToAdd > 0 {
this.playerDevelopmentData.AddDevelopmentPoints(perkPointsToAdd, gamedataDevelopmentPointType.Primary);
}
}
public static func IsStatASkill(statType: gamedataStatType) -> Bool {
switch statType {
case statType.CoolSkill:
case statType.IntelligenceSkill:
case statType.ReflexesSkill:
case statType.StrengthSkill:
case statType.TechnicalAbilitySkill:
return true;
}
return false;
}
}
public class HandleLevelUpRequest extends ScriptableSystemRequest {
public let statType: gamedataStatType;
public let newLevel: Int32;
}
public class LevelChangedListener extends ScriptStatsListener {
public let sdppl: ref<SDPPL>;
public func OnStatChanged(ownerID: StatsObjectID, statType: gamedataStatType, diff: Float, total: Float) -> Void {
let request: ref<HandleLevelUpRequest>;
if Equals(statType, gamedataStatType.Level) || SDPPL.IsStatASkill(statType) {
request = new HandleLevelUpRequest();
request.statType = statType;
request.newLevel = Cast<Int32>(total);
if IsDefined(this.sdppl) {
this.sdppl.QueueRequest(request);
}
}
}
}
Replace the content of the "sdppl_base.reds" with this and it will also level up multiple level at once correctly.
didn't know how to write to you directly so i am asking it here
ill leave here the link Set Dev Points Per Level Preset
// Attribute points gained on character level up. Ignored if using custom map.
// Default = 1
this.attributePointsOnCharacterLevelUp = 2;
// Perk points gained on character level up. Ignored if using custom map.
// Default = 1
this.perkPointsOnCharacterLevelUp = 2;
// ------ Settings End ------
This will give you 2 attribute and 2 perk points per level instead of 1. Just tested this on a new game myself.
I should check if its outdated and update them if possible, they may also be incompatible with the current version of the game.
I am running a mod that changes the level I can get to. and an unlimited attribute reset mod. Could these mods be clashing?
Update, Removing the Custom Level Cap mod makes the game launch with no error from SDPPL