[MOD] Custom Combat

Freaky

Chieftain
Joined
Feb 4, 2021
Messages
61
Location
Israel
Sick of losing veteran troops to 90% battles? Me too. I'm fixing it. Initially, I plan on just changing the combat to 1 way, but eventually adding options. Here are the principles I'd like to enforce:

- Attacking with overwhelming force should always destroy the defender
- Attacking with underwhelming for should never kill the defender
- Attacking with superior force should always be beneficial
- Attacking twice with significantly superior force twice should usually destroy the defender

This will mainly mean more withdrawals and more narrow health results

Any other ideas?
 
One idea that @devolution and I have been discussing (and that he has already implemented in Civ 4 Colonization) is to place a limit on the number of combat rounds, like in air combat. A limit of 5 would ensure that a unit with superior combat strength can't die when at full health.
 
How about a Critical Strike / Critical Fail feature similar to D&D and similar RPGs?
  • An attacking unit that has at least 90% chance of winning automatically inflicts double damage.
  • An attacking unit that has 10% or less chance of winning automatically inflicts half damage.
 
How about a Critical Strike / Critical Fail feature similar to D&D and similar RPGs?
  • An attacking unit that has at least 90% chance of winning automatically inflicts double damage.
  • An attacking unit that has 10% or less chance of winning automatically inflicts half damage.

I think what you're describing is the opposite of a D&D crit, in that the effect is based on stats rather than dice rolls. Much better than a D&D crit for a strategy game, where RNG is generally bad.

I do think that RNG has a place in spicing things up, but I just think most games do it wrong. Random parts of a game should happen far enough out to do something about them. Like if you were to spice up DDR/Guitar Hero, etc. with some RNG...
Bad RNG: Randomly make your buttons presses not count, or move the arrows right before you're supposed to step on them
Good RNG: Arrows start in random lanes as they enter
 
I think what you're describing is the opposite of a D&D crit, in that the effect is based on stats rather than dice rolls. Much better than a D&D crit for a strategy game, where RNG is generally bad.
Than call it "RPG inspired even though it is the opposite way" or whatever. But you get the point: It wouldn't eliminate RNG just reduce it's effect.
 
I've changed the name to "Custom Combat" since the goal is no longer just to reduce combat RNG, but to give people more customizability.
 
I've got customizable number of combat rounds and damage per round in now locally. I'll be putting out a first release this week I hope. Forked and mergable from BULL.

Next on the list I have a request for making copper/iron give bonus dmg like FFH, and making troops not require those resources to build (all customizable of course).

Would other people be interested in having tactical combat where your stacks go into a mini battlefield until it's resolved like MOO2 or HoMM? Would be even cooler if GGs were like HoMM heroes.

Any other suggestions?
 
Would other people be interested in having tactical combat where your stacks go into a mini battlefield until it's resolved like MOO2 or HoMM? Would be even cooler if GGs were like HoMM heroes.
Surely we would... but...
  • IIRC it was tried already with little success/popularity.
  • MoO2 and HoMM were designed with that feature from the beginning and yet their AIs were lacking in competence. How would Civ4 AI handle it? :confused:
I don't want to discourage you but maybe you want to focus your efforts on something more promising and fruitful.
 
Surely we would... but...
  • IIRC it was tried already with little success/popularity.
  • MoO2 and HoMM were designed with that feature from the beginning and yet their AIs were lacking in competence. How would Civ4 AI handle it? :confused:
I don't want to discourage you but maybe you want to focus your efforts on something more promising and fruitful.
Yeah I totally agree. I would probably branch the code and work on that on the side. Definitely a major overhaul compared to exposing existing parts of the combat system for modification. Even if the AI isn't so good at first, it would at least be more interesting for non top tier players who dont enjoy stacks of doom.
 
A playable version of Custom Combat is out now! You can adjust the number of combat rounds and the damage per hit scale. Still some edge cases to work out, but changing the max combat rounds to 5 makes it feel more like Civ5, where evenly matched stacks will take multiple turns to destroy one another.

Steps
  1. Install BUG+BULL
  2. Download the code repo as a zip file - https://github.com/freakygithub/civ4bull-sdk/tree/civ4-custom-combat-master
  3. Backup the things from these next steps as you go... just in case
  4. Replace BULL's CvGameCoreDLL.dll (wherever you have it installed) with CvGameCoreDLL.dll from the zip file
  5. Copy CustomAssets from the zip to your CustomAssets folder (for me, ...My Games\beyond the sword\CustomAssets)
  6. Copy BugUserSettings from the zip to Bug's UserSettings folder (for me, ...My Games\beyond the sword\BUG Mod\UserSettings)
  7. Open Civ4 and start a game
  8. Open BUG menu (ctrl+shift+O) and play around with new settings :) You might have to re-update these when you load a game (for now), but with less RNG, you should need fewer reloads anyway.
 
Interesing,
Ill have a look, this looks promising.

I recenttly editted the resolve combat function to handle siege unit.
My rules are,
If siege, on attack, it canmot recieve damage from the defense defender.
If its a siege vs siege,
The defender gets to attack back one.
Also,
Hit chance is randomized with a consideration of health to both sides.
Same as for damage.
Both methods are game optional oprions.

Keep up your good work.
 
Thanks :) I'll add some seige options to the to-do list.
- Siege units ignore defender retaliation (boolean)
- Exception for other siege units (boolean)
- Siege collateral damage has a chance to miss each unit
 
Yeah I totally agree. I would probably branch the code and work on that on the side. Definitely a major overhaul compared to exposing existing parts of the combat system for modification. Even if the AI isn't so good at first, it would at least be more interesting for non top tier players who dont enjoy stacks of doom.
One thing to consider is that every single game that had such a system, even ones with fairly competent AI also have an autoresolve button. And that button gets used a lot. Players only really play battles manually when something big is on the line.
 
One thing to consider is that every single game that had such a system, even ones with fairly competent AI also have an autoresolve button. And that button gets used a lot. Players only really play battles manually when something big is on the line.
Yeah, I've used those options a lot myself. Total lopsided combat isn't any fun. One thing that most devs get wrong though is messing up what would have happened so you can auto-resolve to take out some of their troops when your tiny army would have gotten ROFLstomped, or when you have to reload to smash the opposing army yourself so you don't lose any troops. You can only get so close to accuracy, but one thing I doubt anyone does is learn how good the current player is compared to the algorithm and adjust accordingly. Probably something I won't do is a side project, but would love to see some day :)
 
Just tested it out with BAT, and it works! Updated the Readme to include BAT file locations
 
I've finished the checkbox to remove metal requirements, but I'd be interested in everyone's opinion on how to determine if a unit gets the copper/iron bonus.
Promotion when the unit is built? Can't upgrade later
Capitol has access? Common early on to have a disconnected city that has the metal and would normally produce it
Any city has access?
Traded for the resource?
 
Top Bottom