Thread: Names Above Ground Items

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31
  1. #11  
    Finland
    Zoltus's Avatar
    Join Date
    Dec 2015
    Posts
    559
    Thanks given
    116
    Thanks received
    120
    Rep Power
    69
    Good snippet thanks for sharing


    Spoiler for God:
    Reply With Quote  
     

  2. #12  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    22
    Posts
    4,440
    Thanks given
    889
    Thanks received
    1,518
    Rep Power
    3031
    Thanks for the share
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #13  
    Banned
    Join Date
    May 2017
    Posts
    39
    Thanks given
    49
    Thanks received
    8
    Rep Power
    0
    nice release thanks.
    Reply With Quote  
     

  4. #14  
    Registered Member
    Join Date
    May 2017
    Age
    20
    Posts
    18
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    this is nice i like the idea of it why not add color like red for rare's and so on from that
    Reply With Quote  
     

  5. #15  
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    138
    Thanks given
    33
    Thanks received
    76
    Rep Power
    109
    Quote Originally Posted by Siner View Post
    this is nice i like the idea of it why not add color like red for rare's and so on from that
    Here's my current one
    (Any item that's default value is >= 50k || amount >= 100k will be purple, else it will be white with alpha)
    You can adjust that to be a filter as well, or however ya want. Up to you friend

    Code:
    newSmallFont.drawCenteredString((itemDef.value >= 0xC350 || item.anInt1559 >= 0x186A0 ? "<col=DA6EA2>" : "<trans=120>") + itemDef.name + (item.anInt1559 > 1 ? "</col> (" + formatAmount((int) item.anInt1559) + "</col>)" : ""), scene_draw_x, scene_draw_y - offset, 0xffffff, 1);
    All content I release is NOT to be SOLD or offered as a SERVICE. Please respect my wishes, as my releases are free to use. Thank you.


    ~[Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. Thankful user:


  7. #16  
    Registered Member
    Join Date
    May 2017
    Age
    20
    Posts
    18
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Deku View Post
    Here's my current one
    (Any item that's default value is >= 50k || amount >= 100k will be purple, else it will be white with alpha)
    You can adjust that to be a filter as well, or however ya want. Up to you friend

    Code:
    newSmallFont.drawCenteredString((itemDef.value >= 0xC350 || item.anInt1559 >= 0x186A0 ? "<col=DA6EA2>" : "<trans=120>") + itemDef.name + (item.anInt1559 > 1 ? "</col> (" + formatAmount((int) item.anInt1559) + "</col>)" : ""), scene_draw_x, scene_draw_y - offset, 0xffffff, 1);
    nice work =) i might use
    Reply With Quote  
     

  8. #17  
    true

    DerekH's Avatar
    Join Date
    Dec 2011
    Age
    12
    Posts
    1,178
    Thanks given
    527
    Thanks received
    257
    Rep Power
    125
    about time someone released it haha
    Reply With Quote  
     

  9. #18  
    Registered Member
    Join Date
    Feb 2015
    Posts
    570
    Thanks given
    4
    Thanks received
    104
    Rep Power
    19
    Quote Originally Posted by DerekH View Post
    about time someone released it haha
    RIP haha
    Reply With Quote  
     

  10. #19  
    Donator


    Join Date
    Mar 2012
    Posts
    1,015
    Thanks given
    219
    Thanks received
    294
    Rep Power
    587
    Quote Originally Posted by Deku View Post
    Pretty simple, but haven't seen it released (add a toggle if ya want)



    Code:
        private void render_ground_item_names() {
            for (int x = 0; x < 104; x++) {
                for (int y = 0; y < 104; y++) {
                    Deque node = groundItems[plane][x][y];
                    int offset = 12;
                    if (node != null) {
                        for (Item item = (Item) node.getFirst(); item != null; item = (Item) node.getNext()) {
                            ItemDefinition itemDef = ItemDefinition.lookup(item.ID);
                            get_raster_position((x << 7) + 64, 64, (y << 7) + 64);
                            newSmallFont.drawCenteredString(itemDef.name + (item.anInt1559 > 1 ? " (" + item.anInt1559 + ")" : ""), scene_draw_x, scene_draw_y - offset, 0xffffff, 1);
                            offset += 12;
                        }
                    }
                }
            }
        }
    For reference,
    Code:
        private void get_raster_position(int raster_x, int height, int raster_y) {//calcEntityScreenPos
            if (raster_x < 128 || raster_y < 128 || raster_x > 13056 || raster_y > 13056) {
                scene_draw_x = -1;
                scene_draw_y = -1;
                return;
            }
            int tile_bounds = method42(plane, raster_y, raster_x) - height;
            raster_x -= absoluteX;
            tile_bounds -= anchor;
            raster_y -= absoluteY;
            int sine_y = Model.SINE[yCameraCurve];
            int cosine_y = Model.COSINE[yCameraCurve];
            int sine_x = Model.SINE[xCameraCurve];
            int cosine_x = Model.COSINE[xCameraCurve];
            int pos = raster_y * sine_x + raster_x * cosine_x >> 16;
            raster_y = raster_y * cosine_x - raster_x * sine_x >> 16;
            raster_x = pos;
            pos = tile_bounds * cosine_y - raster_y * sine_y >> 16;
            raster_y = tile_bounds * sine_y + raster_y * cosine_y >> 16;
            tile_bounds = pos;
            if (raster_y >= 50) {
                scene_draw_x = Rasterizer.textureInt1 + (raster_x << SceneGraph.viewDistance) / raster_y;
                scene_draw_y = Rasterizer.textureInt2 + (tile_bounds << SceneGraph.viewDistance) / raster_y;
            } else {
                scene_draw_x = -1;
                scene_draw_y = -1;
            }
        }
    And call
    Code:
    render_ground_item_names()
    below(*meant above)
    Code:
    draw3dScreen();
    Can add a rarity color and value onto the string if ya want, but this is just basic
    What about if an item stack exceeds 65535? You'll have to extend the packet to fix the overflow.
    Reply With Quote  
     

  11. #20  
    Super Donator


    Join Date
    Feb 2011
    Age
    20
    Posts
    1,135
    Thanks given
    180
    Thanks received
    180
    Rep Power
    243
    Quote Originally Posted by nucleon View Post
    What about if an item stack exceeds 65535? You'll have to extend the packet to fix the overflow.
    If you scroll down a bit at the first page its right there..

    Btw, this is a neat release and specially when you let the Math be still in it for someone to understand it
    Reply With Quote  
     

Page 2 of 4 FirstFirst 1234 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Item's name on ground
    By JacobiYounger in forum Help
    Replies: 4
    Last Post: 05-26-2016, 07:48 PM
  2. Replies: 11
    Last Post: 12-02-2015, 11:28 PM
  3. Replies: 8
    Last Post: 02-28-2009, 10:50 PM
  4. 100% Perfect picking up ground items! + Video
    By Pkitten in forum Tutorials
    Replies: 177
    Last Post: 09-26-2008, 10:32 PM
  5. Replies: 1
    Last Post: 10-23-2007, 12:40 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •