1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Choice System

Discussion in 'World Editor Help Zone' started by firevlad711, Aug 19, 2016.

  1. firevlad711

    firevlad711

    Joined:
    Mar 27, 2013
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Hello! I would like to know hot to make a choice system for a campaign like the ones who Shar Dundred used in his campaign: Legens of Arkain. Something like at a point you have to chose between variant X or Y with a diferent result in the end. Or something like, if you do or not side quest Z this would happen. I hope I can get a tutorial or some help. Thanks for reading.

    For example I want in a mission to be able to chose if you kill a bandit or not. In the next mission of the campaign if you let the bandit go, he will come in your help with some extra units. If you kill him, the bandits will want revenge and will be hostile.

    Another example is in another mission you will have a sidequest to kill a group of mages. If you do that in the next quest where 6 lords battle (with you 7). A lord will tell you that the mages killed many of his soldiers and got away. And he will be an ally in the mission for that. If you don't do the sidequest. He will say that he does not trust you to pick a king from the lords. And he will become hostile.
     
    Last edited: Aug 19, 2016
  2. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    your question is of a very general nature and therefore hard to answer.

    It is all about game design.
    It is also a lot of questions in there, like
    how is the world designed. Is is open or guided?
    how big can differences be? Is there real different story-lines or only small diff?
    etc.

    The way to go would be certainly having a variable for each decision or better have an array.

    the way I do it, for example, is to have a boolean array called Decisions or whatever. Then I reserve a number of slots for some gameplay event, that I can set to true or false depending on triggering.

    Its actually very easy but a lot of work.

    Just an example:
    I made a little scripted event, where bandits rob a bank, and it depends on the actions of all players before. Depending on what they do, i set the array slot to true. Now, when the bandits attack, the number of bandits and outcome of the raid is altered depending on the number and type of true array slots. If players gave a lot of money to the police forces, there is even police units spawning and preventing the attack. This is all set in the array, when players do something, and then, later evaluated in the scripted event.
     
  3. firevlad711

    firevlad711

    Joined:
    Mar 27, 2013
    Messages:
    13
    Resources:
    0
    Resources:
    0
    This is very helpful. And I accept that my question was very general and particular. So I will try to explain to you what I have in mind in simple words.
    I want to make a sidequest where you have to choose between killing a bandit or not killing it. If you refuse to kill it, he and his friends will help you in the next mission by giving you some extra units. If you kill him the bandits remain hostile and you get no aditional units. I hope that will make it a little bit clear. I will edit so the others can more easily understand. Thank you for help. :D
     
  4. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    no worries :)

    Do you mean different maps by writing "mission" or is it the same map? In case of different maps in a singleplayer campaign, you have to store the information in the game cache (you can find tutorials online for this).

    Anyway, in this case you could create a boolean variable "HasBanditBeenKilled" or so and set it to false initially. Now you create a trigger that fires when a unit dies (event a unit dies) and then add the condition "Dying Unit is Your Bandit". Then simply set HasBanditBeenKilled to true.

    Then in that next mission, you use a simple "if then else" action in your trigger, where the condition is simply boolean: HasBanditBeenKilled equals to false.
    If it is false, create the additional units.

    Its pretty straight foreward and all can be done in GUI.
     
  5. firevlad711

    firevlad711

    Joined:
    Mar 27, 2013
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Thanks for all the help. And yes I ment different maps.
     
  6. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    this tutorial may help you:

    Game Caches

    it does only work in campaigns though.
     
  7. Shar Dundred

    Shar Dundred

    Map Moderator

    Joined:
    May 6, 2009
    Messages:
    4,503
    Resources:
    12
    Packs:
    1
    Maps:
    10
    Tutorials:
    1
    Resources:
    12
    Not 100% correct.
    Keep in mind that I could also transfer game cache between
    different campaigns, so it could also work between different maps.
    It might not work for multiplayer, however.
    Haven't really tested that yet.
     
  8. firevlad711

    firevlad711

    Joined:
    Mar 27, 2013
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Thanks everyone for help. After a day of searching and looking. I did make a choice system with dialog buttons. It is still preatty simple and filled with holes and possible errors, but I think I can fix them.