Forum

> > CS2D > General > Calling CS2D's statically Lua function. Legal?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Calling CS2D's statically Lua function. Legal?

3 replies
To the start Previous 1 Next To the start

old Calling CS2D's statically Lua function. Legal?

MikuAuahDark
User Off Offline

Quote
Hello, I have a question about legality of my action.

I have a server where I want to write a CS2D <-> Discord by using LuaSocket. Unfortunately CS2D has Lua 5.1.4 statically linked which renders external modules impossible, if not, can lead to crashes and other problems.

For anyone that just says "just link with Lua5.1" >


My solution is instead of linking to new Lua 5.1.4, I created a Lua 5.1.4 wrapper which calls CS2D's private Lua 5.1.4 functions by locating the private Lua address inside CS2D. This can provide compatible Lua modules because we only use single Lua 5.1.4 implementation (the one provided by CS2D). So instead of linking to normal Lua 5.1.4 library/DLL/.so, link with my CS2D Lua wrapper instead. Please note that this only benefits server scripters, not clients. This is not a form of cheats/hacks that can give a client unfair advantage.

Now, before I fully completed the Lua wrapper, I have few questions.

1. Is it legal to create something like this? Especially since CS2D has strict "no hacks/cheats" policy.
2. If this is legal, then am I allowed to distribute my CS2D Lua wrapper as open-source project?
3. If this is illegal, then why something like file cs2d Null-packet Protection can be approved? From what I see, that file tampers CS2D dedicated (in-memory) in some way by doing function redirection using assembly.

Note that I fully aware that any updates to CS2D (dedicated) breaks the address lists of the Lua functions.

Regards,
AuahDark.

old Re: Calling CS2D's statically Lua function. Legal?

DC
Admin Off Offline

Quote
What user Gaios said. I'm really concerned about modifications on the client executable which affect the client side of the game. These are unwanted and forbidden because these are done to get unfair advantages in most cases.

I don't really care when you mess with the server in a way that improves it / adds useful things.

So you have my permission to do what you talked about.

note: it's good that you asked because it's forbidden in general to modify the exectuable(s)/binary files of CS2D in any way. That's stated in the readme file.

old Re: Calling CS2D's statically Lua function. Legal?

MikuAuahDark
User Off Offline

Quote
Thanks for the permission. I'm aware that tampering CS2D binaries is not allowed in any way. However what I'm trying to do doesn't tamper CS2D binaries in any way. I only try to workaround the "statically linked Lua" problem in CS2D so I can use external modules without strange crashes/memory errors/whatever I said in the "more" tag.

By "external modules" I mean Lua modules that are written in C.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview