• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Choice System

Status
Not open for further replies.
Level 2
Joined
Mar 27, 2013
Messages
14
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:
Level 14
Joined
Jul 1, 2008
Messages
1,314
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.
 
Level 2
Joined
Mar 27, 2013
Messages
14
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.

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
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
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.
 
Level 2
Joined
Mar 27, 2013
Messages
14
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.
Thanks for all the help. And yes I ment different maps.
 
Level 2
Joined
Mar 27, 2013
Messages
14
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.
 
Status
Not open for further replies.
Top