• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
City of Arabel
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Standard Subraces are viewed with disgust

Scheduled Pinned Locked Moved Closed Bugs
15 Posts 6 Posters 849 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Echo
    last edited by 16 Jun 2021, 15:22

    Being reviewed. Thanks for the input!

    "You can complain if you weren't asked; you can't complain if you were asked but didn't contribute." ~ Professor.

    1 Reply Last reply Reply Quote
    • Z
      Zool @Wulfric
      last edited by 16 Jun 2021, 20:46

      @Wulfric said in Standard Subraces are viewed with disgust:

      I was bored so I gave it some more thought to open up more possibilities.
      This can be extended to multiple levels of disgust (or even friendliness, depends on the configuration) towards subraces.

      Disclaimer: I didn't test this in the toolset, I wrote it here on the forums, so may have a few syntax errors :)

      Base code here:

      // List of possible subraces and the attitude of commoners or merchants towards them
      //
      // Format: "[subrace name]:[attitude], [subrace name 2]:[attitude2], ..."
      //
      // (Example) Attitudes:
      // 0: neutral
      // 1: distrusted
      // 2: hated
      string sSubraceAttitudes = "sun elf:0, hill dwarf:0, aasimar:1, tiefling:2";
      
      // Get the attitude towards a player subrace
      // The attitudes are listed before the sSubraceAttitudes variable
      int DetermineAttitude(string sSubrace);
      
      int DetermineAttitude(string sSubrace) {
          if (sSubrace == "") {
              // default is neutral for no subrace
              return 0;
          }
      
          int iSrPosition = FindSubString(sSubraceAttitudes, GetStringLowerCase(sSubrace));
          if (iSrPosition < 0) {
              // The player has a subrace, but we don't know about it. Should not happen
              // returning neutral for now, should ask the player to bug report this
              return 0;
          }
      
          // Find the attitude associated with the given subrace
          int iSrOffset = iSrPosition + GetStringLength(sSubrace) + 1;
          int iAttitude = StringToInt(GetSubString(sSubraceAttitudes, iSrOffset, 1));
      
          return iAttitude;
      }
      

      And an example on how to use it:

      // on merchant open somewhere in the code
      switch (DetermineAttitude(sSubrace)) {
          case 0:
              // open store normally
              break;
      
          case 1:
              // I don't like you, but eh, here you go
              break;
      
          case 2:
              // Go away you freak!
              break;
      }
      

      You can assign different meanings to numbers, though this has a limit of 10 possible attitudes (0-9), but that should be more than enough.

      Cheers!

      EDIT: You can make sSubraceAttitudes a parameter for the function and then the attitudes can be fully customised for whatever purpose you want to use this script :)

      Cool, thanks.

      > !!!MOLES for the MOLE GOD!!!

      1 Reply Last reply Reply Quote
      • P
        Puffy
        last edited by 17 Jun 2021, 08:23

        Its a misspelling in the script, the ok subraces are spelled with small letters whilst it should be capital letters to work.

        @SpiffyMeister
        the real bench mark for success is if you seduce a puffy pc or npc
        @Prof-Misclick
        Puffy said "Don't you trust me? Then vote yes NERD!"
        #scaredofstrongwomen

        1 Reply Last reply Reply Quote
        • P
          Puffy
          last edited by 17 Jun 2021, 08:41

          Should be resolved 7322

          @SpiffyMeister
          the real bench mark for success is if you seduce a puffy pc or npc
          @Prof-Misclick
          Puffy said "Don't you trust me? Then vote yes NERD!"
          #scaredofstrongwomen

          1 Reply Last reply Reply Quote
          • E
            Ethika
            last edited by 17 Jun 2021, 12:13

            This is still an issue

            1 Reply Last reply Reply Quote
            • P
              Puffy
              last edited by Puffy 17 Jun 2021, 12:17

              Ping me on discord when you are IG, so I can check your variables.

              @SpiffyMeister
              the real bench mark for success is if you seduce a puffy pc or npc
              @Prof-Misclick
              Puffy said "Don't you trust me? Then vote yes NERD!"
              #scaredofstrongwomen

              1 Reply Last reply Reply Quote
              • P
                Puffy
                last edited by 17 Jun 2021, 12:32

                Need to put in GetStringLowerCase

                @SpiffyMeister
                the real bench mark for success is if you seduce a puffy pc or npc
                @Prof-Misclick
                Puffy said "Don't you trust me? Then vote yes NERD!"
                #scaredofstrongwomen

                1 Reply Last reply Reply Quote
                • E
                  Echo
                  last edited by 19 Jun 2021, 18:29

                  Try again after v7327

                  "You can complain if you weren't asked; you can't complain if you were asked but didn't contribute." ~ Professor.

                  1 Reply Last reply Reply Quote
                  • E
                    Echo
                    last edited by 26 Jun 2021, 15:59

                    Any testing/update on this?

                    "You can complain if you weren't asked; you can't complain if you were asked but didn't contribute." ~ Professor.

                    P 1 Reply Last reply 5 Jul 2021, 07:37 Reply Quote
                    • P
                      Puffy @Echo
                      last edited by 5 Jul 2021, 07:37

                      @Echo said in Standard Subraces are viewed with disgust:

                      Any testing/update on this?

                      @SpiffyMeister
                      the real bench mark for success is if you seduce a puffy pc or npc
                      @Prof-Misclick
                      Puffy said "Don't you trust me? Then vote yes NERD!"
                      #scaredofstrongwomen

                      E 1 Reply Last reply 7 Nov 2021, 14:44 Reply Quote
                      • E
                        Echo @Puffy
                        last edited by 7 Nov 2021, 14:44

                        Tested with Gold Dwarf. Worked as intended.
                        0b7c4edd-33bd-4a8d-9d4c-e89a5d127284-image.png

                        "You can complain if you weren't asked; you can't complain if you were asked but didn't contribute." ~ Professor.

                        1 Reply Last reply Reply Quote
                        • E Echo moved this topic from Bug Reports on 7 Nov 2021, 14:46
                        • 1 / 1
                        1 / 1
                        • First post
                          14/15
                          Last post