Balance Factors

Discussion in 'Civ4 - Caveman 2 Cosmos' started by Thunderbrd, Mar 12, 2018.

  1. MattCA

    MattCA Prince

    Joined:
    Jan 25, 2019
    Messages:
    342
    Gender:
    Male
    I think a couple hundred building types are animal stories / myths. Ive wondered if it's worth making a new info object just for these and maybe the other unbuildable buildings. Then you could keep them out of the canbuild() loop. Also I think there is only a couple different types of bonuses they give, so maybe you could make a new function to use instead of processBuiding() that is much smaller and simpler for them.
     
  2. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,509
    Location:
    Norway
    In the "My take on stuff" modmod I defined those myth and stories buildings like this

    <BuildingInfo>
    <BuildingClass>BUILDINGCLASS_AMPHIBIAN_MYTH</BuildingClass>
    <Type>BUILDING_AMPHIBIAN_MYTH</Type>
    <MapCategoryTypes>
    <MapCategoryType>MAPCATEGORY_EARTH</MapCategoryType>​
    </MapCategoryTypes>
    <Description>TXT_KEY_BUILDING_AMPHIBIAN_MYTH</Description>
    <Civilopedia>TXT_KEY_BUILDING_ANIMAL_MYTH_PEDIA</Civilopedia>
    <Strategy>TXT_KEY_BUILDING_ANIMAL_MYTH_STRATEGY</Strategy>
    <!-- Prerequisites -->
    <PrereqTech>TECH_TAXONOMY</PrereqTech>
    <!-- Cost -->
    <iCost>-1</iCost>
    <!-- Local -->
    <CommerceChanges>
    <iCommerce>0</iCommerce>
    <iCommerce>1</iCommerce>
    <iCommerce>1</iCommerce>​
    </CommerceChanges>
    <!-- Global -->
    <FreeBuilding>BUILDINGCLASS_AMPHIBIAN_MYTH</FreeBuilding>
    <!-- Other -->
    <iAsset>1</iAsset>
    <Flavors>
    <Flavor>
    <FlavorType>FLAVOR_CULTURE</FlavorType>
    <iFlavor>1</iFlavor>​
    </Flavor>
    <Flavor>
    <FlavorType>FLAVOR_SCIENCE</FlavorType>
    <iFlavor>1</iFlavor>​
    </Flavor>​
    </Flavors>
    <bNeverCapture>1</bNeverCapture>
    <ArtDefineTag>ART_DEF_BUILDING_AMPHIBIAN_MYTH</ArtDefineTag>​
    </BuildingInfo>

    A building giving itself as a free building to all cities seems to work just fine when I've played with this setup, and it effectively halves the amount of buildings by removing the need for the _EFFECT buildings.

    The bNeverCapture = 1 means that it can't suddenly spread like a disease between different nations when conquering or trading cities.
     
    TaylorItaly and Anq like this.
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,636
    Gender:
    Male
    Location:
    Las Vegas
    Rather than making a new info object that would be memory costly to setup all the tags for, maybe we should define new, more selective building vectors to loop through for various checks? Set the vectors for different categories of building types on load, or 'class' buildings like units tend to be classed. You think this might work?
    Interesting... How would this work after buildingclass is eliminated?
     
  4. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,509
    Location:
    Norway
    How do you think the FreeBuilding tag would work when BUILDINGCLASS_ is eliminated?
    It would be changed to work with BUILDING_ instead.

    <BuildingInfo>
    <Type>BUILDING_AMPHIBIAN_MYTH</Type>
    <MapCategoryTypes>
    <MapCategoryType>MAPCATEGORY_EARTH</MapCategoryType>​
    </MapCategoryTypes>
    <Description>TXT_KEY_BUILDING_AMPHIBIAN_MYTH</Description>
    <Civilopedia>TXT_KEY_BUILDING_ANIMAL_MYTH_PEDIA</Civilopedia>
    <Strategy>TXT_KEY_BUILDING_ANIMAL_MYTH_STRATEGY</Strategy>
    <!-- Prerequisites -->
    <PrereqTech>TECH_TAXONOMY</PrereqTech>
    <!-- Cost -->
    <iCost>-1</iCost>
    <!-- Local -->
    <CommerceChanges>
    <iCommerce>0</iCommerce>
    <iCommerce>1</iCommerce>
    <iCommerce>1</iCommerce>​
    </CommerceChanges>
    <!-- Global -->
    <FreeBuilding>BUILDING_AMPHIBIAN_MYTH</FreeBuilding>
    <!-- Other -->
    <iAsset>1</iAsset>
    <Flavors>
    <Flavor>
    <FlavorType>FLAVOR_CULTURE</FlavorType>
    <iFlavor>1</iFlavor>​
    </Flavor>
    <Flavor>
    <FlavorType>FLAVOR_SCIENCE</FlavorType>
    <iFlavor>1</iFlavor>​
    </Flavor>​
    </Flavors>
    <bNeverCapture>1</bNeverCapture>
    <ArtDefineTag>ART_DEF_BUILDING_AMPHIBIAN_MYTH</ArtDefineTag>​
    </BuildingInfo>

    I mean, duh. :crazyeye:
     
    TaylorItaly likes this.
  5. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,636
    Gender:
    Male
    Location:
    Las Vegas
    OK, well it seemed like it might be relying on something to do with the default buildingclass or something.
     
  6. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,509
    Location:
    Norway
    Oh, I see.
    Well, in a way it does, but that's the case with all tags that hold a buildingclass reference, it is the default building for that buildingclass that is used by the dll code unless the civ in question has a replacement building for that class.
    Pretty much every building is the default building of its class in C2C with the exception of the base culture buildings.
    Creating new object types should only be done if there is a considerable and clearly defined need for one. Something that can encompass a bigger field than just animal myths and stories.

    I mean, it's a good idea to consider, but we should really discuss what makes the new object truly special before creating it. It should have a general usage area that is clearly defined and at the core different from regular buildings.
    Like, maybe this new object should not be considered a building placed in a city but rather a national heritage kinda deal. It could have an important role in the "ideas" project that TB is planning. etc.
    How would it interact in synergy with other objects like civic/traits/buildings etc.
    Or maybe you are right (MattCA), perhaps having a specialized building sub-class object is the way to go... I don't know for sure.

    We should not be making too specific new object types that have a small usage area, but consider how we can make it a fully respectable and self justified new type of object, where future aspects of its usage have been considered and explored.

    Well, I'm just babbling at this stage, simply calling for discussion before anyone starts making a new object for the game is all.
     
    Last edited: Jul 16, 2019
    billw2015 likes this.
  7. MattCA

    MattCA Prince

    Joined:
    Jan 25, 2019
    Messages:
    342
    Gender:
    Male
    smart.

    if current buidings remember 100 types of bonuses and myth / stories use a dozed type out of the 100 then you would need a new infos object with those dozen bonuses. so it would use up memory for those 12 bonus. then memory for each story / myth type would be reduced by 88 bonus (100 - 12 ). whatever that would be. Of course theres more to consider but overall should be less memory.
    And if you guys can come up with something better then myths great. More classes in general is the important part I was thinkin.
     
  8. Anq

    Anq Prince

    Joined:
    Apr 14, 2019
    Messages:
    351
    Gender:
    Male
    Location:
    Anser (geese) HQ
    BuildingClass seems to be easy to deal with.
    DefaultBuilding always refer to only one Building (or none as is the case with native cultures), not a list of them as I have presumed Classes are a collection of similar function Buildings.
    Six tags need to be moved to Buildings: iMaxGlobalInstances, (~Team~), (~Player~), iExtraPlayerInstances, bNoLimit, and VictoryThresholds. bMonument has never been used and there is no code for it, even python code. All function calls to "CilivizationInfo.getCivilizationBuilding(eBuildingClassTypes)" can be reduced to using eBuildingTypes directly. One problem though, is that if the exe is using BuildingClasses internally, I'll have no way to know this except after removing all of them.
     
  9. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    About two months ago. Before I had to call an ambulance to take me to hospital where I did lots of thinking about my life. Now all my friends want to "fix" me :lol:. Changes I am making to Real Life is the reason I have not committed all those changes we talked about. I'll do them after the release. I think one has a "break games" component but it can be left as is for now.
     
    TaylorItaly likes this.
  10. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,555
    Gender:
    Male
    Location:
    Canberra, Australia
    When I tried that it did not work which is why I added in the _EFFECT buildings. Also there are still problems with the FreeBuilding mechanism, personally I suspect the information about free buildings is getting too long and the later ones are not being added to the list.
     
  11. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,419
    Gender:
    Male
    Location:
    Western IL. cornfields
    I don't remember arsonists get much in the way of withdrawal, if at all. And all other throwing units still get more promotions available to them than arsonist.
    Hmm...missing out on that too...
    Must be a hidden bonus then.
    Not what I was referring to, was referring to the skimpy list with only str shown. Which is blurred tremendously by promotions. You know the things you made that you want 5000 of. By the way curious how close are you to that 5000 mark?

    I would like to reply to this in detail but I won't. Let sleeping War Dogs lie. Does denigrate me though that you consider me unable to "understand the why". Instead perhaps you should understand that maybe I don't like some of the paths taken on this design set up. (Oops some of the details I was not going to bring up! :p )
    Old wounds eventually heal... even for a black sheep :old::cowboy: :jesus: that does not like idea of :assimilate: or else. Oh! And are we there Yet! Crickey! I need to go to the bathroom! :D
     
    TaylorItaly likes this.
  12. MattCA

    MattCA Prince

    Joined:
    Jan 25, 2019
    Messages:
    342
    Gender:
    Male
    I do that?
     
  13. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    7,509
    Location:
    Norway
    Alberts and Anq are both interested in removing buildingclasses.
    Too many chefs can ruin the meal... unless it's organized.
    Alberts is the senior C2C dll programmer among you so it will have to be up to him to take the lead on this and to delegate/coordinate/guide you and Anq in that project as he sees fit.

    Try not to duplicate effort is all I'm saying, communicate. ^^
     
  14. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,636
    Gender:
    Male
    Location:
    Las Vegas
    It looks like I'm wrong about ALL throwing units getting an Anti-Archery bonus - that's a NON-fire throwing unit detail so it's not a factor universal to throwing, just most, and not Arsonists, so I'm wrong there. But...

    Arsonist 1.PNG Arsonist 2.PNG
    They do have a much stronger city attack% than I thought they did and a bonus vs siege I forgot about. But the withdraw is there (at 17% which is the same as Javelineers) and I forgot about the first strike chances. The collateral is 5% stronger than it is on Javelineers.

    Anyhow,
    I do understand that and to point it out is not to attack you. I get it. I just wish you didn't resist it just because you don't like cities to be able to defend themselves, meaning be capable of having a real chance of repelling even a strong and well-designed attack force. As someone else here said, if they can't, what's the point of even trying to defend your cities?

    You do realize that most of these are intended to be status promotions like a numerous amount of poisoned and diseased statuses as well as many equipments, right? Then there are build-ups and statuses as well. Yes, there are some more option based skill promos coming in the plan but generally most are in place. I'm not in favor of a bunch of random promotions just for the sake of having more promotions - each has a purpose.

    Without combat mods, most of the promotions are pretty tame in general anyhow. And there's also no reason for a Javelin to get more promotions than an Arsonist so I'm not sure how you're seeing this happening.
     
  15. alberts2

    alberts2 Emperor

    Joined:
    Aug 16, 2012
    Messages:
    1,947
    Gender:
    Male
    Location:
    Germany
    It's easy but it's alot of work and it will also break the save compatiblity. It might be a good idea to setup a branch for the BuildingClass and UnitClass removal.
     
  16. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    28,636
    Gender:
    Male
    Location:
    Las Vegas
    I suppose the first task to getting this done would be to identify all the tags that need to be redesigned, keep a list of them and each of us can pick up the conversion process, assigning ourselves a tag to convert, when we have time to devote a little effort to that. Until those are done, there's not a lot of point to trying to attack the actual issues involved in their removal.

    How would a branch help us in this? I've never worked with a branch and I'm not sure what it really means... would I have to have 2 mod folders for the SVN? I know there's documentation and I've found it too confusing to follow.
     
  17. Anq

    Anq Prince

    Joined:
    Apr 14, 2019
    Messages:
    351
    Gender:
    Male
    Location:
    Anser (geese) HQ
    It works like this: Under the Sources folder, you open up the "Branch/tag..." menu, set destination path to "branches/test_folder" (notice it uses forward slashes, not backward slashes like windows paths), and then every file under Sources folder will be copied to the test_folder. You have to enter some messages because this action is recorded by the server and will be assigned an svn revision number in series with the trunk changes. Be careful about the from/to paths. Think of them as: Files having the pattern /path/of/origin/*, will be found at /path/of/destination/* after the branching operation. If destination files exist already, then what you do is merge two different trees (EDIT: merge different revisions), either from trunk to branch to keep branch updated(**), or branch to trunk once the development is done and we're ready to break savegame compatibility.
    The "switch working copy" checkbox will let you switch the Mods\Caveman2Cosmos folder to the branch you created, which means you're not going to receive updates in the trunk unless you switch over again to the trunk. Basically I don't do this. I just check out the branches to a separate folder from the trunk aka Mods\Caveman2Cosmos, so I can keep the trunk updated.

    **: Merging is not published to the svn server until you commit the changes, so you can use merge however many times to keep your local copy up to date with the trunk sources.
     
    Last edited: Jul 17, 2019
  18. T-6000

    T-6000 Chieftain

    Joined:
    Apr 18, 2019
    Messages:
    10
    Gender:
    Female
    Personally I always set the combat strength of arsonists down to 5, it's the first (and only) change I make whenever I grab a new version out of the SVN dealie, I find it makes them a tactical choice that's contextually useful, rather than the outright best option in 90% of situations.
     
    TaylorItaly and billw2015 like this.
  19. TaylorItaly

    TaylorItaly Warlord

    Joined:
    Oct 24, 2016
    Messages:
    280
    Gender:
    Male
    Location:
    Germany
    May i ask , how to do that ?
     
  20. pi4t

    pi4t Warlord

    Joined:
    Aug 2, 2009
    Messages:
    277
    Gender:
    Male
    As an aside, the AI appears to agree with Thunderbrd's assessment of the balance of Arsonists, based on what Justinian just marched into my lands :D

    Note that given the geography of my lands, there's very little reason for him to actually send in 113 arsonists unless he really wants the barbarian cities to the North (or is planning an exceptionally cunning trick to backstab me, I guess, but I don't think the AI is that smart? I hope not, anyway...if that is his plan then I'm basically about to lose since I'm outnumbered and my cities will offer no defence). I can only assume he has enough lying around that he could spare those ones to come and pay me a visit. For the record, that stack also includes about 15 wolves, a few rams and a healer, but nothing else. No conventional military forces at all. Just loads and loads and loads of arsonists.

    It looks like the "fix" to the AI spamming loads of rams might have just resulted in it spamming loads of arsonists instead?

    Spoiler :

    upload_2019-7-17_13-15-37.png


    I realise that I haven't built as much defence as I could have. It's a persistent weakness of mine when playing Civilisation. But I can't see how I could possibly have built enough defenders, in each of my cities (or even in the city-and-fort that form a choke point against the rest of the continent) to defeat a stack of doom of that size which can also instantly bombard my city's defences down to nothing and has a higher strength than the best defenders available and gets a bonus to city attacks. The only "strategy" I can see that would work would be to build up my own stack of doom and smash the enemy before I got destroyed myself. Or to use diplomacy to avoid war, of course.
     
    TaylorItaly likes this.

Share This Page