Page 1 of 1
Lua gadget example: Turn based play
Posted: 05 Feb 2009, 01:46
by TheFatController
I had an idea of how to implement
turn based play using a mix of Wait commands and the AllowCommand function, here's the results:
Download: http://pw3n.net/gadgets/turn_based.lua
It does seem to work (aside from small problems like landing aircraft in the orders phase and losing the ability to control firestate) if you drop it into any mod.
There's also a table which can be used to end the orders phase early, if finishedOrders[teamId] is 'true' for every team then the orders phase will end, I imagine this would be best done with a GUI button.
I'm not too keen on taking this much further myself but wanted to see if it would work and am releasing it for modders to have a go with and hopefully improve.
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 09:47
by TheFatController
Todo list:
- Freeze resource gain/loss during order mode.
- Freeze reload times during order mode.
- Freeze unit movement during order mode.
- Hide Firestate and add a fake Firestate option that can be used to toggle how the unit works in action mode.
- Add a 'DONE' button to unsynced so teams can declare their ordermode finished (and set finishedOrders to true).
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 11:44
by SpliFF
I'm very interested in this. It has potential.
I will finish it off and make it an alternate game mode for Metalstorm. Metalstorm has a strong focus on strategic planning so this is a perfect compliment to the mod. I'll probably implement it as a limited "pause" resource that players can activate a limited number of times.
Thanks for the release. You rock!
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 12:13
by TheFatController
Thinking about it, if you were able to send a pause from Synced and prevent any players from unpausing that would be a lot better than using Wait, but I don't believe you can currently.
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 12:26
by jK
... deploy gadget?
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 12:53
by TheFatController
Oh yes, that worked didn't it..
The gadget in this post was a quick job I really just wanted to start a discussion with the example.
That'll be something to look into.
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 13:41
by imbaczek
planes landing and stuff could be taken care of with movectrl, right?
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 14:25
by R-TEAM
Hi,
nice idea.
But i have the best (and most realistic)
turn based Wargame (ATM WW2 only)already here
and have tryed Spring because i searched a good RTS .......
[and spring is a realy good RTS

]
So for me -> thanks, but dont need it.
Maybe other like it - best wishes for it
R-TEAM
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 14:27
by SpikedHelmet
Despite the fact that I absolutely abhor turn-based games, this seems like a very cool idea, for a computer-game version of turn-based TT games like Warhammer, Warmachine, even *shudder* D&D.
Re: Lua gadget example: Turn based play
Posted: 05 Feb 2009, 15:05
by imbaczek
gimme nethack
Re: Lua gadget example: Turn based play
Posted: 06 Feb 2009, 16:26
by Pendrokar
...M.A.X. 3D...
Re: Lua gadget example: Turn based play
Posted: 27 Jul 2009, 15:13
by Avatar
The above link seems to be broken. Any alternative location? tia
ps: M.A.X. was G.R.E.A.T. but way too unstable

Re: Lua gadget example: Turn based play
Posted: 28 Jul 2009, 12:57
by Pendrokar
Avatar wrote:
ps: M.A.X. was G.R.E.A.T. but way too unstable

That's for sure...
Re: Lua gadget example: Turn based play
Posted: 29 Jul 2009, 08:02
by yuritch
Not that unstable with 1.04 patch btw. Too bad MAX 2 was a whole different game.
Re: Lua gadget example: Turn based play
Posted: 31 Jul 2009, 23:46
by Guessmyname
I still say you'd be better off doing this by actually pausing the game during the orders phase.
Re: Lua gadget example: Turn based play
Posted: 01 Aug 2009, 13:11
by Avatar
btw: there is a M.A.X. remake in development ->
http://www.maxr.org
Turn based play would be great in combination with buying/deploying units instead of building an infrastructure for production and with objectives that the players have to take. Spring 1944 has both options (buy/deploy and objectives).
Would this be possible for other mods (with LUA)? (i really like EE and NOTA).
I┬┤m not into programming and LUA, so i can┬┤t imagine if this is possible and how long it would take to do it...
Re: Lua gadget example: Turn based play
Posted: 23 Sep 2009, 20:53
by D3monic
Avatar wrote:The above link seems to be broken. Any alternative location? tia
It's still broken.
Re: Lua gadget example: Turn based play
Posted: 24 Sep 2009, 21:51
by bobthedinosaur
can you pause via lua and have a sync timer to unpause?
Re: Lua gadget example: Turn based play
Posted: 13 Apr 2015, 13:30
by 8611