Page 13 of 15

Re: GTA2 ScriptPad

Posted: 05 May 2013, 09:16
by PacMani
Did you use Scintilla for the edit control?

Re: GTA2 ScriptPad

Posted: 05 May 2013, 09:28
by Sektor
Add a hotkey to compile/compile and run (without prompt) for quick testing.

imageshack blocks my IP range from viewing some images like the ones you linked. I don't know why. I've tried to contact them twice but they didn't reply.

Re: GTA2 ScriptPad

Posted: 05 May 2013, 21:14
by B-$hep
@PacMani
No, far better component than Scintilla.
I wanted to use Scintilla but its too complex. It will take "years" to set up in Delphi and for .mis syntax.
Im not interested in this.

Sektor, i will try to change image hosting then.
Can you see now?
Image
Image

I will add this hotkey.

Re: GTA2 ScriptPad

Posted: 06 May 2013, 02:56
by Sektor
Yes images display now. Thanks.

Re: GTA2 ScriptPad

Posted: 06 May 2013, 15:45
by PacMani
Yeah, Scintilla didn't work for me too. What are you using then?

Re: GTA2 ScriptPad

Posted: 07 May 2013, 22:02
by B-$hep
Why you ask? Creating your own GTA2 scriptpad?

Re: GTA2 ScriptPad

Posted: 08 May 2013, 15:41
by PacMani
No, I was always just interested in syntax hilighting capable controls :D

Re: GTA2 ScriptPad

Posted: 09 May 2013, 22:30
by B-$hep
I have problems with my XP and i must reinstall it. Skype is crashing like crazy and there are alot of other problems. I will get back after that is done.

Reason for delay is that i was unable to make MRU list look good with new theme, now i found better component and will use that.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:26
by B-$hep
New version finally: ScriptPad v2.5.0.31
Get it from first post.

Why it took so long? Because i was too busy with my other things. Especially tuning my car. Because of the good weather i didn't want to sit in front of pc. Im getting tired of this.

It has many new features. Autocompletion and hints are not yet added back.
I need to make them better anyway, so it's pointless to add half done things.

Whats new:
*) You can now select many lines and comment them out with one click
*) You can also indent and unindent the selected lines
*) You can now use autoreplace feature, this is useful for making things like collectibles like
"machinegun" into COLLECT_00 or something, whatever you need.
Don't overdo it. It's not for autocompletion. It allows you to make things easier. You can edit
the supported keywords on your own in Options dialog under "Autoreplace"
*) All settings are now stored in registry under HKCU\BShep ScriptPad.
If you have any problems with that on some OS, let me know.
At first time you should choose the options you need in Options dialog.
There will be more later.
*) You can associate and unassociate the scriptpad with .mis files, like previously in Tools menu.
*) If you know your script is valid and compiles you can now just hit F9 and run your script in GTA2.
For this to work you must fill up the run dialog (F8) and the GTA2 path, map file used etc.
It compiles and runs GTA2 immediately. No error checking is done at that point. Will do this later.
But test out the stuff, there may be some bugs.

Known bugs:
1) Options dialog "Cancel" button does nothing yet.
2) Weird random crash sometimes when you close scriptpad. Occurs rarely. I will try to fix it asap.

There may be more things added, changed besides the UI but please report any bugs you find.


Enjoy.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:35
by Sektor
Thanks!

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:39
by B-$hep
I forgot to mention that the "Autoreplace items" listbox should containt something like this:

Code: Select all

plp=player_ped
levs=levelstart
leve=levelend
card=car_data
So when you type plp in editor, it will be replaced with player_ped
levs will be replaced with levelstart
etc. Hopefully you will get the idea.

You don't have to press Enter always, you can use Space also, so you can continue typing the rest of the command, names, brackets or whatever.

As i said you can add more commands to this list also and edit / delete the existing ones.

EDIT:
Ok, i noticed that there is some random crash when you close scriptpad. Very rarely happens but i don't know the exact location or reason yet. I will try to debug it.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:46
by Sektor
It's using the old HKLM instead of HKCU, so the registry/F8 run options don't work with GTA2 v11.43.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:51
by B-$hep
Using HKCU.

Did you specified the .scr file output in General tab of options dialog?
I know it should actually copy to there or use actual .scr file path.

Probably i forgot that. But if you specifiy .scr file output path into gta2\data, it should work.

EDIT: ok, it seems that i forgot to use actual .scr file path. I got it, but i never use it.

Im fixing it

EDIT2: ok, stupid thing. The path thingy code was commented out, dunno why i did it.
This should fix it.

EDIT3: run dialog uses HKLM.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 20:57
by Sektor
The F8 run option definitely wrote to HKLM.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 21:07
by B-$hep
Ok, i reuploaded it.
I will get the 11.43 and will test with this more.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 21:41
by Sektor
I think you just fixed SCR but the other run settings (Skip frontend, run in window, GMP, STY) still use HKLM.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 22:16
by B-$hep
Ok, i reuploaded.
Test it.

All stuff is now saved / read from HKCU.

Now the question, if user executes the scr with F8 and clicks "Run" button, should it recompile the script or not? Currently i modified it to use currently opened mis file, so it compiles and uses that by default.
But should it recompile it everytime you Run the scr or not.

Now there is also messagebox shown if there were any compilation errors, then you must fix them first. Before you are allowed to run gta2.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 22:30
by Sektor
Works now. F8 should just be run, no need to compile, it's fine as is.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 22:34
by B-$hep
Ok, i think you should get it again. I fixed some other things related to run.
It was not reading the run dialog editbox values unless you modify the editboxes stuff by hand.
Now on closing it always saves the contents of editboxes.

Re: GTA2 ScriptPad

Posted: 22 May 2013, 23:56
by B-$hep
New update:
I added an option to choose either v9.6 or 11.43.
The Vike's version is active by default because i noticed that many users use it here.
If 9.6 is active then it uses HKLM for debug stuff, else HKCU.

I tested and it seems to work fine for 9.6. 11.43 needs testing.