Comments (31)
I think I accidently closed the issue. I have confirmed the bug with the scrap.tf bots as well.
from steambot.
The scrap.tf bots were forked from SteamBot early in SteamBot's development, so we really can't say much for scrap.tf.
from steambot.
Well, What I was thinking, since it appears to be in both bots, that's it's a problem with the core code, and not some change that was made, or, not made.
Since you say they were forked from an earlier build, it would seem like this issue would be something that is has been there for a while, but hasn't shown itself since no one has attempted to use other items with it.
from steambot.
I think when it tries to get the item from the item schema, it doesn't exist so it throws that sort of general error (from looking at line 541 of Trade.cs).
from steambot.
I have been looking at the Schema.cs file, and it appears to only call the TF2 item schema. This could be why we are experiencing crashes from the bot. I have adjusted the Game ID in the API call to call from Dota 2 instead. This still throws errors when a Dota item is dropped in the trade window. I am going to start looking at the item structure to see what the difference is.
EDIT: I believe I have found where the error is occuring. Currently in Schema.cs items are returned by a given crafting material. In the return results from the API call to the Dota item schema, there is no property for CraftMaterialType.
Here is a sample of an item returned from the Dota schema.
{
"name": "Riki's Dagger",
"defindex": 0,
"item_class": "dota_item_wearable",
"item_type_name": "#DOTA_WearableType_Daggers",
"item_name": "#DOTA_Item_Rikis_Dagger",
"proper_name": false,
"item_quality": 0,
"image_inventory": null,
"min_ilevel": 1,
"max_ilevel": 1,
"image_url": "",
"image_url_large": "",
"capabilities": {
"can_craft_mark": true,
"can_be_restored": true,
"strange_parts": true,
"paintable_unusual": true
}
}
from steambot.
The problem with supporting both TF2 and Dota is the time it would take to request both schemas. Maybe if we have options for each bot, like download/use the TF2, Dota, or both schemas? And if the user adds an item that doesn't exist, gracefully handle it instead of throwing an exception.
from steambot.
I was able to figure out why the errors were throwing. There are 2 calls to the Schema Web API. Once both calls were changed to access the Dota schema, adding items from Dota now works as expected. I am fine with having the owner of the bot set up the script calls for which game they want, until we can figure out a long term solution to using both.
Problem is, the name of the project is SteamBot, not TF2Bot. Therefore we need to make it a goal to work on all steam trading. I will head up the Dota branch. I have been unable to figure out the schema for the Steam Inventory, ie. games, beta invites, etc. So I am not for sure that it is possible yet.
We could add a option in the settings file, that allows the user to place in the ID of the game they wish to use. 440 for TF2, 570 for Dota 2. All it would require is adding of the parameter, then building the new API calls to use the variable instead of a hard coded address.
from steambot.
What I'm thinking is to define a setting in the file that is an array of IDs to use for games. For example:
{
"SchemaGames": [440, 570],
}
Obviously, "SchemaGames"
wouldn't exactly be the key for it, but at least we would be able to support multiple games. And it wouldn't be hard to check up on trading, since we could open a trade in a regular browser and check requests using any tools.
from steambot.
There are a few other places where the GameID comes in to play. Such as in Trade.cs when adding/removing items. The appid has to be set to the correct id to make sure that it doesn't crash and give the error above.
I have been able to get the bot working with Dota 2 items, however, same as when it's set in TF2 mode, it can only trade Dota 2 items.
I am not sure we can get around fetching both schemas. And I'm not for sure how we would deal with defindexes being the same for the 2 different items.
from steambot.
The problem with supporting both TF2 and Dota is the time it would take to request both schemas.
@redjazz96 If we could cache the schemas (#103) this would be less of a hindrance.
from steambot.
@cwhelchel yeah, that might work
from steambot.
I'm just curious where does one find the data that steam provides with the trade? Does it not include the information on what item belongs to which game? Because as i see it right now even if you cache both schemas you will only be able to use one or the other because they have overlapping defindexes? Also can the bot be fooled into trading the wrong item at the moment? i.e dota2 and tf2 items with same defindex?
from steambot.
@StormReaper For every event that you get from tradestatus
, there is an appid
sent with it.
from steambot.
@StormReaper the problem isn't that there are overlapping defindexes, the problem is that there are no defindexes at all.
from steambot.
So i've been digging around to see if there might be a way around this, there are allready methods in place for fetching the tf2 inventory community feed which return some data, the defindex is not present but a different one is there which can be used as a unique id for a schema.
There are also other community feeds for other games and gifts, the biggest problem though is that there is no schemas for all this data.
The bot would need some sort of an external schema to be built for handling these items, tf2 and other valve games could have the schemas matched by some variables such as name, or picture not ideal but I believe it could work. Steam must have its own shema for the steam inventory but its unclear if or when they would release this info. Sorry if this sounds slightly confusing i'll try to clarify as best I can later and hopefully code this in soon.
from steambot.
A small update on my last comment, I've made some new and interesting discoveries most importantly of which is that we should be able to get the bot working with private backpack/inventories. There are two methods (foreigninventory) and (inventory) on the community website that can be used while inside a trade to fetch the inventory of the other user and the bot. I've found these methods while observing a steam trade with fiddler and one is executed when the trade is loaded to fetch the users backpack, and the other is executed once the other user adds an item.
Both of these methods return a list of data about each inventory item including a classid which is unique and is used to identify items in a schema. For valve games the classid can be further used in ISteamEconomy/GetAssetPrices and ISteamEconomy/GetAssetPrices SteamWebAPI calls to get more data, the GetAssetPrices also includes defindex to classid mapping so we can use that to map with the currently used GetSchema methods and other schemas for dota2 and portal2? haven't checked yet but most likely.
For non valve games such Spiral Knights, SMNC and Crimecraft gangwars there are currently no schemas that can be fetched. But each inventory item still comes with enough data to identify the items.
I've already mapped a few classes and webapi calls, but could use some help especially interested in the web methods used for the trade and the way cookies are currently handled.
from steambot.
Any Updates with this?
from steambot.
I kinda stopped working on it, although what i said is possible, the asset prices only contain the defindex definitions for items that can be sold through the store, so quite a number of items are missing i.e crates, promos etc. Also it's quite a lot harder to find certain information like item attributes, because they are stored differently for easy use in the steam trade window.
It would require significant work to be done to fetch all the item attributes if you want them. Although probably the best single example of this working in action is the the tf2 warehouse bot. As it doesn't rely on the tf2 web api to fetch the backpacks. I'm currently busy with other work so i'm not going to be doing any other work with this for now, but perhaps in the future.
from steambot.
Is there atleast a way to the the other User's Steam Gifts Inventory?
There is a sorta-of public API:
http://steamcommunity.com/id/%profilename%/inventory/json/753/
from steambot.
Yes, its pretty similar to the one you posted have a look at GetForeignInventory method on this https://github.com/StormReaper/SteamBot/blob/steam/SteamTrade/TradeSession.cs
from steambot.
Is this still an issue?
from steambot.
Looks like an interesting discussion. If we could get SteamBot to work with multiple games that would be pretty great.
from steambot.
+1 for multiple game support, or the support of steam inventory items, such as trading cards.
from steambot.
Would like to see an update on this too.
from steambot.
Where is the exception thrown? Bot.cs
?
It looks like whatever exception it causes is caught and thrown away because during debug I added a non-TF2 item and the window closed without ever entering my OnAddItem()
routine.
from steambot.
Would love to see support for steam inventory, my main reason of interest for this project
from steambot.
If someone is actually wanting to look into this you may be able to glean some useful information from steamodd's sim module.
from steambot.
In OnTradeAddItem(), when adding a Dota 2 item, schemaItem is NULL and inventoryItem contains no useful information – does this mean that SteamBot does not support Dota 2 trading?
from steambot.
No, Steambot supports Dota 2 trading. However, there are some changes that
need to be made to some of the code to make it work. I would suggest
reading through some of the past posts. Your answer is in there.
On Mon, Apr 7, 2014 at 7:24 AM, glen-84 [email protected] wrote:
In OnTradeAddItem(), when adding a Dota 2 item, schemaItem is NULL and
inventoryItem contains no useful information - does this mean that SteamBot
does not support Dota 2 trading?Reply to this email directly or view it on GitHubhttps://github.com//issues/105#issuecomment-39719093
.
from steambot.
"No, Steambot supports Dota 2 trading. However, there are some changes that need to be made to some of the code to make it work. I would suggest reading through some of the past posts. Your answer is in there."
I just trade with one user who use steam bot for dota2.. he trade rares, keys..
from steambot.
What are you talking about? I didn't say it couldn't be done. I said it can
be done, but you have to read the past posts on how to get Steambot setup
correctly to do it.
On Sun, Jun 29, 2014 at 3:48 AM, zuiahve [email protected] wrote:
"No, Steambot supports Dota 2 trading. However, there are some changes
that need to be made to some of the code to make it work. I would suggest
reading through some of the past posts. Your answer is in there."I just trade with one user who use steam bot for dota2.. he trade rares,
keys..—
Reply to this email directly or view it on GitHub
#105 (comment).
from steambot.
Related Issues (20)
- SteamKit2 what is the name of callback to get new trade offer? HOT 1
- Confirmation of the trade offer returns null HOT 4
- RateLimitExceed HOT 3
- Can't compile getting SteamAuth reference error. HOT 8
- closed
- Login with existing account on desktop auth HOT 1
- ERROR: Login Error: AccountLogonDeniedNeedTwoFactorCode HOT 3
- Does Tradepartner has Steam Guard enabled? HOT 1
- Bot gets stuck sometimes until you press ENTER HOT 2
- Tradeoffer marketable items check
- [Virus Detect on Starting Bot] HackTool:MSIL/Stimilani.A HOT 4
- Compile error: The type or namespace name 'SteamAuth' could not be found HOT 2
- What versions of vs? HOT 3
- SteamWeb Authenticate not working
- SteamTrade.dll is marked as a virus HOT 1
- error syntax HOT 1
- Botting against a player
- Unable to compile code HOT 2
- Cannot find the referenced component "MonoDevelop.CSharpBinding". Unable to find the referenced component "SteamAuth". How to fix it?
- Authentication failed, retrying in 2s... How can it be fixed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steambot.