Help me make my new variant! (please!)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • backwardsEric
    Knight
    • Aug 2019
    • 527

    Reading out the element from the resist looks correct. You didn't pass the result of grenade_brand() as the element for the effect (I assume you would want it to replace ELEM_FIRE). If you want distinguish the weak and strong brands, you'd want to get the multiplier as well.

    As for the targeting, the "other" parameter doesn't affect that for EF_STRIKE. Someone else will have to chime in how to best set the target for this case.

    Comment

    • Julian
      Adept
      • Apr 2021
      • 122

      Originally posted by Nick
      The "->" is if you have a pointer to the struct (so if grid was a struct loc *), if it's just the struct you need a ".". So grid.y and grid.x should work.
      As a side note, one usually shouldn’t pass structs directly, as it makes the compiler copy it onto the stack. Pass by reference with a const declaration instead. (Not that it’s a big deal for a grid, which is tiny.)

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9634

        Originally posted by Julian
        As a side note, one usually shouldn’t pass structs directly, as it makes the compiler copy it onto the stack. Pass by reference with a const declaration instead. (Not that it’s a big deal for a grid, which is tiny.)
        Yeah, in most of these case the struct loc has replaced two int arguments, so it's pretty much neutral.
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • Grenoble
          Rookie
          • Aug 2021
          • 7

          Still up?

          Originally posted by will_asher
          So, I'm looking into making a new variant since I just came back to Angband, and I always think the most fun thing to do with a game is tweak it, tinker with it, tamper with it, customize it, alter it, twist it, slime it, and otherwise modify it. But I'm going to need some help because I am much more of a hack than an actual coder/programmer, so this thread is where I'll ask questions.
          Still messing around with this? I just went down this rabbit hole with the ToME variant. I wanted to build it on Win 10. I could sort of read c++ when I started and now I know how to debug a linking problem with a library. It was an amazing journey and I hope you'll keep at it. Here are some things I'd wish I knew, etc:
          • I'd really recommend starting with a version that uses cmake. The integration with vs 2019 exposes a lot of features it would have taken forever to find on my own. It was easier for me to "get" cmake and then go back and understand older makefiles.
          • C++ encompasses C (I didn't/still don't really get this), so VS will see your project as C++. I forked someone's code and then created a new project from existing files.
          • The compiler you'll end up using is determined by the "triplet" you're targeting and the platform you're building on. Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name. If you were building on windows for linux, for example, you might use gcc through mingw.
          • The link above is from the home of a package manager that can handle common libraries and tools for windows. It turned into a good resource for me.
          • Most of the documentation you'll run into is hot garbage. Find someone you can talk to when you are well and truly stuck.

          Comment

          • will_asher
            DaJAngband Maintainer
            • Apr 2007
            • 1124

            Originally posted by Grenoble
            Still messing around with this? I just went down this rabbit hole with the ToME variant. I wanted to build it on Win 10. I could sort of read c++ when I started and now I know how to debug a linking problem with a library. It was an amazing journey and I hope you'll keep at it. Here are some things I'd wish I knew, etc:
            Thanks for the tips. I am pretty close to releasing an alpha version for other people to play (and help me find & fix bugs).
            I've been using Visual Studio 2019, and I don't touch the make files. I've never used cmake.
            Will_Asher
            aka LibraryAdventurer

            My old variant DaJAngband:
            http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

            Comment

            • Grenoble
              Rookie
              • Aug 2021
              • 7

              Oh nice! Subscribed to this thread, please post here when you release. Congrats!

              Some of the best documentation I found on building older software came from forums like this. Anything you can post on your process would be interesting to me.
              Last edited by Grenoble; September 13, 2021, 19:03.

              Comment

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