YDM - Ygo Dueling Mod II

YDM - Ygo Dueling Mod II

30.5k Downloads

Possibilities for interating with YGOPro server?

purerosefallen opened this issue ยท 4 comments

commented

I'm not sure cards could be handled by reading lua scripts, but if a ygopro client could be implemented in this mod, it could also be a choice to launch ygopro server instances for hosting the duel.
https://github.com/mycard/ygopro/tree/server
The above one is the server of ygopro. It launches by command args and hosts 1 room listening on a specific port optioned with args.
A possible design could be, to launch an instance of ygopro server when any duel starts, and send duel data with ygopro protocol to the server, and refresh the field with the returned info.
You may also refer to the client code of ygopro on the master branch for the protocol and client implementation of ygopro.
I hope automatic dueling mod would come out soon.

commented

Whats the point of connecting to a ygppro server? Why not just create the interface for the LUA files in the mod directly?

commented

@CAS-ual-TY Then you don't have to care about parsing Lua scripts and remake a whole yu-gi-oh server. You just need to do the client part, and intracting with YGOPro server. It would be less work.
YGOPro only works with Lua scripts on the server side only. The client almost does nothing but handles data from server and makes responses.

commented

It doesn't make sense to code hundreds LUA functions again, for there is already a implement.
And it may be a cool idea to duel with someone out of Minecraft - or with someone in ANOTHER MINECRAFT WORLD.
These are also benefits if we use a existing server.
Focus on the UI only and there is muuuuuuuch less work to do.

commented

I would not code any LUA scripts, I would make an interface which reads them. But the above solution seems easier. Thanks for letting me know about this. I will stay with the manual implementation for now, but might look further into this in the future.