1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Promotions DLL

Discussion in 'Civ4 - Mod Components' started by TheLadiesOgre, Sep 2, 2009.

  1. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    Not quite sure what to do about that, I've haven't made a debug dll before, let me take a look at it, I'll post in a little
     
  2. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
  3. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    where?
     
  4. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    I would assume right after getVictoryAdjacentTileHeal() <----- like that
     
  5. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    Hey, I was just working on some <TEXT> stuff for the next version and realized I was going to need volunteers to translate the text into the non-english languages. Any assistance would be greatly appreciated. Either post here or PM me, though it may be a couple of weeks before I get the next version out as I want to make the remainder of the changes that I had in mind for PromotionInfos.xml (mostly all new-to-BtS tags and functionality at least AFAIK and some ports from UnitInfos) before releasing.
     
  6. Cybah

    Cybah Emperor

    Joined:
    Jun 22, 2007
    Messages:
    1,480
    I can do the German translations.
     
  7. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    Thank you cybah, german covered, three left to go.
     
  8. Castor_Troy

    Castor_Troy Warlord

    Joined:
    Jun 4, 2007
    Messages:
    145
    Location:
    Romania
    Im not french but i used to know french quite well i can give it a try with a online dictionary and such if you want and there isnt anyone better who can :)
     
  9. mechaerik

    mechaerik Tuturuu!

    Joined:
    Oct 28, 2008
    Messages:
    7,064
    Location:
    Los Angeles
  10. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
  11. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    Alright, so what should I do with Culture? I'm deciding on how a few promotions will work and I'm at a loss for what I should do with culture. I've added <PillageCommerceChange>, which (if all goes according to plan) will look something like this in the XML

    Spoiler :
    Code:
    <PillageCommerceChanges>
      <PillageCommerceChange>
        <CommerceType>COMMERCE_CULTURE</CommerceType>
        <iCommerce>??</iCommerce>
      </PillageCommerceChange>
      <PillageCommerceChange>
        <CommerceType>COMMERCE_ESPIONAGE</CommerceType>
        <iCommerce>??</iCommerce>
      </PillageCommerceChange>
      <PillageCommerceChange>
        <CommerceType>COMMERCE_GOLD</CommerceType>
        <iCommerce>??</iCommerce>
      </PillageCommerceChange>
      <PillageCommerceChange>
        <CommerceType>COMMERCE_RESEARCH</CommerceType>
        <iCommerce>??</iCommerce>
      </PillageCommerceChange>
    </PillageCommerceChanges>


    Now, I'm doing it this way to get the *, **, *** effect. I'm figuring that * will allow you to gain this commerce in addition to the gold you normally get from pillaging (Marauder * will end up being more of a "double pillage" effect, twice the gold, twice the improvement loss). After that, ** will be where <bPillageOnMove> is turned on and then finally *** will be where <bPillageOnCombatVictory> is turned on (though it will be less of a pillage and more of a mugging as there will be no improvement loss). This is how I am converting The_J's/Tsentom1's Industry Espionage, Marauder and Sneak promotions to the DLL (and keep in mind everything will be editable in the XML so if you just want it to be one promotion for each with all three effects you'll be able to do that in the XML, hell if you want it to be one promotion that give you all three effects for every CommerceType you could do that too.... it'd be ridiculously overpowered though). However, this brings me to my problem, I cannot think of a reasonably justified way that culture could be pillaged (research could be stolen research documents, espionage could be state-secrets or classified documents, gold just means you rob people/places a little more throughly), which leads me to hesitate to add code to make a culture pillage actually work, so I guess what I am asking is: What is your opinion? Do I:

    1) Have a culture pillage possibly in the XML but yet non-functioning or;
    2) Include the code to allow culture pillage despite the fact it makes absolutely no sense

    Edit: thinking about has also made me question whether I should change it from an integer array to a boolean array
     
  12. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    Robin Hood was totally a Culture Pillager. Otherwise you can think slander campaign or other such propaganda pushes. Though having them happen in a battle is a tad weird, you can think of it as spreading false claims AFTER the battle (the winner writes history). If everyone thinks you only killed the town guards because they were attacking a helpless one-eyed beggar in a wheelchair with crutches and a blind dog, they might ignore the fact that he is bound up hand and foot with his skin in a neatly stacked pile of perfectly 1 inch by 1 inch squares next to him, while you are giving this rousing speech between bites of his liver (with no old man in sight, let alone his 2 legged dog)


    You can run it as just a standard commerce array:
    Code:
    <PillageCommerces>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
    </PillageCommerces>
    
    And specify as the integer precisely how MUCH of that type of commerce you get on pillage. More annoying to remember which Commerce goes in which slot, but easier to write the XML loading method since a function exists to do so automatically for you.

    I would say that you ought to have a seperate array for each of the possible effects. So PillageCommerce, PostCombatCommerce, CommerceOnMove. Or whatever you intend the third to be, bPillageOnMove combined with PillageCommerces should attain that goal just fine, so potentially you only need 2 arrays.

    You could also just have this integer be an indication of how to modify the base rate, and let the base rate be calculated by what you pillaged or what your opponent's stats were. Then you add this integer, or multiply by it (in which case you would probably use a percentage scale)
     
  13. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    I have actually already started switching over to a boolean array with the thought that if it is toggled on, I'll hijack ::pillage so that when it spits out the iPillageGold that Python determines, it also applies that same number to whatever Commerce is toggled on, I was figuring that would be simpler, I don't know though
     
  14. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,430
    Location:
    DE/NL/FR
    Stealing culture: I suggest, that you take as basis the total culture from the next city.
    I would spread the stolen culture over all your cities. Or maybe you can add a popup, which lets you choose the city...both is not really satisfying...i have no better idea.
     
  15. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
  16. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    I didn't even think of applying it like IDW, I was thinking that I would apply it to the capital, but now I'm going to have to take a look at the IDW code.
     
  17. Duque d'Caxias

    Duque d'Caxias Great General

    Joined:
    Nov 17, 2006
    Messages:
    102
    Location:
    Brazil
    Please, please, please, could you add Tsentom's Survival Promotion. I've tried to merge this python promotion but it seems it is not entirely compatible with Dale&#8217;s Combat Mod (or another mod I&#8217;m using).
     
  18. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    I was planning on it, I'm just trying to get a few things worked out, I want to add all of the promotions that will be added before I release the next version. I'm also going to doublecheck everything that I've done up to now.
     
  19. Duque d'Caxias

    Duque d'Caxias Great General

    Joined:
    Nov 17, 2006
    Messages:
    102
    Location:
    Brazil
    This is nice! I can't wait to use it.
     
  20. Opera

    Opera Deity

    Joined:
    Sep 21, 2008
    Messages:
    4,643
    Gender:
    Female
    Did you make any progress with your PillageOnMove tag? I still didn't look at it further yet. At first sight it seemed decent. So I'm not sure what is wrong.
     

Share This Page