Oni Central Forum

A Community-driven Forum discussing Bungie's Oni

You are not logged in.

#1 19/6/07 11:42

Tyr
Member

Oni Script Editor

Hey all big_smile, I've been busy again roll:P.
I'm a noob in scripts and codes (atm) and know (almost) nothing about the possibility of them, but to combine the learning of it with programming with (a demo version of) REALbasic (easy-to-use program to create software, more info here).
I created the program Oni Script Editor (OSE), based on a text editor program I made in the tutorial of REALbasic and it has currently almost no options, but after the school year's over (a few days), I'll focus more on it so I can finish more functions and options.

Oni Script Editor is a simple project. I had an idea to make a program that can create/edit scripts!
At the moment it is only in beta and there are still alot of bugs (saving/opening is not smooth yet and more)
and it's made in beta license, so even if you tried to edit, you'll have to plan the time tongue.

These were the first features that came to my mind when I made the first draft of this program,
I will not be able to create all functions as long as I don't know them. I will add all functions such as those of "Chr_..." and "ai2_..." and all I think, so those will atleast
be easily accessable.

You can download the beta versions:
OSE-v0.30 here: http://www.savefile.com/files/823194
OSE-v0.35 here: http://www.savefile.com/files/828860
OSE-v0.40 here: http://www.filefactory.com/file/5df855/
OSE-v0.45 here: http://www.xs4all.nl/~rijpkem5/Files/On … Editor.zip
Download 0.50 and newer releases from now on here: http://www.xs4all.nl/~rijpkem5/Downloads.html

Screenshot of v0.50 below smile
osescreenv050iv8.png

The buttons under the banner are quite working (find is working too I hope, Run is not yet doing anything)
The checkbox in the right-bottom corner is to coördinate run which Oni.exe it has to run, it was just for my convenience atm (the button Run has the function to load Oni, but isn't working yet).
It will probably be moved to the settings window when it arrives smile

Currently I'm working on adding colour schemes (# notes automatically turn blue), making macro-added functions appear on a new line, refining the saving/opening functions to work spotless and giving the Graphical Interface groupbox a restyle.

Post your opinion, ideas, bugs and if you want to help (by adding more functions for example) you can also say it here (REALbasic has a free (extendable?) trial version, so you could even get some project sources from me).

Tyr

Last edited by Tyr (1/7/07 7:36)

Offline

#2 19/6/07 12:42

Tantir
Member

Re: Oni Script Editor

Great idea!!! I can`t help you because:
1. I`m noob in scripting
2. I first heard abaut REALbasic
3. Read http://oni.bungie.org/community/forum/v … hp?id=130} this topic for more reason.

Offline

#3 19/6/07 12:55

Tyr
Member

Re: Oni Script Editor

Yeah, I know (about the topic) smile
But together we might be able to work something out? big_smile

Last edited by Tyr (19/6/07 12:55)

Offline

#4 19/6/07 13:25

geyser
Member

Re: Oni Script Editor

roll

1) This is double work. You probably know Tosh, well he apparently made an interactive BSL syntax checker (JavaScript, supposed to work online, didn't work with Opera).
Of course, his stuff is not exactly an editor, but it's very close to an editor. He faced a few problems supporting the different forms of syntax accepted by Oni, though.
I don't mean you're redundant, but it might be a good idea to remember that Tosh exists, and maybe talking with him could give you a hint or two about the issues.

2) The option to run Oni.exe after editing a script is ridiculous. Oni allows you to reload scripts while it's running, even without restarting a level under some conditions.
The script editor really doesn't need any features apart from syntax highlighting and maybe (maybe) highlighting of preset variable and function names (from header).
There's also the option to interface the editor with Oni's game content files (maybe via Oni itself), so that you can highlight valid AI/TV/animation names, etc, etc.
Such "smart headers" are a bit more complicated than a simple syntax highlighter. A basic highlighter can be written in no time for text editors such as PSPad...
An even better move would be to integrate such a tool into a freeware IDE. Then you'll get it all: syntax highlighting, autocompletion, function signature lookup... smile


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#5 19/6/07 13:37

Tyr
Member

Re: Oni Script Editor

Thanks, ah -never knew about Tosh's program (do know Tosh tho smile) and yeah, this was just a simple idea which we might be able to work out together (with help/ideas from some coders, like your feedback now big_smile).
The Highlighting is my priority of working right now and I am thinking of adding auto completion too (have some code/info about it).

About the Oni starting, I thought it was a nice 'touch' tongue to add it for simplicity (never knew about the changing of scripts while Oni is running roll), but ofcourse it can be deleted/replaced by something more important or better.

I'm a beginner in both scripting and programming (REALbasic is very simple and easy to use in my case tho), but I'll try my best to make at least a standard program which makes things easier
and more manageable. I'll start off finishing some of these basic modules and then move on to some of the harder parts (those headers for example smile)

It is very basic and not much more than half a notepad atm, but it has potential in my eyes (atleast as a startup program to the big world of scripting and programming tongue)

Last edited by Tyr (19/6/07 13:39)

Offline

#6 19/6/07 13:39

Tantir
Member

Re: Oni Script Editor

Maybe I have some ideas, but I don`t know your possibilities.
1. Hmmm, In onidev, when in script is bug is little info abaut bug.  There is which line is wrong. So you can add a line- count. (you understood me, i hope)
2. I have 10 copies of "oni"(folder). When program start it should say "which IGMD folder you want edit" or somethink like that."
3. You should add TEMPLATE. Like: you click on buttton and apear " func name { } "  Or func void main(void)
{
env_show 401 1
env_shade 401 913 .2 .4 .2
env_show 402 1
env_shade 401 913 .2 .1 .3
env_show 403 1
env_shade 401 913 .3 .1 .3
env_show 404 1
env_shade 401 913 .3 .2 .1
env_show 405 1
env_shade 401 913 .1 .3 .2
env_show 406 1
env_shade 401 913 .2 .1 .4
env_show 407 1
env_shade 401 913 .1 .4 .1
env_show 408 1
env_shade 401 913 .4 .4 .1
env_show 409 1
particle dishpulse do start
particle sturm_ambient start
fork pre
gl_fog_blue=0.0
gl_fog_red=0.0
gl_fog_green=0.0
gl_fog_start=.989
gs_farclipplane_set 5000" with ILLUSTRATION.

Hmmm, sometimes i think " I have tousen ideas per second and all of them is bad" ;P

Edit: hmmm, i write post too slow....

Last edited by Tantir (19/6/07 13:41)

Offline

#7 19/6/07 14:01

Tyr
Member

Re: Oni Script Editor

Tantir wrote:

Maybe I have some ideas, but I don`t know your possibilities.
1. Hmmm, In onidev, when in script is bug is little info abaut bug.  There is which line is wrong. So you can add a line- count. (you understood me, i hope)
2. I have 10 copies of "oni"(folder). When program start it should say "which IGMD folder you want edit" or somethink like that."
3. You should add TEMPLATE. Like: you click on buttton and apear " func name { } "  Or func void main(void)
{
env_show 401 1
env_shade 401 913 .2 .4 .2
env_show 402 1
env_shade 401 913 .2 .1 .3
env_show 403 1
env_shade 401 913 .3 .1 .3
env_show 404 1
env_shade 401 913 .3 .2 .1
env_show 405 1
env_shade 401 913 .1 .3 .2
env_show 406 1
env_shade 401 913 .2 .1 .4
env_show 407 1
env_shade 401 913 .1 .4 .1
env_show 408 1
env_shade 401 913 .4 .4 .1
env_show 409 1
particle dishpulse do start
particle sturm_ambient start
fork pre
gl_fog_blue=0.0
gl_fog_red=0.0
gl_fog_green=0.0
gl_fog_start=.989
gs_farclipplane_set 5000" with ILLUSTRATION.

Hmmm, sometimes i think " I have tousen ideas per second and all of them is bad" ;P

Edit: hmmm, i write post too slow....

Hmm... I'll try to answer per point:
1. It is (I think) very advanced, but it might be possible to add a bug-checker on basis of all the possible words and phrases of the scripting language (I don't know it for sure though)
2. It is possible to add a file manager in the beginning to choose a file to start with (and Open Recents and stuff)
3. If you would click the small button in the top right corner (should've enabled it by default, a menu pops up to the right with this option (only one yet and it's still a bit messy since it doesn't start on a new line, but I'm working on it wink)
It would also be possible to add a whole Main Function's starting info aswell (isn't that hard to implant I think smile)

And ofcourse Ideas are not bad, just keep em coming, so we can make this perfect big_smile cool

Offline

#8 19/6/07 15:50

geyser
Member

Re: Oni Script Editor

"Hmmmm" smile

1. Tantir meant you should add a line counter, Tyr, not a "bug-checker"
(Oni is such a bug-checker, so you would be basically rewriting Oni... in Basic smile )
(so, either an indicator of the current line or line numbers in front of every line...)

2. Usually I handle that thing myself, by choosing what I drag into the text editor.
If you really want to write an editor just for BSL, I'd definitely add drag-and-drop.

3. Note that functions can have different signatures (return types and arguments).
func main is the same as func void main(void), but you have a lot of others.
func string Whatever(whatever) doesn't work good, but anything else does IIRC.
(oh, yes, it's good to know that BSL is probably one of the buggiest parts of Oni... smile )
Functions with complex signatures (different from "void(void)") are what I use in OTA.
Original functions may have even more funny signatures (like string|int arguments).

It is very basic and not much more than half a notepad atm, but it has potential in my eyes (atleast as a startup program to the big world of scripting and programming)

It's very good if people pick up some real-world skills because of their interest in Oni. Keep it up, definitely.

Last edited by geyser (19/6/07 15:56)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#9 20/6/07 19:13

Tosh
Member

Re: Oni Script Editor

Neat~
Well yeah so I did make a syntax highlighter/checker, but my site is down at the moment. (I can put it back up, I just need to find the time. >_>; ) I dunno all the syntax capability, though, so there is some missing. It's also slow (interpreted language interpreting a language.. lol ^^; ) so it'd be nice to see in a compiled format I guess.
Why I wrote it in Javascript though is because I wanted it to work on Mac.. so is there any Mac compiler for REALbasic?

Lastly I dunno REALbasic and don't intend to learn right now - I have a lot of other things to do sad - so I dunno if I can directly help you at all, sorry.

Good luck on this, sounds good so far. smile

Offline

#10 21/6/07 14:06

Tyr
Member

Re: Oni Script Editor

Released: OSE v0.35 smile
Download: Link
Changes:
- Reviewed whole look
- Added line counter (not working yet tho wink)
- Added search function (replace is still bugged)
- Added listbox instead of buttons, but since listbox doesn't work yet the buttons are still there
- Updated the toolbar instead of individual buttons (still needs more buttons though)
- Added the viewer (without any actions yet, just for the looks)
- Restructured interface (yet cosmetic only)
- The scrollbar has lost his functionability... working on it

Notes:
I'll answer the previous posts soon, but atm don't have the time (last days of school -> then I have all my time for OSE big_smile)
Screenshot in main post updated

Last edited by Tyr (21/6/07 14:14)

Offline

#11 21/6/07 14:52

paradox-01
Member

Re: Oni Script Editor

wooo^^ I've a bug for you.  button "} - End Func" gives one a "{"

Offline

#12 21/6/07 17:10

s10k
Member

Re: Oni Script Editor

Tyr have a look also in this:

Offline

#13 22/6/07 1:19

Tyr
Member

Re: Oni Script Editor

Script_10k wrote:

Tyr have a look also in this:

Damn! Someone was before me yikes
Ah well, of course they did better (I can use it as a guideline smile) and I'll not claim that I made the first code editor, but I'll continue my project, since I mainly did this to learn scripting and coding myself.
I like OLST from now on as well, however I don't like the fact of using Ctrl with all Enter and Tab events wink).
Something like that is really what it should look like, but then with some more functions like showing the chosen target character in a viewer (going to ask to use the pictures on sgg's site, the ones here, and of course get the whole list of available commands (and put them in like in OLST, or maybe like I'm doing now (list-wise, also with function information). Only this is enlarging the whole a little bit, while OLST is very compact smile
Thanks wink

paradox-01 wrote:

wooo^^ I've a bug for you.  button "} - End Func" gives one a "{"

Indeed tongue Will fix it in the next release, thanks big_smile

Tosh wrote:

Neat~
Well yeah so I did make a syntax highlighter/checker, but my site is down at the moment. (I can put it back up, I just need to find the time. >_>; ) I dunno all the syntax capability, though, so there is some missing. It's also slow (interpreted language interpreting a language.. lol ^^; ) so it'd be nice to see in a compiled format I guess.
Why I wrote it in Javascript though is because I wanted it to work on Mac.. so is there any Mac compiler for REALbasic?
Lastly I dunno REALbasic and don't intend to learn right now - I have a lot of other things to do sad - so I dunno if I can directly help you at all, sorry.
Good luck on this, sounds good so far. smile

REALbasic has also a lot of users over different platforms (most on Mac I think). You can build your program over Windows, Mac or Linux platforms with ease smile (don't know sure if the demo license gives limits/restrictions to that though). REALbasic is very simple ('good for starters' and (I think) has a language that looks like C, not sure though).
I'll try to do my best to create something that is easy in use and provides starters (including myself) with more ease to learn.
I'm also currently working on a Syntax Highlighter and some spell checker as Syntax checker, but that'll probably take some time. Luckily my school's almost over so I'll have more time to learn and experiment with it.
Thanks, and (again) REALbasic is really basic big_smile wink

geyser wrote:

"Hmmmm" smile

1. Tantir meant you should add a line counter, Tyr, not a "bug-checker"
(Oni is such a bug-checker, so you would be basically rewriting Oni... in Basic smile )
(so, either an indicator of the current line or line numbers in front of every line...)

2. Usually I handle that thing myself, by choosing what I drag into the text editor.
If you really want to write an editor just for BSL, I'd definitely add drag-and-drop.

3. Note that functions can have different signatures (return types and arguments).
func main is the same as func void main(void), but you have a lot of others.
func string Whatever(whatever) doesn't work good, but anything else does IIRC.
(oh, yes, it's good to know that BSL is probably one of the buggiest parts of Oni... smile )
Functions with complex signatures (different from "void(void)") are what I use in OTA.
Original functions may have even more funny signatures (like string|int arguments).

It is very basic and not much more than half a notepad at the moment, but it has potential in my eyes (at least as a start-up program to the big world of scripting and programming)

It's very good if people pick up some real-world skills because of their interest in Oni. Keep it up, definitely.

Thanks for the heads up smile:
1. I chose line numbers in front of every line, but trying to make it more than 37 lines (it doesn't yet scroll with the text ^^) and maybe create the action if you press the line number (they're click able, you select the whole line in front of it).
2. The list in the right top corner will be able to do that I hope, it should be possible. Otherwise also a button or arrows to the text might work as well (as last resorts)
3. Like in OLST, which Script_10k just pointed me out it is already done with functions/syntax highlighting, together with notes and stuff. I need to find code that can be based on lines (if there is a # in front of it, color the whole line blue for example)
I hope I can at least reach something like that big_smile
Thanks for the kind words and I'll definately keep this up (I do not want to compete with OLST and will not use it's ideas and stuff, the creators just had the same idea as I have (only they were first tongue) big_smile

Last edited by Tyr (22/6/07 1:21)

Offline

#14 22/6/07 5:18

geyser
Member

Re: Oni Script Editor

Warning concerning the line numbers (cf screenshot). The following is wrong:

 8|#       Y = character type (N=ninja, T=tanker, S=striker, R=red, etc.)
 9|#               x = character number, usually same as character's initial 
10|patrol id
11|#
12|#       trigger volume scripts: t##, where ## refers to trigger volume id

Should be:

 8|#       Y = character type (N=ninja, T=tanker, S=striker, R=red, etc.)
 9|#               x = character number, usually same as character's initial 
XX|patrol id
10|#
11|#       trigger volume scripts: t##, where ## refers to trigger volume id

I'll try to do my best to create something that is easy in use and provides starters (including myself) with more ease to learn.

In that respect I really recommend a regular text editor like PSPad (possibly with a few BSL-specific macros: might write a few of those).
And of course, the ideal interpreter/previewer is Oni itself. Nothing beats the Dev Mode console.
The best way to learn BSL is to enter elementary commands at runtime, and see what happens.

showing the chosen target character in a viewer

Note that characters are subject to change.
Even the original ones have a varying appearance
(random skin + random size + upgrade on Hard)
And it's best not to think about modded binaries...

I mean, Oni Master already toyed with Character.BINA (Furies and Tankers in the Airport are cool, right?)
Loser's Warehouse introduced heavily modded characters in Chapter 1 (different health, different skins...)
The last version of DemOni adds ninjas to the Warehouse (and Ed re-added Tankers and Furies in Airport)
Also, we'll be able to add all character classes to level0, and then ssg's lists will be ultimately irrelevant smile
(I mean, we'll very probably want to spawn Muros and Barabases and Mukades in every level, right?)
So, again, Oni is ultimately the only tool that can accurately interpret references to game content.

If you want to provide an alternative to Oni's Dev Mode inside a script editor, I would do this:
Make a parser/viewer for CJBOCharacter.BINA (exported from every level with OUP or such)
Then the user would be expected to provide an up-to-date BINA you'd look up characters in.

I never bothered to check out OLST... Somehow a text editor was all I ever needed wink

Last edited by geyser (22/6/07 5:20)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#15 23/6/07 4:21

Tyr
Member

Re: Oni Script Editor

Released: OSE v0.35 smile
Download: Link
Changes:
* Added Autocomplete function (from RadAutocomplete source, temporarily) for all keywords and the first ai2_commands (there is still a bug that changes the color to grey if you type the code instead of autocompleting it)
* Populated the first list tabs and added functionality of adding them to the text (double click).
* Added functionality to show more information, parameters and an example per selected item in the list
* Removed the first Func buttons and updated them inside the list.
* Scrollbar fixed
* Linebreaker (lines ending and continuing at the next line) (hopefully fixed) with adding a horizontal scrollbar and enlarging the whole's width
* Added information fields (read-only) in the viewer part. Working on the picture feature, which will only be implemented for chr_
* Added more buttons and a separator(?) to fill in the top part
* Added help window to show what the parameters were that are shown in the information part of the addable functions and links.
* Added splash screen
* Added help menu item
* Added nicer picture for Viewer
* Added Menubar menu (not functionable yet)
* It's getting much and much more comfortable and gets a real purpose smile
* Post your bugs and stuff here, it is very welcome big_smile
* Line counter still not yet fixed
* It freezes sometimes with autocomplete and scrolling (again it will probably only be temporarily and this has my main priority at the moment)
* Top-button is not yet functionable
* Still no highlighter and Autocomplete is not smooth

Notes:
Screenshot in main post updated

-----

geyser wrote:

Warning concerning the line numbers (cf screenshot). The following is wrong:

 8|#       Y = character type (N=ninja, T=tanker, S=striker, R=red, etc.)
 9|#               x = character number, usually same as character's initial 
10|patrol id
11|#
12|#       trigger volume scripts: t##, where ## refers to trigger volume id

Should be:

 8|#       Y = character type (N=ninja, T=tanker, S=striker, R=red, etc.)
 9|#               x = character number, usually same as character's initial 
XX|patrol id
10|#
11|#       trigger volume scripts: t##, where ## refers to trigger volume id

I'll try to do my best to create something that is easy in use and provides starters (including myself) with more ease to learn.

In that respect I really recommend a regular text editor like PSPad (possibly with a few BSL-specific macros: might write a few of those).
And of course, the ideal interpreter/previewer is Oni itself. Nothing beats the Dev Mode console.
The best way to learn BSL is to enter elementary commands at runtime, and see what happens.

showing the chosen target character in a viewer

Note that characters are subject to change.
Even the original ones have a varying appearance
(random skin + random size + upgrade on Hard)
And it's best not to think about modded binaries...

I mean, Oni Master already toyed with Character.BINA (Furies and Tankers in the Airport are cool, right?)
Loser's Warehouse introduced heavily modded characters in Chapter 1 (different health, different skins...)
The last version of DemOni adds ninjas to the Warehouse (and Ed re-added Tankers and Furies in Airport)
Also, we'll be able to add all character classes to level0, and then ssg's lists will be ultimately irrelevant smile
(I mean, we'll very probably want to spawn Muros and Barabases and Mukades in every level, right?)
So, again, Oni is ultimately the only tool that can accurately interpret references to game content.

If you want to provide an alternative to Oni's Dev Mode inside a script editor, I would do this:
Make a parser/viewer for CJBOCharacter.BINA (exported from every level with OUP or such)
Then the user would be expected to provide an up-to-date BINA you'd look up characters in.

I never bothered to check out OLST... Somehow a text editor was all I ever needed wink

With 0.40 coming up, some changes are included (resized the window a bit and added a horizontal scrollbar in the editfield to fight this linebreaking). Also I added a splash screen for fun, but if it's bothering people (it's only 3-seconds) I can remove it easily.
In the help window and as parameters I'm using the ones I'm using in REALbasic, which (I hope) are quite similar to those of other coding languages (Integer: number, Boolean: True or False (1 or 0) and String: Text, sometimes between brackets).

I'm considering using PSPad or something else, but only if I really get stuck in OSE here. Atm 0.40 is quite buggy (and slow, or is it just my computer? tongue) and with some functions that still need alot of editing. The viewer finally got a function and I've added alot of them.
I do first want to try to get something out of this, since (in my opinion) I'm already quite far.
Maybe if this one works I and is done I can make another one in PSPad smile

I also added something else: RadAutocomplete (see the message at startup and using opening/saving functions), which can be very nice but is atm bugging it alot. Since it has those messages and the bugs, I'll probably replace it in next release with something 'smoother'.
Some minor changes, additions in menus and the toolbar, updated "No picture" picture and all, but the line counter is still not working.

About the images: You are right. It might be too simple to only add the pictures (and information) of Ssg's website, since when modded they can change.  When I've got to more advanced parts (like this), there could indeed be a link to/use for OUP in OSE.

By the way, Do you think OLST is created with PSPad aswell?

Last edited by Tyr (23/6/07 4:24)

Offline

#16 23/6/07 7:46

geyser
Member

Re: Oni Script Editor

Hey, Tyr, do you realize that your signature makes it impossible to browse the forum discreetly? smile

PSPad is not a programming language. It's a freeware text editor: http://www.pspad.com/
It supports a number of programming languages natively and can use macros for more.

It also supports online editing (e.g. you can edit a file in-place on a remote FTP server).
It can also be interfaced with compilers and so act as a basic IDE.
I don't use all the features, though. As far as I'm concerned, it's just a good editor.
I never made a macro (highlighter/translator/whatever) for it, only some regex stuff.

Heh, tried out OLST (WTF do the initials stand for, Script?)... It's really funny in places.
It was obviously coded from scratch in something like MSVC++ .NET, like OniTools.NET
Pressing Enter repeatedly anywhere but in the text window closes the whole thing. Wow smile
And as for the "commands", they apparently ignored the variable/function distinction...
So they actually insert ai2_ignore_player 1 instead of ai2_ignore_player = 1 hmm

Last edited by geyser (23/6/07 17:44)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#17 23/6/07 8:18

s10k
Member

Re: Oni Script Editor

Heh, tried out OLST (WTF do the initials stand for, Script?)...

Damm.. I found it in onichars old forums that are down at the moment, it had also the descriptions and what initials mean.

This is only site what have something of it:
http://www23.brinkster.com/onichars/Downloads/files/

I had download it for my hard drive before the link get broken. However I lost the readme. :S

Last edited by s10k (23/6/07 8:19)

Offline

#18 23/6/07 8:24

Tyr
Member

Re: Oni Script Editor

Released: OSE Homepage big_smile
Download: Homepage or manually: http://www.xs4all.nl/~rijpkem5
Changes:
* Complete, but with mistakes and an "Untitled" page title roll*
*Hopefully working download links for newest releases, individual files, older files and screenshots*

Notes:
Will update as much as possible

----

geyser wrote:

Hey, Tyr, do you realize that your signature makes it impossible to browse the forum discreetly? smile

Heh, indeed tongue Edited it to something more "official" lol wink

geyser wrote:

PSPad is not a programming language. It's a freeware text editor: http://www.pspad.com/
It supports a number of programming languages natively and can use macros for more.

It also supports online editing (e.g. you can edit a file in-place on a remote FTP server).
It can also be interfaced with compilers and so act as a basic IDE.
I don't use all the features, though. As far as I'm concerned, it's just a good editor.
I never made a macro (highlighter/translator/whatever) for it, only some regex stuff.

I know that it is a program smile I did download and install it, but at first hand it looked a bit... different and difficult (compared to the REALbasic IDE I'm used to roll:P)
Seeing that I didn't get how to use it and it would take some time and focus to learn and I was already quite far into OSE on REALbasic, I chose to first go on with REALbasic and if I really get stuck
or I'm done, I might try out PSPad smile

geyser wrote:

Heh, tried out OLST (WTF do the initials stand for, Script?)... It's really funny in places.
It was obviously coded from scratch in something like MSVC++ .NET, like OniTools.NET
Pressing Enter repeatedly anywhere but in the text window closes the whole thing. Wow smile
And as for the "commands", they apparently ignored the variable/function distinction...
So they actually insert ai2_ignore_player 1 instead of ai2_ignore_player = 1 hmm

Oni Line Script Trainer or something? tongue
In OSE I tried to make a difference between =1 and 1 (I'd call it Boolean (true/false or 1/0) or Integer (= <number>)). My info viewer tells a lot about every function currently implemented and gives an example smile. The function to show a pop up box with the options per selected function is not yet done.

In the end I hope that I have an Editor (at least comparable) to OLST smile


About OSE v0.40 release: The autocomplete function is messing the whole thing up, so I decided to throw it out. Instead of that I'm now adding color support to the add note function (changes color to blue if you double-click the "Add Note" function, and normal black if select anything else, and adding multiple lines-adding to the function list.
If I can work this out, it might also be able to color some keywords right after opening a script.

Before OSE v0.50's release I'll have added more, if not all functions that are on Ssg's website (the ones here) and hopefully fixed the main problems.
The website will then also be updated smile

Last edited by Tyr (23/6/07 10:33)

Offline

#19 23/6/07 20:07

geyser
Member

Re: Oni Script Editor

Script wrote:

I had download it for my hard drive before the link get broken. However I lost the readme. :S

I'm not sure the readme, if any, would have redeemed the thing.
OLST is majorly messy (unlike OniTools.NET, which has ruled my world for a long time) smile

OLST could stand for Oni Level Script Tool... or something equally semi-random.

Tyr wrote:

Before OSE v0.50's release I'll have added more, if not all functions that are on Ssg's website (the ones here) and hopefully fixed the main problems.

You know it exits without a backup after 5 minutes? I'm dead curious how you plan to fix that smile

As far as character skins go, note that on PC they can be set at runtime (chr_set_class).
We can't rename characters yet, but a lot of parameters listed by ssg can be overridden at runtime.
(OK, it still makes sense to keep a list based on the current Character.BINA, for scripting reference)

As far as user-friendliness goes, see here for an older thread with the same motivation as yours:
http://oni.bungie.org/forums/index.php?threadid=419
As you can see, it started with Mango asking for an editor that made scripting "a whole lot easier".
Then Script10k gave a heads-up on OLST (too bad Mango was on Mac; then again, OLST is lacking)
Finally, Tosh got started on the JS syntax-checker (last time I checked, it refused to work with Opera).

In the end I hope that I have an Editor (at least comparable) to OLST

That shouldn't be very hard. BSL knowledge in near-complete now and you can take advantage of that, while OLST has a lot of incomplete or inaccurate spots (well, scripting was not really an exact science back then).

In OSE I tried to make a difference between =1 and 1 (I'd call it Boolean (true/false or 1/0) or Integer (= <number>)).

Now this didn't sound good at all, so I checked out OSE... and there's indeed some kind of confusion...

Boolean: Either the number 0 or 1, indicating if the function is true (=1) or false (=0).

A very confusing use of "function". All the more of a confusion since you say e.g. ai2_ignore_player is an "Integer" (or, as you say, has as Integer "parameter")...
It's a variable (a boolean BTW), and as any variable it can have no "parameters" other than the right-hand-side of an assignment. So, again, confusing at the least smile
More on that (and on other inaccuracies) later. I'll probably put some overviews/tutorials on the wiki at the same time... private "lessons" don't make much sense...

...

Perhaps the only thing that makes me rather uneasy with those "scripting assistants" is that they start out with the good intention of making scripting accessible to non-coders...
But you end up (unwillingly) promoting half-truths, and more annoyingly non-truths about what BSL entities are and do... Something that doesn't happen with a regular editor.
The more I look at OSE/OLST, the more I have the feeling that: a) they'll never "make scripting a whole lot easier"; b) they will, however, generate major misconceptions sad
At the end of the day, scripts are like programs, and programs just don't write themselves... In that respect a (possibly verbose) tutorial is worth a thousand "assistants".

That's just a late-night impression: not to be taken too seriously. I'll probably post tomorrow to point out the major misconceptions I mean: maybe some can be avoided or helped.

Last edited by geyser (23/6/07 20:26)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#20 24/6/07 10:10

Tyr
Member

Re: Oni Script Editor

Released: OSE v0.45 big_smile
Download: Link
Changes:
* Removed RadAutocomplete function, cleaned it up alot.
* Added color function to "Add note" selection in the list
* Added and corrected more list functions
* Moved the "Viewer Enabled" Checkbox to the settings
* Changed the find and replace functions on the parent window (for easier in-script navigation) to be able to use tabs
* Added a Settings button and window
* Added Readme Window
* Added a Readme button as link to the added window with the readme file
* Moved "Tyr - 2007" Text to the bottomright corner
* Added Welcome box with starting options (option to not show this at startup is not yet functionable)
* Made plans to make a tutorial
* Planning to remove the 5-minute limit in some way
* Added weapon and powerup commands
* Planned review on parameters ai2_commands (chr_commands postponed to next release because of this same confusion about parameters)
* Added graphical support to some buttons
* Added the new window links to the toolbar
* Planned review help window to become more advanced, detailed and understandable (again with the confusing parameters, work in progress...)
* Changed the About window to show more links and to have a better structure.
* Added the "Viewer Enabled option in the Settings window together with the option to not show the welcome window (this is not yet oworking)
* Disabled the Opening functions on the toolbar and in the welcome box, it was essential (temporarily ofcourse). Opening can still be done by selecting it in the menu.
* Added Syntax Highlighting for the keywords, numbers and notes! Finally I got it done. Tell me if you like the colors big_smile!
* Colors might not be the perfect ones and only a small part of the language is yet highlighted (more to come)
* Don't mind the temporary list to the right, it's only for selecting BSL if you do not have highlighting atm (will be hidden in next release)
* Some more small changes

Notes:
Extract the Definitions folder in the same location as the .exe, otherwise you will get no highlighting.
Screenshot in main post updated, website is going to get an update as well (tomorrow probably)
When I get the time I'll reply, don't have time atm smile

Last edited by Tyr (25/6/07 0:45)

Offline

#21 24/6/07 13:47

s10k
Member

Re: Oni Script Editor

Nice update keep the good work.

Offline

#22 24/6/07 15:06

geyser
Member

Re: Oni Script Editor

Link to 0.45 is dead, should be: http://www.xs4all.nl/~rijpkem5/Files/On … Editor.zip
Replacing this with more interesting comments as I test the thing.

EDIT: OK, not much more to say. We'll have to work on the "confusion"...
The best I can do to help is update the corresponding pages on the wiki. Watch me.

About variables and functions (and other statement/expression types: "command" is actually very vague).
You know that variable declaration/definition (var int number= 42;) is one kind of statement.
Then you have trivial statements like number; or less trivial ones like variable assignments (number= 43;).
Then you have function calls (some of them have return type "void", but not all of them: so the return value can be used).
The you have more or less regular "expressions" (one variable being assigned the value of another plus/minus something, one function taking the result of another one as a parameter). Some expressions rely on the use of operators (12 of them, occurring in different kinds of expressions: + - = ! and or eq ne < > <= >=)
And then complex statements organized by keywords (15 of them: at float if repeat string bool for int return using else fork iterate schedule var every func over sleep void).
A function declaration/definition func void SayHello(void) {dmsg("hello");} is such a complex statement, a variable declaration is another one, same for an "if" block, a "forked" call etc.

Basically, the "commands" overview by ssg (and previous folks) covers only 2 types of statements: plain variable assignments and plain function calls (preset variables and preset functions).
Even though people like ssg and OniMaster know/knew about complex statements (grouped in braces, subject to an "if", "forked" calls etc), they have not described them in detail when making their overviews and tutorials.
And I think one has to go through the basic crash course on the notion of value before one can script efficiently and understand why scripts do what they do (otherwise, it's a bit embarassing, even if "it works")
(value of a variable and value of the right-hand-side expression of an assignment, return value of a function and value of its input parameters, value of the "condition" field of an "if" statement... that kind of thing...)

And just another short note before I head over to the wiki. Some of Oni's functions can have parameters of alternative types (e.g., string OR int).
I would use "|" for them (like the original docs), or "OR" (like here: http://wiki.oni2.net/index.php/BSL:Func … functions), not "/".

EDIT 2: Hey Tyr, maybe have a look at what OSE looks like over here smile
http://geyser.oni2.net/pics/misc/OSE-Screen0.45-XP/
I'm afraid you'll have to specify some window/font settings explicitly.

Another annoying "feature" (maybe one you're aware of)... Something with scrolling in the main editing area.
Whenever I type anything in a file that's taller than the editing window, the scrolling goes wild for 5 seconds.
Just scrolls up and down, to the end of file and back up. Very fast. Could be caused by the highlighter parser.

Last edited by geyser (25/6/07 6:07)


Behold the power of that which is yet unborn! For the swirling images that flow forth from the Chrysalis are only a shadow of the sleeper's true power.

Offline

#23 25/6/07 1:31

Tyr
Member

Re: Oni Script Editor

geyser wrote:

Link to 0.45 is dead, should be: http://www.xs4all.nl/~rijpkem5/Files/On … Editor.zip
Replacing this this with more interesting comments as I test the thing.

K, thanks alot smile (the link was probably working before I restructured the website in other folders and files, but forgot to do this). Fixed

geyser wrote:

EDIT: OK, not much more to say. We'll have to work on the "confusion"...
The best I can do to help is update the corresponding pages on the wiki. Watch me.

About variables and functions (and other statement/expression types: "command" is actually very vague).
You know that variable declaration/definition (var int number= 42;) is one kind of statement.
Then you have trivial statements like number; or less trivial ones like variable assignments (number= 43;).
Then you have function calls (some of them have return type "void", but not all of them: so the return value can be used).
The you have more or less regular "expressions" (one variable being assigned the value of another plus/minus something, one function taking the result of another one as a parameter). Some expressions rely on the use of operators (12 of them, occurring in different kinds of expressions: + - = ! and or eq ne < > <= >=)
And then complex statements organized by keywords (15 of them: at float if repeat string bool for int return using else fork iterate schedule var every func over sleep void).
A function declaration/definition func void SayHello(void) {dmsg("hello");} is such a complex statement, a variable declaration is another one, same for an "if" block, a "forked" call etc.

Basically, the "commands" overview by ssg (and previous folks) covers only 2 types of statements: plain variable assignments and plain function calls (preset variables and preset functions).
Even though people like ssg and OniMaster know/knew about complex statements (grouped in braces, subject to an "if", "forked" calls etc), they have not described them in detail when making their overviews and tutorials.
And I think one has to go through the basic crash course on the notion of value before one can script efficiently and understand why scripts do what they do (otherwise, it's a bit embarassing, even if "it works")
(value of a variable and value of the right-hand-side expression of an assignment, return value of a function and value of its input parameters, value of the "condition" field of an "if" statement... that kind of thing...)

And just another short note before I head over to the wiki. Some of Oni's functions can have parameters of alternative types (e.g., string OR int).
I would use "|" for them (like the original docs), or "OR" (like here: http://wiki.oni2.net/index.php/BSL:Func … functions), not "/".

K, I'll keep an eye on the wiki and try to clarify the parameters and the code smile. I used Ssg's site until now but the wiki/BSL:Functions already looks like it has more overview and clearer statements. I'll probably redo all the tables with them (when you have updated them as you said smile)
Hmm... Indeed, I thought that / was a better idea, but I could better just stick to your documentation (since you know a lot more than me wink) and with your help OSE can become something. At least something that works like it should be big_smile

About this, after I've fixed this and all the parameters/descriptions are correct, can I use the tutorial of Scripting from Scratch (the invisible strikers in the last training room smile) for OSE?
Of course I'll credit the author and give his name with the project. It might be possible to make an interactive tutorial (on-screen instructions with click able options per step roll and stuff which could be worked out quite well I think). I already put a button to it on the welcome menu, but it is still disabled since it doesn't have any function yet.

geyser wrote:

EDIT 2: Hey Tyr, maybe have a look at what OSE looks like over here smile
http://geyser.oni2.net/pics/misc/OSE-Screen0.45-XP/
I'm afraid you'll have to specify some window/font settings explicitly.

Indeed... thanks for the pictures. My screen is a bit deceiving in this tongue
I'll test OSE more thoroughly on a Windows XP with another screen to see if the interface is correct before I'll release it (I'm on a Windows Vista with a 22" wide-screen, which is probably changing the interface's look to me than to other screens tongue)
By the way, I'll also (try to) make a mac version with the next release smile

geyser wrote:

Another annoying "feature" (maybe one you're aware of)... Something with scrolling in the main editing area.
Whenever I type anything in a file that's taller than the editing window, the scrolling goes wild for 5 seconds.
Just scrolls up and down, to the end of file and back up. Very fast. Could be caused by the highlighter parser.

Yes, I found out about this at the time of release. It is probably because of every new letter it redraws all highlighting. I'll try to fix this asap.

Again a load of features and fixes in the next release, 0.50, which will probably come somewhere in the middle of this week (first I need to fix all confusion and small problems, including dragging functions from the lists into a specific place in the text).

Thanks for all the kind help already, geyser big_smile and of course Script_10k and the rest for the kind words smile

Last edited by Tyr (25/6/07 5:58)

Offline

#24 25/6/07 10:58

EdT
Moderator

Re: Oni Script Editor

By the way, I'll also (try to) make a mac version with the next release

Cool!

Offline

#25 25/6/07 11:26

Tyr
Member

Re: Oni Script Editor

I decided to release a mac version some earlier (before the official 0.50 release), so here it is! smile
Do keep in mind that it is in between releases, so you will see some objects already fixed and moved, but maybe also some things bugged.
Would love to hear if there are bugs in it and where wink
I'd also love a screenshot (to see how OSE looks on Mac), so I can put it on the homepage big_smile
I chose build as "Mac Universal Binary", which hopefully includes all things (don't know a lot about mac tongue).
It is OSE-v0.47, but since I don't think you can open .zip files I 'll post them separately (will make a folder), and hope you can make something of it ^^
http://www.xs4all.nl/~rijpkem5/files/mac/0.47/

Last edited by Tyr (25/6/07 11:28)

Offline

Board footer