Vanilla Code Questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DavidMedley
    Veteran
    • Oct 2019
    • 1004

    #46
    It's not the newlines, but thanks. It's the odd extra space or tab.
    Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #47
      Here is my recommendation for managing your own version of the angband git repository:
      1. Fork the official repo (angband/angband) using the fork button on github
      2. Clone/download this to get your own local copy
      3. Keep your master branch up-to-date with the official master branch, do not do development work on your master branch
      4. For development work, create a branch and do your work there. Once it's ready for inclusion, push it to your github repo and make a pull request
      5. The official master branch will be updated frequently. Make sure that you (fairly frequently):
        • Pull changes from the official repo and update your master (it should be just a fast-forward, since you are not developing on your master);
        • Rebase your development branch or branches against your master branch, resolving any conflicts that arise


      This is how I work, and it should keep confusion to a minimum.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • DavidMedley
        Veteran
        • Oct 2019
        • 1004

        #48
        OK, good tips. I know less about version control than I probably should.
        Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

        Comment

        • DavidMedley
          Veteran
          • Oct 2019
          • 1004

          #49
          I got my changes into a new branch, rolled my master back (via CLI couldn't find this option on github), and can now pull in the 13 commits at the press of a button. Github gives me 3 choices for this:
          - Create a merge commit
          - Squash and merge
          - Rebase and merge

          Which do you recommend?
          Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9634

            #50
            Originally posted by DavidMedley
            I got my changes into a new branch, rolled my master back (via CLI couldn't find this option on github), and can now pull in the 13 commits at the press of a button. Github gives me 3 choices for this:
            - Create a merge commit
            - Squash and merge
            - Rebase and merge

            Which do you recommend?
            If you're pulling commits into your new branch from master and want to stay aligned with it, use rebase - that will bring your branch up to date with master, and then replay your new commits onto that base.
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • DavidMedley
              Veteran
              • Oct 2019
              • 1004

              #51
              OK, maybe I'm doing it wrong. I thought the first step was to pull from angband:master to myband:master.
              Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9634

                #52
                OK, let's start again. Which 13 commits?
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • DavidMedley
                  Veteran
                  • Oct 2019
                  • 1004

                  #53
                  Heh, sorry. I need to read a book :-(

                  I have a master branch that is exactly like the master branch from Mar 17, 2020. From there I created a BGmod branch, and all my changes are in there. Then I tried this https://github.com/damedley/myband/pull/1 "damedley wants to merge 13 commits into damedley:master from angband:master". And that's where I paused, pondering the merge/squash/rebase choice.
                  Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9634

                    #54
                    Originally posted by DavidMedley
                    Heh, sorry. I need to read a book :-(

                    I have a master branch that is exactly like the master branch from Mar 17, 2020. From there I created a BGmod branch, and all my changes are in there. Then I tried this https://github.com/damedley/myband/pull/1 "damedley wants to merge 13 commits into damedley:master from angband:master". And that's where I paused, pondering the merge/squash/rebase choice.
                    Right, so I would recommend using CLI to do that, although it may be that rebase and merge would work.
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • DavidMedley
                      Veteran
                      • Oct 2019
                      • 1004

                      #55
                      Via which command?
                      Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9634

                        #56
                        Originally posted by DavidMedley
                        Via which command?
                        I do
                        Code:
                        git fetch official
                        git merge official/master
                        on my master branch.
                        One for the Dark Lord on his dark throne
                        In the Land of Mordor where the Shadows lie.

                        Comment

                        • DavidMedley
                          Veteran
                          • Oct 2019
                          • 1004

                          #57
                          Having Trouble with Timed Resistance

                          I tried adding a timed free action effect. I copied everywhere I saw confusion or att_conf. It compiles and runs. When cast, it gives the message I wrote. The notice shows at the bottom. The flag is set in the character sheet. But when something tries to slow or paralyze the character it simply doesn't work. Can anyone suggest why this might be?
                          Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                          Comment

                          • Nick
                            Vanilla maintainer
                            • Apr 2007
                            • 9634

                            #58
                            Originally posted by DavidMedley
                            I tried adding a timed free action effect. I copied everywhere I saw confusion or att_conf. It compiles and runs. When cast, it gives the message I wrote. The notice shows at the bottom. The flag is set in the character sheet. But when something tries to slow or paralyze the character it simply doesn't work. Can anyone suggest why this might be?
                            In calc_bonuses() in payer-calcs.c you will see a bunch of special cases like this for timed effects, for example
                            Code:
                            	if (p->timed[TMD_SINVIS]) {
                            		of_on(state->flags, OF_SEE_INVIS);
                            	}
                            You will need a similar thing for your timed free action.
                            One for the Dark Lord on his dark throne
                            In the Land of Mordor where the Shadows lie.

                            Comment

                            • DavidMedley
                              Veteran
                              • Oct 2019
                              • 1004

                              #59
                              Do you see anything wrong with this?

                              Code:
                              	if (p->timed[TMD_FREE_ACT]) {
                              		of_on(state->flags, OF_FREE_ACT);
                              	}
                              Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                              Comment

                              • Nick
                                Vanilla maintainer
                                • Apr 2007
                                • 9634

                                #60
                                Originally posted by DavidMedley
                                Do you see anything wrong with this?

                                Code:
                                	if (p->timed[TMD_FREE_ACT]) {
                                		of_on(state->flags, OF_FREE_ACT);
                                	}
                                Looks perfect.
                                One for the Dark Lord on his dark throne
                                In the Land of Mordor where the Shadows lie.

                                Comment

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