Page 1 of 2
Deployments
Posted: 05 May 2007, 21:13
by Guessmyname
Basically, in my more whimsical moments, I dreamt up this:
1. Host hosts a game, sets up a points limit and deployment zones (the boxes used in start-pos selection?)
2. Players join, select sides
3. Game start. Force Selection and Deployment Stage. Nothing moves or shoots or anything like that. Players select units to use in the coming battle, preferably something like this:
Select unit class (ie Tank, Infantry, Aircraft etc)
Select specific unit type (ie Predator Tank)
Select version of unit (ie Predator Annihilator with Heavy Bolter Sponsons)
4. Players place their units on the map (icon-list of units to be deployed at side - drag drop onto map?)
5. When a player has deployed his forces, he clicks the ready button (like when you're choosing a start position). When all players have done this, the game begins
Most of this should be possible in lua (the deployment phase for example - tell lua to create certain units...). The menu system for choosing units, the drag-drop thing and pretty much all of 'point 5' and 'point 1' are the things I'm not sure about.
What does everyone think? Feasable?
Posted: 05 May 2007, 22:17
by Snipawolf
Sounds like liberation day, in Spring.. If this works I may just make a game for it

Posted: 05 May 2007, 23:24
by imbaczek
Doable, more-or-less.
Make a unit which has commands to spawn and despawn some units in a region. (Maybe it's possible to access start area data after game start, if not, should be trivial to add.) Points and stuff can be kept by Lua, with presentation using gadgets. When the user clicks ready (either a command in the spawner or a gadget button), the spawner gets despawned and game starts - units are given their proper LOS and unimmobilized.
What would be needed: unit drag'n'drop in deployment phase. Dunno if that's possible.
Posted: 06 May 2007, 02:25
by AF
This would be done via a lua start script, aka a lua mission that doesnt specify a map or mod.
The only code that'd need changing outside of lua would be the lobby.
Posted: 06 May 2007, 02:46
by trepan
Guessmyname
I had the same idea a long time ago (think I picked it up from someone
else's thread at that). I liked it then, and I like it now. Thanks for the
reminder.
I've got most of it implemented in a LuaRules module that is used before
the regular game gadgets code is loaded. I'm not too sure I want to add
team switching, but I think you'll be pleased with the rest of it. I'm also not
touching the initial commanders (except to rig the command buttons during
the deployment phase).
imbaczek
You describe the setup I'm using pretty closely, with the biggest difference
being that all units are build using the ICON_BUILDING type. Note that
this allows you to see the valid locations for units. I'm also replacing the
real command descriptions with fake ones for the dummy units, and using
the commander tooltip to show how much metal and energy you have
remaining. Builds that have become too expensive have their buttons
disabled (greyed out).
AF
Huh?
Posted: 06 May 2007, 03:38
by trepan
Additions:
- A countdown timer (host can reset)
- Host can change the timer, radius, metal, and energy levels
on the fly (units are removed in reverse chronological order for
resource adjustments)
- Build buttons show the number of units of their type that could
be built with the remaining resources
- On-screen display of remaining resources, players that are
ready, the deployment radius, and the timer (probably player
countries too)
I'll probably package this into a mod mutator for folks to try. This
method also has the advantage of letting players know what they
are getting into before joining a battle.
Posted: 06 May 2007, 14:24
by Guessmyname
niiiiiice...
Posted: 06 May 2007, 15:54
by AF
Lua missions can also eb sued as start scripts.
Theres a tag in script.txt that allows the lobby to specify a start script to go long with the battle. Thus allowing game modes other than fixed/random/choose ingame using lua.
This way capture the flag or commander respawn type games are possible. It doesnt require lua mod rules, and its a choice for the user, not a part of the game mechanics the modder sets up.
The onyl obstacle so far has been betalord nto adding support to the lobby and server.
Posted: 06 May 2007, 17:17
by 1v0ry_k1ng
so its pick armies of certain sizes then duke it out?
wouldnt it be just as easy to have a single factory for a commander that can build anything instantly but has finite resources?
Posted: 06 May 2007, 17:35
by imbaczek
ivory: There's that 'Ready' button issue.
Posted: 06 May 2007, 18:11
by trepan
AF
How would you implement the deployment feature with a start-script?
Posted: 06 May 2007, 20:01
by Guessmyname
1v0ry_k1ng wrote:so its pick armies of certain sizes then duke it out?
wouldnt it be just as easy to have a single factory for a commander that can build anything instantly but has finite resources?
If that unit was a factory units would have to exit it before the next could be built. Thus, not instantaneous. Plus, with the number of units present in the mod I was thinking of, a factory's buildmenu would have over ten pages at least. The user would have to flick between them, causing more delay. All the units would also be around said factory, not deployed were the user wants from the get go (not all deployable stuff would necessarily be mobile)
If the unit was a mobile / nano-tower unit that built stuff where the user wanted, because of Spring's oh-so-smart pathfinding, it would still try to move closer to the place the thing it's build is. More delay. The buildmenu issue would also still be in effect.
Posted: 07 May 2007, 21:06
by trepan
Current Setup:
The green numbers in the lower left corner of the buildpics are the number
of units for that type. The yellowish numbers in the upper right corner of the
buildpics are the number of units that can still be created of that type (based
on maxUnit, maxMetal, and maxEnergy).
All build units have a Delete command (not shown in the screen shot). The
Delete command is bound to the "stop" action, so you can use whatever key
you have bound to the normal Stop command to delete units.
Posted: 07 May 2007, 21:39
by 1v0ry_k1ng
sweet. SOMEONE MAEK A MOD!
Posted: 07 May 2007, 22:10
by Guessmyname
I have a mod for use with this, just need the code and up-to-date dev version of Spring first before fitting them all together
Posted: 07 May 2007, 22:15
by trepan
This can be used with any mod, the code does not currently have any
mod specific unit names. The default setup is to load the available builds
with everything that the commander can build, and everything that the
commander's builders and factories can build (so Tech Level 1). This can
be customized for a mod with little effort.
The maxUnits, maxMetal, maxEnergy, and maxTime defaults can be
changed be editing the defaults (a no brainer). The host can also change
all of these parameters in game using the .deploy command.
I'll probably be releasing the code as a mutator for BA47 once it's done.
Then you can just copy the LuaRules/ code into your mod, make a few
simple edits, and you're good to go.
Posted: 08 May 2007, 02:13
by AF
Ironically similar to the way you did it.
I'd have a metal and energy bar, a paralysed commander and I'd let the user plonk down virtual units, then when the game starts theyd all spawn and off you'd go. Or they'd be actual units that're paralyzed like yours.
Posted: 08 May 2007, 06:08
by Shadowsage
Why am i reminded of Metal Fatigue?
Posted: 11 May 2007, 23:23
by Cainen
You weren't the only one to be reminded of it; this sounds almost exactly like the prebuild time in MF, though it doesn't look like it has the tech limits of that. However, MF was extremely clunky and did many things much worse than the things it did right.
Also, I'd suggest having a slightly different approach to that, one more like MF: if it's possible, read the resource limit that's set upon the game's start and take the resources from that, rather than giving you free resources; in MF, you could hold onto your metajoules so you could tech up earlier than you would be able to otherwise, or you could build an instant anti-rush.
Posted: 12 May 2007, 04:50
by Erom
Metal Fatigue wrote:metajoules
The most ridiculous psuedoscience name for a resource ever conceived!