VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Community General Discussions
  • Search

Stacked item cost

Discussions related to Vanguard: Saga of Heroes.

Moderator: Community Managers

Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Stacked item cost
  • Quote

Post by zippyzee » Tue May 10, 2016 8:30 am

If a stack of 50 arrows at a vendor is listed as 5 copper, is that 5 copper per arrow or 5 copper for the stack?
Top

User avatar
OncaLupe
Developer
Developer
Posts: 446
Joined: Mon Mar 02, 2015 7:29 pm
Location: Michigan, USA
Re: Stacked item cost
  • Quote

Post by OncaLupe » Tue May 10, 2016 9:58 am

For the stack.
Top

zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Re: Stacked item cost
  • Quote

Post by zippyzee » Tue May 10, 2016 10:10 am

That's what I figured.

So here's the issue. I can certainly charge that for the stack, and that works fine. In fact, that's what my current build does.

But...when you sell a stack back, how do I calculate the value? In other words, if the normal stack size is 20, and you have 30, then you need 1.5x the value of a stack. So each item needs to have a default stack size to compare to. I'm not sure we have that set up in the database to do this properly. I will have to do some checking on that. Some items might be stackable, but the default stack size would be 1, as in you receive 1x the value of the item per item you sell.
Top

elcapitan
Posts: 36
Joined: Tue Jun 24, 2014 6:30 pm
Re: Stacked item cost
  • Quote

Post by elcapitan » Thu May 12, 2016 11:18 pm

It would equal to 1 copper per stack of 10... anything less would need to be 0.xx (rounded down to 0 at values lower than 1 copper).... else there would be a gaining glitch.
Top

shargash
Team Member
Team Member
Posts: 338
Joined: Tue Apr 15, 2014 10:16 pm
Re: Stacked item cost
  • Quote

Post by shargash » Tue May 17, 2016 11:05 am

I would think you would only need one field in the database: the individual item cost. You can then do the math to figure out the stack price. If you set the minimum item value to 1 cp, you would never have to worry about rounding issues on partial stacks.
Top

zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Re: Stacked item cost
  • Quote

Post by zippyzee » Tue May 17, 2016 1:21 pm

That is the most logical approach in my mind, as well. I have yet to implement anything, but will get to it soon.
Top

zippyzee
Developer
Developer
Posts: 1240
Joined: Wed Jul 23, 2014 2:11 pm
Re: Stacked item cost
  • Quote

Post by zippyzee » Sat May 28, 2016 3:42 pm

I've been playing with this a bit.

Note that in the database, we have a ton of items with no sell price information, so if you sell them to a vendor you will not receive any money.

But, item 1437532, Inert Essence, is in the database with a sell price of 10c. The stack size on that was 20. If you do the math, each inert essence is worth .5 copper, which is not something we can code for. That means that in the actual game there was some sort of math going on with sell price for a stack (one of the scenarios above). Or, possibly, the sell price is indicative of 1 inert essence, so 20 sold for 200c, which would be the other scenario. If we can spot a vendor item that someone sold a quantity of, and find the sell price of that, we can compare it to the vendor's known sell price of that item to see how it works. I haven't found that instance, yet.

We do eventually need a default or max stack size for each item, for various reasons.

We also need to do a sweep through the logs to get as many sell prices as we can for our items, and then do something to set the rest.

Right now you can exploit a vendor by buying stacks of items (once you buy an item, it is valued at the vendor sale price), separating them into smaller stacks, and then selling the smaller stacks back at the full stack values. Otherwise we are getting closer to the finished product on this.
Top

shargash
Team Member
Team Member
Posts: 338
Joined: Tue Apr 15, 2014 10:16 pm
Re: Stacked item cost
  • Quote

Post by shargash » Wed Jun 01, 2016 1:36 pm

I dug around a bit in my logs, and I think I understand what happens with stacks, at least on the buying side. Excerpt from chat log follows. Note that between crafting bouts, I used to sell any partial stacks of mats in my crafting bag, and then buy stacks of mats in a particular order, such that my bag would fill up with the various mats in predictable locations in my bag (making it easier to check to see if I had enough of any particular mat to continue, or needed to hit the vendor.

[18:38:41] You sell Adhesive.
[18:38:43] You sell Cleaner.
[18:38:43] You receive 1 copper.
[18:38:44] You lose 5 copper.
[18:38:44] Carwan Dusa says, "There you go."
[18:38:45] You lose 5 copper.
[18:38:45] Carwan Dusa says, "There you go."
[18:38:45] You lose 5 copper.
[18:38:45] Carwan Dusa says, "There you go."
[18:38:48] You lose 5 copper.
[18:38:48] Carwan Dusa says, "There you go."
[18:38:48] You lose 5 copper.
[18:38:48] Carwan Dusa says, "There you go."
[18:38:51] You lose 5 copper.
[18:38:51] Carwan Dusa says, "There you go."
[18:38:52] You sell Softener.
[18:38:52] You receive 2 copper.
[18:38:53] You lose 5 copper.
[18:38:53] Carwan Dusa says, "There you go."
[18:39:01] You lose 5 copper.
[18:39:01] Carwan Dusa says, "There you go."
[18:39:01] You lose 5 copper.
[18:39:01] Carwan Dusa says, "There you go."
[18:39:02] You lose 5 copper.
[18:39:02] Carwan Dusa says, "There you go."
[18:39:02] You lose 5 copper.
[18:39:02] Carwan Dusa says, "There you go."
[18:39:02] You lose 5 copper.
[18:39:02] Carwan Dusa says, "There you go."
[18:39:03] You lose 5 copper.
[18:39:03] Carwan Dusa says, "There you go."
[18:39:04] You lose 5 copper.
[18:39:04] Carwan Dusa says, "There you go."
[18:39:05] You lose 5 copper.
[18:39:05] Carwan Dusa says, "There you go."

Unfortunately, the chat log didn't capture the size of the stacks, but several things can be deduced from the log:
1. The price for a stack of mats was 5c. I always bought whole stacks (at the time, a stack was probably 20; the log is from 2007)
2. The Cleaner (2nd from top) was less than a full stack, and I received 1c.
3. The Adhesive (the top) was too small a stack to register 1c, so I got nothing. I don't know if the code is rounding or performing an INT() function.

Hope that helps.
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “General Discussions”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD