Third Party Tools / [STICKY] GameGuru Lua Notepad++ API

Author
Message
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 17th Jan 2018 20:22 Edited at: 10th Sep 2018 15:18
I'm about to make several of you very, very happy.
First of all, if you aren't using notepad++, the free editor, go get a copy now from here:https://notepad-plus-plus.org/download/

What I have is a work in progress; I am about 70% complete but there's still like.. 400 more functions to add (thanks lee ) and frankly my hands are tired and my brain is mush. What you're looking at will probably be complete by next week.
And what is it I have, exactly?

A simple ANSI API for notepad ++ that's for Game-Guru. This will give auto-complete functionality for Game-Guru functions like GetAmbienceRed(), or whatever. It will tell you what variables it needs input (numbers, strings, entities, etc) as well as the output it may provide.



As you complete the function, it will highlight the next variable you need to add.



It will allow you to do a lookup of similar functions.



Tired of looking at the globals.lua file? Or googling online for 'what the heck does this thing do?' or 'god, I wish I had some way to know all the functions that would grab player x position data'? Well, look no further.

It effectively extends the Lua API support already native to notepad++ and allows the game-guru functions to work as well.



It however, does have MOST of the common functions added, though again I'm still like 450 short or so. Most of these are the player control ones that were added in the July patch. Make no mistake, this is still a very serviceable piece and should be complete within a week or so.

Configuration and setup instructions are a cinch and can be found here:
https://docs.google.com/document/d/1brjQxSsCZ2UzyCoRIiCZBaGcMiTJyKQgUThejL8aXNQ/edit?usp=sharing

The actual lua.xml file can be found for download here:
https://drive.google.com/open?id=1STRRmVUFn6lGKPEmHAPq6Qzd6swJF9Gz (Updated 9/10/2018 to Reflect Flatlander's update!)


I realize it's probably a bit presumptuous to ask this but mods, do you mind stickying this post? I think it'll be of significant benefit for those who are interested having a game-guru friendly programming interface.
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 17th Jan 2018 20:31
WOW I mean WOW this is fantastic its exactly what I need to help me learn LUA did I say WOW
this needs to be a sticky its a must have tool in my opinion thank you very much Bolt
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 17th Jan 2018 20:35
FYI this has taken me ~ 12 hours to this point so ... if there are errors I apologize. Simply make a note and PM me what you find.
Thanks
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 17th Jan 2018 20:38
For people like me that don’t have a clue this is priceless,many thanks for doing this .

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 17th Jan 2018 23:29
A deep bow, this will be so helpfull, thanks.

synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 17th Jan 2018 23:36
Ok I'm game ...
I dont mind keeping it sticky as long as it stays productive

The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 18th Jan 2018 17:49
@Bolt Action Gaming ,, absolute fantastic. thank you.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 19th Jan 2018 13:43
Very nice, Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

LeeBamber
TGC Lead Developer
24
Years of Service
Recently Online
Joined: 21st Jan 2000
Location: England
Posted: 19th Jan 2018 15:09
@Bolt Action Gaming : Works GREAT! Let me know when you are finished and I will create a nice PDF from this (with your permission of course) and I will host it for everyone, and put it on the Steam Guides too
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 19th Jan 2018 15:22
Thanks B.A.G., this will be extremely useful.
i5 2500k 3GB GTX1060 8GB RAM Windows 10
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 19th Jan 2018 15:25
@Lee your timing is impeccable. I just uploaded the final version this morning not 5 minutes ago.
I've got everything in there minus the few items we discussed that aren't relevant (i.e. the myriad of commands that say 'command used by the default player control mechanism' - which are used by the engine and not by Lua scripters).

Should be *knocks on wood* 100% complete now. Also with respect to permissions - do as you like with it. I started this tool as a way to simplify my own coding work and I realized others would benefit. So @Lee if you want to distribute this to others, by all means do so! The more the merrier. I will do my best to keep it current when Lua updates go out but please bear in mind everyone that it's 2400 lines of XML code currently so it's no small task to update this thing. If a major Lua content patch goes out I'll need time to update that. Beyond that - thanks everyone and enjoy!
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 19th Jan 2018 17:04
ok i have downloaded the latest notepad ++ and have copy the file you said ,and tick everything you have said to tick in the preferences, but i do not get the same result as you did in your thread. am i doing something wrong , or do i have to press a button to get the auto-complete functionality to work ?
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 19th Jan 2018 18:06
Not sure. These are my settings:


After setting these I copied lua.xml into C:\program files (x86)\notepad++\plugins\api
Then I restarted notepad++ by closing it and reopening it.
At this point, when you open a lua file (it must be a lua file or saved as a lua before this will work, maybe that's the problem?) it will begin allowing you to autocomplete.
PCS
7
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 19th Jan 2018 19:51
OK NOW ITS WORKING.
I think the problem was i copied the lua file first and then did the settings.
now i have done first the settings and then copied the lua file , and then it worked.


Thanks again.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 4GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Blacknyt46
8
Years of Service
User Offline
Joined: 29th Feb 2016
Location:
Posted: 25th Jan 2018 03:01
Thank you Bolt Action Gaming for all your hard work in delivering this awesome tool.
Jim C
Loretta
7
Years of Service
User Offline
Joined: 13th Aug 2016
Playing: Generation Zero; Skyrim SE , Fallout 4, In VR- Pistol Whip,
Posted: 25th Jan 2018 19:41
Thank you SO Much Bolt this is Amazing!
"The cave you fear to enter, holds the treasure you seek." - Joseph Campbell

ASUS ROG G20- Desktop Intel Core i7-6700 -3.4Ghz - 16GB Memory - NVIDIA GeForce GTX 970-4GB - Windows 10 64bit
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 25th Jan 2018 21:01
Just saw this.... very good idea, usually do the same for other languages such as SAS etc.... thanks BAG.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 26th Jan 2018 15:47
Glad others are finding utility with it. To me, it's already proven useful though true story I was coding a new kit I'm preparing ot sell and I sat back and thought.. why isn't this working? I should have a list available! ... I had never installed it on my development computer. I had literally written the Lua XML API and tested it on a different machine so my main PC never even had it! Once installed, I was much happier. Just kind of ironic considering I originally started writing this for myself then never even installed it!
I will be adding a little more support later next week with respect to g_Entity/g_KeyPressE/etc globals. I just need to figure out the best way to do it in the XML file and then I'll upload it again next week.

smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Jan 2018 14:39
nice addition, will help for those obscure function names
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 18th Mar 2018 02:28 Edited at: 18th Mar 2018 02:28
I was thinking about developing an editor like this but it is now in very good hands.
When in doubt -- C4 :heh, heh, heh:

-Jamie Hyneman
Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 9th Apr 2018 16:10
From the standpoint of an editor what I'd love to see would be something that integrated an autocompleting notepad UI with that interesting visual Lua programmer someone made way back.

By the by, I haven't forgotten this project but I'm currently in the 'busy season' for my work so I haven't had a chance to update the API for new PP commands (which are coming left and right)
JASailor
14
Years of Service
User Offline
Joined: 11th Jun 2009
Location:
Posted: 15th Apr 2018 19:42
Thanks much.

Perhaps one day the scripts themselves will have some comments added too. Does anyone know of a diagram of what script calls or contains other scripts? Is there perhaps a utility which could cross reference all the lua scripts in a directory?

JASAILOR
Mortt
7
Years of Service
User Offline
Joined: 16th May 2016
Location:
Posted: 26th Apr 2018 07:40
This is very handy to have.
Will make it much more easy to write scripts now.
AWESOME
(Custom) Intel i7 3.3 Mhz. 16 GB fast ram. EVGA Nvidia 1050 Ti 4GB. Dell US27 2560 x 1440. Dell 24 1920 x 1080. Awesome.
Next G. Card EVGA GeForce GTX 970 Superclocked ACX 2.0 Gaming 4GB GDDR5 PCIe3.0 Graphics Card.
Would Like EVGA NVIDIA GeForce GTX 1080 8GB GDDR5X PCIe3.0 Graphics Card
PM
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 2nd Jun 2018 01:36
Thanks Bolt Action Gaming. You shot this one outta the park. It's a whiz-bang for sure. :SMILE:

This is now the lua editor I use. I used ZeroBrane prior to this which was a good lua editor. However, it didn't have GG commands included and I like how the auto-fill works.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Jun 2018 04:00 Edited at: 20th Jun 2018 23:54
I am now using Notepad ++ with this API all the time now scripting with lua. I love this API.

The reason for this post is to let you know that I found a command with the wrong syntax help. See image. You will notice that you place the text string as the last parameter. Actually, the text string goes before the red, green, blue color parameters as can be seen in the closeup of image #2.

Addendum:
For those who would be interested in correcting or adding to the API file, all you need to do is open ".xml" file that contains the lua API in notepad ++ (lua.xml). This file is in the API folder of notepad ++. I have corrected the above myself. To add a new command; follow the syntax used for the other commands. There are three main API commands used: 1) <KeyWord name=>, 2) <Overload retVal="" descr= >, and 3) <Param name=>. There can be more than one parameter. I don't believe that there would be a retVal for the Overload statement, however, you will want to include a description. You end the API commands with </Overload> and </KeyWord>

BoltAction correct any of this if I have it wrong.

Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory

Attachments

Login to view attachments
G4M3R13
8
Years of Service
User Offline
Joined: 28th May 2015
Playing:
Posted: 25th Jul 2018 12:44 Edited at: 25th Jul 2018 13:22
This is awesome !

but I don't get any popup hints. How do I get those to work ?

edit**
nvm I fixed it. I was using this Lua api >> https://forum.game-guru.com/thread/213931
so I just uninstalled it and voila ! Keesh alfredo !
recreating dreams into reality
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 2nd Sep 2018 23:45
I have updated the lua xml API for game guru to include everything from where Bolt Action Gaming left off and through the water functions.

If he allows me to upload it here I will. I am waiting on some answers first regarding some of the water value commands
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Sep 2018 01:38
Very nice. I think he is pretty busy at the moment.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 3rd Sep 2018 02:48
Hi Myke, I knew he was busy that's why I went ahead and finished it up until the next time. Should I just go ahead and post it here. Everybody knows that this was started by Bolt Action. Just helping him out (and myself )
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Sep 2018 03:27
After reviewing the first page posts here it say it ok to do as you will with.

https://forum.game-guru.com/thread/219215?page=1#msg2594157
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 3rd Sep 2018 07:02
Pirate Myke wrote: "After reviewing the first page posts here it say it ok to do as you will with."



I checked it out again, and I already knew it was OK to go ahead and add to it since it was in Notepad ++ XML format. This was kind of like when you helped me out by adding all those FPI commands to my two actions and conditions files for FPIedit Pad. However, I think I will wait for Bolt Action's response because he might actually get to it before he reads this and he can update his download post.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Sep 2018 14:03
Sounds good.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Bolt Action Gaming
GameGuru Tool Maker
10
Years of Service
User Offline
Joined: 24th Oct 2013
Location: Harrisburg, PA (USA)
Posted: 4th Sep 2018 15:59
I don't mind someone picking this up. The initial work was a huge piece of time when I had immense downtime at work but right now between book writing, the blog, personal stuff and a major pickup at my job I've really had very little free time. Big thanks, flatlander.
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Sep 2018 18:08
Excellent. Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 5th Sep 2018 04:03 Edited at: 5th Sep 2018 06:45
I'm glad to help out. Follow these two steps.

1. If you have not downloaded Notepad ++ then click here to download.
2. You will need to download the API for LUA. Click on link for ZIP or link for 7z. This is an updated version that takes it through all the "water" commands. I had just found out that I did not describe these "water" functions correctly so I will be correcting them in the next few days.

Configuration and setup instructions
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Sep 2018 05:17
Thank you. Flatlander.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 5th Sep 2018 20:19
Thanks for your time and helping out Flatlander

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Flatlander
GameGuru Master
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 6th Sep 2018 22:09 Edited at: 6th Sep 2018 22:14
The following in the expandable "Code" box is the new xml code for setting the water shader settings. I took the description information right out of the document file provided by Corno_1. You can open this file in Notepad++ and in fact, I recommend it especially since you have to have this application in order to actually use this API. :SMILE: The code is at the very end of the file or you can search for "<!--***Water Shader Settings***" which is the first line of what you need to replace. These are the "setter" commands.



For this next set of commands, you can search for "Get water shader information" which is the first line of what you need to replace. These are the "getter" commands.



At the very end of the xml file are two commands

</AutoComplete>
</NotepadPlus>

Please, Do Not accidentally delete these lines.

One more tip, Corno_1 has provided a document entitled, "Water Lua Command List.pdf" in the GG Doc subfolder.
Alienware Aurora R7 with SSD 256GB boot drive ( C: ) and a secondary drive ( D: ) that is 2TB
Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 3.19 with Intel Turbo-burst
Installed RAM 16.0 GB
64-bit operating system, x64-based processor
Windows 10 Home
NVIDIA GeForce GTX 1070 with 8192 MB GDDR5 and 8095 MB shared system memory

Login to post a reply

Server time is: 2024-04-27 20:27:45
Your offset time is: 2024-04-27 20:27:45