Solved secret character

Question that is answered or resolved.

DD Tokki

Well-known member
This may or may not be a feature, so I'm still asking.
Secret characters are unlocked only after clearing the game.
Is there any way to unlock the character for each specific stage?
stage 01 -> boss 01 -> player(boss 01) -> next
stage 02 -> boss 02 -> player(boss 02) -> next
stage 03 -> boss 03 -> player(boss 03) -> next...
I want to unlock the character when clearing the stage without looking at the ending like this.
 
Last edited:
I think spawning Unlock0 should be sufficient to ran Unlock function.

But anyways, I assume this Unlock0 has content similar to Unlock1 and Unlock2? that they write to Test.txt ?
When Test.txt is created, Rugal is unlocked and comes out even if you do not clear Rugal from the beginning.
 
Sorry for late reply, I am completely forgotten about this yesterday.

Anyways, since Unlock0 entity calls Unlock function, you'd need to modify the contents to match the unlocking states.
The one I'm quoting here is the latest one but it may be different with the one in Map demo, however it should give you idea on how it works:
C:
void Unlock(int Flag, void Path)
{ // Unlocks certain character or achievement based on flag and write the status on file named Path
// 1: Unlocks Paladin
// 2: Unlocks Arthur
// 3: Stores Elite Killer Trophy
// 4: Stores Rest In Peace Trophy
    void file = openfilestream(Path, 1);
    char Code; int Value; char Check; int VCheck;

    if(Flag == 1){
      Code = "Rise";
      Value = 39;
      Check = "Load";
    } else if(Flag == 2){
      Code = "Rise2";
      Value = 56;
      Check = "Load2";
    } else if(Flag == 3){
      Code = "Jtf";
      Value = 117;
      Check = "Lizto";
    } else if(Flag == 4){
      Code = "DmAt";
      Value = 957;
      Check = "Pipor";
    }

    if(file == -1){
      writedefault(Path);
    }

    VCheck = getglobalvar(Check);
    
    if(VCheck!=Value){
      fileedit(Path, Code, Value);
      filewrite(Path);
    }
}

I usually use different Code in txt file with respective global variable but you could use same one.
Try modifying your Unlock function to suit your unlock states then set it properly in Unlock1 and other Unlock entities.
 
Sorry for late reply, I am completely forgotten about this yesterday.

Anyways, since Unlock0 entity calls Unlock function, you'd need to modify the contents to match the unlocking states.
The one I'm quoting here is the latest one but it may be different with the one in Map demo, however it should give you idea on how it works:
C:
void Unlock(int Flag, void Path)
{ // Unlocks certain character or achievement based on flag and write the status on file named Path
// 1: Unlocks Paladin
// 2: Unlocks Arthur
// 3: Stores Elite Killer Trophy
// 4: Stores Rest In Peace Trophy
    void file = openfilestream(Path, 1);
    char Code; int Value; char Check; int VCheck;

    if(Flag == 1){
      Code = "Rise";
      Value = 39;
      Check = "Load";
    } else if(Flag == 2){
      Code = "Rise2";
      Value = 56;
      Check = "Load2";
    } else if(Flag == 3){
      Code = "Jtf";
      Value = 117;
      Check = "Lizto";
    } else if(Flag == 4){
      Code = "DmAt";
      Value = 957;
      Check = "Pipor";
    }

    if(file == -1){
      writedefault(Path);
    }

    VCheck = getglobalvar(Check);
 
    if(VCheck!=Value){
      fileedit(Path, Code, Value);
      filewrite(Path);
    }
}

I usually use different Code in txt file with respective global variable but you could use same one.
Try modifying your Unlock function to suit your unlock states then set it properly in Unlock1 and other Unlock entities.
Code:
void Unlock(int Flag, void Path)
{ // Unlocks certain character based on flag and write the status on file named Path
// 1: Unlocks Rugal
// 2: Unlocks Chun-Li
// 3: Unlocks Griffon
    void file = openfilestream(Path, 1);
    char Code; int Value; char Check; int VCheck;

    if(Flag == 1){
      Code = "Boss0";
      Value = 1200;
      Check = "Load";
    } else if(Flag == 2){
      Code = "Boss1";
      Value = 2400;
      Check = "Load2";
    } else if(Flag == 3){
      Code = "Boss2";
      Value = 3600;
      Check = "Load3";
    }

    if(file == -1){
      writedefault(Path);
    }

    VCheck = getglobalvar(Check);
 
    if(VCheck!=Value){
      fileedit(Path, Code, Value);
      filewrite(Path);
    }
}


I added 00 to the value in the unlock script, and now Rugal is no longer unlocked from the beginning, but when I restart the game, the characters that should be unlocked still do not appear. However, if you load it, the cleared character will appear. I think this will be a long homework assignment.
 
Last edited:
I think spawning Unlock0 should be sufficient to ran Unlock function.

But anyways, I assume this Unlock0 has content similar to Unlock1 and Unlock2? that they write to Test.txt ?
Code:
11
22
33
44
Boss0
55 (1200 - Rugal)
Boss1
66
Boss2
77
88
#End

When I return to the title without exiting the game, the unlock is maintained, but when I close and turn it on again, it seems that the "Test.txt" file is saved without the unlock number. I don't know, but if I manually change it to "1200", the boss comes out.
 
Last edited:
Back
Top Bottom