Soulslike Mechanics: Are they possible?

Discussion in 'Authors' Hangout' started by MaverickMinion, Dec 31, 2021.

  1. I've an idea for a story in a Soulslike setting. Ignoring the very obvious stuff that a written story cannot do compared to video game, the main feature I'd like to make use of is the dying/respawning gimmick. I'm not sure if Variables can support it though, or how well they'd be able to do it.

    Using the first boss of DS3 as an example of what I'd do if the mechanic can be used, the player might die a number of times in the first phase (humanoid) because of poor choices (not enough restoration items, misjudging attack patterns, not enough environmental awareness, etc) with future fights minimizing/eliminating certain options until after a certain amount of deaths, they get past all the issues and manage to get to the boss's second phase (inky snake monster thing).

    After triggering this second phase, the player could again try to brute force their way past multiple deaths to EVENTUALLY get the options that guarantee a win, or get lucky and manage to get the right choices to win with fewer deaths. Another option, would be that this encounter would open up new options to the player, like more conversation topics for an NPC who might have an idea that either expands the amount of actions a player can take (giving the player fire bombs because they think the creature might be weak to fire) or eliminating guaranteed failure options.

    Another thing I want to do, but am unsure if I can/should, would be track how often the player dies and have that influence things down the road. How, I don't know yet, but feels like if used right it could be a promising variable.

    Unfortunately, all the stuff regarding the site's game mode is mostly gibberish to me. I can't immediately determine whether or not its possible to do something like that the way I want or not, and I'd rather not start off with a less-than-basic idea of how to make the mechanics work the way I want only to find out after a significant amount of work later that I can't follow through on the ideas.
     
    insertnamehere likes this.
  2. SeriousBrainDamage

    SeriousBrainDamage Really Really Experienced

    Sounds like a daunting task, really.

    Probably you could achieve something like that with conditional text and a jaw-dropping number of variables. And that would be just for one fight.

    Could be fun, though, if you managed to pull it off.
     
  3. Almax

    Almax Really Experienced

    Actually, everything you've just asked about is super easy! I'm gonna explain every aspect of it to be safe, so if you already know something, sorry that it might come off as condescending. It's also going to end up sounding pretty complicated, so be sure to take it step-by-step and go slow through it! Refer back to it as you need, and you'll get the hang of it after writing a few chapters, promise.

    Firstly, just have a variable named "Deaths" that goes up by one each time a player dies. You can do this by having a "death" chapter option in the boss fight page -- the "death" chapter would require your HP variable to be <1, and every other chapter (run in and attack, drink a potion, etc.) requires your HP variable to be >0. The "death" chapter would increase Deaths by 1, and link back to your last Bonfire equivalent. To make a Link chapter, while editing the chapter contents click "Create Link Chapter" on the right side, and select what chapter you want it to connect to. A link chapter can't have any text, so create a new chapter for this, or it'll delete whatever you've got written. In addition to increasing the player's Deaths, you should also use this to change whatever other variables you want to change, such as refilling their HP (and the Boss').

    In the main Boss Fight chapter, each option should link back to the "hub" of sorts, where all options are available. For example:

    Fight the Boss

    >Attack its Legs
    >>(Link back to Boss)

    >Drink Healing Potion
    >>(Link back to Boss)

    >Activate Second Phase [REQUIRES BOSS HP < X%]
    >>New "hub" chapter for fighting the boss, with new battle options

    >Death
    >>(Link back to Bonfire)


    There would be other ways to do this involving the options themselves being links, and changing a hidden variable to create entirely new text on the Fight the Boss page, but that's complicated and you don't need to even think about it if it's your first time using variables, this way works just as well anyway.

    Each of the options can have variable requirements to choose them -- for example, to drink a potion you need your HP < 100% and your Potions > 0, or to choose certain options you need your Deaths over a certain threshold, like you were asking about. You can use more specific variables for this too, such as LearnedFireWeakness == True. You can also have variables that internally count how often you use each option -- for example, "Attack its Legs" could have BossLegAttack + 1 each time you view it, and internally change text based on that variable so that it's not just the same thing over and over -- maybe even making changes as big as the Boss learning and countering if you do the same thing too many times, or just as simple a change as flavour text that basically explains the same thing. I'll cover how to change text based on variables in a bit!

    Be sure to reset any variables like BossLegAttack to 0 when the player dies, so that they don't go in continuing from last time. If you like, you can make these variables more general (such as AttackBossType1), so that you don't need to make new ones for each boss and can just reuse the old ones -- which'll work, since you'll never be fighting two bosses at once, and they should all be set to 0 when the fight starts anyway. Also, you probably want to set variables like that to Hidden so that the player can't see them, which can be done by clicking the box with two rectangles until it's a circle with a line through it when setting or changing the variable. The two rectangles mean keep the variable's current visibility, the eye means make it visible, and the circle with a line through it means make it hidden.

    You could also base which versions of the same-looking chapter the player sees based on their in-game stats. For example, having two chapters called "Attack its Legs", which I'll call A and B. Chapter A would require Strength > 50, and would be invisible otherwise. Chapter B would require Strength < 51, and would be invisible otherwise. This means that the player only ever sees one version of the Chapter. Chapter A would be a success, leading to reduced Boss HP, whereas Chapter B would be a failure, in which you take damage. If you wanted, you could even make the system more complicated like the following, but that would just be for optional immersion:

    Attack the Legs (A)
    Requires Strength > 50
    Requires BossLegAttack == 0
    Sets BossLegAttack to 1
    Reduces Boss HP (success)

    Attack the Legs (B)
    Requires Strength < 51
    Requires BossLegAttack == 0
    Sets BossLegAttack to 1
    Reduces Player HP (failure)

    Attack the Legs (C)
    Requires Strength > 60
    Requires BossLegAttack == 1
    Sets BossLegAttack to 2
    Reduces Boss HP (success)

    Attack the Legs (D)
    Requires Strength > 61
    Requires BossLegAttack == 1
    Sets BossLegAttack to 2
    Reduces Player HP (failure)

    A system like the above would mean that the Player needs a higher Strength to do the same move successfully for a second time. Do keep in mind that it's good game design to have a way for players to win no matter what, even if it's just one obscure path of choices, and that barring every success behind a stat can be frustrating for no reason. People are here to have fun and read stories, not to get stuck on a pointlessly hard boss and have to reclick through a bunch of chapters for a second try. If something's going to be punishing to lose, make it feel rewarding to win. Be cautious not to follow video games' design too closely in all areas, because we're making something completely different here, and you wouldn't want a clock powered by car batteries.

    Now, onto the last bit to do with what you were asking about -- making Deaths change things down the line! That means getting into how variables can change chapter text. This is going to look really complicated, but take your time, because it's actually fairly simple once you get the hang of things. I'm gonna try to set things out in the most clear way possible. I'll do the example of a conversation that has special text if you've never died, different special text if you've died five or more times, special text if you've died twenty or more times, and default text for if you've died 1-4 times. Keep in mind that if you want something like "special text if you've died to BOSS ONE x amount of times", or any other variable in the game, it'll work the exact same way but you'd have to set up the variable beforehand -- e.g. making Boss One's death chapter increase Deaths by 1, as well as increasing BossOneDeaths by 1. Remember that you can also use all of these variables as requirements to view specific chapters, too.

    Right, onto the complicated-looking changing text! I'm going to write it out in phases, and explain it all in a paragraph beneath each phase. Please do refer back to the complicated-looking bit as you read the paragraph beneath, it'll make it easier to get. And trust me, everything's a lot easier after you do it yourself a few times, that's all it takes to really get it!




    {if Deaths = 0}"Ah! You look like somebody who can handle themself."{elseif Deaths > 19}"I'm not sure you should go any further. The things in here will eat you alive."{elseif Deaths > 4}"Hello! Be careful, it's not safe around here."{else}"Well met, friend."{endif}




    Squiggly brackets are the ones you've got to use. It should be pretty clear what's happening here, for the most part -- make sure to end each contingency with an "{endif}" to close the check. Only one {endif} is required in the above example, because only one {if...} was used -- {elseif}s continue on from the original. Also, notice that {if Deaths > 19} comes before {if Deaths > 4}, because if it went the other way, somebody with 28 Deaths would only ever see the {if Deaths > 4} text, since they meet that requirement and wouldn't go on to the else-case.

    Now, here's the same thing, but also with changes based on if you have a certain amount of money:




    {if Deaths = 0}"Ah! You look like somebody who can handle themself.{if Money > 15} I don't suppose I could interest you in some armour and weapons, then?{endif}"{elseif Deaths > 19}"I'm not sure you should go any further. The things in here will eat you alive.{if Money > 15} Especially in that rinky armour you've got on -- you could really use what I'm selling.{else} Come back when you've got some money for new gear.{endif}"{elseif Deaths > 4}"Hello! Be careful, it's not safe around here.{if Money > 15} You should consider investing in some new equipment.{endif}"{else}"Well met, friend.{if Money > 15} Can I interest you in any weapons or armour?"{endif}




    It looks complicated! I know! But trust me, it's not that bad. Here's a few examples of variable states and outputs, try to follow them through in the above example to get a better understanding of what's going on:

    Deaths = 0 and Money = 0
    "Ah! You look like somebody who can handle themself."

    Deaths = 0 and Money = 40
    "Ah! You look like somebody who can handle themself. I don't suppose I could interest you in some armour and weapons, then?"

    Deaths = 26 and Money = 4
    "I'm not sure you should go any further. The things in here will eat you alive. Come back when you've got some money for new gear."

    Deaths = 26 and Money = 32
    "I'm not sure you should go any further. The things in here will eat you alive. Especially in that rinky armour you've got on -- you could really use what I'm selling."

    Notice that the new variable checks also require an {endif}, and this {endif} can be contained within a different check if you like, and once ended the first check's {elseif}s and {else}s can still pick up from it. Try see if you can follow the text through to find what would be printed if Deaths = 18 and Money = 12. Play around with it and try writing your own strings and then following through until you've got a grasp on it. You can also use totally different variables for an {elseif} in the same string of logic -- for example, here's a string of text where you get special text if you have some specific Armour levels, and different special text if you don't have that Armour level but do have a certain Reputation level:




    "{if Armour == 5}That plate sure is fine craftsmanship.{elseif Armour == 4}That mail looks sturdy enough.{elseif Reputation > 20}You're doing great work out there.{else}Good day.{endif}" The man says with a nod.




    Hopefully that answers all of your questions, and gives you a guide to follow until it becomes natural to you! Let me know if you've got any questions, and have a good time writing!
     
  4. SeriousBrainDamage

    SeriousBrainDamage Really Really Experienced

    That's one way to spell super easy, I guess.o_O
     
    Dissonant Soundtrack and Almax like this.
  5. Almax

    Almax Really Experienced

    Haha, it definitely looks like a lot, but once you get it it really does all make sense. I was over-explaining and repeating myself a bit in an attempt to make everything super clear and throw in some suggestions of how things could be done, so it's really just a lot of words for not a lot of stuff. Or at least, less stuff! Really it's just "make a variable counting Deaths", and the rest is extra explanation of some other helpful bits.
     
    SeriousBrainDamage likes this.
  6. SeriousBrainDamage

    SeriousBrainDamage Really Really Experienced

    I'll treasure this explanation in case I ever decide to give game mode a serious try.;)
     
    Almax likes this.
  7. Very informative, thank you. The pages regarding variables and how to use them in the FAQ guide isn't dumbass friendly lol.

    There are some points I'd like some clarification on, if that's alright?

    My understanding of variables is still pretty mediocre, but I've been doing some light experimenting and as far as I can immediately understand, there's not an obvious option to reset certain variable counters to zero. I mean, nothing that would read as a variable that can be 1 or higher (like "BossLegAttack/AttackBossType1") and immediately make it so that by the time it needs to be back to 0, there's no way (that I see) to immediately have that variable set back short of a multi-chapter setup with variable changes specifically accessible to the one that turns X into 0 by way of subtraction for each possible number the variable could be and hope I didn't overlook something.

    While variables definitely matter in getting the full experience across, some of the points in your explanation both supported and opposed the possibility of having the story set up in a way where it still makes sense without the game mode on. The {elseif} segment makes me think that, when done right, could reduce chapter clutter by properly accounting for every factor correctly. But in a section prior to that, you mentioned a multi-chapter approach based on what variables readers trigger during their playthrough. From the other game-mode intensive stories I've come across, it seems like an approach that doesn't always mesh well with a normal reading. Is there something I'm missing or not understanding about that? I mean worst case, I just throw up the "Game Mode works best for this story" disclaimer and be done with it, but I'd like to know anyway.
     
  8. insertnamehere

    insertnamehere Really Really Experienced

    upload_2022-1-3_13-9-27.png
     
    gene.sis and Almax like this.
  9. Almax

    Almax Really Experienced

    There is actually a really easy way to set any variable to zero! At the bottom of any chapter, including a link chapter that they have to pass through, you can enter variable changes. This is where you can add any number or subtract any number. There's also an "=" option, so instead of setting BossLegAttack to be +1 like in previous parts, just set it to =0. Simple! So in your Death chapter, or it's link back to the Bonfire chapter, just have a buncha variables at the bottom all set equal to zero, or set their estus flasks equal to three, or whatever else you want!

    And yes, you absolutely can have {elseif}s change a chapter's text and then the same chapter can be used again -- for example, to have different flavour text on each leg attack so it's not just the same thing over and over again. The thing is, those variable changes and requirements at the bottom are going to stay the same no matter how the chapter's text changes. So it's fine if, for example, you want to have one chapter display one of three sex scenes based on if you're friendly with, unknown to, or enemies with the people in the room, where the only change is the reading -- but if the different chapters will actually result in different outcomes, like amount of damage done or success/failure conditions, then those need to be in separate chapters to have unique variable changes. This could also be done by just having the one Leg Attack chapter, with a bunch of different links back to the main boss fight chapter that all have different requirements and variable changes. For example:

    Attack the Legs
    No Requirements
    Increases BossLegAttack by 1
    Has unique text dependent on Strength, BossLegAttack, HP, and BossHP values

    >(Link back to Boss)
    Requires Strength > 50, BossLegAttack = 1, HP > 0, and BossHP > 0
    Links back to the main chapter
    Reduces BossHP

    >(Link back to Boss)
    Requires Strength < 51, BossLegAttack = 1, HP > 0, and BossHP > 0
    Links back to the main chapter
    Reduces HP

    Where the links change the variables for you, instead of having multiple chapters. I personally prefer this method, but it might make the inside of the chapter quite cluttered if you're planning on the fight being quite long, and it'll need a lot of carefully-placed {else}s and {elseif}s to get right and keep the order of importance right, for not a lot of benefit -- the clutter of options to pick from if you do multiple chapters won't show up in Game Mode, and will make the chapter internals much more manageable for you.

    Also, sidenote of something I didn't mention -- keep in mind that the variable changes of a chapter are done first, and so you need to take that into account when writing the chapter. For example, if BossLegAttack starts off at 0, and the chapter sets to 1, don't be fooled by the fact that those changes are input at the bottom of the chapter, because they happen at the top. Anything hidden behind {if BossLegAttack == 0} will never show up, because it will always be set to 1 first. Hope this helped!
     
    gene.sis and SeriousBrainDamage like this.
  10. wilparu

    wilparu Really Really Experienced CHYOA Backer



    I have never used game mode and likely never will but huge props to you for explaining all that. I am sure that will help so many writers!
     
    Almax likes this.
  11. Almax

    Almax Really Experienced

    Thank you! I really hope it does.