• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OpenTibia Sublime Text 3 - Lua TFS Autocomplete

Evil Puncker

prolonged absenteeism
TFS Developer
Joined
May 30, 2009
Messages
7,241
Solutions
140
Reaction score
2,865
while you guys are at it, please add an item name <-> item id converter with a click or two
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Solutions
46
Reaction score
423
Location
Oregon
while you guys are at it, please add an item name <-> item id converter with a click or two

Because of the existence of ranges, that would actually require parsing the items xml (whose xml? where is this xml? which one?) and caching that data in memory or tmp. A nuisance... but certainly is scope I suppose. I suppose we could make tooling so newer engines could generate a suitable consumable export so servers with lots of customs, and customs scaffolded through Lua, would not be left out, and provide prepackaged blobs for common legacy releases...
 
OP
Syntax

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,886
Reaction score
294
Location
Texas
Ahaha, no. The concept is ok, but the execution dances like a drunk rhino. After recursively debugging issues with their build scripts to determine an ideal way to package an actual build myself (vs using their binaries) and winding up with a 900MB AppImage package (it grabbed the entire chroot), even though it had already made both a deb and an rpm, I pondered wtf I was doing, gave up, and fabricated a much simpler route myself.


Not familiar. I also searched. Citation would be lovely? As far as I know Eclipse has never had any sort of enterprise pricing scheme.



I guess that's my point here. Theia isn't an IDE. It's a toolkit to fabricate them. That makes it seem like the right tool for the job.

I guess I confused Jetbrains with Eclipse, I'm not a Java developer. Either way VSCode is my main editor and the telemetry is easy to turn off.
TypeScript is my main language and Microsoft is a good backer for both my IDE and Language, it's nice to have those coupled.
I don't know Eclipse or Theia but I wish them well, I'm glad they opted for VSCode compatibility, but I see no immediate need to use them.

Either way a VSCode extension can do everything we need for both editors, no fork is needed to required to change colors, add language features, etc.
Post automatically merged:

while you guys are at it, please add an item name <-> item id converter with a click or two

That's a pretty good idea. I have a decently accurate items.xml to achieve this. I can make it similar to the CSS colors where it adds the item image to the left and the item name on hover if it detects an item id.
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,145
Solutions
25
Reaction score
1,416
Location
PLand
For people who cannot run code from Git. It does not work! I fixed 2 problems in code. Runnable version with instruction for Node newbies in README in attachment. Tested on Node version '10'.
 

Attachments

OP
Syntax

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,886
Reaction score
294
Location
Texas
For people who cannot run code from Git. It does not work! I fixed 2 problems in code. Runnable version with instruction for Node newbies in README in attachment. Tested on Node version '10'.

Thanks, the code is quite old. I updated the gist with your changes.
 

Falacchi

New Member
Joined
May 3, 2011
Messages
74
Solutions
3
Reaction score
3
@Syntax
U can make to Snippet from VSCode?
See on gen.js vscode returning json file but return json empty
 

Evil Puncker

prolonged absenteeism
TFS Developer
Joined
May 30, 2009
Messages
7,241
Solutions
140
Reaction score
2,865
wish I had it for notepad++ (tried multiple times to switch to another code editor but was no success)
 

Shadowox

Member
Joined
Nov 9, 2018
Messages
29
Solutions
1
Reaction score
17
GitHub
DiegoRibeiro
wish I had it for notepad++ (tried multiple times to switch to another code editor but was no success)
I dont know if you were kidding or not. But i made an auto complete for notepad++ for the tfs 1.2.

Here is the xml for notepad++, you can download it from my gist:

And here is the code that generates the xml based on two json files that i copy from @Syntax functions.txt:

I could have add some descriptions for each functions and the proper return values but i am not familiar with TFS 1.2.

Here is a video showing the autocomplete in action:

And don't mind my editing skills lol.

ps: I could have incorporated this file with the lua.xml from the notepad++ to have both auto completes, from the tfs and the lua. But this is a bit more dificulty to do. Maybe ill make a new version if i have time and you need this. Meanwhile you can switch languages, its annoying but you will have the benefit of both files.

Regards
 
Last edited:
Top