Force Borg to use an item if they find it
Collapse
X
-
Comment
-
I don't see the email but I see the attachments here now. I will check it out
duplicated the crash. I will look into it. I am wondering if it has to do with having a tab before the #. The parsing code can be sensitive and not sure why it wouldn't warn if that was the issue.
found the email. You got spam filtered. Sorry, I will tell gmail you aren't spam .Last edited by agoodman; May 7, 2024, 20:58.Comment
-
okay, two issues here.
1) the crash was a big bad bug. When a formula looked like ((a) + b) rather than (a + b) I was "taking" the operator and then not using it. This threw off all the calculations so it was walking into oblivion. Good find. The only place borg.txt does this is on "depth(100): condition((value(trait, amt ezheal)) < 15);" where I left an additional () in by accident but the code should have handled it. Since none of my borgs had hit the point of running that calc yet, I missed it in testing.
I have checked in a fix to this. It is currently in borg_calc_crash in my fork and I submitted it to be merged.
2) why isn't it using Ringil... well, this is a "Adam's big mouth" bug. It turns out the ESP plus other things the mace was giving you contributed more than 999999 to power. I changed the formula to give 9999999 (" condition(value(activation, cold_ball100)): reward(9999999 * value(activation, cold_ball100));") and the next time he hit town he switched to Ringil. I should have named a bigger number. 999999 isn't a magic "always use this" number it is just a number I thought was high enough to out weigh any other weapon... I was wrong.Comment
-
As always, thanks for looking into it. As for- You found it, not me. Updated my borg.txt to match and it seems to be working!
- I get it. I just wasn't sure is 999999 was a hard cap limit and never tried. I should have. At that point, if it's preventing a dive (ESP (telepathy) is decently rare and the early artifact rings seem to be thrown away (LOST) if they are found early.) that's probably how I would want it to react (weird home value is so low).
- Also, is the "trait" esp or telepathy. Artifacts have flags of telepathy but none have esp. esp seems to have rewards in borg.txt but telepathy does not.
Last edited by Grommen; May 8, 2024, 04:08.Comment
-
no, thank you for the bug. I really appreciate your playing with this beta level code and giving me feedback.
I get it. I just wasn't sure is 999999 was a hard cap limit and never tried. I should have. At that point, if it's preventing a dive (ESP (telepathy) is decently rare and the early artifact rings seem to be thrown away (LOST) if they are found early.) that's probably how I would want it to react (weird home value is so low).
it is a delicate balance of "this is rewarded low at low levels because it isn't important" and "I will need it at higher levels so reward it so it is stored". I am glad to adjust if we end up with a power calculation that works better.
I thought telepathy granted esp. I would need to check and make sure I am marking traits correctly. If you have a "has telepathy" item you want me to check if is being rewarded correctly for ESP, let me know. Also, here is how to check on your own
wizard mode (^a) to generate the item (for artifacts, ^aC) then look at the borgs traits
^zhs (for "has" "skill" (I should fix that to "trait")) and all the skills are dumped with their values
put on the item and repeat... now you know the trait value change for putting on that item. BTW, make sure you id it first so the borg knows what it is.
you can then see the power difference with ^zp and the "how deep do I think I am ready for" with ^z2
You are definitely not submitting too much! You can give bugs here, put messages in github or email. I always like getting feedback, even bugs... perhaps especially bugs since I hate having bad code out there.Comment
-
take a look at ^p it is all in the message log. I think Dr A added a way to get a character dump that included this information. I will have to poke around. I might have had trouble getting it to work and gotten rid of that code.Comment
-
Another Borg issue. Using 4.2.5-185-g02b5e5f72. I've noticed it for a while but had trouble getting a save where it happens. It seems the borg sometimes stops (doesn't crash) when on top of or next to stack(s) of items (White &). This obviously doesn't happen all the time so there could be something else going on. This happens no matter borg_uses_dynamic_calcs TRUE or FALSE. Start the borg another time or multiple times seems to push past it eventually. I now have a save and will attach it. If issues with attachment, I will email it to you.Comment
-
Another Borg issue. Using 4.2.5-185-g02b5e5f72. I've noticed it for a while but had trouble getting a save where it happens. It seems the borg sometimes stops (doesn't crash) when on top of or next to stack(s) of items (White &). This obviously doesn't happen all the time so there could be something else going on. This happens no matter borg_uses_dynamic_calcs TRUE or FALSE. Start the borg another time or multiple times seems to push past it eventually. I now have a save and will attach it. If issues with attachment, I will email it to you.
I am not sure if the handling of stacks changed or what but when the game gives "You have no room for ..." it requeues the keypress so it is processed as your next action (rather than requiring "-- more --" to be cleared before doing more stuff, like many messages do). The borg saw this requeued key and thought it was a user pressing a key to abort. I toss back a key press of 0 and this seems to be ignored since the borg has special handling for keypress 0 or, for some reason, 10.Comment
-
ok, I have checked in a fix for this under "borg_stack_keypress" (pull request https://github.com/angband/angband/pull/5964 if you want to manually change your code... or just wait for it to get merged in, the devs are usually quick, within a week, for pull requests)One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.🥰 1Comment
-
Grommen a quick borg.txt fix
change line
# wearing something that needs an ID
reward(value(trait, amt need id) * 10000);
to
# wearing something that needs an ID
reward(value(trait, worn need id) * 10000);One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.Comment
Comment