[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
NoX Forum • View topic - Nox Script 3.0 and NoxTools on GitHub
Page 1 of 4

Nox Script 3.0 and NoxTools on GitHub

PostPosted: Mon Aug 22, 2016 2:33 pm
by zoaedk
Hi all,

I am pleased to announce that we (cai and zoaedk) have finally finished the first release of Nox Script 3.0. This is a complete rewrite of the language for writing Nox scripts. Included in this release is a modified Map Editor, Nox Script compiler, Visual Studio Code language support, and a language and built-ins reference.

Before I talk too much about the changes we made, I would also like to mention that we created a NoxTools organization on GitHub. The goal is to have a central repository for the many scripts and tools for Nox. If you want to become a member the organization or add a project, let me know.

What is Nox Script 3.0? It is a C-like scripting language that is compiled into a script object file that can be loaded into a map. The included Map Editor has two new options under the File menu: "Import Script" and "Export Script". These are used to load and save the script that is embedded in a map, and are only compatible with Nox Script 3.0.

The complete language details are in the documentation. Two features that were missing from previous Nox scripting was function arguments and function return values. Arrays and variables now work reliably. Also, the built-ins have been reviewed and all of the Unknown functions have been discovered, except for one.

Visual Studio Code. We implemented language support in Visual Studio Code, so you now have a mostly functioning IDE for writing scripts. It also integrates the compiler for a seamless experience. Installation instructions are available on GitHub.

Image

Example. A simple translation of the script from Kingdoms.map is available here. There are also example snippets in the Nox Script documentation.

Map Editor. The included Map Editor is based on the last public release. The principal changes are fixing the ScriptObject parser to handle functions with arguments and return values, and adding support to load in an external script object. The source code and binaries are on the NoxTools GitHub.

Compiler. The Nox Script 3.0 Compiler is written in Python using pyparsing. It uses the included builtins.h header file to get type information for the built-ins. Future work on the compiler: adding optimization passes, and the ability to decompile scripts from official maps.

tldr; Download and install Visual Studio Code. Go to GitHub and download the Map Editor and the VS Code extension. Open the vsix file in VS Code to install it. Now write a script file (.ns extension), compile by pressing F5, and then import the script into a map using the Map Editor.




안녕하세요

zoaedk (https://github.com/awesie) 룸메이트인 cai (https://github.com/brianairb) 입니다.
얼마전 카톡 그룹에 힌트를 드리긴 했습니다만, 며칠동안 같이 작업하여 만든 녹스 스크립팅 언어인 Nox Script 3.0을 공개합니다.
이전 스크립트 언어들과는 별개로 아예 처음부터 새로 설계되고 구현된 언어입니다. 이번 릴리즈는 다음 프로젝트들을 포함하고 있습니다:
- 새로운 스크립트 오브젝트를 import 할 수 있게 업데이트 된 맵 에디터 (https://github.com/NoxTools/MapEditor/releases/latest)
- Nox Script 컴파일러 (스크립트 --> 오브젝트) (https://github.com/NoxTools/noxscript)
- Visual Studio Code IDE 스크립트 언어 서포트 (https://github.com/NoxTools/vscode-noxscript)
- Nox Script 3.0 언어 설명 및 built-in 함수 API 레퍼런스 (https://noxtools.github.io/noxscript/)

저희가 만든 것들에 대한 설명에 앞서, GitHub에 NoxTools 그룹을(https://github.com/noxtools) 만들어서 오픈 소스 코드 관리를 하고 있다고 알려드립니다.
주 목적은 녹스 스크립트들과 툴 등을 한곳에서 쉽게 관리하고 액세스할 수 있게 하기 위함입니다.
그룹에 참여하시거나 기여하고 싶으신 분들은 언제든지 말씀하시면 됩니다.

Nox Script 3.0 이 뭔가요?
=> C 언어와 비슷하게 설계된 언어로써, 녹스 맵 파일에 첨부할 수 있는 스크립트 오브젝트 파일로 컴파일 됩니다.
=> 포함된 맵 에디터 (v1.0b)의 File 메뉴 아래에 두 개의 메뉴가 추가되었습니다: Import Script / Export Script.
이 기능은 맵에 스크립트 오브젝트 파일을 추가하거나 첨부되어있는 스크립트를 추출할 수 있고, Nox Script 3.0만 호환됩니다.
=> 언어에 대한 자세한 설명은 레퍼런스 (https://noxtools.github.io/noxscript/)를 참조하세요.
=> 이전 녹스 스크립팅에서는 지원하지 않았던 함수 인자 및 리턴 값 지원이 추가되었습니다.
=> Array와 변수를 문제 없이 사용할 수 있습니다.
=> Built-in 함수들을 모두 다시 리뷰하였고, 한 개의 함수를 제외한 모든 함수들이 명시되었습니다.

Visual Studio Code
=> Visual Studio Code는 MS에서 만든 코드 에디터입니다. 보통 잘 알려진 언어 (C, Java 등) 코딩이 가능하지만, 확장기능을 이용하여 새로운 언어 지원이 가능합니다.
=> 이번 릴리즈에 포함된 Nox Script 언어 지원을 통해, syntax highlight, auto-complete, signature help 등의 기능이 추가되어 거의 완전한 IDE 사용이 가능해졌습니다.
=> 또한, 컴파일러 추가를 통해 간단히 IDE에서 바로 오브젝트 파일을 컴파일 할 수 있습니다.
=> 설치 및 사용 설명은 GitHub 프로젝트를 참조하세요 (https://github.com/NoxTools/vscode-noxscript)

(미리보기)
http://i.giphy.com/3o7TKnScB4qPMfx4lO.gif

예제 및 샘플
=> Kingdoms.map 맵의 스크립트를 Nox Script 3.0 언어로 구현한 버전을 제공합니다. (https://gist.github.com/awesie/c358e6f6 ... 40493879b7)
=> Nox Script 언어 레퍼런스에 다른 코드 예제 및 샘플이 있으니 확인해보세요.

맵 에디터
=> 이번 릴리즈에 포함된 맵 에디터는 최신 릴리즈에 기반하였습니다. (viewtopic.php?f=54&t=1428)
=> 가장 큰 차이점은 ScriptObject parser 코드를 수정하여 함수가 인자를 받거나 값을 리턴할 수 있게 되었습니다.
=> 소스코드와 바이너리들은 NoxTools GitHub에서 확인하실 수 있습니다. (https://github.com/NoxTools/MapEditor)

컴파일러
=> Nox Script 3.0 컴파일러는 pyparsing 라이브러리를 이용하여 Python으로 작성되었습니다.
=> 포함된 builtins.h 헤더파일을 사용하여 built-in 함수들의 함수 정보를 수집 및 사용합니다.
=> 앞으로 개선 및 추가 될 부분들: 코드 최적화, 기본 맵들의 스크립트 추출 (디컴파일)

뭐라는건지 모르겠어요. 빨리 스크립팅하고 싶어요. 현기증 난단 말이에요!
=> Visual Studio Code를 다운로드 받으세요. (https://code.visualstudio.com/download)
=> 최신 맵 에디터를 받으세요. (https://github.com/NoxTools/MapEditor/releases/latest)
=> VS Code 익스텐션을 받으세요. (https://github.com/NoxTools/vscode-noxs ... ses/latest)
=> 다운로드 받은 vsix 파일을 VS Code로 열어서 설치하세요.
=> 스크립팅을 시작하세요! (.ns 파일 확장자로 저장하세요.)
=> F5 버튼을 눌러 컴파일하세요.
=> 맵 에디터를 사용하여 방금 컴파일한 따끈따끈한 오브젝트 파일 (.obj)을 로드하세요.

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Mon Aug 22, 2016 3:32 pm
by panic
WOW~~~~~~~~~~~~!!

IT IS VERY GOOD!!!!

THANK YOU VERY MUCH ...!!

VERY VERY THANK YOU...! I AM HAPPY NOW ...!!

hey where i check nox functions.. (ex: create, object, wallOpen <- nox functions...)

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Mon Aug 22, 2016 4:27 pm
by panic
hey ,,,

there code can receive to int .

---code---
MoveWaypoint, Create, GetWaypointX, GetWaypointY

current syntax
MoveWaypoint(only object(waypoint)... , float, float);
CreateObject(string, only obect(waypoint) );
GetWaypointX(only object(waypoint) );

however...!
first parameter can be int from 'moveWaypoint' code ....

MoveWaypoint(object(waypoint) or int, float, float);
can receive both object(waypoint) and int (waypoint_number).

also....

CreateObject(string, object(waypoint) or int);

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Mon Aug 22, 2016 10:23 pm
by zoaedk

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Mon Aug 22, 2016 11:56 pm
by Host_6
Why am I getting "Invalid Nox Script header" error everytime I try to export a script?

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Tue Aug 23, 2016 12:13 am
by zoaedk
The Nox Script 3.0 compiler does not currently support decompilation. You can only export a script from a map that had a Nox Script 3.0 script imported.

(The compiler embeds the original source code in the script so that we can keep around comments and stuff.)

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Tue Aug 23, 2016 9:37 am
by panic
HOW TO MAKE THE DATA TYPE CONVERT FUNCTION ?

INT -> FLOAT or FLOAT -> INT..

example)
int a = 30;
float b = IntToFloat(a);
PrintToAll("input(int): " + IntToString(a));
PrintToAll("output: " + FloatToString(b));

result)
input: 30
output: 30.0000000

download ( int -> float convert program)
link:
http://cfile231.uf.daum.net/attach/2511 ... 030928F08A

float / int
1 / 1065353216
2 / 1073741824
3 / 1077936128
4 / 1082130432
5 / 1084227584
....
100 / 1120403456
101 / 1120534528
....

i find float - int calculation way. so i write below code. (picture)
below code can calculate to that int + float .

because... float '1' = int '1065353216' ... well... float 2 = int 1073741824...

how to make int-float function without sum int to float .?

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Tue Aug 23, 2016 10:02 am
by zoaedk

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Tue Aug 23, 2016 10:07 am
by panic
sorry ... because you are busy...

however... i need floatToInt function too...

you have it?

Re: Nox Script 3.0 and NoxTools on GitHub

PostPosted: Tue Aug 23, 2016 10:28 am
by zoaedk