Null pointer use - borg6.c:6526
Borg bugs and feature requests
Collapse
X
-
-
There is code to change the amount of time a borg will explore levels based on the level feeling. It doesn't work great because there are so many reasons a borg might decide to hang out, scumming money, lacking certain traits, etc.Leave a comment:
-
A quick way to vastly improve the borg perfomance:
Once the item feeling is disclosed, leave the level if its not high enough.
High enough would be something like
3+ for dlvls 1-10
5+ for dlvls 11+Leave a comment:
-
There is no location zero in the quiver. It starts at 1, unless you have inscribed ammo.Leave a comment:
-
Null pointer use - borg6.c:6526
With 4.2.4-325-ge46382202 compiled from source on macOS with OPT set to "-g -O0 -DUSE_STATS -fsanitize=address -fsanitize=undefined", had the borg stop on a null pointer use exception from the undefined behavior sanitizer. The call stack at the point of the exception was
1. borg_launch_bolt_aux(y=46, x=77, rad=2, dam=144, typ=6, max=20, ammo_location=0) at borg6.c:6526:32
2. borg_launch_bolt(rad=2, dam=144, typ=6, max=20, ammo_location=0) at borg6.c:6633:51
3. borg_attack_aux_rod_bolt(sval=9, rad=2, dam=144, typ=6) at borg6.c:7333:11
4. borg_attack_aux(what=63) at borg6.c:8725:13
5. borg_attack(boosted_bravery=false) at borg6.c:9277:13
6. borg_think_dungeon at borg8.c:4766:9
7. borg_think at borg9.c:643:13
8. borg_inkey_hack(flush_first=0) at borg9.c:3180:13
9. inkey_ex at ui-input.c:228:12
10. textui_get_command(count=0x00007ff7bfefd820) at ui-input.c:1759:8
11. textui_process_command at ui-game.c:518:15
12. textui_get_cmd(context=CTX_GAME) at ui-game.c:594:3
13. play_game(mode=GAME_LOAD) at ui-game.c:921:4
At the point of the exception, k_ptr was NULL, *ag was { feat = 1, info = 1, glyph = false, store = 255, take = 1, kill = 0, hmmm = 0, xtra = 0 }, and *take was { kind = NULL, known = false, seen = false, extra = false, orbed = false, x = 0, y = 0, when = 0, value = 0, tval = 0 }, (rx, ry) was (75, 46), (x2, y2) was (77, 46), and the player's grid was (77, 36). There was a cutlass (tval = 11; sval = 5) at (75, 46) in both cave and player->cave. I've attached a clipped screenshot at the point of the crash though the grid in question is just outside what's displayed.Leave a comment:
-
speaking of dynamic calcs in borg.txt
I really dislike the design of this stuff right now (I can say that without fear of insulting the designer... I did it years ago. Not sure what younger me was thinking). I was considering something like
Code:AnyClass [ Power [ value(trait, afuel): range(0, 6): reward(60000) value(trait, afuel): range(7, 10): reward(6000-(count()*100)) value(trait, food): range(1, 1): condition(value(trait, ishungry) or value(trait, isweak)): reward(100000) ] Depth Requirement [ depth(10): condition((value(potion, Cure Critical Wounds) + value(potion, Cure Serious Wounds)) > 2 or value(trait, clevel) > 30) ] ] Warrior [ Power [ value(trait, afuel): range(0, 6): reward(60000) ] ]
FORMULA072=_ITEM324 _ITEM327 + 3 >= 3 * 500 *
so, converting that to the new variables (same RPN) would be
Formula072 = value(staff, power) value(staff, holiness) + 3 >= 3 * 500 *
or, in a format people understand
Formula072 = ((value(staff, power) + value(staff, holiness)) >= 3) * 500 * 3
so if the total number of staffs of power + staffs of holiness is 3 or more, you get 1500 power points.
The problem is that parsing and calculating the formula written common algebraic notation is not so easy, especially if I try to take order of operations into account.
and when it comes to the general format of the values, I started considering JSON or something similar but the parsers for those are big and complicated and it seems like a bad idea to make angband dependent on an outside library just for the borg. Seems like a non-starter.
I am still thinking on this but welcome ideas both on formula formatting and parsing and on the general format of a "dynamic borg power language"
BTW, this got bumped in priority in my eyes because one of the first posts when I announced the resurrection of the borg was @Siemelink asking about editing borg.txt. Gotta give the users what they want.Leave a comment:
-
Borg bugs and feature requests
Hey, I figured I would create a thread to track borg bugs and give an update on bugs that have been worked on
The following is checked into the borg_4x fork and a merge request has been created for V.
1) a fix to eating so more things, including potions of slime mold juice, will be snacked on when just "hungry"
2) a fix to eating when starving to include more things as above
3) a fix to making a hole in the inventory to not overflow integers
4) a fix to making a hole in the inventory to prioritize heavy objects
5) a fix to casting a glyph when just "playing with spells"
being worked
1) stepping on lava
2) dynamic calculationTags: None
Leave a comment: