Author Topic: Small, but VITAL, Lua Suggestions  (Read 1118 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Small, but VITAL, Lua Suggestions
« on: 7 September 2009, 17:47:44 »
I'm going to cut to the chase. Here's some Lua suggestions I've been hoping for for military. They are not particularily complex, nor are super powerful, but useful none-the-less.

1. Way to get the typed text (needs hotkeys disabled while typing), as well as team/all. From when we press enter and type, normally meant for multiplayer.

2. Way to display text in the console. Errors are displayed in the console, but what about Lua messages?

3. Way to instantly give an upgrade to a faction. Now THIS is vital. Not sure why it's been overlooked.

4. Way to check if faction has an upgrade. Goes hand in hand with the last one.

5. Way to force unit location (no 2 space around sides). For precise placement. Should be done with an extra optional value in the createUnit(), such as createUnit('name', 0, startLocation(0), true).

6. Return true for button pressed on showMessage(), so to exectute AFTER all messages viewed, so we can get when the person has finished looking at the message. For example: myvariable = showMessage('xxx','xxx'), and my variable is false until the message 'ok' box is pressed.

7. Hold Position command. Simple nuf. Just perhaps holdPosition('unit').
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: Small, but VITAL, Lua Suggestions
« Reply #1 on: 7 September 2009, 18:44:46 »
When/if I learn LUA I'll be glad to have options like these. :)
Egypt Remastered!

Proof: Owner of glest@mail.com

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Small, but VITAL, Lua Suggestions
« Reply #2 on: 7 September 2009, 23:16:54 »
1. Way to get the typed text (needs hotkeys disabled while typing), as well as team/all. From when we press enter and type, normally meant for multiplayer.
2. Way to display text in the console. Errors are displayed in the console, but what about Lua messages?
There is setDisplayText(), I want a debug log too, but I am not doing that until glgooey is all sorted.

Quote from: omega
3. Way to instantly give an upgrade to a faction. Now THIS is vital. Not sure why it's been overlooked.
4. Way to check if faction has an upgrade. Goes hand in hand with the last one.
Yep.

Quote from: omega
5. Way to force unit location (no 2 space around sides). For precise placement. Should be done with an extra optional value in the createUnit(), such as createUnit('name', 0, startLocation(0), true).
createUnit() will return a boolean indicating success or failure then, and you will have to be responsible for checking it and responding accordingly.

Quote from: omega
6. Return true for button pressed on showMessage(), so to exectute AFTER all messages viewed, so we can get when the person has finished looking at the message. For example: myvariable = showMessage('xxx','xxx'), and my variable is false until the message 'ok' box is pressed.
The message box is asynchronous, the call returns immediately, a 'callback' that can be optionally supplied to showMessage() will give you what I think you want...

Quote from: omega
7. Hold Position command. Simple nuf. Just perhaps holdPosition('unit').
attack stopped commands have been added.

For future reference, this is the LUA discussion topic of choice,
https://forum.megaglest.org/index.php?topic=4556.0

I understand you people don't like to use bug/feature trackers, but if you start a new topic for all these suggestions, some of them will get lost!  It's inevitable.
Glest Advanced Engine - Code Monkey

Timeline | Downloads