Lua Videos posted

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

Lua Videos posted

Post by Whicker »

I decided to make a video on some basics of using Lua... well, it went a little long. 59 minutes of pure gold. Well, maybe not gold, but for a total beginner it may be helpful. If you already know the basics of Lua/coding there may not be much in there for you.
Also went over a way to do scoring with a lua event. At the end went into the deep end of the Unit Wrapper. Also a bit on the luahistory file and snaketail log viewer. Not sure what the other 45 minutes are about. Should have broken them out into separate vids but so it goes.

https://youtu.be/eDlgkYDTbUQ

looping thru units in Lua - to change their mission or loadout. I learned a bit about this while making it, and it looks like checking for nil values (from units destroyed) may not be necessary any more due to better error handling in the game? I had been a bit confused about this before.
https://youtu.be/lLiykXLExBc

making a function in Lua
https://www.youtube.com/watch?v=je6rl0YFQ_I

Functions and Returning Values
https://youtu.be/CbX6OmIzsoA

Lua Tables
https://youtu.be/F3grnsGdD7A

Unit Wrapper in Depth
https://youtu.be/F5eVMhro9kY

Using lua to set a ship's path when leaving a semi landlocked port
https://youtu.be/rvxnZJio7ac

Using lua to change the waypoints of a course - addon to one above about ships leaving port
https://youtu.be/rC0fObbhNro

Using overlays
https://www.youtube.com/watch?v=Zjhm6eX9_gw

Hopefully they are of some use to some people out there! I highly recommend playing around with Lua, it can be fun/easy to work with (sometimes).

I also created a Videos page on CommandOps to keep them together:
https://commandops.github.io/videos/
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua Videos posted

Post by KnightHawk75 »

This is great. I suspect this is going to help a fair amount of people just starting out. Hopefully it demystifies some things for those not familiar with lua or general programming constructs who may have been holding off even trying.

Nice work sir, a definite plus for the games community.
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Lua Videos posted

Post by Whicker »

Thanks!
I'm a little disappointed in the video quality - I think that is the first video I have made on my new monitor that is higher resolution than the video was produced at so it is a little fuzzy from getting resized. Just about everything that could have gone wrong did go wrong while making them.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua Videos posted

Post by KnightHawk75 »

Seemed ok to me at least in 1080p full screen via YT, you live you learn, could maybe increase the font size in the console editor maybe for next time (console view menu zoom-in), may help a little when resizing. Keep it up!
User avatar
Gunner98
Posts: 5998
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Lua Videos posted

Post by Gunner98 »

Great video

I've done quit a bit of Lua but mostly the 'hunt & peck' then call for help variety! This helps a lot.

Cheers

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Lua Videos posted

Post by Whicker »

added 2 other videos above - one on a basic function that was from a week or two ago and another one from today on using a function to return a value.

Any other ideas for a lua video? I think there is some basic stuff to get people on track there. Might do a few on creating a scen but just looking for idea for a Lua video at the moment.
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Lua Videos posted

Post by Primarchx »

These are great because it puts Lua in context with Command. I've been watching a bunch of Lua Tutorials but particularly like yours, Whicker, because it gives game-specific examples. Great job!
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua Videos posted

Post by KnightHawk75 »

Should probably be pinned, or maybe a link added in the resources pinned item.
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Lua Videos posted

Post by Whicker »

glutton for punishment, vid on tables added to the list above.
User avatar
Primarchx
Posts: 1954
Joined: Sun Jan 20, 2013 9:29 pm

RE: Lua Videos posted

Post by Primarchx »

Good info on the #table function with regard to custom element names vs standard, ordered references!
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Lua Videos posted

Post by Whicker »

another one- going over the unit wrapper a little deeper.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua Videos posted

Post by KnightHawk75 »

Cool I'll check out the newly added content, thanks.
Whicker
Posts: 665
Joined: Tue Jun 19, 2018 9:54 pm

RE: Lua Videos posted

Post by Whicker »

added 3 more this weekend to the list in the first post - 2 on fixing ship path issues when leaving a port and one on overlays.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Lua Videos posted

Post by KnightHawk75 »

Nice I'll check them out tonight, but in advanced - thanks for doing more of these.
User avatar
kevinkins
Posts: 2465
Joined: Wed Mar 08, 2006 11:54 am

RE: Lua Videos posted

Post by kevinkins »

How did I miss these? Thanks a million!

Kevin
“The study of history lies at the foundation of all sound military conclusions and practice.”
Alfred Thayer Mahan
Post Reply

Return to “Lua Legion”