LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
289 stars 160 forks source link

Sort of Cool... #2636

Closed Iamblichos closed 8 years ago

Iamblichos commented 8 years ago

It has often struck me that UnitCombatTypes aren't a variable, and therefore not changeable in CvUnit.cpp on the fly (it has no variable). What if you had a Hero Unit (i.e. a Great General that was a Combat Unit) that started as a Mounted Unit and then became a Tank once it progressed to the appropriate era? So I made it a variable. Note the combat modifers for the barbarian units (my values are a little different from the CBP):

20161013122754_1

then I immediately advanced myself to the modern era which triggered the unit in the DLL to have new database read values, barbarian no longer has bonus vs. mounted:

20161013122907_1

...but anti-Tank applies:

20161013122914_1

Just to show that the variable is setting the CombatClass correctly for regular units:

20161013122954_1

Iamblichos commented 8 years ago

I could have just initialized a whole new database unit when I hit the modern era, but I didn't like that. It's just one UnitType entry and another table that reads values for new Era Combat Strength and New Era UnitCombat Type.

matlajs commented 8 years ago

interesting idea. same thing is in prehistoric mod, where ,,Hero'' is skirmisher and meele cavalry too. was funny, but there will be problem with stack him with another units, since he is military unit now?

Iamblichos commented 8 years ago

This unit can't stack because he's not a civilian unit (the CP does have the ability to stack combat units if the flag is set manually for that particular unit without giving all combat units that ability). The challenge (which wasn't a huge challenge, just sorta cool ya know?), was to have a singular unit (not two units), that had two different CombatClasses (UNITCOMBAT_MOUNTED and UNITCOMBAT_ARMOR) in distinct Eras (Ancient - Industrial -> Mounted, Modern - Future -> Armor). I don't think that mod can do that with 1 unit without some DLL manipulation unless it's a unit that has a unitclass upgrade( but then you are dealing with multiple units and clutter, and if its a Special Unit, which one would spawn on creation?)

matlajs commented 8 years ago

i got one idea. absolutely no clue if it would be possible to do and if so, how dificult it would be.

Iamblichos commented 8 years ago

What do you have?

matlajs commented 8 years ago

what are those general/admiral points right now? that is some kind of special yields? can those be changed for GG/GA to something maybe faith related for them being rather purchasable than born when you filled pool.

TechpriestEnginseer commented 8 years ago

They are normal yields like culture and science. Although, I think you could already buy Great Generals and Great Admirals through faith with the right social policy branch?

matlajs commented 8 years ago

bad english as always. i didnt ment it this way. i ment it do those GG/GA yields like normal yields, which will not trigger born of those persons. but i have no idea what would replace those faith pruchases in authority/imperialism branch. or nothing what would not demand some complete rebalance or rework. rather i leave it for profesionals :D

Iamblichos commented 8 years ago

You mean like when they hit the GG/GA threshold points, they become a trainable unit?