Deployments
Moderator: Moderators
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Deployments
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?
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?
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.
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.
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?
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?
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.
- 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.
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.
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.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
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)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 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.
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.

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.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
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.
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.
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.
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.