Announcement

Collapse
No announcement yet.

Loadout arrays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loadout arrays

    Loadouts are currently being stored as huge arrays with 32 slots of objects for each loadout. Now what if we wanted more than 4 loadouts? I have an idea:
    Instead of having one big array containing all the objects you want to buy, how about a series of smaller arrays containing all the loadout numbers?
    You'd have one array of about 24 entries, and each of those entries would contain one class variable (the buyable object) and one integer array of maybe 8 entries, containing the numbers of all the loadouts (and additional integers/arrays for price, number etc.)
    You could then have almost as many loadouts you want, as long as no more than (in this case) 8 of them contains the same object.
    ]V[]V[

  • #2
    And another idea:
    You could continue to use a huge array, but instead of giving 32 slots to each loadout, you'd have an additional array referencing loadout number.
    ]V[]V[

    Comment


    • #3
      Ok, I just finished school. I got honours, but that doesn't matter. Once school is over my brain shuts down, so I can't comprehend much of anything with a lot of numbers and thinking without trying really hard.

      And I'm too lazy and tired to try real hard.
      The only constant is change.
      (And I wouldn't have it any other way.)

      Comment


      • #4
        Originally posted by CrouchingDork
        Ok, I just finished school. I got honours, but that doesn't matter. Once school is over my brain shuts down, so I can't comprehend much of anything with a lot of numbers and thinking without trying really hard.

        And I'm too lazy and tired to try real hard.
        Dork, try this out.

        More than 4 thief loadout slots. More than 4 guard loadout slots.

        Me, I love the idea.

        Comment


        • #5
          Originally posted by LaughingRat
          Originally posted by CrouchingDork
          Ok, I just finished school. I got honours, but that doesn't matter. Once school is over my brain shuts down, so I can't comprehend much of anything with a lot of numbers and thinking without trying really hard.

          And I'm too lazy and tired to try real hard.
          Dork, try this out.

          More than 4 thief loadout slots. More than 4 guard loadout slots.

          Me, I love the idea.
          Ok look, I don't have the time to go translate that into English.

          Good idea.
          The only constant is change.
          (And I wouldn't have it any other way.)

          Comment


          • #6
            its a good idead but i only use one loadout anyway
            <-- Resident Nightblade suggestion attorney...

            Comment


            • #7
              Originally posted by CrouchingDork
              Ok look, I don't have the time to go translate that into English.
              That's why I did it for you.

              Comment


              • #8
                Originally posted by LaughingRat
                Originally posted by CrouchingDork
                Ok look, I don't have the time to go translate that into English.
                That's why I did it for you.
                See, this is what I mean. Stop speaking German.

                I myself only use 1 loadout for all maps usually, unless I'm sword DMing or messing around. That way I always know what I have left, never have to scroll through my inventory, and can react with an invis or flash easier.
                The only constant is change.
                (And I wouldn't have it any other way.)

                Comment


                • #9
                  That's great, I've always wanted a guard and thief loadout for each individual map.

                  Comment


                  • #10
                    Originally posted by Firetiger
                    its a good idead but i only use one loadout anyway
                    I always wondered why always left picks, even on Th-Flats.

                    Comment


                    • #11
                      Originally posted by Alpha-Omega
                      That's great, I've always wanted a guard and thief loadout for each individual map.
                      Hmm, I can see an idea forming:

                      -Auto-loadouts : A player could set up their ideal loadout for each map and they would automatically receive this when the map loads and theyve chosen a team. Could save a bit of hassle, since I rarely alter my loadout strategy for any particular map, and I've bought the wrong loadout for the wrong map on several situations.

                      Comment


                      • #12
                        Or have 'suggested loadouts' like the stupid Word helper dude gives 'suggested formats' for letters
                        "Just off the border of your waking mind there lies another time, where darkness and light are one. As you tread the halls of sanity, you feel so glad to be unable to go beyond. I have a message from another time."

                        Comment


                        • #13

                          Comment


                          • #14
                            Dalai, if you make it like that, I quit!

                            Comment


                            • #15
                              MM, look through your ThLoadouts.ini. It looks like it's arranged as follows:

                              1. Loadout names are stored in an 8 element array, 4 slots per team.
                              2. Item types (classes) are stored in one large 256 element array, with 32 slots devoted to each loadout. Keep in mind, this does not mean you can only have 32 items total in your loadout, but 32 *different* items regardless of quantity.
                              3. This brings us to quantity which is stored in much the same manner as the item types with a 256 element array.

                              Think of it like this:
                              [code:1:13cc72844e]
                              loadouts items quantities
                              ----------- ------------- -------------
                              0 0 0
                              ... ...
                              1 32 32
                              ... ...
                              2 64 64
                              ... ...
                              3 96 96
                              ... ...
                              4 128 128
                              ... ...
                              5 160 160
                              ... ...
                              6 192 192
                              ... ...
                              7 224 224
                              [/code:1:13cc72844e]

                              If you want to add more loadout types you would need to make the following changes to ThPlayerLoadouts.uc (or preferrably a subclass):

                              1. Increase the size of the LoadoutNames array to the total number of desired loadouts.
                              2. Change the size of the Item array to the LoadoutNames size x 32
                              3. Make the same change to the Quantity array.
                              4. Change the "7" in "if (i&lt;0 || i&gt;7) return;" to the size of LoadoutNames - 1.

                              Comment

                              Working...
                              X