[Cosmic v83] Need help adding Progressive Rebirth Rates(Complete)

Newbie Spellweaver
Joined
Jan 1, 2024
Messages
39
Reaction score
10
Does anybody know how to do this? I don't know where to start on adding progressive rates by Rebirth. I want it to be harder the more rebirth you have.

Got it!

Insert this at the top of Character.java
JavaScript:
private int reborns;

add this

Code:
public int getReborns() {
    return reborns;
}

public void setReborns(int reborns) {
    this.reborns = reborns;
}

Then modify the getExpRate
You can modify the rate and the threshhold for the amount of rebirths here.
Code:
public int getExpRate() {
    if (hasNoviceExpRate()) {
        return 1;
    }

    int rebirthCount = getReborns();
    
    if (rebirthCount >= 300 && rebirthCount < 400) {
        return 100;
    } else if (rebirthCount >= 200 && rebirthCount < 300) {
        return 200;
    } else if (rebirthCount >= 100 && rebirthCount < 200) {
        return 300;
    }

    return baseExpRate;  // This will handle all cases under 100 rebirths
}
}
 
Last edited:
if you already have rebirth function, u should have a rebirth count..
just use that and divide the exp u gain?

somewhere in gainExp function.
if (chr.getRebirthCount() > 10) exp /2;?
 
Upvote 0
if you already have rebirth function, u should have a rebirth count..
just use that and divide the exp u gain?

somewhere in gainExp function.
if (chr.getRebirthCount() > 10) exp /2;?
Do you not have to call the database to read the rebirth?
 
Upvote 0
You should already have that function if you have rebirth function..if not just try looking at those old v83 repacks
 
Upvote 0
You should already have that function if you have rebirth function..if not just try looking at those old v83 repacks
I have it, im using the version of cosmic right before they removed Rebirth
 
Last edited:
Upvote 0
Check if u have rebirthcount. then u should know what to do later
I do not have rebirth count.

i found the fuction for database for reborns. So what about adding my own exp rate
for example, 500x is the base exp
100 - 200 rebirth is 300x
200 - 300 -> 200x
400 - 500 -> 100x
and so on. would that be with
if (chr.getRebirthCount() > 10) exp /2;?
 
Upvote 0
I have it, im using the version of cosmic right before they removed Rebirth
where to get this version of cosmic before they removed Rebirth?

anyone know how to enable/add back rebirth system? thanks.
 
Upvote 0
Back