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

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>
 
Are "ART_DEF_UNIT_MEMBER_MODERNSOLDIER" showing when used alone ?
 
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.
 
Thanks for the help.

The "ART_DEF_UNIT_MEMBER_MODERNSOLDIER" are displaying properly when used alone.

I have attached a screenshot displaying them.
 

Attachments

  • Civ5Screen0087.jpg
    Civ5Screen0087.jpg
    425.6 KB · Views: 73
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, ...);
 
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.
 
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.

Any idea what they do?
 
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.
 
Top Bottom