Page 1 of 1

Lua Game Scripting

Posted: 08 Feb 2007, 01:15
by trepan
Here's a preliminary (incomplete and very rough) document describing the
next feature that I plan to add (synchronized mod-based lua game scripts).

http://trepan.homelinux.net/spring/gamerules.lua

I took a look at what it would take to implement it, and found that most of
the work had already been done in LuaUI (I actually started by copying
LuaUI.cpp, and then removing about 75% of it).

Some things that this will make possible:
- Gaia features (and probably units)
- Growing resources
- Game modes like hold-the-flag
- Multiplayer scripted scenarios
- Limiting or disabling unit sharing (comm-ends team games)

P.S. This is still in the planning stages, so don't bother me with feature
requests. If anything, it'll just make me take longer to get to whatever it
is you want. The call-in and call-out listings are not complete, and some
of the formats are likely to change. I'm posting this now to get yall thinking,
not to be pestered ;)

P.P.S. Hopefully this will work nicely with mutators. We'll also see how
it plays out with respect to different maps...

Posted: 08 Feb 2007, 01:19
by smoth
Sounds neat trepan.

How would this work?

Is it a sepperate file or would it be included with a map?

Posted: 08 Feb 2007, 01:20
by trepan
You just Include gamerules.lua in the mod package (or in one of its dependencies).
This is mod based, not map based. I might play with allowing map based control later,
but for now, mod only.

Posted: 08 Feb 2007, 01:21
by Peet
<3 Trepan

Does it enable mandatory mod ui's?

Posted: 08 Feb 2007, 01:22
by trepan
P3374H
No. That will probably never happen.

Posted: 08 Feb 2007, 01:26
by Fanger
rats...

Posted: 08 Feb 2007, 01:32
by LOrDo
:(
Oh well, looks like a very cool extension.

Posted: 08 Feb 2007, 01:39
by smoth
This sounds really neat. Not a feature request but a question.

can this work with the missions to?

Will it allow say, an aircraft to fly by and drop of units for a mission?

This really sounds neat!

Posted: 08 Feb 2007, 02:20
by TheFatController
This looks excellent, I already have a few ideas :)

Would map based scripting be possible at some point too?

Posted: 08 Feb 2007, 03:35
by AF
smoth wrote:can this work with the missions to?
Will it allow say, an aircraft to fly by and drop of units for a mission?
already possible in the mission lua API. What would be nice is if the mission lua API had the GUI controls the lua UI has.