Adding Oangband magic realms/spellbooks. What changes do I need to make?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Elfin Jedi
    Adept
    • Mar 2013
    • 102

    Adding Oangband magic realms/spellbooks. What changes do I need to make?

    I am trying to add the nature and necromancy magic realms from Oangband to 4.0.4.

    So far I have successfully added the new classes (druid, necromancer, assassin) by giving them clones of the mage and rogue spell sets, and added nature and necromancy spellbooks to object_base.

    However it doesn't like it when I add the spellbooks to the object file (it gets a parse error, I don't see any problems with what I have entered so far).

    I managed to get the code to compile, added the nature and necromancy realms to list-magic-realms.h and successfully recompiled. And now I have added nature books and necromancy books to obj-tval.c (which it is not happy about). What else do I need to do to get it to accept spellbooks as objects?
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #2
    Are you sure you shouldn't just be playing FAAngband? (Given the classes you've added.)

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #3
      Awesome, this is the sort of thing I wanted to enable

      You will need to add nature and necromancy books to list-tvals.h, if you haven't already - let me know how it goes.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Carnivean
        Knight
        • Sep 2013
        • 527

        #4
        Are realms even a necessary construct at this point? (From a technical standpoint, not a UI one)

        You can create a spell from the effects of other spells from either realm in the spell list. Mages can have priest spells in their list (and vice versa) simply by copying the effects from the appropriate spell.

        Comment

        • Elfin Jedi
          Adept
          • Mar 2013
          • 102

          #5
          Originally posted by AnonymousHero
          Are you sure you shouldn't just be playing FAAngband? (Given the classes you've added.)
          Actually, I want to make other changes besides just the magic/class system. I am adding monsters and races from Unangband, hopefully terrain eventually too, and races from Eyangband. And eventually I would like to make it so you can choose between a Poschengband race(? might try to combine the 2 systems)/class/magic system and the other one at character creation.

          Ok, now it launches and functions ok, except that it doesn't display the name of the spellbook in my inventory list. There is instead a blank entry for a) which can be browsed or cast from normally.

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #6
            Originally posted by Elfin Jedi
            Actually, I want to make other changes besides just the magic/class system. I am adding monsters and races from Unangband, hopefully terrain eventually too, and races from Eyangband. And eventually I would like to make it so you can choose between a Poschengband race(? might try to combine the 2 systems)/class/magic system and the other one at character creation.

            Ok, now it launches and functions ok, except that it doesn't display the name of the spellbook in my inventory list. There is instead a blank entry for a) which can be browsed or cast from normally.
            You need to add a couple of case statements to obj_desc_get_basename() in obj-desc.c to get the names to show up.
            takkaria whispers something about options. -more-

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              Hmm. Looks like (at least) two files need to be fixed so they use object-base.txt.
              This one, and ui-knowledge.c

              Originally posted by takkaria
              You need to add a couple of case statements to obj_desc_get_basename() in obj-desc.c to get the names to show up.

              Comment

              • Elfin Jedi
                Adept
                • Mar 2013
                • 102

                #8
                How do I fix ui-knowledge.c?

                Comment

                • Pete Mack
                  Prophet
                  • Apr 2007
                  • 6883

                  #9
                  Add your base type to the monster_group array at line ~1058.

                  Comment

                  • Elfin Jedi
                    Adept
                    • Mar 2013
                    • 102

                    #10
                    Ok, I updated obj-desc.c and ui-knowledge.c (both monsters and objects). The spellbooks still don't display in inventory list. What am I missing?

                    Also, rebalancing monsters still crashes.

                    By the way I started a github account: Elfin-Jedi. It might still be a bit of a mess.

                    Comment

                    • Pete Mack
                      Prophet
                      • Apr 2007
                      • 6883

                      #11
                      OK, I mostly see what is happening to cause the crash. It is trying to create a monster of race 353 in town, which appears to have level 0, but does not actually exist. (It is the commented out no-friends crawler.)


                      I don't know why it should happen this way for rebalancing, but not for ordinary play.

                      As a workaround you *may* be able to rebalance if you try on a level other than 0.

                      Edit:
                      that works.
                      But beware: it screws up monster level a lot (using the previous example, carrion crawler moves to dl 33, where it would be a patsy.) Don't use the generated file directly.
                      Last edited by Pete Mack; July 9, 2016, 22:49.

                      Comment

                      • Elfin Jedi
                        Adept
                        • Mar 2013
                        • 102

                        #12
                        Can I just remove the commented out monsters?


                        What do I do about this error (4.0.5)?

                        make.exe": *** No rule to make target `obj-identify.h', needed by `cmd-cave.o'. Stop.

                        I notice cmd-cave.c says: #include "obj-identify.h". I don't see a cmd-cave.o.

                        Now that I look closer I don't even see an obj-identify.h. Hmm...

                        Adding it worked.
                        Last edited by Elfin Jedi; July 10, 2016, 18:08.

                        Comment

                        • Pete Mack
                          Prophet
                          • Apr 2007
                          • 6883

                          #13
                          @EJ-
                          No idea about deleting the commented characters. But why bother? There is a fine workaround.

                          Comment

                          • Elfin Jedi
                            Adept
                            • Mar 2013
                            • 102

                            #14
                            Well... I can rebalance without it crashing that way (thanks) but the new_monster file doesn't seem to have the new monsters I added. And I'm going to have to edit most of the monsters sooner or later.

                            Unless... maybe... there might be some .c or .h files that need to be edited... I do think I remember a list-mon or something like that.

                            Will check.

                            (I already got the ui-knowledge one.)

                            I didn't see any that directly list monsters though.
                            Last edited by Elfin Jedi; July 10, 2016, 20:32.

                            Comment

                            • Pete Mack
                              Prophet
                              • Apr 2007
                              • 6883

                              #15
                              There are no source files that list monsters, just monster base types.

                              Comment

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