Variant writing.. quickstart guide? Also, Hengband variant suggestions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dzhang
    Scout
    • Jan 2008
    • 47

    Variant writing.. quickstart guide? Also, Hengband variant suggestions?

    Hi all,

    I'm a long-time player of Angband (about 7 years now), and have always been thinking about implementing a few changes that I'd like. The problem is, I have NO idea how to go about writing a variant. I've coded quite a bit in C and C++ before, but mostly on Unix, and never really looked at the Angband code.

    What I'm wondering is this: Is there a Quick-start guide to writing variants somewhere out there? I.e. Overview of how maps are generated, how monsters are generated, etc. Variable names, player stats, etc. Common coding pitfalls, and mega-hacks we should be aware of, etc.

    In particular, I'm looking to make a variant based on Hengband. Suggestions on what improvements people would like to see are welcome! (Email me at dzhang@dna.caltech.edu).

    A brief list of ideas:

    2 new schools of Magic: Order and Wild.

    Order magic has NO variability in the spell effect (i.e. fixed duration, fixed damage, etc), and furthermore, failed castings do not consume SP.

    Wild magic, on the other hand, has maximum variance (always 1dN, damage/duration). Furthermore, the SP cost of casting Wild Magic varies randomly between 1 and X, the listed price for casting (so listed SP costs will be roughly double). And Wild Magic will have a fail rate modified by 0.05 + 0.9*Y, where Y is the fail rate as computed by INT and level.

    Items:

    New weapon Ego: (Crystalline)
    Weapon always rolls max damage on dice. Weapon never deals crits. Grants Resist Chaos.

    New ring: Ring of Evocation (+X).
    Spell damage is multiplied by (1+X/20). These will have the same rarity and p-val distribution as Rings of Speed. Furthermore, they will only function on the right Finger.

    New ego ring: Ring of Evocation of the Gish (+X).
    Increase spell damage as in Ring of Evocation. Furthermore, it acts as a Ring of Damage (+X) by increasing melee damage of every attack by +X.

    Monsters:

    Change HP to be represented by longs. Come on, we're not lacking memory in this day and age. Increase HP of bosses as necessary.

    Mutations:

    Max (x/10) mutations, where x is character level. For Beastmen, this is doubled to (x/5). Shop that removes mutations will be closed. Mutations from Chaos attacks will not replace existing mutations, but !oPolymorph and Polymorph Self (spell) will.

    More nasty mutations:

    Slurred speech: Your spell fail rates increase by 2%, and your minimum spell failure rate increases by 2%.
    Frozen breath: You have a 2% chance of ruining potions. Breath cold. Counters fiery breath.
    Fiery breath: You have a 2% chance of ruining scrolls. Breath fire. Counters frozen breath.
    Uncontrollable spending: You have a 20% chance every time you visit a store of buying a random item.
    Lost in thought. You have a 1 in 10,000 chance every round of being paralyzed for 1d13 rounds. If you have FA, this is reduced to 1d3 rounds. If you make a saving throw vs. DC 125, you are not paralyzed.

    Classes:

    Wrestler: Uses techniques to throw monsters around while damaging them.

    Gish: 4 max blows, 1 school of magic (cannot change). Can achieve 0% fail, access all spells from school. Pick from Sorcery, Order, Wild, Craft, Life, and Death.

    Mindbender: Unique class with spell-like abilities that Stun, Sleep, Confuse, Charm monsters powerfully, so that even high level uniques have chance of being affected.

    Dungeon depth:

    I'm also thinking of making the dungeon deeper, with more than one "bosses that need to be killed to go any lower." Chronicles of Amber provide many more possible uniques, like Random (new king of Amber), Merlin (new king of Chaos), etc.

    Thoughts? Chris, Elliott, Victor? Come on, I know you guys visit these forums occasionally ;-)
  • ElectricPaladin
    Scout
    • Jan 2008
    • 33

    #2
    To preface: I am a total n00b. I just re-entered the *band world less than a month ago, and joined this forum maybe a week ago.

    But... In My Humble Opinion...

    There seem to be lots of *bands out there. If you want the advice of a player - not by any means a coder - if you want to write a variant people will actually play, you need something that makes it particularly cool and unique. Every *band download is an investment of time and energy, so as I look at varaiants, I consider "does this variant do anything interesting that a variant I already have and play doesn't?" and "do I want to bother to learn this game and play it?" That's probably why I only have Angband, Hellband, Steamband, and Zangband... and I'm probably going to get rid of Hellband soon, though on the other hand, I'm seriously considering downloading sCthAngband.

    /2 cents.
    A/Z/Steamband W H- D c-- f PV+ s- TT? d P++ M+

    A C "Perra" HPa L:25 DL:'800 A R !Sp w:*Holy Avenger* Mace

    Comment

    • zaimoni
      Knight
      • Apr 2007
      • 590

      #3
      Yes. Which is why writing a *band variant should not be predicated on whether anyone actually plays it.
      Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
      Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
      Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

      Comment

      • dzhang
        Scout
        • Jan 2008
        • 47

        #4
        My main motivation is to have more variety to play with.

        I never got around to winning vanilla Angband, because I found it too tedious after a point, and not enough excitement. Many variant (such as NPP) cause me to suffer the same ennui, to the point that I don't have enough motivation to learn the game well enough to beat it.

        Two variants that I really liked were ToME and Henband, because both have a lot of interesting features, and almost limitless replayability due to different race/class/skill/approach combos. Emphasis on the word "almost." I haven't really played any *bands for about 4 months now (a minor attempt at artifactless Hengband being the exception). I decided the only way I'm going to play *band again is if there's another variant different enough to be fun.

        Hengband has a decent following of players, and a ton of features. Furthermore, it has a really nice Auto-pickup/Auto-destroy shell, and many features I want to keep (like random monster energies). So I figure I'm addicted enough to only play derivatives of Heng. Entroband didn't really add enough variety to keep me hooked for too long.

        So that's why I want to write a variant adding a ton of new features. I'm pretty sure at least some of the old Hengband fans will try it, but even if not, I'd be happy.

        ***

        More ideas!

        Remove the minimum of 3 on stats (except during character generation). A la D&D rules, if you are reduced to 0 in a stat, you go crazy/die/are indefinitely paralyzed. Thus, attacks that drain stats become much more deadly. Eldritch horror will probably need to be adjusted somewhat. Mindless races (Zombie, Golem, etc) probably should get Sustain INT, WIS, and CHA. Items will probably need to be tweaked to increase the frequency of sustain stats.

        Humans will get an advantage (sick of having races no one will ever play):
        At character level 30, they gain a mutation of their choice.

        Half-elf will probably be removed. Come on, even in D&D Half-Elves are pathetic and never get picked.

        New class: Factotum. Has access to 2 schools of magic. Can access spells in primary school through 3rd book, and secondary school through 2nd. Unlike mages, he can tap even Samurai and Bardic books. Can change schools at will (even primary school), but need to spend turns relearning every spell he wants. No limit to the number of spells gained/realms changed.

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9647

          #5
          Originally posted by dzhang
          What I'm wondering is this: Is there a Quick-start guide to writing variants somewhere out there? I.e. Overview of how maps are generated, how monsters are generated, etc. Variable names, player stats, etc. Common coding pitfalls, and mega-hacks we should be aware of, etc.
          If you're happy reading code, I'd advise starting off by looking at dungeon.c (for the main game loop), types.h (for the basic player, monster, object etc structures) and generate.c (for level generation). This should give a starting point to move on and look at the bits of the code you want to modify. Then start making small tweaks and see how it goes (things that change savefile format are the scariest). I have been working on FAangband for two and a half years noe, and there are still bits of the code I hardly recognise, so you don't need to know everything all at once.

          As far as the why goes, I think that Heng and Entro both no longer being maintained is enough reason.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • chris
            PosChengband Maintainer
            • Jan 2008
            • 702

            #6
            Hengband Variant Suggestions

            Hey Dave,

            I strongly encourage you to work really hard to make a awesome Hengband based variant ;-) I like many of your ideas, and will even offer some of my own:

            [1] Add more artifacts, or change existing ones. Especially needed are more artifact shooters. I'm tired of playing Archers because they always play the same (get Bard, make seeker arrows, etc). Careful about game balance though. I think Brian inadvertantly made a much easier variant to win with in Entroband, as melee got a nice pump. Melee is strong enough in Hengband (maybe too strong?)

            [2] Make Old Castle and Cloning Pits rewards randomized. Old Castle should still be class specific, but should choose from several arts rather than just hard coding one. Come on, does every single solitary player have to win with Shiva's boots?

            [3] Spells. This is an idea I've had for a while ... not sure if any other variants have done this. Spell books should initially be empty. You gain spells in scroll form, and scribe them in your book or books. You can only carry a limited number of spell books, and each book has a limited number of slots, so your spells available are limited. And you need to find the good spells in the dungeon. Maybe you start with a Scroll of Magic Missle to get things going ...

            [4] Fix the Tower quest. Very abusable ... though probably only you and I know how to do it ;-)

            As far as the code goes, I don't really know it that well. For the artifactless changes I made, I made heavy use of grep and basically hunted around until I found all the places that needed changing. Adding new classes and items is hard, I think. Adding new artifacts is easy, since those can be added in a_info.txt.

            Also, I'd be more than happy to playtest for you ...

            --Chris

            Comment

            • Djabanete
              Knight
              • Apr 2007
              • 576

              #7
              I'd play(test).

              Comment

              • dzhang
                Scout
                • Jan 2008
                • 47

                #8
                Thanks for your comments!

                Originally posted by chris
                [1] Add more artifacts, or change existing ones. Especially needed are more artifact shooters. I'm tired of playing Archers because they always play the same (get Bard, make seeker arrows, etc). Careful about game balance though. I think Brian inadvertantly made a much easier variant to win with in Entroband, as melee got a nice pump. Melee is strong enough in Hengband (maybe too strong?)
                --Chris
                I had the same feeling about melee vs. magic, which is why I was adding in the Ring of Evocation. My general feeling towards the problem is that what's done is done, and I don't want to water down existing artifacts, so the way to go is to make the game deeper. I.e. after you kill the Serpent, you next have to kill Hades at dlvl 120, who can summon Zombified Serpents of Chaos.

                Originally posted by chris
                [2] Make Old Castle and Cloning Pits rewards randomized. Old Castle should still be class specific, but should choose from several arts rather than just hard coding one. Come on, does every single solitary player have to win with Shiva's boots?
                --Chris
                Some of us find Feanor occasionally.. but good point, something I hadn't really thought about before. (Again, points to the need for more artifacts, I guess..)

                Actually, I don't know where I read this before, but someone had the idea of having an extra store selling unidentified items (including small chance for artifacts). That appeals to me, though game balance will probably be an issue. Maybe make the price increase with the number of items you've bought from there.

                Originally posted by chris
                [3] Spells. This is an idea I've had for a while ... not sure if any other variants have done this. Spell books should initially be empty. You gain spells in scroll form, and scribe them in your book or books. You can only carry a limited number of spell books, and each book has a limited number of slots, so your spells available are limited. And you need to find the good spells in the dungeon. Maybe you start with a Scroll of Magic Missle to get things going ...
                --Chris
                This sounds like a good idea for a new class (rather than retrofitting all the existing classes). Kind of like the Magic-Eater, except with Scrolls, and limited in your choice of what spells to acquire. Probably will need a few more offensive scrolls. So basically a mix of the Magic-Eater and the Imitator.

                Not sure how to balance things with ?oArtifactCreation, ?oAcquirement, etc..

                Originally posted by chris
                [4] Fix the Tower quest. Very abusable ... though probably only you and I know how to do it ;-)

                As far as the code goes, I don't really know it that well. For the artifactless changes I made, I made heavy use of grep and basically hunted around until I found all the places that needed changing. Adding new classes and items is hard, I think. Adding new artifacts is easy, since those can be added in a_info.txt.

                Also, I'd be more than happy to playtest for you ...
                --Chris
                I'm still mostly in the "jotting down ideas" stage at the moment, and probably won't get to actual coding for two weeks (I have my PhD candidacy exam then..). Your help coding and debugging would be appreciated! (Though I'm sure that's not what you signed up for :-P)

                Oh, do you have a copy of the original 1.7.0 source? Or should I work off your artifactless-variant code? (I assume you commented things out, rather than remove?) It shouldn't be too hard to make "Artifactless" a birth option..

                Comment

                • konijn_
                  Hellband maintainer
                  • Jul 2007
                  • 367

                  #9
                  Well,

                  I can tell you already I will be stealing stuff

                  -1- Order school ( Wild magic sounds a lot like the Chaos school to me )
                  -2- Crystalline ego ( but maybe res light instead of res chaos or even bounce back light attacks, like it gets mirrored on the crystal or something )
                  -3- Ring of evocation ( max up to like +3 or +4 though )
                  -4- Restricting mutation count is a great idea, the UI cannot handly gracefully more than 23/25 mutations anyway
                  -5- All mutations except possibly lost in thought, it seems too zany

                  I can send you the diff's for Hengband which comes from Zangband, which should give you some indication on where to change stuff.

                  Let me also say that you should continue with Entro, it would be sad to see the maintenance of that fall by the wayside.

                  Cheers,
                  T.
                  * Are you ready for something else ? Hellband 0.8.8 is out! *

                  Comment

                  • dzhang
                    Scout
                    • Jan 2008
                    • 47

                    #10
                    Originally posted by konijn_
                    Well,

                    I can tell you already I will be stealing stuff
                    Haha.. go ahead! Maybe if you implement enough of these changes I won't need to do any coding :-P


                    Originally posted by konijn_
                    -1- Order school ( Wild magic sounds a lot like the Chaos school to me )
                    The problem with the "Chaos" school is that despite the name, the effects are actually quite low-variance (such as Mana Storm for 500 damage). So maybe the Chaos school should be renamed the "Force" school or "Mana" school or something.

                    The whole idea of Wild Magic is that it will be very powerful (probably higher expected damages than many others), but very, very unreliable. I'll post the spells I have in mind in a bit and you can see if it's worth incorporating..

                    Originally posted by konijn_
                    I can send you the diff's for Hengband which comes from Zangband, which should give you some indication on where to change stuff.

                    Let me also say that you should continue with Entro, it would be sad to see the maintenance of that fall by the wayside.

                    Cheers,
                    T.
                    That might be pretty useful, the diff's of Heng and Zangband. Wait, is your Hellband variant also based off Hengband? (I'm ashamed to admit I haven't tried it yet..)

                    I'm not too excited to continue from Entroband, because from past Psych courses, I know that people really like to bemoan nerfing things they're used to.. I'm going to have to power down a lot of the new artifacts in Entroband if I do continue with it. The change list, as far as I can tell, are mostly limited to artifact changes, The Chemist, and reseting of dungeon start depths. Is there any particular feature of Entroband that you like? It might be easier just to recode it...

                    Cheers,

                    Dave

                    Comment

                    • dzhang
                      Scout
                      • Jan 2008
                      • 47

                      #11
                      Preliminary thoughts on

                      ***************
                      Wild School:
                      ***************

                      Description: The Lords of Chaos, outraged at the ascension of Merlin, have conspired to embrace the primal chaos existent within each of them, and to forge that entropy into powerful, if unreliable weapons.

                      Game Rules: Wild spells consume a random amount of SP, distributed linearly between 0 and the spell's cost (costs are accordingly made approx. double normal). Failure rate is computed as 0.9*a+0.05, where a is the failure rate computed by INT and level (thus, always 5% chance of success, 5% chance of failure). Cannot be selected by Good Priest. Cannot be selected with Order, even by a Mage or Factotum. When wielding a Chaotic weapon, spell failures are reduced by 5%.

                      Define x = character level.

                      Spells:

                      --------------------------------------
                      Book 1: Uncertainty Principles
                      --------------------------------------

                      Wildstrike: Level 1, 2 SP, Fail rate 20%. Fire a bolt of (acid, fire, cold, lightning, or poison) for 1d(18+x*1.2) damage.



                      Wild Teleport: Level 6, 10 SP, Fail Rate 40%. With 1/3 probability, you teleport (x/5) squares. With 1/3 probability, you teleport (x) squares. With 1/3 probability, you teleport (5x) squares.

                      Uncertain Mind: Level 8, 12 SP, Fail rate 20%.
                      Roll d5 and consult the following table
                      1 Bless for 1d40 turns
                      2 Heroism for 1d60 turns
                      3 See Invisibility for 1d50 turns
                      4 Berserk for 1d60 turns
                      5 Fear (self) for 1d20 turns

                      Random Regrowth: Level 9, 15 SP, Fail Rate 25%. Heals 1d(20+2x/5) damage

                      Wonder: Level 10, 20 SP, Fail Rate 50%. Similar effect as activating Wand of Wonder (but different from the Chaos spell and wand).
                      Roll 1d20, Lookup effect on following table
                      1 Clone Monster
                      2 Haste Monster
                      3 Heal Monster (1d40)
                      4 Polymorph Monster
                      5-7 Light area
                      8-10 Confuse Monster
                      11-13 Wildstrike (1d54 bolt of acid, fire, cold, lightning, or poison)
                      14-16 Trap/Door Destruction
                      17-18 Teleport Other
                      19 Greater Wildstrike (1d160 ball of acid, fire, cold, lightning, poison, light, or dark with radius 1d(x/7)-1).
                      20 Detection

                      --------------------------------------
                      Book 2: Embracing Entropy
                      --------------------------------------

                      Confusion Blast: Level 15, __ SP, Fail rate __%. 1/3 chance of Confuse target, 1/3 chance of beam of confusion, 1/3 chance of ball of confusion (radius 1d4).

                      Random Deflector: Level 20, 35 SP, Fail rate 50%. Gives Reflection for 1d50 rounds

                      Greater Wonder:

                      Greater Wildstrike: Level 25, SP 30, Fail Rate 50%. Fires a ball of (acid, fire, cold, lightning, poison, light, or dark) with damage 1d(100+2x) and radius (1d(x/7)-1).

                      Recharge: As standard spell

                      Chaotic Surge: 50% chance of +10 speed each round for 1d(5x+50) turns.

                      Wild Terrain: Earthquake with radius 1d15

                      --------------------------------------
                      Book 3: Maxwell's Demonslayers
                      --------------------------------------

                      Wild Position: For 1d(2x/5) turns, the player teleports with range (1d20) at the beginning of each turn (this does not consume his move).

                      Perilous Lore: Identifies the target item. If 1d20 > X / 7 + 10, then player's INT is drained. If 1d20 = 20, then the item is destroyed, unless it's an artifact.

                      Uncertain Healing: Level 35, 70 SP, Fail Rate 75%. Heals max{300, 1d(player HP / 2)}.

                      Dragon's Breath: Breath deals 1d(current HP) damage to cone, of a random element

                      Kaleidoscopic Doom: 1d50 damage from every element (fire, cold, lightning, acid, poison, light, dark, sound, shard, nether, nexus, chaos, disenchant), radius 2. (Expected damage 325)

                      Chaotic Mind: Immediately cures hallucination. 50% chance of ESP each round for 1d200 rounds. Cannot be hallucinated for the duration.

                      --------------------------------------
                      Book 4: The Anti-Pattern
                      --------------------------------------

                      Volatile Branding: Brands non-ego weapon with (Volatile)

                      Wild Negation: Level 35, SP 70, 75% Fail. Roll 1d25 and consult the following table
                      1 No Effect
                      2-5 Dispel Magic on yourself
                      6-24 Dispel Magic on your target
                      25 Dispel Magic on yourself AND your target

                      Wild Defense: Level 46, 150 SP, 70% Fail. First, all temporary effects affecting player (both positive and negative) are stripped. Thn, various effects are applied, with probabilities as listed below. Every effect is calculate individually (meaning one can get all of them, or none of them).
                      Effect Prob. Duration
                      ---------------------------------------------------------
                      Blessing 90%
                      Heroism 80%
                      Stone Skin 70%
                      Resistance 60%
                      Haste 50%
                      Magic Resistance 40%
                      Heal 300HP 30% N/A
                      Wall of Stone 20% N/A
                      Wraithform 10%


                      Wild Offense: Level 48, 200 SP, 75% Fail. Various effects, with probabilities as listed below. Every effect is calculate individually (meaning one can get all of them, or none of them). (Expected damage 383+410=793 for level 50)
                      Effect Prob. Damage (x = level)
                      ---------------------------------------------------------
                      Frost Bolt 90% 1d(20+3x) cold
                      Fire Bolt 80% 1d(30+3x) fire
                      Mana Burst 70% 1d(20+3x) mana, radius 2; [1d(20+4x) if Mage, High-Mage, or Sorc]
                      Fireball 60% 1d(100+2x) fire, radius 2
                      Dispel Evil 50% 1d(4x) holy, all evil in view
                      Wave of Power 40% 1d(300) force, all in view
                      Mana Storm 30% 1d(600+8x) mana, radius 4
                      Wrath of God 20% 1d30 Disintegrate balls (radius 2) near target, each does 1d(50+6x) disintegrate damage
                      Soul Strike 10% 1d(4 * player HP) damage to single target, no save; player HP reduced by 1d(player HP / 2).
                      Last edited by dzhang; February 1, 2008, 09:49.

                      Comment

                      • dzhang
                        Scout
                        • Jan 2008
                        • 47

                        #12
                        Hm, I can't seem to get spacing right... is there a character for "tab" or "space" that I don't know about?

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9647

                          #13
                          Originally posted by chris;5134[3
                          Spells. This is an idea I've had for a while ... not sure if any other variants have done this. Spell books should initially be empty. You gain spells in scroll form, and scribe them in your book or books. You can only carry a limited number of spell books, and each book has a limited number of slots, so your spells available are limited. And you need to find the good spells in the dungeon. Maybe you start with a Scroll of Magic Missle to get things going ...
                          Frazband, possibly?
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • konijn_
                            Hellband maintainer
                            • Jul 2007
                            • 367

                            #14
                            Haha.. go ahead! Maybe if you implement enough of these changes I won't need to do any coding :-P
                            Well, I wont do the race/class things They do not really fit. I like the concepts but it would need a different name.

                            The problem with the "Chaos" school is that despite the name, the effects are actually quite low-variance (such as Mana Storm for 500 damage). So maybe the Chaos school should be renamed the "Force" school or "Mana" school or something.
                            Maybe I might adapt the Chaos school spells to some of your Wild Magic spells. I am not too happy with the Chaos school as it is now anyway.

                            <Snip>

                            That might be pretty useful, the diff's of Heng and Zangband. Wait, is your Hellband variant also based off Hengband? (I'm ashamed to admit I haven't tried it yet..)
                            Hellband comes from Zangband/Cthangband, a fair amount of code should be the same since Hengband comes from Zangband as well. ( Hellband has all the virtues already removed by the way

                            I'm not too excited to continue from Entroband, because from past Psych courses, I know that people really like to bemoan nerfing things they're used to.. I'm going to have to power down a lot of the new artifacts in Entroband if I do continue with it. The change list, as far as I can tell, are mostly limited to artifact changes, The Chemist, and reseting of dungeon start depths. Is there any particular feature of Entroband that you like? It might be easier just to recode it...
                            You know more about this than me. If you dont really like a lot in Entroband, then by all means start a new Variant from Hengband.

                            Cheers,
                            Dave
                            T.
                            * Are you ready for something else ? Hellband 0.8.8 is out! *

                            Comment

                            • chris
                              PosChengband Maintainer
                              • Jan 2008
                              • 702

                              #15
                              Originally posted by dzhang
                              Oh, do you have a copy of the original 1.7.0 source? Or should I work off your artifactless-variant code? (I assume you commented things out, rather than remove?) It shouldn't be too hard to make "Artifactless" a birth option..
                              You can get the latest 1.70 source code here:


                              I wouldn't start with the artifactless stuff I did, since I don't even remember what I changed. An unsuspecting user in Preserve Mode off would wonder why they were so unlucky!!!

                              --Chris

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎