Could anyone please tell me in which files i have to look to change the damage multipliers of Bows and Crossbows?
Damage Multiplier of Bows
Collapse
X
-
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 -
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 crossbowComment
-
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
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 BeatlesComment
-
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
-
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.
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 BeatlesComment
-
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
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
-
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 it doesn't work then it might be some other syntax issue and this might help narrow it down.Comment
-
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
-
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 BeatlesComment
-
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
Comment