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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    Hi @Inthegrave
    I had a quick look @ t BTS 3.19 sources and contact delay is not scaled in any manner. Map size \ game speed do not affect the time until the AI will contact the player.
     
    Last edited: May 29, 2019
    Inthegrave likes this.
  2. Inthegrave

    Inthegrave Chieftain

    Joined:
    May 28, 2019
    Messages:
    28
    Gender:
    Male
    Wow. It had felt like there was no scaling but it's still shocking to learn there is none. If playing the game on blitz you can possibly breeze through several eras without the ai ever
    contacting you. To be honest even when playing on normal speed the default contactdelay combined with contactrand settings make the ai hardly ever contact you.
    I'm going to need to do some mass tweaking.

    I wonder if it's possible to make the contactdelay setting scale with gamespeed? Probably would involve some python or DLL editing that I'm not familiar with.
    Might have to start studying how to.
     
  3. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    It would be trivial to scale the contact delays. For instance you could just add the scaling code in CvPlayerAI::AI_changeContactTimer(..). Unfortunately, this function is not exposed to python so you'd have to mod the DLL.
     
    Inthegrave likes this.
  4. Inthegrave

    Inthegrave Chieftain

    Joined:
    May 28, 2019
    Messages:
    28
    Gender:
    Male
    Is it maybe exposed with AND? I'm guessing not. Know of any good tutorials written or in video forum? Preferably both.
     
  5. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,877
    Gender:
    Male
    Location:
    Leblanc
    Where is the rule implemented that e.g. Galleys can enter Ocean when it is culturally covered?
     
  6. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    371
    Location:
    Germany
    CvUnit::canMoveInto: "sea units can enter impassable in own cultural borders"
     
  7. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,877
    Gender:
    Male
    Location:
    Leblanc
    Duh, I have looked at this snippet twelve times but my eyes glazed over because I was looking for getOwner(). Thanks for the help!
     
    f1rpo likes this.
  8. OzzyKP

    OzzyKP Chieftain

    Joined:
    Dec 16, 2000
    Messages:
    1,622
    Location:
    Washington, DC USA
    I’ve got a specific question about unit graphics. The female Mormon missionary unit in Caveman 2 Cosmos is awesome, but I can’t figure out how to add it to my mod. The unit has a .dds file, not a .nif, and I can’t find the xml for it in the unit art file. How do I add it?
     
  9. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,194
    Location:
    In a constant brainstorm...
    IIRC it's somewhere in the modules. Search there.
     
  10. djdazi180

    djdazi180 Chieftain

    Joined:
    Feb 8, 2018
    Messages:
    18
    Gender:
    Male
    Location:
    Cologne, Germany
    Anyone got a way of getting a map from a Hot Seat Game to later play as Single Player?
     
  11. SaibotLieh

    SaibotLieh Chieftain

    Joined:
    Sep 25, 2009
    Messages:
    1,446
    Haven't looked at the unit yet, but I guess it is the model I created some time ago: https://forums.civfanatics.com/resources/more-female-missionaries-part-2.19352/

    You should be able to find the nif and dds files there and also the basic xml entries.
     
  12. OzzyKP

    OzzyKP Chieftain

    Joined:
    Dec 16, 2000
    Messages:
    1,622
    Location:
    Washington, DC USA
  13. SaibotLieh

    SaibotLieh Chieftain

    Joined:
    Sep 25, 2009
    Messages:
    1,446
  14. blovdubb

    blovdubb Chieftain

    Joined:
    Feb 4, 2006
    Messages:
    71
    Location:
    Charlotte,NC
    XML question????

    I want to make buildings have "OR" Bonus requirements like some units do, for ex. to build a Tavern you would have to have the Bonus Ale OR Wine OR Liquor. Is this possible???

    for example I tried to use this tag edited from the spearman unit in unitinfos

    <PrereqBonuses>
    <BonusType>BONUS_ALE</BonusType>
    <BonusType>BONUS_WINE</BonusType>
    <BonusType>BONUS_LIQUOR</BonusType>
    </PrereqBonuses>

    it doesn't give the OR option for buildings like it does units.
     
  15. OzzyKP

    OzzyKP Chieftain

    Joined:
    Dec 16, 2000
    Messages:
    1,622
    Location:
    Washington, DC USA
    When you get a crash to desktop, how do you figure out the cause? I don’t see anything in the logs. There weren’t any pop ups, it just crashes. Help?
     
  16. lfgr

    lfgr Chieftain

    Joined:
    Feb 6, 2010
    Messages:
    647
    There are a wide range of causes for CtDs. IIRC, missing art definitions are one frequent non-DLL-bug cause.

    If you can compile a dll and debug, it is usually not too hard to find the bug or at least in which part of the code it happens, depending on the complexity of the code involved. Usually the problem is an invalid memory access, and if you're debugging the game with Visual Studio it will pause the game and show a popup.
     
  17. OzzyKP

    OzzyKP Chieftain

    Joined:
    Dec 16, 2000
    Messages:
    1,622
    Location:
    Washington, DC USA
    How do you debug the game with Visual Studio?
     
  18. lfgr

    lfgr Chieftain

    Joined:
    Feb 6, 2010
    Messages:
    647
    You need to compile a debug DLL, then start the game, click "Attach to process" in Visual Studio and choose the Beyond the Sword process.
     
  19. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,158
    Gender:
    Male
    Location:
    Canberra, Australia
    Not possible without changing the dll unfortunately.
     
  20. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,194
    Location:
    In a constant brainstorm...
    I'm facing some unidentified bugs in my mod (Chronicles of Mankind). There is an infinite loop at and turn in the early classical era. Unfortunately I don't understand how logs work (if those can help at all?). Is there some tutorial for debugig and especially on how logs work? (This is a modmod of Rise of Mankind - A New Dawn 2.)

    If someone experienced could take a look at the saves of jopin and tell me what may cause the the problem, I'd be grateful. THX!
     

Share This Page