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

Any way to make this multi-member unit work again?

Discussion in 'Civ5 - Creation & Customization' started by The Tollan, Dec 2, 2012.

  1. The Tollan

    The Tollan Prince

    Joined:
    Oct 29, 2005
    Messages:
    418
    I have a mod that changes Mechanized Infantry so it contains multiple types of unit members, which are basically:

    Mechanized Infantry, Modern Soldier, and Mechanized Infantry2 (added this one to so that the formation is arranged a certain way).

    Now, the problem I have is that nothing in this formation appears in game except for the first unit member, which is the standard Mechanized Infantry. Everything in the code after that does not appear any game (and seems to have no audio now also).

    The mod worked without any noticeable issues until the recent "Windows 8" patch.

    Is there any way to rearrange the code to make it work? I tried several things to fix the problem, but nothing has worked.


    Code:
    <GameData>
    	<ArtDefine_UnitInfoMemberInfos>
    		<Update>
    			<Where UnitMemberInfoType="ART_DEF_UNIT_MEMBER_MECHANIZEDINFANTRY" UnitInfoType="ART_DEF_UNIT_MECHANIZED_INFANTRY"/>
    			<Set NumMembers="1"/>
    		</Update>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_MECHANIZED_INFANTRY</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MODERNSOLDIER</UnitMemberInfoType>
    			<NumMembers>2</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_MECHANIZED_INFANTRY</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MECHANIZEDINFANTRY2</UnitMemberInfoType>
    			<NumMembers>1</NumMembers>
    		</Row>
    		<Row>
    			<UnitInfoType>ART_DEF_UNIT_MECHANIZED_INFANTRY</UnitInfoType>
    			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_MODERNSOLDIER</UnitMemberInfoType>
    			<NumMembers>2</NumMembers>
    		</Row>
    	</ArtDefine_UnitInfoMemberInfos>
    </GameData>
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,309
    Location:
    France
    Are "ART_DEF_UNIT_MEMBER_MODERNSOLDIER" showing when used alone ?
     
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,309
    Location:
    France
    test the model alone first, for example replace the infantry with it:
    Code:
    UPDATE ArtDefine_UnitMemberInfos SET Model = 'YourUnit.fxsxml' WHERE Type = 'ART_DEF_UNIT_MEMBER_INFANTRY';
    replace "YourUnit" with your models name and spawn an infantry unit in game.
     
  4. The Tollan

    The Tollan Prince

    Joined:
    Oct 29, 2005
    Messages:
    418
    Thanks for the help.

    The "ART_DEF_UNIT_MEMBER_MODERNSOLDIER" are displaying properly when used alone.

    I have attached a screenshot displaying them.
     

    Attached Files:

  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,309
    Location:
    France
    from database log using your mod:

    Code:
    [1566269.881] table ArtDefine_UnitMemberCombatWeapons has 21 columns but 20 values were supplied
    from patch notes:
    Code:
    Add a combat weapon parameter that allows for a projectile that is not going to do any damage to have a "miss" radius. The helps spread out projectiles when there are a lot of attackers, but only one or two targets.
    You need to add one value (the miss radius) to your SQL entries for ArtDefine_UnitMemberCombatWeapons. Can't access the DB right now, so I can't tell what's the default value there, maybe someone can add this info.

    Alternatively use this (safer) syntax instead:

    Code:
    INSERT INTO tablename (column1, column2, ...) VALUES( val1, val2, ...);
     
  6. Horem

    Horem Emperor

    Joined:
    Apr 1, 2010
    Messages:
    1,720
    Location:
    Wales, UK
    Default Value is blank, null? Name is, MissTargetSlowRadius ("MissTargetSlopRadius" FLOAT, )
     
  7. The Tollan

    The Tollan Prince

    Joined:
    Oct 29, 2005
    Messages:
    418
    The problem is now resolved and the mod is functioning again. The missing information for the new "combat weapon parameter" value was indeed causing the problem. The default value is null as Horem noted. I checked the database for the Paratrooper and Mechanized Infantry values (since all the unit members in this mod are based off of those two units), and both in both cases the value was null.

    Thanks for the help. :)

    I have uploaded new versions of the two mods onto the Steam network and also on this site.
     
  8. Irkalla

    Irkalla ENTP POWWWEEEEEER

    Joined:
    Sep 25, 2012
    Messages:
    1,009
    Location:
    Way down around Vicksburg
    Any idea what they do?
     
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,309
    Location:
    France
    see my quote of the patch note above, it's to prevent all arrows from a full health archer to strike the last figure of a warrior unit with low health for example, as it give strange trajectories for the projectiles sometime.
     

Share This Page