MasterScript process :)


(Roeltje) #1

My scripting program is already beginning to have shape :slight_smile:

if u dont know where im talking about, look here:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=14365

here’s a screenie of what i already have :slight_smile:

Im looking for Chruker now, because i wonder:

  • is it ok if i use your scripting reference? (for the syntax highlighting and the imported reference)
  • do u have it in some database or something so i can import it easier? :slight_smile:

If u guys have more ideas, post 'em :slight_smile:

Greetz,
RoeltjE


(IneQuation) #2

A toolbar would make it look a bit less empty. :wink: And, like every code editor, it would need things like search and replace, line numbering etc.


(EB) #3

IMO…

  1. what RookieOne said
  2. routines and subroutines should have seperate colors
  3. preset for game_manager routine.
    …so when you open a new file…it would already have something like this:
game_manager 
{
	spawn {
		
// Game rules 
		wm_axis_respawntime	20    // axis respawn time
		wm_allied_respawntime	20    // allied respwan time
      wm_set_round_timelimit	15    // map timelimit

// Objectives
		// 1: 
		// 2: 
		// 3:  

// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team    // place number

// Winner on expiration of round timer (0=Axis, 1=Allies)
		wm_setwinner	 // place number
             }
}

  1. a drop down selection of script commands would be good…
    This way you could see all commands available for use, and then even click them in the list to have them appear @ cursor, in the script file.

  2. I think I am going overboard.


(carnage) #4

you have a very nice text colouring system witch is very good and will be helpful. The find/search etc and line numbering are very useful but some sort of visula display like an expandable tree would be much more convinent that having all the code righ in from off you

so you could go from tank>spawn> etc making individaul parts very easy to find and manage

can your program read the data from a map file to automatical get informtion on spawns etc? and then even posible set them up automatical? if you feel there isnt enough data in the entites exra fields can always be added in the editor without and plugins and causing harm to the bsp

oh yeah and can you include some control over the text size and font so people who prefer a smaller code to get more on screen are happy but thoes who like it nice and big to read are happy


(EB) #5

If carnage’s head and my head were mushed into 1, then the world would be full of insanely intuitive programs.


(psyco_mario) #6

may i ask what this isw made in (ok, i think its VB but which ver? .NET?)


(Roeltje) #7

ty for the ideas :slight_smile: ill try to add as much as i can :slight_smile:
for now im trying to fix a frikking error…

its made with Visual Studio C# 2005 :slight_smile: that’s all i know :stuck_out_tongue:

i already had some idea of some prefab game_manager script :slight_smile:

Greetz,
RoeltjE


(Aborted) #8

I started making something similar in VB .NET about 2 months ago, i actually got very far aswell, but then stopped cause i couldnt be bothered anymore.

Maybe i should continue it i have the code somewhere :lookaround:


(Chruker) #9

Im looking for Chruker now, because i wonder:

  • is it ok if i use your scripting reference? (for the syntax highlighting and the imported reference)
  • do u have it in some database or something so i can import it easier?

Sure you can use reference as a base for the syntax highlighting. I only got the scripting reference in its html form.


(Roeltje) #10

Ok thank u!! :smiley:


(Roeltje) #11

[b]The program is already beginning to get shape :smiley:

Scripting reference done :wink:

Plz feedback :slight_smile:

Im looking for some testers/bug finders at the moment :slight_smile: interested? pm me :slight_smile:

[/b]


(kamikazee) #12

Not bad at all… Will it feature some form of indentation too? (I like tabs in scripts, just to keep things readable.)


(Roeltje) #13

lol i thats just one of my bad scripts without tabs in it :stuck_out_tongue:
it can do all functions of notpad exept the replace and the find thing :slight_smile:


(carnage) #14

i think he means auto tab the text so its readable and stays nice and orgonised without the user having to make a consious effort


(thefatladysings) #15

looks useful :slight_smile:
probably makes it al lot easier to code :stuck_out_tongue:

@carnage; read your Pm’s :stuck_out_tongue:


(kamikazee) #16

Indeed, it would be great if the editor keeps the indentation of the previous line and adds or removes a tab when an openening or closing brace is found ( ‘{’ and ‘}’ ).
Of course, it would only need to check this for the current line but not force it for the whole file. It would be a pain if you would like to change the indention, only to notice that the editor changed it back when you are typing further down.

However, a seperate auto-indent tool could be nice as well. It would take only a few clicks then to get a quick overview of some of the scripts posted here.
Of course, the program needs to ask if you want to continue, accidentally clicking the button might mess up your work.


(Roeltje) #17

yeah i was thinking of that too :slight_smile:
it’s going to be really hard making that :wink:
the first i wanna do next is importing targetnames from a .map :slight_smile:


(Shaderman) #18

Nice, looks promising.


(kamikazee) #19

It’s not really hard to make the indent-while-you-type part…

I just wrote 1 way to do it below. I hope it won’t scare you off…
Actually, making the “clean indent” tool might even be easier.

I guess there’s an event to catch when a user types something. Just make it react when n opening brace ( ‘{’ ), closing brace ( ‘}’ ) or a newline ( enter key, be it numpad or large return key ) is entered in the text field.
(Note: allso check if the length of the inserted text is larger then 1 token, in that case he’s pasting and you won’t want to indent at that moment)

Then you got to write those events. Entering ‘{’ will set a flag ‘indent’. As soon a new-line is entered after that, a new line will be made having more tabs then the previous line. (You’d need a function to count tab characters then from a given line of text. It will allso need some work to extract the previous line from the script itself.)
If the user doesn’t press “enter” or clicks somewhere else in the text field, the flag is set off.

Now nearly the same happens when you press ‘}’. Here you should check if the cursor was on an empty line. (Save for tabs) In that case, you would check how many tabs there are on the previous line, and place one less on this line.

In case of a newline, it should create a new line but allso insert as many tabs as there were on the previous line.

I might be able to write the code for this myself, but I know that the project wouldn’t get finished without some pressure.


(carnage) #20

the first i wanna do next is importing targetnames from a .map

thats very easy due to the simple .map format might be useful to pick out the scriptname though :wink:

if you take the class of the entity out as well then you can limit the options of what can be done to each entity in the script and present the user will a list of valid commands to chose from instead of having to have a great knolegde of scripting