test content
What is the Arc Client?
Install Arc
Options

AND/OR function solution. Use invisible walls to create an OR

medullanmedullan Member, Neverwinter Beta Users Posts: 33
edited May 2013 in The Foundry
Okay so I am sure many of you have found yourselves disappointed that there doesn't seem to be a way for you to create a quest with choices that have different effects. For example my problem was I wanted three different npcs all to have a dialog option that would start an encounter with all three npcs. Also each npc would have a dialog option that would send you to retrieve a quest item or some similar side quest. The problem came in when I tried to set the non hostile npcs to disappear when the hostile versions of themselves appeared. If I set them to disappear when each of the three reaches the fight dialogue option then all three npcs had to be brought to that fight dialogue option before the non hostile versions disappeared. There seemed to be no way to set it to, if option a, b, OR c is reached despawn npc. I asked in the forums and searched to see if anyone else had addressed this problem and the resounding answer was there is no OR in the foundry.

Well I figured out a way to make it happen. I will try to explain it to the best of my ability so that we can all take advantage of what I like to call the OR gate.

Ok so I haven't yet applied this idea to my above "three npc problem" but I did get it working on a different encounter in the same quest. In this other encounter the player, whom we will call, Gary speaks to a young girl who needs berries for a pie. In the course of the dialog there are several options... Gary can go get the berries for her. Gary can go with her to get the berries. Gary can enlist the aid of her friends and they can all go get the berries. Or Gary can attack the little girl who is wasting his time with her berry problem. In all but the first option the little girl npc must despawn and be replaced with either a hostile npc who will attack Gary or a friendly npc who will follow Gary and attack any hostile npcs. With three different reasons for our little girl npc to despawn we hit a roadblock, without an OR gate.

So what I have done is to trap Gary in a box this box is made of invisible walls. Go ahead picture a mime. Gary isn't trapped indefinitely however because inside this box is a crystal multiple distinct versions of a crystal in fact. the first crystal is always the despawn trigger. This crystal causes our little girl npc to disappear. It's like magic. The second crystal however is always different. The second crystal that appears is determined by the dialogue choice that Gary has made. When Gary interacts with this crystal the appropriate npc is told to spawn be it for good or for evil. The invisible walls that appear to trap Gary, after he has made a choice, in order to force Gary to interact with the choice crystals, appear when the first crystal appears, and disappear when the second crystal is interacted with. A different set of walls is needed for each secondary choice crystal.

I have tested this theory and am beginning to implement it into my own modules. Using "when component complete" to trigger spawning and despawning allows me to use interact objects as a clunky but effective workaround for the lack of any OR options in the foundry.The first crystal, the one that causes despawn, appears as soon as a dialogue with more than one choice is initiated. The second crystal is set to appear when a specific dialogue option is reached. Both crystals are set to despawn "When this component complete"

I would appreciate it if you had any suggestions on how I could further refine this or different ways this could be used to accomplish different tasks. If you find yourself having success using my OR Gate please feel free to comment with how you used it in your quest. And last but not least if you have any questions on how to get this to work for you and your quest please feel free to ask.
Post edited by medullan on

Comments

  • Options
    zovyazovya Member, Neverwinter Beta Users, Neverwinter Hero Users, Neverwinter Guardian Users, Neverwinter Knight of the Feywild Users Posts: 0 Arc User
    edited May 2013
    In logic, two ANDs can make an OR. I'm using such a technique in my next chapter.
  • Options
    medullanmedullan Member, Neverwinter Beta Users Posts: 33
    edited May 2013
    zovya wrote: »
    In logic, two ANDs can make an OR. I'm using such a technique in my next chapter.

    I wish I understood what you mean. Are you saying the same thing I said in my book with a short sentence that only a programmer would understand, or are you saying you have a different way to accomplish the same goal?
  • Options
    gemstrikegemstrike Member Posts: 127 Arc User
    edited May 2013
    Uhh....two ANDS do not make an OR.

    http://en.wikipedia.org/wiki/OR_gate

    NANDs or NORS can be used to do an OR, but we don't have those either :P

    Oh, and we never said that you cann't do OR logic, just that you can't do it on the main story line. So in your pie example, if it's part of the story line, all of your choices must resolve to a single point. I'm also not following your logic very well, but it is almost 1:30AM for me so I'm not thinking well right now. I'll look at it again tomorrow, but something about it is bugging me as needlessly complex.

    Edit: three edits so far. time to get some sleep :P

    Foundry Author! Check out @gemstrike to see my quests :)
    Want to make your own? Then watch my videos.
    New Videos
    Old Videos
  • Options
    zovyazovya Member, Neverwinter Beta Users, Neverwinter Hero Users, Neverwinter Guardian Users, Neverwinter Knight of the Feywild Users Posts: 0 Arc User
    edited May 2013
    medullan wrote: »
    I wish I understood what you mean. Are you saying the same thing I said in my book with a short sentence that only a programmer would understand, or are you saying you have a different way to accomplish the same goal?

    No, just confirming your logic. I was able to get OR conditions also by using similar methods.
  • Options
    medullanmedullan Member, Neverwinter Beta Users Posts: 33
    edited May 2013
    That is what I thought you meant. I am curious how you implemented it. It feels like I might be over complicating it or possibly not doing it very well for one reason or another.
  • Options
    levitatemelevitateme Member Posts: 48 Arc User
    edited May 2013
    I'd really like to have optional quests, not just or's though. (i.e., have an npc help you... or not.) Similar to what Skyrim and other systems do.
    Currently working on : Shopping Mall Security (NW-xxxxxxxxx)
    Author of the LGBT quest: Alternative Entertainment (NW-DHQPDNBZM)
  • Options
    medullanmedullan Member, Neverwinter Beta Users Posts: 33
    edited May 2013
    levitateme wrote: »
    I'd really like to have optional quests, not just or's though. (i.e., have an npc help you... or not.) Similar to what Skyrim and other systems do.

    Yeah my module will have multiple quests in fact each npc will have their own side quest that they will offer you. You can choose to do their quest or you can choose not to. In the end depending on what choices you have made a different npc will show up to tell you which map to play next so that even the main story line of the campaign will fork in different directions. So far my first map will have two different "Bosses" depending on whether you choose one path or another will determine which "Boss" you encounter, and how you will interact with them. Once all your decisions are added up you will get a token and an npc will spawn to tell you what it says. Some npcs will send you on a wild goose chase to do stuff that has absolutely nothing to do with the main quest line. Perhaps they will even offer optional quests that will allow you to earn currency that can be spent within the module.
Sign In or Register to comment.