Most Efficient Way to Script: Multiple Decisions Combining to Lead to Different Results

● ARCHIVED · READ-ONLY
Started by RebelRed 4 posts View original ↗
  1. Howdy folks,

    So I'm pretty comfortable with the scripting system and have been playing around with a couple ways to do this, but I wanted to just describe a scenario and elicit some opinions on what the best/most efficient way to go about scripting this type of situation would be (since I'm going to be using this type of thing a lot for a project I'm working on):

    Here's what I'm looking for: Imagine you are trying to script a trial-like situation where the player is one of the parties (or representing one of the parties). Over the course of this trial, imagine that the player is making various decisions about how to proceed (what to say/do/present/etc.) Now I'm pretty comfortable with conditional branching changing the course of the trial at certain points, but my question is about the most efficient way to have all these decisions essentially get "added up" and determine the ultimate outcome of the trial.

    In other words, I want each decision made by the player to add or subtract a certain point value from what the player needs to achieve "victory". Every decision gets (or loses) the player a certain number of "points" (invisibly in the background) and at the end of the trial the outcome is determined by how many "points" the player has accumulated. Thus, different combinations of choices could lead to the same outcomes. (I want the player to have the freedom to take multiple paths to victory or defeat and I don't want to have to script a million conditional branches for every possible combination of choices a player could make.) Ideally I'd like to be able to assign different weight to different decisions depending on their importance.

    How would you all go about scripting a system like this? Is it possible to do it at all efficiently?

    Let me know if that doesn't make sense.
  2. If you want to make it with events only you could use a variable for this. 

    Add or substract a certain value on every decision, and at the end make conditional branches for certain ranges.

    So for example if the Variable is between -100 and -50 let the player loose, if it is between -49 and 0 let the player lose but different. 

    If it is between 1-50 let the player win, and if it is between 51 and 100 let him win, too but again different.

    So you could make four endings this way. That would be the easiest way to do something like this.
  3. Exactly what I was looking for. Thanks a bunch, man!
  4. I've moved this thread to VX Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Please do not use the term "script" for adding commands to events. Scripts are something completely different, and not required here at all.