Can I cheat Death? Or, how to disable 'Game Over' after party demise in encounter battle.

Discussion in 'RGSSx Script Support' started by Jernau Gurgeh, Jun 5, 2014.

  1. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    I'm starting work on my initial project in RPMVXa which is going to be a personalised RPG-lite adventure featuring my young nieces & nephews - all 8 of them.

    The limited amount of combat will be event-based, skipable and there's no death - if everyone in the party gets knocked out ('dies') in an evented battle, they will just get a bad luck message and maybe lose some cash and/or XP, and they'll have to wander off to an inn to recuperate, find a healing pool or spam some potions etc etc.

    However, I have thought about offering the option for the older kids to enable random encounters too, and also jack up the RPG elements a bit, but I still don't want 'death' and the Game Over screen to be an issue. I've looked all over but can't find a satisfactory solution to this. I don't think Yanfly's Death Common Events script would handle this, or the default Immortal state, and it's probably not practical to set conditions on ALL troops for ALL party members regarding what to when their HP=0.

    Does anybody know how I can manage this?

    Thanks!
     
    Last edited by a moderator: Jun 5, 2014
    #1
  2. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    This?


    Cheat Death.png
     
    #2
  3. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    Thanks for the suggestion, but that's for evented battles, which I have worked out how to do. What I'm wondering is how do I achieve the same thing for all random encounter battles?
     
    Last edited by a moderator: Jun 5, 2014
    #3
  4. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    Then it's time for some Scripting!

    Open up the script editor and find the "BattleManager" script.

    use Ctrl+F to find "Defeat Processing"

    Then a few lines down replace

    SceneManager.goto(Scene_Gameover)with

    revive_battle_membersreplay_bgm_and_bgsSceneManager.returnnow it is impossible to get a Game Over from ANY BATTLE, EVER!
     
    Last edited by a moderator: Jun 5, 2014
    #4
    Jernau Gurgeh likes this.
  5. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    Hacking the main game scripts? I like it! It's just like when I started out as PHP 'developer' - hands-on is how you learn best methinks!

    It works a treat, and I'm sure I'll have a go at hacking away at it from there to include some kind of message saying "You loser!" and rob them of some XP and gold. Actually, I sort of get the gist of the code and so might see if I can rewrite (overwrite?) the whole Defeat Processing script to suit my needs.

    Many thanks RyokuHasu :)

    UPDATE: Wow. I've just created my first script that replaces a default script, on my third day of using RMVX Ace. How exciting!
     
    Last edited by a moderator: Jun 5, 2014
    #5
    RyokuHasu likes this.
  6. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    it's not hacking it's editing/scripting. please don't use such terms for my profession.

    And congrats on your achievement.
     
    #6
  7. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    Apologies! I've always referred to it as 'hacking' when I'm adding to, editing or otherwise messing about with someone else's code - usually PHP code in the content management systems of the websites I work on to make it do what I (or my clients) need it to do. But I'll refrain from using the term here :)
     
    #7
    RyokuHasu likes this.
  8. Mouser

    Mouser Veteran Veteran

    Messages:
    1,246
    Likes Received:
    264
    First Language:
    English
    So you know - you should copy the script, paste it down below materials and put your changes there.

    Leave the original untouched up where it was. The game will use whichever code is lower down in the stack.
     
    #8
  9. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    Thanks, I've already worked that out. I'm currently working on the script to increase HP and reduce XP and gold according to settings earlier on in the script - allowing the script user to define set amounts or percentages or maybe even dependent upon level. I think I'm possibly getting a bit carried away with this though. ;)
     
    Last edited by a moderator: Jun 5, 2014
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,914
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Is this resolved then?
     
    #10
  11. Jernau Gurgeh

    Jernau Gurgeh Villager Member

    Messages:
    22
    Likes Received:
    4
    Location:
    Chiark Orbital
    First Language:
    English
    Yes, thank you.
     
    #11

Share This Page