| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Amateur Game Designer
Join Date: Nov 2005
Posts: 1,011
|
Stack Attack... Attack.
So, again I turn my eye to modding Civ4 and adressing one of the meatier issues of the game: The overly simplistic combat model.
But it's tough deciding how to handle combat as part of a stack attack model. So far I've devised this: Attacker starts the combat. Attacking artillery fires Defending Artillery fires Defending archers fire (this is one of the few cases the defender gets the initative) Attacking archers fire Attacking cavalry go. Defending Cavalry go. Attacking infantry go. Defending infantry go. Nearby artillery "arrives" Nearby cavalry "arrives" Repeat cycle Nearby archers and infantry arrive Repeat until victory is determined. If victory is determined before any nearby units arrive, they are not affected by the combat. Any units reduced to 10% will fall back. For the specifics, units of equal strength, all factors considered, will do 20% damage to one another (how this varies, or if it will vary at all, will come in later iterations). However, if one side is outnumbering the other, that side will suffer a 50% penalty ratio for proportion he outnumbers the opponent. To detail this, if one person attacks a single unit with two units, both of the attacking units will be at 75% effectiveness in terms of attacking: For the purpose of taking damage, they will still be at full effectiveness. If this damage puts a unit below 10% or into death, health gets set to 10% and the unit is flagged as "wounded" and moved back one square. Wounded units can be killed. Calvary will have the opportunity to take a promotion to bypass this step for units they damage. Units with an advantage versus another unit type will have a 50% chance of attacking their favored foe, if one exists in the battle. Units can take tactics promotions that increase this chance of attacking their favored foe and decrease their chance of being attacked by their counter. Infantry (and certain ships) may also take the guard ability which allows them to be selected instead of another unit. The way this will proceed: Unit's turn (attacker or defender) comes up to attack. It rolls to see if it gets to attack a favored foe (if it has one). Upon success, the target unit is checked for a tactics promotion. If the original roll would not have been a success with the defender's modifier, the target is picked at random (treated as a failure). The targetted unit may be re-targetted, however. Upon success, the defender's units are polled to see if any have the guard promotion. If any do, a check is made for intervention and the best possible guard is selected. If that guard stands a better chance than the original targetted unit, the guard is now the defending unit. At this point the attacking unit has a 20% chance of attacking the guard unit, again modified by tactics, otherwise will select a unit at random. This part seems to involve a lot of steps, so I may need to revise this process of target selection. When nearby units are pulled in, their location is polled versus that of the enemy. If an enemy unit is pincered (enemy units on both sides) units will get a boost when entering combat to assist. Example: Tiles A B C. Player 1 is in tile B, is attacking tile C. When units from A arrive (after a couple of rounds into combat, depending), those units will have a boost, so player 1 better be able to take out units in tile C quickly. The advantage of this system is that it allows units to fight as a stack, as well as hold ground or a line (the system used in Alpha Centauri), as well as gerally making the system more tactical. Units will hopefully live longer and allow a player to recover from a mistake and/or recover from being massively outnumbered and, ideally, give the defender an advantage in the form of attrition (defender regenerates, attacker does not). Options? Suggestions? I need to make sure I have a solid "flowchart" of sorts before I start programming.
__________________
Active: Civ 5 Mod components Mylon Mega Mod - Holistic Cultural model, enhanced resources, and more! No longer maintained: Broken Loose - A Modmodmod for Fall Further, featuring cultural and economic improvements |
|
|
|
|
|
#2 |
|
Mephistophel
Join Date: Nov 2006
Location: Bellinzona
Posts: 14,304
|
I'd reccomend taking a look at Dales Combat Mod. It does basicly everything you wanted.
__________________
One thing we are good at in English is having words for ways to die.-Neil deGrasse Tyson, on 'spaghettification' Looking at the poster again, I also like the way that the baby is cocking its head and looking away from the doctor, as if to show that this not merely a skeletal Moai-baby, it's a particularly aloof and disinterested skeletal Moai-baby.-Traitorfish |
|
|
|
|
|
#3 |
|
Amateur Game Designer
Join Date: Nov 2005
Posts: 1,011
|
I'm not seeing any details about how Dale's mod resolves the stack attack. I suppose I'd have to dig into the thread to get that info.
__________________
Active: Civ 5 Mod components Mylon Mega Mod - Holistic Cultural model, enhanced resources, and more! No longer maintained: Broken Loose - A Modmodmod for Fall Further, featuring cultural and economic improvements |
|
|
|
|
|
#4 |
|
Mephistophel
Join Date: Nov 2006
Location: Bellinzona
Posts: 14,304
|
IIRC, stack attack is done with any fighters attacking each other. All non-destroyed fighters provide ground support. Artillers fire is then exchanged, the ranged. Melee troops hold the line while mounted troops go around the flanks to atttack the artillery and archers. It is alot more complicated than this with opportunity attacks, and such. All of this is done in one combat, so you see a big clash. How you want combat done would require a complete (not just modding) of the source code, and possible expand into the unreachable parts of the game code. If you want combat as complex as you described, I would reccomend the Total War games.
__________________
One thing we are good at in English is having words for ways to die.-Neil deGrasse Tyson, on 'spaghettification' Looking at the poster again, I also like the way that the baby is cocking its head and looking away from the doctor, as if to show that this not merely a skeletal Moai-baby, it's a particularly aloof and disinterested skeletal Moai-baby.-Traitorfish |
|
|
|
|
|
#5 |
|
Amateur Game Designer
Join Date: Nov 2005
Posts: 1,011
|
I've fiddled with the code and I've almost made a stack attack mechanism for the space mod in this game, though I would dip into Dale's and steal (and tweak) the code he uses for the graphical part of the attack. The actual process isn't too difficult to program, I merely need to have a set in stone process laid out for the actual before, otherwise I'll wander around and not get anything done.
__________________
Active: Civ 5 Mod components Mylon Mega Mod - Holistic Cultural model, enhanced resources, and more! No longer maintained: Broken Loose - A Modmodmod for Fall Further, featuring cultural and economic improvements |
|
|
|
|
|
#6 |
|
Mephistophel
Join Date: Nov 2006
Location: Bellinzona
Posts: 14,304
|
I know nothing about C++ coding (it is likely hell will freeze over before I know how) but a major portion of Dales challenge is getting the AI to understand it and ranged bombardment.
__________________
One thing we are good at in English is having words for ways to die.-Neil deGrasse Tyson, on 'spaghettification' Looking at the poster again, I also like the way that the baby is cocking its head and looking away from the doctor, as if to show that this not merely a skeletal Moai-baby, it's a particularly aloof and disinterested skeletal Moai-baby.-Traitorfish |
|
|
|
|
|
#7 |
|
Amateur Game Designer
Join Date: Nov 2005
Posts: 1,011
|
Aye, that is a challenge, but for the most part, as long as the AI uses a decent mix of units and moves them around in a big stack it should be fine.
__________________
Active: Civ 5 Mod components Mylon Mega Mod - Holistic Cultural model, enhanced resources, and more! No longer maintained: Broken Loose - A Modmodmod for Fall Further, featuring cultural and economic improvements |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stack attack? | BobTheBull | Civ4Col - Strategy & Tips | 1 | Dec 20, 2008 01:00 PM |
| Stack Attack | hotstuffjsn | Civ4 - General Discussions | 20 | Aug 31, 2007 07:29 AM |
| Stack Attack | abuaftab | Civ4 - General Discussions | 5 | Nov 28, 2006 10:09 PM |
| What is a stack attack? | gamer9865 | Civ4 - General Discussions | 10 | Sep 11, 2006 04:33 PM |
| Stack Attack | alireza1354 | Civ4 - General Discussions | 0 | Nov 04, 2005 11:21 AM |