LUA code libraries.

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

LUA code libraries.

Post by tjhkkr »

Have anyone thought about...
or
is anyone interested in putting a LUA code section in the forums... we put our lua code out there.
I have found snippets of code here and there I never thought about but are GREAT ideas?

Anyone else interested?
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
User avatar
stilesw
Posts: 1569
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: LUA code libraries.

Post by stilesw »

tjhkkr,

Kevinkin and I started something like this some time back. We created a DropBox reference library for Lua code samples and other reference material. We've not done a whole lot with the Lua part but I'll be happy to give you access to the library if you PM me with your email address.

Thanks for the interest/ideas,

-Wayne Stiles
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: LUA code libraries.

Post by tjhkkr »

Thank yoU!
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
User avatar
fortyporkpies
Posts: 20
Joined: Wed Apr 08, 2009 7:09 pm
Location: Washington DC

RE: LUA code libraries.

Post by fortyporkpies »

Always have thought that that would be a great addition to the forums...
Attachments
LUASNIPPETSCMANO.txt
(121.68 KiB) Downloaded 170 times
thewood1
Posts: 9138
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: LUA code libraries.

Post by thewood1 »

That is a great doc. I am going to add it to the document pdf zip I built, unless there are any objections.
User avatar
Randomizer
Posts: 1497
Joined: Sat Jun 28, 2008 8:31 pm

RE: LUA code libraries.

Post by Randomizer »

@Fortyporkpies, An excellent resource, many thanks for compiling and uploading it.

-C
User avatar
fortyporkpies
Posts: 20
Joined: Wed Apr 08, 2009 7:09 pm
Location: Washington DC

RE: LUA code libraries.

Post by fortyporkpies »

Awesome!!
Yes, please upload! It's for everyone. And I'd love to see that zip when you get a chance!

Cheers
Nick G
thewood1
Posts: 9138
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: LUA code libraries.

Post by thewood1 »

Added and uploaded...
Attachments
CommandDo..ationv2.zip
(6.16 MiB) Downloaded 126 times
User avatar
fortyporkpies
Posts: 20
Joined: Wed Apr 08, 2009 7:09 pm
Location: Washington DC

RE: LUA code libraries.

Post by fortyporkpies »

Those pdfs are a goldmine. Thanks, guys.
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: LUA code libraries.

Post by tjhkkr »

ORIGINAL: thewood1
Added and uploaded...
Thank you for these .pdfs
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: LUA code libraries.

Post by angster »

Generic Helper Functions
Attachments
Generic He..unctions.txt
(5.06 KiB) Downloaded 85 times
User avatar
fortyporkpies
Posts: 20
Joined: Wed Apr 08, 2009 7:09 pm
Location: Washington DC

RE: LUA code libraries.

Post by fortyporkpies »

@angster - Thank you for posting these. The group manipulation functions are especially helpful!
User avatar
stilesw
Posts: 1569
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: LUA code libraries.

Post by stilesw »

angster,

Thanks for the code examples. I've included them in the unofficial CMANO Lua sample library. This is a companion repository to the unofficial Dropbox general CMANO reference library.

Anyone who would like access to the Lua reference or general reference libraries please PM me with your email address and I will add you to the access lists.

Also, anyone who has Lua code samples or other reference material of interest to the CMANO community, let me know and I can include them in the Dropbox files.

Thanks,

-Wayne Stiles
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
Halsey1945
Posts: 21
Joined: Mon May 18, 2015 1:55 pm

RE: LUA code libraries.

Post by Halsey1945 »

Not sure if this is the place to put this, but I made a program to create ScenEdit_AddUnits in Python. I was wondering if there are any special requirements or suggestions anyone can think of. Also, if I should try and make it in other languages. Here is what I have so far:

A command prompt program that asks for unit type, decides what info is needed, asks for it, sends it to the right function (air, facility, ship, submarine), and prints the results.

A program that takes an input file, creates a list by line of the input, takes the first input as unit type, decides needed info, sends to the right function, adds it to a result list, continues until there is no more list elements, and prints the results to a output file. This one is the most troublesome one. Also, right now you have to edit in the file names.

my programming skills are rudimentary at best, but I am a quick and dedicated learned. And, I am hoping to help others.
User avatar
stilesw
Posts: 1569
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: LUA code libraries.

Post by stilesw »

Halsey1945,

Well, I've never done anything in Python (old FORTRAN, COBOL, Pascal, C/C+, and Basic guy). I have done Lua within CMANO. I'd be happy to check out what you have created but the CMANO Lua expert is michaelm.

I also informally maintain the unofficial CMANO DropBox Reference and Lua Code sample library - happy to give you access if you PM me with your email address.

-Wayne Stiles
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
Halsey1945
Posts: 21
Joined: Mon May 18, 2015 1:55 pm

RE: LUA code libraries.

Post by Halsey1945 »

Here is what I have so far.
Attachments
CMANOProgram.zip
(10.3 KiB) Downloaded 69 times
Post Reply

Return to “Mods and Scenarios”