Force Borg to use an item if they find it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agoodman
    Apprentice
    • Jan 2011
    • 77

    #16
    Originally posted by Grommen
    Errors uploading files again
    I still don't see a save. You can try emailing it to me directly at goodman.adam at gmail.com (replaced @ with "at" to stop spammer scanning for email addresses)

    Comment

    • Grommen
      Rookie
      • Mar 2024
      • 8

      #17
      Originally posted by agoodman

      I still don't see a save. You can try emailing it to me directly at goodman.adam at gmail.com (replaced @ with "at" to stop spammer scanning for email addresses)
      I emailed it to you a few days ago. It also looks like file uploads finally worked for my message

      Comment

      • agoodman
        Apprentice
        • Jan 2011
        • 77

        #18
        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

        • agoodman
          Apprentice
          • Jan 2011
          • 77

          #19
          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

          • Grommen
            Rookie
            • Mar 2024
            • 8

            #20
            As always, thanks for looking into it. As for
            1. You found it, not me. Updated my borg.txt to match and it seems to be working!
            2. 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.
            Also, I seem to be submitting maybe too much? If so, please let me know. Feel free to email me. If not, is this the way you would prefer issues/feedback to be submitted?
            Last edited by Grommen; May 8, 2024, 04:08.

            Comment

            • agoodman
              Apprentice
              • Jan 2011
              • 77

              #21
              Originally posted by Grommen
              As always, thanks for looking into it.
              no, thank you for the bug. I really appreciate your playing with this beta level code and giving me feedback.

              Originally posted by Grommen
              As for
              You found it, not me. Updated my borg.txt to match and it seems to be working!
              I found the issue you pointed out. I am happy with you getting credit I am glad the fix seems to be working

              Originally posted by Grommen
              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.

              Originally posted by Grommen
              ​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.

              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

              Originally posted by Grommen
              ​Also, I seem to be submitting maybe too much? If so, please let me know. Feel free to email me. If not, is this the way you would prefer issues/feedback to be submitted?
              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

              • Grommen
                Rookie
                • Mar 2024
                • 8

                #22
                Originally posted by agoodman

                ^zhs (for "has" "skill" (I should fix that to "trait")) and all the skills are dumped with their values
                I do this and get "Borg_has[] dump complete. Examine log." but no file seems to generate.

                Comment

                • agoodman
                  Apprentice
                  • Jan 2011
                  • 77

                  #23
                  Originally posted by Grommen

                  I do this and get "Borg_has[] dump complete. Examine log." but no file seems to generate.
                  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

                  • Grommen
                    Rookie
                    • Mar 2024
                    • 8

                    #24
                    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

                    • agoodman
                      Apprentice
                      • Jan 2011
                      • 77

                      #25
                      Originally posted by Grommen
                      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.
                      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)

                      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

                      • Grommen
                        Rookie
                        • Mar 2024
                        • 8

                        #26
                        Awesome. Thank you as always. I have been using the builds that come with the releases and will probably continue to do so

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9592

                          #27
                          Originally posted by agoodman
                          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)
                          That's in the latest build now.
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • agoodman
                            Apprentice
                            • Jan 2011
                            • 77

                            #28
                            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);

                            Comment

                            • Nick
                              Vanilla maintainer
                              • Apr 2007
                              • 9592

                              #29
                              Originally posted by agoodman
                              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);
                              That fix is in now too
                              One for the Dark Lord on his dark throne
                              In the Land of Mordor where the Shadows lie.

                              Comment

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