GTA2 ScriptPad

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: mispad

Post by elypter »

wow, looks very nice already
yur sa'nok ngeyä
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: mispad

Post by Pyro »

Looks really cool :)

Since you mentioned you'll be able to pick what colours things like functions are, can you also change the colour of the background? Sorry if it's already been mentioned! :shock:
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

Thanks guys.

Yep.
  • The background color
  • Font
  • Font color
  • etc...
Even color of commas, dots, brackets and else.
You see it already from screenshots also.

And more good news: my fever decreased to 36.9
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

I got a question for you script coders here.

Is multi tabbed editing possibility needed?
I mean, do you edit multiple files at one time or your scripts are usually in one large file?
And you don't have multiple mis files required for one level?

For example: you do something in first script and then you must modify something in another script.

I'm just thinking here: to add the tabs or not.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: mispad

Post by elypter »

i have some maps that have muliple script files but i usually don't edit them at the same time. what happens more often is that i want to copy something or look up how something works on another map. A tab feature would be practical but it's not essential because i can use notepad++ for that too. So only do it if it is not too much work for you. ;)
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

OK, i will think about it and will see how it could look.

But i add the file monitor for sure. So if some other editor modifies the currently opened file in MisPad then MisPad will ask, if file should be reloaded.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: mispad

Post by elypter »

yeah, thats important. notepad++ and TMs editor have this feature too. there is one thing thats annoying with npp: when you reload the file it uncollapses everything. could you please try to preserve the code folding status. maybe it's not easy when nodes can be added or deleted but at least most should stay the same. Or even if it remembers it only when no nodes are changed would be very useful.
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

elypter wrote:could you please try to preserve the code folding status. maybe it's not easy when nodes can be added or deleted but at least most should stay the same. Or even if it remembers it only when no nodes are changed would be very useful.
I have to dig into codefolding unit then and try to save it's state to INI or registry directly in codefolding unit. It should be easier that way.

Atm im working on highlighting color settings dialog stuff.
Because MIS highlighting settings & info (colors, styles etc) is saved in external file it needs some tricks to make work and editable by user.

Maybe not for the others but i seem to like hack things working rather than thinking more about the problem, probably because im lazy.

So it's biggest but very interesting task atm.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

OK, i found another VCL that actually is more stable than Synedit. I mean especially the codefolding stuff and managing the highlighting colors and stuff is a lot easier.
So atm im trying it out. Seems very pretty.
It looks like SynEdit but the core is actually completely different.
And i can use it in Delphi 3. Which makes very small exes.

Here is example screenshot with new VCL.
This will be final VCL i think. It has many good features: folding etc.
It has alot of things configurable.

Highlighting colors will be easier to modify.
This is just my todays completed highlighter. Added all known commands and assigned
colors to them. But i will change them of course, some colors do not look so well.

Image

And when i get home from my job i will probably start messing with codefolding.
Folding is much nicer in this particular VCL. Again alot of stuff can be configured to suit one's needs.

Folding example (very basic):
Image

EDIT
Bracket highlighting in action (again very basic example)
Image
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

Just to let you know where i am atm.
Colorizing stuff is working, user can modify the colors to fit his needs.

And now im trying to make autocompletion to work properly.
Actually it works but there are few "cosmetic" changes to make and small bugs to fix.
I really like it, because it speeds up script creation alot.

You basically type half of the command, for example:

Code: Select all

pl
and it will display the small popup at cursor with current command

Code: Select all

player_ped
and when you hit enter it completes it for you.

Most of the time you will hit enter, because it writes most of the code for you.
Soon i will try to post some demo or video about how it works.

It's very alpha atm to actually post it.

Stay tuned.
Always wear safety glasses while programming.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: mispad

Post by elypter »

very nice progress
yur sa'nok ngeyä
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: mispad

Post by Pyro »

Auto-complete sounds awesome, hope it works out ;)

If there are multiple choices for auto-complete, how would we choose? Would it just be mouse and click the option or can we use the arrow keys to select and then press enter (I prefer the second option)? Of course, how many letters do you need to type before auto-complete kicks in? First letter? Second? If it was the first letter the list could end up pretty massive in some cases :shock:
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

Tooltips are displayed when you typed some command. It shows you what parameters the current command expects:
Image

Another:

Image

But because most of the GTA2 mis commands are in such format:

Code: Select all

]somestringe = AWESOME_GTA2_COMMAND (bla, bla, bla
Another example:

Code: Select all

charname = CREATE_CHAR ( float X , float Y ) remap  rotation  occupation  END
I mean there are more stuff after final closing bracket.
Because of this, my implementation doesn't fully work.
I have to parse it more carefully. But it will be done.

Because its useful, i don't have to remember every parameter the current function or command has.

Pyro

Yes, you can use arrow keys and hit enter. It's very fast and i like to use it myself also.
It's same like in Delphi. It makes writing code a lot faster.

To be honest, i haven't added all commands to autocomplete but only few, to see how it reacts.

Just the first look at this stuff.
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: mispad

Post by BenMillard »

Could you prevent hangs due to valid but unsupported folder and file names? I just hit a problem where I had to rename a folder to make .mis files compile.
  • Fail: C:\Program Files\Rockstar Games\GTA2\Mods by Elypter\Tiny Tiny Tiny Town\tiny3-arena.mis
  • Pass: C:\Program Files\Rockstar Games\GTA2\Mods by Elypter\Tiny3 Town\tiny3-arena.mis
Various other filenames failed, until I changed that folder name.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

Hmm, never tried so long path names.
But i already have one idea how to fix that.

But how it hangs? The compiler (miss2) or MisPad?
Always wear safety glasses while programming.
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: mispad

Post by Pyro »

On a similar note, can you check various MIS file names not compiling properly? If you remember I made a post about it here. Cheers.

Still want to finish my single player script tutorial with missions :P
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: mispad

Post by B-$hep »

Ok, now i understand what crashes are there.
I had similar ones some times.
I already have few ideas how to fix it.


How you guys write your scripts mostly?
All in uppercase or all in lowercase or mixed?


Just wondering here, what the autocompleter should use.
Should it complete like this:

Code: Select all

player_ped
or like this

Code: Select all

Player_Ped
or like this

Code: Select all

PLAYER_PED
Of course it probably should be configurable, but atm it's hardcoded.
Always wear safety glasses while programming.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: mispad

Post by Sektor »

I write usually write commands in uppercase and parameters in lowercase.

GIVE_WEAPON ( p1, machine_gun )
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: mispad

Post by elypter »

me too
yur sa'nok ngeyä
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: mispad

Post by Pyro »

Me three. ;)
Post Reply