Hi. I'm kind of a beginner to modding Rimworld, and definitely a novice with C#, so I'm sure that the problem is something simple. Here's my problem:
I'm trying to edit a file in Jerecell's "Rimworld of Madness - Vampires" mod. Here's the original Source code (Provided)
I've tried several approaches, but my goal is to either edit the amount of XP gained under certain situations or to edit the amount of XP required under those circumstances. I've accomplished both of these (The logic is sound and things are compiling), but no matter what I do, I can't get my changes to take priority over Jerecell's mod (Overwrite his behavior), even if mine is loaded after his. What am I doing wrong? Any help would be appreciated.
Solution:
I'm putting a solution here in case someone else is having a similar problem. I wasn't updating the Defs correctly. I just referenced my class in Defs, and problem solved.
I'm trying to edit a file in Jerecell's "Rimworld of Madness - Vampires" mod. Here's the original Source code (Provided)
Code Select
public class CompVampire : CompAbilityUser
{
(...)
public int Level
{
get => level;
set
{
if (value > level && value != 0)
{
abilityPoints++;
if (XP < ((value * 600) * ((IsGhoul) ? 2 : 1)))
{
XP = ((value * 600) * ((IsGhoul) ? 2 : 1));
}
}
else if (value == 0)
XP = 0;
level = value;
}
}I've tried several approaches, but my goal is to either edit the amount of XP gained under certain situations or to edit the amount of XP required under those circumstances. I've accomplished both of these (The logic is sound and things are compiling), but no matter what I do, I can't get my changes to take priority over Jerecell's mod (Overwrite his behavior), even if mine is loaded after his. What am I doing wrong? Any help would be appreciated.
Solution:
I'm putting a solution here in case someone else is having a similar problem. I wasn't updating the Defs correctly. I just referenced my class in Defs, and problem solved.