Urgent help with Modern Algebra's Quest Journal needed

Discussion in 'RGSSx Script Support' started by Kes, May 28, 2015.

Thread Status:
Not open for further replies.
  1. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    Exactly!

    That's what I did with A Tale of a Common Man. The main quest had no reward except the ending itself, and players seemed to like the ending very much, so I guess it worked.
     
    #21
    cabfe likes this.
  2. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,483
    Likes Received:
    978
    Location:
    Buckie, Scotland
    First Language:
    English
    Iavra, your snippet won't quite work for a few reasons, mainly that by the time the original merge is called the party has been deleted. What you need to do is edit the party merge script directly, and put this somewhere before the line which calls delete_party:

    party2.quests.list.each { |quest| 

          0.upto(quest.objectives.size) { |objid|

            if party2.quests.revealed?(quest.id) && party2.quests[quest.id].objective_status?:)revealed, objid)

              party1.quests[quest.id].reveal_objective(objid)

            end

          }

        }

     

    This will reveal for party1 any objectives which were revealed for party2, with the exception of quests that party2 didn't have visibility of in the first place.
     
    Last edited by a moderator: May 29, 2015
    #22
  3. Iavra

    Iavra Veteran Veteran

    Messages:
    1,797
    Likes Received:
    856
    First Language:
    German
    That's why i extended Game_Party.merge and not Game_Parties.merge ;)
     
    Last edited by a moderator: May 29, 2015
    #23
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    Having just tried that snippet I can report that it does indeed add all the quests into one list.  So great!

    What it doesn't do (yet) is record what progress (if any) was made in any of party 2's quests, everything shows up as incomplete.

    What I could do is a series of conditional checks to see if the switches which record the completion of an individual quest is ON or not.  If it is, then a script call to re-complete the quest might do it. I shall have to experiment and see. I'm not sure how to get the data where only some of the objectives were completed, though.
     
    #24
  5. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,483
    Likes Received:
    978
    Location:
    Buckie, Scotland
    First Language:
    English
    I thought reveal objective retained completion from before, but that doesn't make sense because it's party 2 that did the completion, not party 1. Hang on a sec.

    Iavra: The thing is, Game_Party doesn't HAVE a merge method so that's even worse. :p
     
    #25
  6. cabfe

    cabfe Cool Cat Veteran

    Messages:
    2,305
    Likes Received:
    2,385
    Location:
    France
    First Language:
    French
    Primarily Uses:
    RMVXA
    There's a function already included to be used with a script call: objective_complete?
     
    #26
  7. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    I cannot know which individual objectives a player has completed.  What I can know is that a quest is completed  That is because I activate a switch for that quest telling me that.  I can, therefore, check those switches to see if they are ON or OFF.
     
    #27
  8. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,483
    Likes Received:
    978
    Location:
    Buckie, Scotland
    First Language:
    English
    Change it to this.

    party2.quests.list.each { |quest| 

          0.upto(quest.objectives.size) { |objid|

            if party2.quests.revealed?(quest.id) && party2.quests[quest.id].objective_status?:)revealed, objid)

              party1.quests[quest.id].reveal_objective(objid)

              if party2.quests[quest.id].objective_status?:)complete, objid)

                party1.quests[quest.id].complete_objective(objid)

              elsif party2.quests[quest.id].objective_status?:)failed, objid)

                party1.quests[quest.id].fail_objective(objid)

              end

            end

          }

        }
     
    #28
    cabfe and Kes like this.
  9. cabfe

    cabfe Cool Cat Veteran

    Messages:
    2,305
    Likes Received:
    2,385
    Location:
    France
    First Language:
    French
    Primarily Uses:
    RMVXA
    It's exactly what it does:

    objective_complete?(quest_id, objective_id_1, ... objective_id_n)

    ->          This is satisfied if all the listed objectives have been completed

    You only enter what you need to be checked, regardless of the overall status of the quest.

    Of course, if you need to check every objective separately that'll make a very long conditional branch, but still doable without switches.

    Edit: Trihan's version using a script is easier than through traditional eventing in this case.
     
    Last edited by a moderator: May 29, 2015
    #29
  10. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,799
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    Awesome mode officially confirmed.  That new variant works perfectly.

    You have no idea how pleased I am about that.  To have the whole thing running smoothly is such a weight off my mind.

    Thank you very much indeed.

    And thank you, too, Iavra and cabfe, for your contributions to the thinking on this.
     
    Last edited by a moderator: May 29, 2015
    #30
    Lunarea likes this.
  11. Andar

    Andar Veteran Veteran

    Messages:
    28,446
    Likes Received:
    6,491
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #31
Thread Status:
Not open for further replies.

Share This Page