Ravenscript IDEA

If you liked this item, please rate it up on Steam Workshop page.

Author: Nevin

Last revision: 14 Feb at 09:49 UTC

File size: 116.4 KB

On Steam Workshop

Description:

The NEXT snippet addons for ravenscript coding.

ONLY FOR MODDERS
WE HAVE ALREADY SENT A REQUEST TO RAVEN, SO DON’T DELETE THIS ITEM PLZ

Description

RSIDEA is a sub addon to help modders develop ravenscript. through dependent extension,the addon can bring the full of snippet auto fill ,type checking and RS Official Docs.Let modders cut the longer time of developing script and make less syntax errors.

FOR MORE INFORMATION, PLZ CLICK: ravenfieldcommunity.github.io/docs/en/Project/rsidea.html

Features
✅ Complete and easy to use snippet & type checking (maybe ✅ A complete restoration of the official RS documentation(maybe ✅ User annotation aupport ✅ Project with dependent Framework during development support period ✅ Multi-IDE compatible 🅾 RavenM extra api will be added in the future ❌ Suck self pointers with register (behaviour registration, local variable injection and basic unavailability of synchronization) ❌ Non-existent const / var / static / array discrimination (I can’t help it if the dependent extension doesn’t support it)

Installation

This plugin supports Luals and Emmylua (only compatible) with the two dependent extensions, that is, support for VSCode, Neovim, JetBrains IDEA at least four IDEA (of course, if you will write the LSP can also be supported by their own more), here we recommend the use of Luals

Quick install(VSCode ONLY)

Install Lua extension(ID: sumneko.lua) in VS Code

When you’re done,open a folder or code-workspace, open any Lua file, right-click and select "Lua: Open Addon Manager" or Ctrl+P to open the command panel and enter “>lua.addon_manager.open”

Wait for the Addons manager to finish fetching plugins from Github (you may need to have git installed locally, you must have connect to Github, then find "Ravenscript IDEA" in the list of addons and enable it), then enjoy the snippet experience that we bring to you!

Local install

You should only choose this method if you are using another IDE or if you cannot use the Addons manager.

Download the project’s git source code to a local folder by any means, and then add the folder as an external repository in the IDE’s dependent extensions configuration.

For example, download the source code for this project(in github, you can easily find it), also when you
subscribe this item,you can find the zip file at local steam folder. Unzip to a local folder such as "D:/Program/RSIDEA",Then add the path to the folder you unzipped above to the VSCode settings of the "Lua.userThirdParty"

Usage

Due to the immaturity of the dependent extensions and my development experience, you will need to follow these steps in your early development of ravenscript

Associate file types

you have to associate the txt files with the Lua language in the IDE, so that you can use the Lua extension to develop RS.

Find out for yourself on the Internet

Register script

If you only need to use RSIDEA’s basic snippet fill and don’t care about the self pointer fill and the autofill for creating functions or if it’s too much of a hassle, you can ignore this step.

Before starting the development of each rs script, you need to create a separate file in the workspace (e.g. open folder, look it up yourself if you don’t understand the concept, or define the global use of the following file in the extension’s settings) as follows (here the example file name is "exampleWorker.lua", the filename is arbitrary):

—@meta —@class TO_DEF: Behaviours TO_DEF2 = { —@type float a=ANY, b=ANY } rawset(_G,"YOUR_BEHAVIOUR_NAME",TO_DEF2) –Duplication in this case means that multiple behaviors can be defined in the same file. —@class TO_DEF_X: Behaviours TO_DEF_X2 = { —@type float a=ANY, b=ANY }

"rawset(_G,"YOUR_BEHAVIOUR_NAME_X",TO_DEF_X2)"
where the" —@meta" tag needs to appear only once in the file to indicate that the file is globally enabled in the workspace

"—@class TO_DEF: Behaviours" refers to the derivation of a class "TO_DEF" from the class "Behaviour" (as with "TO_DEF2" below, which may be named something else but may not be duplicated, the variable "TO_DEF2" is used in place of the class "TO_DEF". This variable "TO_DEF2" is used to replace the class "TO_DEF".)

The following "TO_DEF2" is filled with the variable you want to use in the self pointer when writing the rs script (so it can be left blank, but not missing" TO_DEF2 = {}"), and "ANY" is a placeholder for the "–@type float" that means that the variable is of type float (optional).

Finally, in "rawset(_G, "YOUR_BEHAVIOUR_NAME",TO_DEF2)“, ”YOUR_BEHAVIOUR_NAME“ is filled in with the name of the behavior registered in “behaviour()” in your ravenscript, and “TO_DEF2” refers to the variable defined above.

Now you can put this file aside and start writing this ravenscript

Manually defined types

Sometimes extension can not automatically determine the type of a variable, you need to define it manually, the "—@type GameObject" in the example below is to declare that the type of this variable a is GameObject (only do IDE level auxiliary variable type determination, does not have any functionality in the actual operation):

—@type GameObject a = self.targets.canvas
Manually defining function parameter types and return values

When you add an event listener, the extension can not automatically identify the type of the return parameter, you need to define it manually, the "–@param value int" in the example below is to declare that the type of the parameter value is int (only to do the IDE level of auxiliary variables to determine the type of the actual operation does not have any function):

—@param value int function test: OnValueChanged(value) end

As follows, "–@return" bool declares that the return value of this function is bool (which is only a secondary variable type determination at the IDE level, and has no functionality in actual operation):

—@return bool function test: Calc() end

❤SPONSER

The work to develop this plugin is really big, and it’s hard for me to allocate too much time to maintain it, so if you want to help us out, you are welcome to give us a small donation at AFDIAN (don’t customize it too much, it’s not worth it). My Afdian:https://afdian.net/a/Nsrc233

Or even simpler, give us a LIKE and a subscribe at Steam Workshop so we can see your approval of this project and let more people know this addon!

Welcome to leave a comment,make the addon better!

COPYRIGHT

License: GPLv3

仅适用于modder

新一代RS开发snippet插件(又新又拉XD
篇幅有限+防李鬼,请访问图片里或最上面的的链接并自行切换网页语言

如果你想支持这个项目,欢迎在爱发电支持我们!或者更简单,在这里给我们一个赞和一个订阅,这样我们就能看到您对这个项目的认可,并让更多人了解这个插件!