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

Why isn't this unit xml working right?

Discussion in 'Civ5 - Creation & Customization' started by Ambug666, Apr 1, 2014.

  1. Ambug666

    Ambug666 Chieftain

    Joined:
    Jun 23, 2009
    Messages:
    92
    What is wrong with my unit xml?

    OK, I am trying to create a unit with two different types of members. If you take a look at the following:
    Code:
    	<ArtDefine_UnitInfoMemberInfos>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WILD_DOG_ALPHA</UnitMemberInfoType>
    			<NumMembers>3</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WILD_DOG_BRAVO</UnitMemberInfoType>
    			<NumMembers>3</NumMembers>
    		</Row>
    	</ArtDefine_UnitInfoMemberInfos>
    
    If I keep it in that order, then I see the three ART_DEF_UNIT_MEMBER_WILD_DOG_ALPHA, but not the BRAVO.

    BUT, if I reverse the order and put BRAVO first, I see the BRAVO units, but not the ALPHA.

    I'm not seeing anything special in the logs.

    I've enclosed the .xml and fsxml files. Can anyone help? Thanks!
     

    Attached Files:

  2. Shoobs

    Shoobs Prince

    Joined:
    Mar 31, 2010
    Messages:
    498
    I think the UnitInfoType is whats doing it.
     
  3. Ambug666

    Ambug666 Chieftain

    Joined:
    Jun 23, 2009
    Messages:
    92
    What is wrong with the UnitInfoType? Isn't that how you add different types of units to the same unit group? Here it is for Barbarians:

    Code:
      
    <ArtDefine_UnitInfoMemberInfos>
        <Row>
          <UnitInfoType>ART_DEF_UNIT_BARBARIAN_EURO</UnitInfoType>
          <UnitMemberInfoType>ART_DEF_UNIT_MEMBER_BARBARIAN_EURO_ALPHA</UnitMemberInfoType>
          <NumMembers>2</NumMembers>
        </Row>
        <Row>
          <UnitInfoType>ART_DEF_UNIT_BARBARIAN_EURO</UnitInfoType>
          <UnitMemberInfoType>ART_DEF_UNIT_MEMBER_BARBARIAN_EURO_BRAVO</UnitMemberInfoType>
          <NumMembers>4</NumMembers>
        </Row>
        <Row>
          <UnitInfoType>ART_DEF_UNIT_BARBARIAN_EURO</UnitInfoType>
          <UnitMemberInfoType>ART_DEF_UNIT_MEMBER_BARBARIAN_EURO_CHARLIE</UnitMemberInfoType>
          <NumMembers>4</NumMembers>
        </Row>
    </ArtDefine_UnitInfoMemberInfos>
    
    I still don't see what I'm doing wrong.
     
  4. Rob (R8XFT)

    Rob (R8XFT) Ancient Briton Super Moderator

    Joined:
    Aug 11, 2002
    Messages:
    10,815
    Location:
    Leeds (UK)
    Unfortunately, I can't seem to view the attachments. I was wondering how many members you defined your actual unit as having (in the "ArtDefine_UnitInfos" under "NumMembers") - 3 or 6? AFAIK, you'd need that to have six to show both sets.
     
  5. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,163
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    No, Ambug666's method is how it's done [there's no NumMembers in ArtDefine_UnitInfos, only in ArtDefine_UnitInfoMemberInfos]. However, I don't see what the problem is either.
     
  6. Nutty

    Nutty Deity

    Joined:
    Mar 9, 2011
    Messages:
    3,163
    Gender:
    Male
    Location:
    Orange County, California, U.S.A.
    Everything's in the database fine; though of course I can't test it beyond that since you didn't attach your built mod.

    How about changing the Formation from DefaultMelee to blank?

    Or, as a test, add the dog models one at a time: _ALPHA NumMembers 1, _BRAVO NumMembers 1, _ALPHA NumMembers 1, etc.
     
  7. Ambug666

    Ambug666 Chieftain

    Joined:
    Jun 23, 2009
    Messages:
    92
    Changing the formation makes no difference.

    Adding the models 1 at a time makes only one model in the unit, even if I added that model several times to the unit.

    Here's something odd:
    Code:
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_BARBARIAN_EURO_ALPHA</UnitMemberInfoType>
    			<NumMembers>2</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WILD_DOG_BRAVO</UnitMemberInfoType>
    			<NumMembers>3</NumMembers>
    		</Row>
    
    Produces 2 barbarians and 3 brown wolves in the unit.

    Code:
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WILD_DOG_BRAVO</UnitMemberInfoType>
    			<NumMembers>3</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_WILD_DOGS</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_BARBARIAN_EURO_ALPHA</UnitMemberInfoType>
    			<NumMembers>2</NumMembers>
    		</Row>
    
    produces 3 wild dogs but no barbarians. There must be something in the wild dog unit that is causing future units to not be added.

    The modfile is way too large to attach here, but here is a zip file of the relevant files if you wanted to make a unit of it.

    Thanks for the help!
     

    Attached Files:

Share This Page