Damage Multiplier of Bows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • redrobert
    Scout
    • Sep 2011
    • 29

    Damage Multiplier of Bows

    Could anyone please tell me in which files i have to look to change the damage multipliers of Bows and Crossbows?
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by redrobert
    Could anyone please tell me in which files i have to look to change the damage multipliers of Bows and Crossbows?
    Unfortunately you'll need to recompile to do this. The damage multiplier is determined by the last digit of the object's sval, so you'll need to edit src/object/tvalsval.h and rebuild.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • redrobert
      Scout
      • Sep 2011
      • 29

      #3
      thank you very much

      i was trying to do this with z+angband but somehow it looks like i am too stupid to recompile as it gives me tons of errors while recompiling - for files i did not even open - and aborts the compilation

      too bad, so that's it then with my x2 crossbow

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by redrobert
        thank you very much

        i was trying to do this with z+angband but somehow it looks like i am too stupid to recompile as it gives me tons of errors while recompiling - for files i did not even open - and aborts the compilation

        too bad, so that's it then with my x2 crossbow
        Hmmm. I was talking about V - I don't know if Z+ uses the same sval-based multiplier mechanic.

        As for compiling - what platform and toolchain are you using? Whichever you use, the chances are that someone will be able to walk you through it.
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • redrobert
          Scout
          • Sep 2011
          • 29

          #5
          i was trying it with windows vista and lcc

          what i have seen z+ has the same mechanics considering damage multiplier. too bad the genius programmer had not made the variables needed for more multipliers

          i guess no one would want a crossbow x2 :-)

          maybe i could make a workaround ... light crossbow with some in-built damage reduction. but recompiling is prefered as i reduced the deadliness of elemental brands as well.

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by redrobert
            i was trying it with windows vista and lcc

            what i have seen z+ has the same mechanics considering damage multiplier. too bad the genius programmer had not made the variables needed for more multipliers

            i guess no one would want a crossbow x2 :-)

            maybe i could make a workaround ... light crossbow with some in-built damage reduction. but recompiling is prefered as i reduced the deadliness of elemental brands as well.
            Sangband has x2 "hand crossbows", in case you're interested.

            I have never used Vista or lcc - sorry. I hope someone who has will chip in.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • redrobert
              Scout
              • Sep 2011
              • 29

              #7
              thanks for your help nevertheless

              Comment

              • dos350
                Knight
                • Sep 2010
                • 546

                #8
                u want lower dmg crossbow?~!
                ~eek

                Reality hits you -more-

                S+++++++++++++++++++

                Comment

                • Blue Baron
                  Adept
                  • Apr 2011
                  • 103

                  #9
                  Originally posted by redrobert
                  thank you very much

                  i was trying to do this with z+angband but somehow it looks like i am too stupid to recompile as it gives me tons of errors while recompiling - for files i did not even open - and aborts the compilation

                  too bad, so that's it then with my x2 crossbow
                  z+ does use a different mechanic and it is hard coded to the sval. The multiplier is set in calc bonuses() in xtra1.c. The displayed multiplier is set in object_desc() in flavor.c.

                  So to add the hand crossbow, you would need to add it, with a different sval, to k_info.txt and increase the objects line in misc.txt, create an sval defines for it in defines.h, and add case statements for the multipliers to calc bonuses() in xtra1.c and object_desc() in flavor.c. Doing a search for SV_LIGHT_XBOW in the src directory will take you to the right places in the code.

                  Edit: I have never used lcc either, but what errors are you getting? Also, the speed of the crossbow is also set in calc bonuses() in xtra1.c.

                  Comment

                  • redrobert
                    Scout
                    • Sep 2011
                    • 29

                    #10
                    error k:\z+src\src\wild1.c 2771 Compiler error (trap) stopping compilation

                    Comment

                    • Blue Baron
                      Adept
                      • Apr 2011
                      • 103

                      #11
                      Originally posted by redrobert
                      error k:\z+src\src\wild1.c 2771 Compiler error (trap) stopping compilation
                      2771 is the line number? If so, the error might be because that line is very long or because it is broken up wierdly. When I put it on one line, it was 290 characters long.

                      You might want to put it all on one line or add some more variables and see if it compiles. something like:
                      Code:
                      int a,b,c,d;
                      a = wild[(j-hstep)/16][(i-hstep)/16].gen.hgt_map;
                      b = wild[(j+hstep)/16][(i-hstep)/16].gen.hgt_map;
                      c = wild[(j-hstep)/16][(i+hstep)/16].gen.hgt_map;
                      d = wild[(j+hstep)/16][(i+hstep)/16].gen.hgt_map;
                      store_hgtmap(ii, jj, ((a + b + c + d)/4) + (((randint1(lstep)-hstep)*181)/256));
                      If this works you would probably have to do this for the pop_map and law_map functions as well.

                      If it doesn't work then it might be some other syntax issue and this might help narrow it down.

                      Comment

                      • redrobert
                        Scout
                        • Sep 2011
                        • 29

                        #12
                        thank you for all the work

                        decompiling doesn't work for me, so i give it up. it is not that important for me. i just make a light crossbow with damage minuses and weight of a heavy crossbow that is easy to find early and a sling with damage bonus. also i have made all ammo do less damage

                        the elemental brands are a bit to strong in my opinion but i can live with that

                        i have another question concerning z+angband

                        if i want to add new ego-things in e-info.txt, would i have to change defines.h as well and then recompile to have any effect?
                        Last edited by redrobert; September 8, 2011, 12:46.

                        Comment

                        • Magnate
                          Angband Devteam member
                          • May 2007
                          • 5110

                          #13
                          Originally posted by redrobert
                          if i want to add new ego-things in e-info.txt, would i have to change defines.h as well and then recompile to have any effect?
                          Before 3.3.0, V had all the ego types hard-coded in defines.h, so it is likely that z+ still has this. However, most of the defines were not actually used anywhere in the code, so it is possible that you can add ego types which will be generated normally without recompiling.
                          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                          Comment

                          • redrobert
                            Scout
                            • Sep 2011
                            • 29

                            #14
                            Thank you,

                            i guess i will just give it a try!

                            Comment

                            • redrobert
                              Scout
                              • Sep 2011
                              • 29

                              #15
                              Just an example how i made the new missle launchers:


                              Code:
                              N:706:& Crude Crossbow~
                              G:}:s
                              I:19:23:0
                              W:5:0:90:55
                              A:5/1:10/1:30/3
                              P:0:0d0:0:-10:0
                              F:SHOW_MODS
                              D:Heavy but not strong, not very good but still a crossbow
                              Code:
                              N:720:& Short Bow~ of Avoreen
                              G:}:U
                              I:19:12:0
                              W:10:0:30:150
                              A:10/5:70/4:85/2
                              P:0:0d0:0:2:0
                              F:SHOW_MODS
                              L:HIT: if player.rp.prace == RACE_HOBBIT then
                              L:HIT:		damage = damage * 1.3
                              L:HIT:	end
                              D:Just about anyone can shoot an arrow with a simple bow like this. 
                              D: In the hands of a hobbit very dangerous

                              Comment

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