Final Frontier Mod planning

Nice to hear :). And What is shown in the animations?
Myself has not done much in Civ4 in 5 weeks as I have started my own game for mobiles.
 
The animation is between the attacking unit and the "Best defender" according to the old Civ4 code, but units show damage/die as appropriate, or show "withdrawn from combat" if neither of the units died. The rest of the units in each of the stacks might fare differently. As it is possible to mix and match models inside of a "unit" it might be interesting to generate units dynamically for the purpose of the battle (to show off the fleet).

But as that's cosmetics, it's not a high priority for me. Now, if someone else wants to tackle the code, I encourage them, the relevant code should be in updateCombat() of CvUnit.cpp .

Now, the question comes down to... What promotions should be left as experience-type promotions? I'll have to cook up some ideas so units will have something to earn on the battlefield, as most of the default promotions are more suited to ship design.
 
Alright, tackled some more code. Cleaned up the designing process so a ship should gain a fixed amount of experience, be "promoted" to design the ship, and then loose that same experience and have its level reset for old fashioned promotions. I still need to find a way to include the starting ship so that it gets a chance to be designed. Combat has been changed to go by the amount of +attack% promotions. I might add more to the promotions XML to properly implement lasers/projectiles/guns (As well as tweak a few other things), but for now this will do.

For armor, the +defense value is what it provides in terms of damage reduction (multiplicative, so armor 1 and armor 2, each providing 10%, would mean the ship takes 81% damage). However, each armor component counts as 4 components when a component gets busted. Therefore, if a ship with no armor looses a component, it will be 1/6 chance of being the bridge. If a ship with armor looses a component, it will be a 1/9 chance of being the bridge. I should either allow more components (which would subsequently require level 4 and 5 promotions, or the means to acquire promotions multiple times rather than using the I, II, III, etc system), or allow a bit more lee way with utility slots so every ship isn't 3 weapons + 1 engine + 1 armor.

For the moment, the means of "destroying" components eludes me. That is, the ability to fetch the name of a component to use string addition and add in the destroyed version. Perhaps it would be a simple matter to make the destroyed versions require the regular version and iterate over the list looking for that cue.

Design wise, I also haven't quite figured out how repair will work... As space is quite crowded, requiring units to be on a "city" to repair components wouldn't be too difficult. One thing I could do is make ships "free" and "instantaneous" to build, but require time and money to repair to working status. Oh, and I still haven't thought about how to "save" designs to save the tedious work of designing every ship. Then the AI will need to learn how to design ships, too.

As for different ship sizes, larger ships will be represented by larger strengths. Damage essentially works on the matter of [damage * attacker / defender] strength. However, chance of hitting will be based on another formula, a bit in reverse. That is, chance of hitting will be something like [defender strength / (attacker strength + defender strength)], though I'll have to work the math out. In essence, I strive to encourage a diverse fleet makeup of fighters, defense/invasion vessels (that rough size), destroyers, cruisers, and battleships.

I have not yet worked out how technology will factor into all of this. I might add in shields after all as a early to mid game tech, replacing armor for damage reduction but not giving the advantage of protecting other valuable components. With more customization of the XML, promotions themselves could be made to upgrade with technology (actually, easiest solution would be to have a pre- and post- techonlogy versions where, upon discovering the tech, python goes through and swaps them out - Or, actually leaves them as is and force players to retrofit).

So many details to work out, but for now I need to focus on getting the combat engine finished, even if it's static.
 
The combat engine is nearly done! Or, at least the first step of it. Now I have to make it possible to repair components and factor in ship sizes. Oh, and I have to figure out how to make the first ship follow the design process. Getting the AI to design ships will also be nice.

One more step will also be adding descriptions for all of these components. Right now I'm dealing with TXT_KEY_BRIDGE and stuff. :)
 
I was thinking, the promotions in Civ are gained through expirience, but they reflect upgradable components, could you add an upgrade system in which you purchase upgrades and keep the old promotion system? Upgrades would directly effect the unit's abilities and capabilities, while promotions would have broader and not as direct effects.
 
I was thinking, the promotions in Civ are gained through expirience, but they reflect upgradable components, could you add an upgrade system in which you purchase upgrades and keep the old promotion system? Upgrades would directly effect the unit's abilities and capabilities, while promotions would have broader and not as direct effects.

I would also like to add that there should be several choices for each weapon system and that there should be opportunities to purchase new weapon systems and other things that are not weapons but would still affect ships like sensors and armor.
 
Sorry about the lack of development. Depression (that has been mitigated by some games I've been using to distract myself with) has really been kicking my ass.

You can download the early version of combat model here: http://forums.civfanatics.com/downloads.php?do=file&id=9527

Stuff that needs to be done: Text and descriptions of the components! Also, tooltips to describe the effect of armor (it is more likely to be damaged when a component is damaged) and shields (mitigate damage slightly). Also, I couldn't get the code to check for a bridge to work properly. That's kinda where I stopped working on it.

Best way to see how the combat model works is to spawn some units, some of yours and some pirates, and manually add the components each ship is to have, then attempt to attack with one of the units: The animations may not play, but all units in both stacks get involved.
 
Back
Top Bottom