Version 1.6.0. SteamGameCoordinator sent no response.
Using SteamGameCoordinator to send EGCItemMg.k_EMsgGCUnlockCrate, the sending code is as follows, but no MessageCallback was received after sending.
public void sendUnlockCrate(long crateId, long keyId) {
ClientGCMsg<ClientToGCUnlockCrateRequest> unlockCrate = new ClientGCMsg<>(ClientToGCUnlockCrateRequest.class);
Field bodyField = ReflectUtil.getField(ClientGCMsg.class, "body");
bodyField.setAccessible(true);
ClientToGCUnlockCrateRequest body = null;
body = (ClientToGCUnlockCrateRequest) bodyField.get(unlockCrate);
body.setCrateId(crateId).setKeyId(keyId);
steamGameCoordinator.send(unlockCrate, 730);
}
@Accessors(chain = true)
public class ClientToGCUnlockCrateRequest implements IGCSerializableMessage {
@Setter
private long crateId;
@Setter
private long keyId;
public void serialize(OutputStream outputStream) throws IOException {
BinaryWriter writer = new BinaryWriter(outputStream);
writer.writeLong(keyId);
writer.writeLong(crateId);
}
public void deserialize(InputStream inputStream) throws IOException {
}
public int getEMsg() {
return EGCItemMg.k_EMsgGCUnlockCrate;
}
}
Sometimes with game messages, you need to set yourself to be playing the game you're trying to unlock.
Sometimes with game messages, you need to set yourself to be playing the game you're trying to unlock.
It has been done. Received callback 4004..The target game is 730. It was feasible before August 15th, but it is completely ineffective now. Has the content of the agreement changed?
Oh, you might be right. Check this blame out, its been appended with DEPRECATED
https://github.com/SteamDatabase/Protobufs/blame/414e81bfc99694f7af5bfe7697a8936c09fc26ba/csgo/econ_gcmessages.proto#L11
Actually a lot of gcmessages for cs seems to be like that. I'm not sure what the alternative is right now.
哦,你可能是对的。看看这个指责,它被附加了
DEPRECATEDhttps://github.com/SteamDatabase/Protobufs/blame/414e81bfc99694f7af5bfe7697a8936c09fc26ba/csgo/econ_gcmessages.proto#L11
实际上,很多 cs 的 gcmessage 看起来都是这样的。我不确定现在还有什么替代方案。
I noticed that there is a k_EMsgGCOpenCrate = 2534, and correspondingly, there should be a message as follows (also updated on August 15th): CMsgOpenCrate { optional uint64 tool_item_id = 1; optional uint64 subject_item_id = 2; optional bool for_rental = 3; optional uint32 points_remaining = 4; } Is this a substitution? But I don't know what value to assign to points_remaining. It would be helpful if you have any ideas.
I'm not sure about any substitutions. Though sometimes I check node-steam/node-globaloffensive forums from Dr. McKay or SteamKit's issues or discussions to keep up to date with potential problems.
We'd need to find a way to capture packets to find a proper response. Nethook and Nethook Analyzer from SteamKit may help, but I don't know if it will work with source2 games.
You can find both files assembled through their Github Actions. Build 1256 has those files and give it a try. (Read NetHooks readme)
I'm not sure about any substitutions. Though sometimes I check node-steam/node-globaloffensive forums from Dr. McKay or SteamKit's issues or discussions to keep up to date with potential problems.
We'd need to find a way to capture packets to find a proper response. Nethook and Nethook Analyzer from SteamKit may help, but I don't know if it will work with source2 games.
You can find both files assembled through their Github Actions. Build 1256 has those files and give it a try. (Read NetHooks readme)
This is very helpful! I successfully captured the corresponding instructions using NetHook2 and parsed them! As shown in the figure. However, this still puzzles me. I have modified ClientGCMsg to a new EMsg (2534) and new parameters in the project, and executed it through SteamGameCoordinator.send. However, I did not receive the callback as expected. (As shown in the image, the expected callback is on the left). I use CallbackManager.subscribe(MessageCallback.class, this::onGCMessage) for message processing. It works fine when sending CMsgClientHello and CMsgClientWelcome, and I can receive MessageCallback. However, the log shows that I cannot receive any MessageCallback using EMsg (2534). This is very confusing to me. Please help me.
Are you building the cs project manually?
If so, try building with the new protos from this PR https://github.com/Longi94/JavaSteam/pull/347
Are you building the project manually?
csIf so, try building with the new protos from this PR #347 Okay, thank you very much! I noticed that the instruction I have been sending has always used ClientGCMsg, and its isProto() method returns false. If I want to send the correct one message CMsgOpenCrate { optional uint64 tool_item_id = 1; optional uint64 subject_item_id = 2; optional bool for_rental = 3; optional uint32 points_remaining = 4; } Should we use ClientGCMsgProtobuf instead?
Should we use ClientGCMsgProtobuf instead?
Wouldnt hurt to try. Most requests/responses use that
I dont play CS, so I dont have any crates to help troubleshoot 😄
Should we use ClientGCMsgProtobuf instead?
Wouldnt hurt to try. Most requests/responses use that
I dont play CS, so I dont have any crates to help troubleshoot 😄
The problem has been solved! Thank you so much for your help! To fix it, we need to replace it with the Protobuf protocol and modify EMsg.
msgType= 1008 EGCItemMsg.k_EMsgGCUnlockCrateResponse ClientGCMsg?
Should we use ClientGCMsgProtobuf instead?
Wouldnt hurt to try. Most requests/responses use that I dont play CS, so I dont have any crates to help troubleshoot 😄
The problem has been solved! Thank you so much for your help! To fix it, we need to replace it with the Protobuf protocol and modify EMsg
Very helpful!
Just FYI: CS (javasteam-cs) protos are available as a maven lib starting 1.7.1-SNAPSHOT (PR #351). The wiki has the url for snapshots if anyone would like to try.