Lua gadget example: Turn based play
Moderator: Moderators
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Lua gadget example: Turn based play
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.
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.
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Lua gadget example: Turn based play
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).
- 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
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!
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!
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Lua gadget example: Turn based play
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
... deploy gadget?
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Lua gadget example: Turn based play
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.
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
planes landing and stuff could be taken care of with movectrl, right?
Re: Lua gadget example: Turn based play
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
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
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25
Re: Lua gadget example: Turn based play
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
gimme nethack
Re: Lua gadget example: Turn based play
...M.A.X. 3D...
Re: Lua gadget example: Turn based play
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
ps: M.A.X. was G.R.E.A.T. but way too unstable
Re: Lua gadget example: Turn based play
That's for sure...Avatar wrote: ps: M.A.X. was G.R.E.A.T. but way too unstable
Re: Lua gadget example: Turn based play
Not that unstable with 1.04 patch btw. Too bad MAX 2 was a whole different game.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Re: Lua gadget example: Turn based play
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
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...
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
It's still broken.Avatar wrote:The above link seems to be broken. Any alternative location? tia
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2700
- Joined: 25 Aug 2004, 13:31
Re: Lua gadget example: Turn based play
can you pause via lua and have a sync timer to unpause?
Re: Lua gadget example: Turn based play
dead linkTheFatController wrote:Download: http://pw3n.net/gadgets/turn_based.lua