Forum

> > CS2D > Scripts > CS2D Lua VSCode Extension
Forums overviewCS2D overview Scripts overviewLog in to reply

English CS2D Lua VSCode Extension

14 replies
To the start Previous 1 Next To the start

old CS2D Lua VSCode Extension

Mami Tomoe
User Off Offline

Quote
Hello!

If you ever scripted for CS2D, you'd know how tedious it is to have to open the docs repeatedly every time you need a reference on a function.
You probably know all the very many "undefined" errors for functions if you had used an editor like VSCode, that'd require you to add exceptions for the CS2D functions.
That's annoying!

So one day I decided to create an offline documentation for every function (and more), but I kept it to myself, because it wasn't that elegant.

Lately, I decided to revise the offline documentations, and thought, why won't I just share it?
Well, it took me many, many days, and I'm nowhere near done. Actually I'm about half way, if we're being optimistic.

But here it is:


I plan to continue and improve a lot about the docs, this is just the beginning.

Of course, at the core of it, the documentation is just a file, but having to manually load a file every time seems a bit annoying, and the whole point is to make things less annoying, and so, the extension!

Of course I never created an extension before, and it shows.
But I wanted to know what you guys think, so I decided to release the extension anyways.

This is the link to the extension: https://marketplace.visualstudio.com/items?itemName=MamiTomoe.cs2d-lua
You can of course search for it inside the built-in VSCode extension market as well.

I didn't bother to make anything too fancy, there's no special read me or anything at the moment, I plan to update those things, but I came here asking for your help!

I need your help with whatever it is you think you can do to help this project, this is a project made for the sake of everyone, not just myself or you.

If you think you can make a cool icon for the extension, or want to document a function I didn't document yet, or anything for that matter like helping me fix consistency issues, whatever it may be, let me know in the comments!

I will continue working on this extension in my own time, but any help is appreciated.
If you need specific instructions on how to help me, you can message me on Discord, you can find me tomoe_mami in the Unreal Software Discord server, hit me up and I'll tell you what I need.

@admins, I'm not sure where I was supposed to publish this, as a file or as a thread, I think this works.

old Re: CS2D Lua VSCode Extension

Mora
User Playing CS2D

Quote
Would be also good having link for every function and hook tip like:
Official cs2d website - cs2d lua hook hostagerescue
Is good job you're doing and I might use it but I'm never lazy to go cs2d.com. Also these tips you give might help more than official site simply because smth is not documented there such as hook priority

This way ^ it gonna be much faster to link for the thing you need from the official site

old Re: CS2D Lua VSCode Extension

Mami Tomoe
User Off Offline

Quote
@user Mora: Every function already has a link to the online version.

Plus it's more than being accessible, it helps you manage clean and clear code.
Intellisense is a blessing!

old Re: CS2D Lua VSCode Extension

Masea
Super User Off Offline

Quote
Very nice! I thought the same thing earlier and it is good to see someone making it real.

By the way, you can still make this a Misc. file and keep this thread for discussion if you care.

old Re: CS2D Lua VSCode Extension

DC
Admin Off Offline

Quote
Very cool and helpful! Thanks for the effort!

It makes sense to use a thread because the extension can be downloaded directly via visual studio code. If you would want to upload it to the file archive you would have to create an empty zip or a zip which only contains a readme which is a bit dumb. Would be ok to me though in this particular case. So if you want to see it in the file archive: Feel free.

old Re: CS2D Lua VSCode Extension

Mami Tomoe
User Off Offline

Quote
user Gaios has written
Here's implementation of types for scripting in TypeScript.
> https://pastebin.com/3NQs1sdA


Looks useful! I will download that for later stages when I plan to add types.

user Masea has written
Very nice! I thought the same thing earlier and it is good to see someone making it real.

By the way, you can still make this a Misc. file and keep this thread for discussion if you care.


I think I will upload it as a file, as per @user DC's suggestion.

user DC has written
Very cool and helpful! Thanks for the effort!

It makes sense to use a thread because the extension can be downloaded directly via visual studio code. If you would want to upload it to the file archive you would have to create an empty zip or a zip which only contains a readme which is a bit dumb. Would be ok to me though in this particular case. So if you want to see it in the file archive: Feel free.


I will upload the actual extension zip to the archive, so it can be download from here as well!
But I don't plan to do that any time soon, as I have to finish the basic stuff first.

@everyone
I still accept help in documenting functions!
Any help is welcome.

old Re: CS2D Lua VSCode Extension

TrialAndError
User Off Offline

Quote
Great job!

I made something similiar a while back where i used alias at the top of the file to make autocomplete a bit easier when typing it later. Maybe a pain to write and looks a bit ugly when you hover over, but it made it easier for me later on! Maybe something to think about or just ignore, up to you!

A couple of examples >
edited 1×, last 24.12.24 12:56:55 pm

old Re: CS2D Lua VSCode Extension

TrialAndError
User Off Offline

Quote
Pastebin: https://pastebin.com/ShqmHLkQ

This is what I had on my disk, should still have working syntax. Not as documented as yours, but you're free to take whatever.

I made it around the time I made for the Typescript one, so it was basically copy-pasted. May have errors or missing stuff after around 2020-2021

Putting it here too if the link ever goes bad or whatever
Spoiler >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview