Stacking

killmeplease

Mk Z on Steam
Joined
Nov 22, 2007
Messages
2,795
Location
Samara
Unit Stacking modcomp [WIP]

With 1UPT, logistics are a big problem.
The Stacking modcomp to come has to solve this problem.

1UPT tweaking is a widely discussed topic, i've seen 3 of such a threads already. People propose a variety of solutions. This is an example tread: http://forums.civfanatics.com/showthread.php?t=385180

So, here is the plan:
  • think out a best stacking system (by gameplay criterion)
  • program combat units stackability, penalties, actions, interface etc.
  • teach AI how to use it

Any help/comments are appreciated.
 
why arent possible?
SDK is already released (today)

The SDK in civ5 does not refer to the same thing as it does for civ4.

In civ5, it is (properly!) applied to all development tools. The part released today was WorldBuilder, Tuner, ModBuddy, and Nexus.

In civ4, it applied exclusively to the C++ used to create custom DLLs. That has NOT been made available yet, and will not be for a few months. Keep in mind, the same exact thing happened with civ4; the DLL access came a few months after release.

By delaying that, they have a chance to get a few patches out so it is more stable of a base, and clean up the code in relative peace. Always a good thing to do, after the frantic activity leading up to a release. ;)
 
thanks for explanation

so we have to wait and use this time span to master the tools firaxis gave us until they grant us sources

Pretty much, yeah. And there is a LOT you can do; Proper stacking, though, isn't really one of them.

Could do some creative things with enough lua use, but it won't ever be simple to use, I'm afraid.
 
Well it's quite easy to change the stacking limits just like that. It's all the fluff around that takes time to update.

I am working on a 2 UPT mod. It started just like a test and worked out to be quite fun to play as well. The big problem is to make the AI understand and play by this rule properly.

Anyway so far I have changed the ranges for archers and other ranged ancient units (except for the ancient artillerys) to 1. The idea behind this was that since you can have 2 upt you can (and should) defend your archer with a good defensive unit. I also edited the cost for those units I changed the range for, to keep it worthwile to produce. Yeah I don't really like archers shooting across lakes and such. :)

I also changed so that musketmen and other later gunpowder units have a range of 1 with a weak range attack. The idea here is that even if you don't want to risk your unit in an attack you could always fire of a shot from the distance. And hey... if archers have a range of 1 I guess riflemens should also have that.

One other change I have done is to increase unit health to 12 (I keep testing and changing this all the time).

I am working on a few more things to flesh this out even more.

What I wanted to say is that you can do alot with just xml changes. Start experimenting! :D
 
I am working on a 2 UPT mod. It started just like a test and worked out to be quite fun to play as well. The big problem is to make the AI understand and play by this rule properly.

Anyway so far I have changed the ranges for archers and other ranged ancient units (except for the ancient artillerys) to 1. The idea behind this was that since you can have 2 upt you can (and should) defend your archer with a good defensive unit.
imho 2 upt ruins tactics (what 1upt was introduced for) greatly.

though sounds interesting. can you write what files you have changed and what the changes did you make?
 
Oh, a limited stack mod would be different; So long as it's kept small enough, all the issues with unit selection and movement can be minimized, at least enough for people to play with it anyway. ;)

And yes, the stack limit is set via define. Extremely easy to modify. It's the interface and AI that are the principal issues. Mainly just selecting a stack and moving the units together; It's not possible in Civ5, the code allowing it was removed.
 
imho 2 upt ruins tactics (what 1upt was introduced for) greatly.

though sounds interesting. can you write what files you have changed and what the changes did you make?

Well tactics becomes very different with 2 UPT instead of 1 UPT but imho it does not ruin it. The reason I tried to mod this in the first place was because I found it stoopid that archers had a range of 2.

Anyway I'm at work now so I can't say the exact changes I made. But here are some!

Stacking limits from 1 to 2
Unit health from 10 to 12
Unit maintance from 8 to 6 (have no idea what the number stands for but it worked like a charm).

Changed the range for a bunch of units. Every units except catapult and trebs for the ancient and classical period from 2 to 1. Many gunpowder and later unit (such as musketmen and riflemen) received a range of 1 and range strenght that is weaker than their melee strenght. (I haven't tested this properly yet) Oh and I also made it so that units that have 1 in range also can move after they shoot. Shoot and scoot.

I also have made some changes to the promotions. And I am trying hard to introduce a new promotion for archers and other range units. I want them to get a free attack (perhaps 50-60% of their current range strenght) on anyone that attacks their hex. You can't do this in XML and I am not sure if you even can do this in Lua but lua is pretty new to me so I am unsure.
 
There is something like free-attack already written into the code somewhere in globaldefines.xml. It is off by default. I tried enabling it and now it works in an interesting way...when you tell a unit to attack, a ranged unit would shoot at you and your attack is cancelled (but you did not use your move), and if you are still healthy enough you can order the attack again.
 
There is something like free-attack already written into the code somewhere in globaldefines.xml. It is off by default. I tried enabling it and now it works in an interesting way...when you tell a unit to attack, a ranged unit would shoot at you and your attack is cancelled (but you did not use your move), and if you are still healthy enough you can order the attack again.

are you certain? there aren't any boolean tags in the global defines, so its unlikely that its there, plus I searched and couldn't find it. Could you kindly point to where that is?
 
I like the new concept that you don't have to create the stack of doom when going on conqest. however one UPT is not optimal either, so very interesting ideas here, is there any mods ready for download?


and is it possible to make the stacking number dependen on the another unit or a promotion?

thinking a that GG could increase the stacking limit from 2 to 3?

or perhaps a command center kind of unit?

or that you could increase the stacking limit in cities or/and citadels?

I also find the combination with 2 UPT and range reduce to archers a good way to compensate for more UPT.

keep posting your results
 
I suggest that 1 ranged unit should be able to stack with 1 melee and certain gunpowder units....however, ranged units could not stack with other ranged units.

In other words, units such as warriors, spearman, swordsman, longswordman, pikeman, musketman, rifleman, infantry, marines, and mech infantry should be able to act as escorts for ranged units....mounted units, armor, and gunships could NOT act as escorts.

BUT, if the escorting unit is killed, then the ranged unit is also killed.

Here is a link to an ongoing discussion re: this proposal: http://forums.civfanatics.com/showthread.php?t=397516

What'cha think?
 
(edit) For what it's worth, here are my thoughts with respect to X-UPT:

Infinite-UPT
Previous iterations of Civ let you stack as many units as you liked. The problem with this approach, in my opinion, was not unlimited stacking per se. Instead, the deeper problem is that every unit in a SOD was effective. That is, all units in a SOD could attack along any front (i.e. side of a tile) without any combat penalty and, similarly, all defenders could defend along the same front without any combat penalty. Effectively this assumes an infinite front along each edge of a tile. From a reality perspective this is jarring and from a tactics perspective it is a "dumb" (I don't mean to use that word perjoratively) system since the "optimal" defender is always chosen to fight. Either way, it hurts immersion and gameplay for a lot of us.

1-UPT
The 1UPT system attempts to deal with this by only allowing 1 unit on each tile. 1 unit = 1 attack from that tile (notwithstanding cavalry whose movement allows them to cycle in and out of a given tile on a given turn). The trouble, as we've seen, is the difficulty in integrating tactical level combat operations into a strategic level game (i.e. unit navigation, AI inability to master necessary tactics, etc).


In either approach, however, there is an implicit balance between offense and defence:
  1. Under the SOD system, unlimited attacks may be met by unlimited defenders;
  2. Under the 1UPT system, 1 attack per tile is defended against by 1 unit per tile.

This balance lies not in UPT limits, but in that offensive output from any given tile(notwithstanding ability to concentrate fire) is counterbalanced by defensive capacity in any given tile. In other words, defenders cannot be artificially overwhelmed. This is the balance that needs to be maintained in a move to a >1UPT system.

Moving to X-UPT where X > 1

The general idea is that tiles would be split into fronts. This would be done automatically during combat and effectively function as a hybrid approach between previous SOD approaches and the current 1UPT. Basically, the number of attacks that could be made from a particular tile's edge would be subject to a limit. Analogously, defenders would be commited to particular fronts and have to face all attacks from that direction (until defeated, at which point another unit on that tile would take over the job of defending that front).

Under the hex system, natural UPT limits seem to be 2, 3, or 6. This would lead to tile fronts of 3 sides, 2 sides, or 1 side in length.

Proposed system for 2-UPT
Spoiler :

OFFENSE:
Melee - maximum 1 attack in any given direction out of the attackers tile. i.e. If there are two melee attackers on a tile, each may attack, but the second one attacking may not attack in the same direction as the first.

Ranged - ranged attacks have no restrictions on number of attacks in a given direction (i.e. two ranged units on the same tile could both fire in the same direction). Range attack distance would generally be reduced to 1 tile except for modern artillery.

Cavalry - may attack in the same direction along the same front the unit it is sharing a tile with.

DEFENSE:
Ranged - capable of counterbattery fire or defensive support fire (as appropriate) based on a % chance. % chance and # of counterfire could be modified with promotions.

Front Line Defender (FLD) - Basically what will happen here is that tiles will be divided in half, with each defender taking responsibility for three contiguous edges. Rules of engagement would be along the following lines:

On the first attack against a tile, the best FLD is selected to defend that edge of the tile. That FLD (FLD1) is now commited to that edge and must meet any subsequent attack on that edge. This becomes one of the three edges that FLD1 may defend, without prejudice to whether it be the central edge or one of the outer ones.

If another edge is attacked, the defender is chosen based on what the companion unit is on the tile. If it is another FLD, then FLD2 defends and commits to that edge. If it is a ranged unit, then FLD1 will defend if the attack occurs on an edge that is within the limit described above.

For the purpose of exposition, assume a straight battle-line - let's say five hexes long. Since orientation makes a difference to concentration of fire, I'm including two sets on numbers - horizontal battle line ratios are shown in brackets.

Line to line ratio of fire - compare to 1UPT
In 1UPT, the attack/defence ratio along the length of the line would be 5/5. Adding in ranged attacks it would be 10/5.
In 2UPT the attack/defence ratio would be 10/10. Assuming modern arty (w. range 2) the ratio would be 20/10. So far, everything is balanced in respect to relative fire capabilities.

Concentration of fire - compare to 1UPT
In 1 UPT, depending on the orientation of the battle line, the attacker could achieve a concentration of fire using melee units of 2/1 (or 3/1). Adding ranged attacks into the mix the ratio becomes 5/1 (or 6/1) - this assumes no ranged units along the attackers front line.

In 2UPT, the maximum concentration of fire on 1 defensive unit would depend somewhat on front commitment. Using only range 1 melee units, the total ratio would be 4/2 with possibly one defender taking the full load or the defenders possibly splitting it, depending on the type of units defending (6/2 with one defender facing 4/1 and the other 2/1). Arty would increase the concentration of fire ratio to 10/2 (12/2)
Spoiler :
I would propose that arty have a chance to damage all units on a tile.
These ratios balance with 1UPT.

These rules could be scaled to higher UPT. 3 and 6 seem like natural limits, since they divide evenly into a hexes sides.


A couple of closing thoughts:

- This approach would maintain the tactics that make 1UPT interesting, but introduxce some nuances with respect to combined arms. Positioning remains important, since gaining an enemy's flank provides the opportunity for greater concentration of fire.

- A system of limited attacks per edge and defender edge commitment could eliminate the need to a hard UPT limit since extra UPT would effectively be wasted (at least for the attacker). A soft limit could be developed instead that would provide combat penalties due to "crowding".

I'm interested in discussing a move to >1UPT, so please let me know what you think of these ideas.

Pooh
 
I patiently await the day that siege engines will be able to stack with one other military unit on a tile, similar to how a worker can.
 
Back
Top Bottom