1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Development Thread

Discussion in 'Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL)' started by alerum68, Sep 2, 2007.

  1. Fuyu

    Fuyu Chieftain

    Joined:
    Nov 5, 2009
    Messages:
    1,217
    Location:
    Austria
    If anything, adding it makes it harder. If someone is using female GPs, then he has the proper schema file anyway.
     
  2. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    That's what I was thinking, and since that also requires less work for me I'm happy to say, "Done and done!" ;)
     
  3. Fuyu

    Fuyu Chieftain

    Joined:
    Nov 5, 2009
    Messages:
    1,217
    Location:
    Austria
    Yes, XML reads fine. Great People being born always gives me error messages about the female version of a unit not being found.
    Code:
    Assert Failed
    
    File:  .\CvGlobals.cpp
    Line:  3618
    Expression:  strcmp(szType, "NONE")==0 || strcmp(szType, "")==0
    Message:  info type UNIT_SCIENTIST_FEMALE not found, Current XML file is: xml\GameInfo/CIV4EspionageMissionInfo.xml
    

    CvPlayer::createGreatPeople always calls kUnit.getFemaleUnitType(), and CvGlobals::getInfoTypeForString will not find anything and give me that assert.
     
  4. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Shoot, is there a form that doesn't perform an assertion? I need a "findInfoTypeForString" that ignores missing keys which I might have to add.
     
  5. Fuyu

    Fuyu Chieftain

    Joined:
    Nov 5, 2009
    Messages:
    1,217
    Location:
    Austria
    It's not like it's not working. If getInfoTypeForString can't find any info for the string it returns -1, which equals NO_UNIT, so it does exactly what you want it to, no need for anything new. The function simply assumes you know what you are searching for and expects that the info actually exists.
     
  6. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    But don't you get the popup when running a debug build? That's kind of annoying since I know up front that the type might not exist. As long as it doesn't do anything bad in the release build, I'm okay to leave it as-is.
     
  7. _alphaBeta_

    _alphaBeta_ Chieftain

    Joined:
    Dec 28, 2005
    Messages:
    976
    Location:
    NJ, USA
    Just having a look at the city tile status feature now, very cool. I saw that the colors and transparencies are customizable in XML. That said, I'm confused why you left working and not-working the same. Makes me think I'm not using the feature the way you intended. For example, what good is it to highlight improved and improvable tiles in an indistinguishable way? Or where you assuming people would choose one or the other? Also seems like the colors are backwards. Shouldn't working an improved tile be good/green?

    In any event, I'm after the highlights that are selected in the first screenshot. I want to know when a city is working a tile that isn't improved. May have spotted a problem with the camp immediately north of Xian. Through process of elimination, that circle is there when only "improvable w. bonus" is checked. Trouble is, it's already improved, and shouldn't be highlighted.
     

    Attached Files:

  8. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Yes, this is something I didn't have time to correctly address. The camp is highlighted as improvable because it does not have a route. While the game provides the bonus if it is next to a river, the AI still flags it as needing a route. I'll probably address this in an early patch because it's rather annoying. I probably should also have added an option to ignore routes since the city's yield is the same whether the route is there or not.

    As for the same colors, I originally had no configurability so perhaps I left two colors the same. Worked improved tiles should be white to mimic what you see in the city screen (working equals white). There's nothing to be done about those tiles so I don't want them "highlighted" with a color. Similarly, not worked unimprovable tiles are black as again there's nothing to be done. I'll double-check the colors tonight.

    BTW, if you select multiple cities all of their tiles are circled, but only the "first" city has its area shaded. I did this so you could select neighbors and still tell whose tiles are whose. Does this make sense, or is it too disjoint? I think 99.9% of the time you'll select only a single city anyway so it probably doesn't matter, but I'd like to do the right (useful) thing in the other 0.1% cases, too.
     
  9. Lemon Merchant

    Lemon Merchant Not into your drama

    Joined:
    Jun 27, 2008
    Messages:
    4,071
    Gender:
    Female
    Location:
    Red Sector A
    Hi Boys. :D

    It sounds like the new tag is causing problems. Here is a little detail on how I implemented the <bFemale> tag in the new BAT.

    I added it so that any unit could be tagged as female, not just Great People, Missionaries, and CEOs. My thought was to make a tag where a modder could easily differentiate between a male and female version of a unit, if desired.

    This is a snip from a relevant schema:

    Code:
        </ElementType>
            <ElementType name="LeaderPromotion" content="textOnly"/>
            <ElementType name="iLeaderExperience" content="textOnly" dt:type="int"/>
            [COLOR="Red"][B]<ElementType name="bFemale" content="textOnly" dt:type="boolean"/>[/B][/COLOR]
            <ElementType name="UnitInfo" content="eltOnly">
                <element type="Class"/>
                <element type="Type"/>
                <element type="UniqueNames"/>
                <element type="Special"/>
        ...
            
    <!-- Snip -->
        ...
    
        <element type="Strategy"/>
            <element type="Help" minOccurs="0"/>
            <element type="Advisor"/>
            [COLOR="Red"][B]<element type="bFemale" minOccurs="0"/>[/B][/COLOR]
            <element type="bAnimal"/>
            <element type="bFood"/>
            <element type="bNoBadGoodies"/>
       ...
    
    And this is how it's implemented in BAT's FUnit module CIV4UnitInfos.XML:

    Code:
        ...
        <Description>TXT_KEY_UNIT_GREAT_PROPHET</Description>
        <Civilopedia>TXT_KEY_CONCEPT_GREAT_PEOPLE_PEDIA</Civilopedia>
        <Strategy>TXT_KEY_UNIT_GREAT_PROPHET_STRATEGY</Strategy>
        <Advisor>ADVISOR_RELIGION</Advisor>
        [COLOR="Red"][B]<bFemale>0</bFemale>    <!-- Set to 1 for female unit -->[/B][/COLOR]
        <bAnimal>0</bAnimal>
        <bFood>0</bFood>
        <bNoBadGoodies>0</bNoBadGoodies>
        <bOnlyDefensive>0</bOnlyDefensive>
        
        ...
    
    The actual <Type> tag as implemented in the BULL DLL is:

    Code:
        <UnitInfo>
            <Class>UNITCLASS_PROPHET</Class>
            [COLOR="Red"][B]<Type>UNIT_PROPHET_FEMALE</Type>[/B][/COLOR]
            <UniqueNames>
                <UniqueName>TXT_KEY_GREAT_PERSON_RUTH</UniqueName>
                <UniqueName>TXT_KEY_GREAT_PERSON_ESTHER</UniqueName>
                <UniqueName>TXT_KEY_GREAT_PERSON_SARAH</UniqueName>
                
        ...
    
    Maybe that will help a little? :)
     
  10. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Thanks to a tip from Afforess, who is currently in exile from CFC, I added a second "true" parameter to getInfoTypeForString() which is aptly named bIgnoreAsserts. ;) Problem solved.
     
  11. _alphaBeta_

    _alphaBeta_ Chieftain

    Joined:
    Dec 28, 2005
    Messages:
    976
    Location:
    NJ, USA
    I was still confused before I realized that there's no road there. That area was recently pillaged in a war, and I forgot to rebuild it. Makes sense now.

    This sounds fine to me. Unless you want to get real fancy and change the highlight with each new city selection, this should suffice just fine. Two clicks switching between adjacent cities can clue you in. I don't think it's worth the extra effort.
     
  12. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Hmm, they are probably stored in the order they were selected (except when using ctrl or alt where it's the natural order of the cities), but I don't know for sure. I'll see what people say about it and revisit it later.
     
  13. Fuyu

    Fuyu Chieftain

    Joined:
    Nov 5, 2009
    Messages:
    1,217
    Location:
    Austria
    How do you select sities without using ctrl? I select one city, ctrl-select another and only one city's tiles are shaded, and the order of selection doesn't matter, only the order of founding/aquiring does - older city goes shades.
    Nothing serious and I don't really know any way around it.
     
  14. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    It sounds like you're shift-selecting which allows you to select any number of cities. If you control-select a city, it selects all cities on the continent. Alt-select selects all cities in your empire.
     
  15. _alphaBeta_

    _alphaBeta_ Chieftain

    Joined:
    Dec 28, 2005
    Messages:
    976
    Location:
    NJ, USA
    Taking a temporary or permanent break EF? Haven't seen any SourceForge action in a while.
     
  16. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,238
    Location:
    North Carolina, USA
    The majority of BUG dev occurred while EF was in-between jobs. He since got rehired, and is busy, I assume.
     
  17. Lemon Merchant

    Lemon Merchant Not into your drama

    Joined:
    Jun 27, 2008
    Messages:
    4,071
    Gender:
    Female
    Location:
    Red Sector A
    Yes, I think I'm the only one without a life right now, hence my appearance here tonight. :lol:

    I know that he has some ideas on the go, but time is a luxury that he (and I - not sure about ruff) doesn't have atm.
     
  18. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    8,788
    Location:
    an Aussie in Boston
    I'm sort of out of ideas at the moment. I do have one but that is just way toooo big to actually want to start.

    Anyone got any python related changes that they want to see in BUG?
    Spoiler :
    That last line was probably the biggest mistake I'll make this year - asking for work. Not promising that anything at all actually gets done :D.
     
  19. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    I was hoping to write up a nice "here's what's happening now, why I'm not modding at the moment, and what to expect in the future" post, but I just don't have the time or energy so I'll just quickly answer your question. Afforess is right about part of that, but even when I was working I devoted all my free time (literally four-five hours every night after work and all weekends) to BUG because, well, I had no life, I really loved modding, and I played Civ4 on occasion.

    While I still have no life per se, I am working longer and also just a bit burned out from doing the above. Plus, Civ5 really took the wind out of my sails. I love that it's hex based . . . and that's it. It is otherwise pretty much the same game. :( And while they did a lot of work to enable in-game browsing of mods, the whole modding system is much more intensive. No doubt it provides more features, but since the game was such a let down I haven't been inclined to start modding for it.

    As for Civ4 modding and BUG, I just need to take an extended break before continuing, but I do hope to pick it up again as it was really fun.
     
  20. Netich

    Netich Chieftain

    Joined:
    Nov 1, 2005
    Messages:
    31
    Take your time, you deserve it. Civ community will always be grateful for the effort you've done.
     

Share This Page