GTA2 ScriptPad

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 ScriptPad

Post by BenMillard »

For me, Consolas is the most (perhaps only?) refined and really legible monospace font. I think Windows 7 comes with it, along with Calibri and friends. Microsoft Office might add it, too, as my PC at work has it. I got it as a download from MSDN on my home machine - or maybe it's the free Linux flavour I have here, recommended from Salamander/DrSlony.

The highlighting in MisPad is much better in so many ways than these attempts, imho. Dark text on light background is Windows standard - you'll get awful glare switching between black windows and white windows. Better make them all the same. (So if you use a dark Windows theme, ScriptPad would (ideally) inherit that thoroughly.)

If every bit of content has a special style then nothing stands out. Which defeats the whole point of having it! Highlighting is only useful if most of it looks normal, with just a few key items highlighted. VB6 IDE is marvellously restrained in this way and it makes the code very friendly for skim-reading.

Firefox's View Source is my favourite syntax highlighting, although I turn off all the boldness. Having syntax errors in red is helpful, such as unbalanced GBHscript coding structures. Your HTML export is cool but could be much more efficient. (That page isn't working at the moment! Some slightly older code demos.)

I'm going for a long weekend away, starting tomorrow. If we meet in Game Hunter next week, I could maybe demonstrated the "smart selecting" by using our GTA2 Etherpad in real-time?
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

OK, Thanks Ben. Have a great weekend.
Will see in GH.


About colors, well as i said, user can always change every color he want's in editor.
I choose the dark background because looking (for example) whole day at white screen really hurts eyes.

I would even switch windows to dark but it may look ugly.
I tried once.


I could add some built in themes. White, darker and very dark.
Etc.

EDIT:
MisPad theme.
Is that better?

Image
Always wear safety glasses while programming.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 ScriptPad

Post by T.M. »

BenMillard wrote:The highlighting in MisPad is much better in so many ways than these attempts
instead of whining, do something about the colors? you've had 2 months to fix them, but still its the same whiny whiny here.
BenMillard wrote:Dark text on light background is Windows standard - you'll get awful glare switching between black windows and white windows. Better make them all the same
all my coding windows are black. white background is useful only for plain text, for syntax colors black background is much more superior in so many ways you cant even understand because you dont even want to understand!
BenMillard wrote:If every bit of content has a special style then nothing stands out. Which defeats the whole point of having it!
are you talking about my syntax colors or the colors b-shep made earlier? i agree he added too many colors. But look at the colors i made. every logical part of the code has own color, and if that still makes your tiny brain confused, then you can always change the colors yourself...
BenMillard wrote:Firefox's View Source is my favourite syntax highlighting
you are aware that HTML is not a programming language? its like comparing apples and bananas here. nice trolling.
BenMillard wrote:Having syntax errors in red is helpful
For a guy who "programs" HTML in microsoft word with white/black syntax colors, then that might sound logical, but seriously, what is this shit? the whole purpose of syntax highlighting is that the words you write wrong WONT get highlighted.


Consider this:
Image
1) On mispad, you will confuse the CHANGE_BLOCK into CHANGE_BLOCK_LID eventually (which isnt a function...), since they both get bold and black and are very close to each. And that is not even the only function like that in MIS scripts. Now when you learn to see the difference between CHANGE_BLOCK and the parameter LID, you can remember to write the code perfectly at the next time too.

2) Look at the integer numbers there, they are different color than floats, why? because MIS syntax will not allow float values in integers and vice versa. If you forget a dot from your float number, you will instantly see that there is error.

And this:
Image
1) On mispad, How exactly you gonna skim through that code and notice there actually was FORWARD codes? Well... you cant!

--

Ben, The biggest problem with you is that you think you know better than others, better than others who actually took the time to think through these things.
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 ScriptPad

Post by Gustavob »

TradeMark wrote: Ben, The biggest problem with you is that you think you know better than others, better than others who actually took the time to think through these things.
You can actually feel the rage on this topic now
You just lost the game.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

I have nothing against anyone's posts.
I like when my topic is active and the discussion continues.

But if we talk about colors, as i said earlier: i will add (actually already added some) different styles, from which user can choose whatever he likes most and he isn't satisfied with some theme, it is possible to change any themes he wants.

He = ScriptPad user.
Last edited by B-$hep on 08 Apr 2011, 20:59, edited 2 times in total.
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: GTA2 ScriptPad

Post by Pyro »

I do like TM's colour scheme so far, but as B-Shep said the colours can change anyway. I know it's been said, but, perhaps merge them together still with the option to change colour(s) and background colours?

I know everyone has their own suggestions and what they'd like to see in it, but seriously, stop the bitching! Really starting to get out of hand. :roll:

PS - Any idea when we'll be able to beta test it B-Shep?
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Thanks Pyro.

You can test it ASAP. Now i have 2 days free from my work and i can devote my time to ScriptPad fully again.

About dark development colors
I also use dark themes alot, in:

C++
Image

Delphi
Image


For my eyes, it's a lot better.
Always wear safety glasses while programming.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 ScriptPad

Post by Cuban-Pete »

Can the forum code-tag for mission files perhaps have the same coloring as yours (TM/B-Shep color)?
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1449
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 ScriptPad

Post by Sektor »

It's possible and there was a thread or posts about forum syntax highlighting but I don't know when I'll get the time to do it. I'd like all the work done for me and I just approve it.
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 ScriptPad

Post by BenMillard »

Would you apply the path and filename fix to MisPad, please? That would really help myself and some other modders until ScriptPad is ready.
User avatar
Salamander
Janitor
Janitor
Posts: 143
Joined: 01 Apr 2009, 20:38
GH nick: Salamander
KingSalamander
Sally
[00]
Contact:

Re: GTA2 ScriptPad

Post by Salamander »

Sektor wrote:I'd like all the work done for me and I just approve it.
Wouldn't we all.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

BenMillard wrote:Would you apply the path and filename fix to MisPad, please? That would really help myself and some other modders until ScriptPad is ready.
I attached the fixed version.

Copy GTA2Mispad.exe over your old .exe and replace with new one.
Also copy the COMPILER.DLL to your Mispad\compiler folder and replace existing if windows asks.

Let me know if you have any problems or bugs with it.
I will try to fix.
Attachments
MisPad1803.zip
(379.79 KiB) Downloaded 889 times
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 ScriptPad

Post by BenMillard »

Wewt! Thanks muchly. If this remembered startup size and position...that would be brilliant.*

Shame that the recent files list is gone. I didn't use it very often but sometimes it helped.

* Hint! ;)

(EDIT) My proposed mission script for new levels is now tested and updated on my website. It provides a .mis with .scr and .mmp in a .zip for modders to get started.

That page demonstrates the Firefox-like syntax highlighting I was suggesting earlier, as does respawning vehicles for GTA2 which I wrote with Sektor.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Some of the requested features are not yet implemented but i think it's time for you guys actually do small beta tests on current version of ScriptPad, to find any bugs and maybe even post some suggestions, or ideas.
Something like that... And then i will continue implementing your ideas.

OK?

It's pointless to "hide" it and show the "screenies" only, and i can't find all bugs by myself.
Because i don't use it so much atm. Just don't have time.

I am still having issues with my PC but after 1 or 2 days i will try to post the zip with ScriptPad.

And about MisPad, i will look what caused the MRU (recent files, so called) to go away.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Ok, first beta upload in first post:
http://gtamp.com/forum/viewtopic.php?p=2159#p2159

Download it, test it, try to make it crash.
if it crashes, try to tell me what did you do.
I also included debug stuff, so it should show what went wrong.

This is very beta, so use with caution.
Always wear safety glasses while programming.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 ScriptPad

Post by Cuban-Pete »

I'm a noob at gta2 script, but I notice these things:
test.png
test.png (22.71 KiB) Viewed 37064 times
- Some text stays black and unreadable. see image. like the = sign or the whole CHANGE_POLICE_LEVEL text.

- numbers in left column are very small in comparison to real code/text

- iconbar has misshaped icon's. new file misses his head for example

- starting a new file. after some work clicking on red cross. no message of saving. than I press new file and get a message to save old (but already) gone file

- where is the "go to" after pressing compile for? It does not go anywhere? Perhaps double clicking the lines in the small compile infowindow should also take you to the correct line in the code
"Mmmm, your eyes are so beautiful."
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 ScriptPad

Post by Gustavob »

same above happens to me, but going to Tools > Options then clicking apply changes the theme to the proper Dark theme. It seems to expect the mis2.syn file inside the folder where the script file is when you open it using Open with > GTA2 ScriptPad. Copying mis2.syn into the script folder or installing ScriptPad in GTA2\data solves that but it would be better if it opened %installationpath%\mis2.syn instead opening %currentpath%\mis2.syn. It doesn't seem to save preferences for me but I dunno if its just me, and I also get a few errors when I change some of the preferences and then try to apply:



but once again, I dont know if its just me

notes: I clicked "Enable autocomplete" then Apply in preferences to get that error but it also happens with other preferences

EDIT: image too big, link only now. also, reinstalling it fixed the crashing problems but it still doesn't save preferences and when I enable Auto completion it is turned on but:
1: I try to add an ARROW_DATA, then I write ARR and its not on the list
2: Then I finish writing: OW_DATA
3: auto completion turns itself off
You just lost the game.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

I also found something related to that:

when i associate mis files with script pad i get the same error that mis2.syn is not found.
when i drag and drop a mis file on the editor exe the same happens
when i drag it on the shortcut the editor opens a new file instead

and 2 unrelated bugs:
Ctrl+C and Ctrl+X doesn't work. it works in any other application but your editor. ctrl + v works though.

when i click on new file and and in the settings "uses template script" is selected it adds the the template to the opened file.

Sorry that i did not write that feedback earlier. scriptpad will be really helpful when it is complete.
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

I don't know what you planned for this version or script pad in general but if you want to add some more features i have a suggestion:

A template syntax for scripts that lets you avoid those repetitions for players and other stuff. I already talked with TM about it and refined the concept. The syntax is made as easy to read and parse as possible i hope.
only characters that are not used by mis are used for it: #$:!?|-{}<>
I hope it is understandable good enough without further explanation but you will probably have questions so just ask.

Code: Select all

#$variable:5 //declaring and setting a normal variable
#$file:1|2{testmap<file>.mis} //special declare of the files the script should be saved to
//$variable:1-6{string where to replace <place holders>} can create values with digits in the middle. the example above testmap1.mis|testmap2.mis

#player:5!file:testmap1.mis$variable:5?player:1-6{
IF (CHECK_CHARACTER_HEALTH(p<player>, 0))
	GIVE_WEAPON (  p<player> , rocket_launcher, 99 )
ENDIF
}
// #condition?replacementlist
//{string where to replace <place holders>}

condition and anticondition can be a list of:

variable:5 
seperated by $

replacement can be a list of:
variable:1|2|3-6 
or variable:(125.0, 128.5)|(126.0, 128.5)|(127.0, 128.5)-(130.0, 128.5)
or just variable
seperated by $

a variable can be in condition, anticondition and replacement at the same time
$file is a special variable that can be used to check for a specific file or go through all files
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 ScriptPad

Post by BenMillard »

Elypter...yuck. Notepad++ or some future version of ScriptPad would provide a Find/Replace box which accepts wildcards or full Regular Expressions. It would do that repetitive code manipulation in a far more intuitive and flexible way than using arbitrary sequences of dollar signs, colons, angle brackets and numerical ranges within comments. :|

Please put your expertise into things which are useful. As you've pointed out a lot recently, our community has very limited resources. From what I've seen over the past decade, more than 80% of it is simply wasted.

Your maps list system could be really useful.
Post Reply