Interesting Bug

Scotch0101

Centurion
Joined
Jun 1, 2014
Messages
138
Location
A cool place
I have an interesting bug in my coding. When I make my art defines file for a unit the fighting animation doesn't play when he attacks. The movement is fine, but when they attack, the unit just stands there and some guys disappear. Not sure what's going on.......I'm using LeeS's code from here.
I'm not using the SQL part, not sure if that might be it...........I'll have to try it sometime, I just dont have the time.
It worked before I bought and downloaded BNW......weird.

Thanks in advance!
 
I have an interesting bug in my coding. When I make my art defines file for a unit the fighting animation doesn't play when he attacks. The movement is fine, but when they attack, the unit just stands there and some guys disappear. Not sure what's going on.......I'm using LeeS's code from here.
I'm not using the SQL part, not sure if that might be it...........I'll have to try it sometime, I just dont have the time.
It worked before I bought and downloaded BNW......weird.

Thanks in advance!
I'm pretty sure those tables I added via SQL are the ones that will control the combat animations. There's an aweful lot of column names within those tables like ChargeRadius, AttackRadius, RangedAttackRadius in the ArtDefine_UnitMemberCombats table and a lot of column names like 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed' in the ArtDefine_UnitMemberCombatWeapons table. Plus the names of the two tables you would appear to be missing seem like they'd be the ones causing the troubles.

Which is why I borrowed SQL from (I can't remember where I borrowed it from now) and merely changes the original 'ART_DEF_UNIT_MEMBER_WHATEVER_I_BORROWED' to 'ART_DEF_UNIT_MEMBER_KNIGHT_TEMPLAR' in the INSERT INTO ArtDefine_UnitMemberCombats.....

As well as I replaced what was originally there in the INSERT INTO ArtDefine_UnitMemberCombatWeapons with 'ART_DEF_UNIT_MEMBER_KNIGHT_TEMPLAR'.

The original I used as a template had 'ART_DEF_UNIT_MEMBER_U_IROQUOIAN_MOHAWKWARRIOR' and I just left that alone as that was close enough for my purposes. I wanted the unit to mimic the UNIT_SWORDSMAN combat animations, and the UNIT_IROQUOIAN_MOHAWKWARRIOR from within the Swordsman group seemed to work well enough for my purposes.

These two table INSERT INTO commands are copying everything for the 'ART_DEF_UNIT_MEMBER_U_IROQUOIAN_MOHAWKWARRIOR' into my new unit's member art define tag 'ART_DEF_UNIT_MEMBER_KNIGHT_TEMPLAR'.
Spoiler :
Code:
INSERT INTO ArtDefine_UnitMemberCombats (UnitMemberType,	EnableActions,	DisableActions,	MoveRadius,	ShortMoveRadius,	ChargeRadius,	AttackRadius,	RangedAttackRadius,	MoveRate,	ShortMoveRate,	TurnRateMin,	TurnRateMax,	TurnFacingRateMin,	TurnFacingRateMax,	RollRateMin,	RollRateMax,	PitchRateMin,	PitchRateMax,	LOSRadiusScale,	TargetRadius,	TargetHeight,	HasShortRangedAttack,	HasLongRangedAttack,	HasLeftRightAttack,	HasStationaryMelee,	HasStationaryRangedAttack,	HasRefaceAfterCombat,	ReformBeforeCombat,	HasIndependentWeaponFacing,	HasOpponentTracking,	HasCollisionAttack,	AttackAltitude,	AltitudeDecelerationDistance,	OnlyTurnInMovementActions,	RushAttackFormation)
SELECT	('ART_DEF_UNIT_MEMBER_KNIGHT_TEMPLAR'),				EnableActions,	DisableActions,	MoveRadius,	ShortMoveRadius,	ChargeRadius,	AttackRadius,	RangedAttackRadius,	MoveRate,	ShortMoveRate,	TurnRateMin,	TurnRateMax,	TurnFacingRateMin,	TurnFacingRateMax,	RollRateMin,	RollRateMax,	PitchRateMin,	PitchRateMax,	LOSRadiusScale,	TargetRadius,	TargetHeight,	HasShortRangedAttack,	HasLongRangedAttack,	HasLeftRightAttack,	HasStationaryMelee,	HasStationaryRangedAttack,	HasRefaceAfterCombat,	ReformBeforeCombat,	HasIndependentWeaponFacing,	HasOpponentTracking,	HasCollisionAttack,	AttackAltitude,	AltitudeDecelerationDistance,	OnlyTurnInMovementActions,	RushAttackFormation
FROM ArtDefine_UnitMemberCombats		WHERE UnitMemberType = 'ART_DEF_UNIT_MEMBER_U_IROQUOIAN_MOHAWKWARRIOR';

INSERT INTO ArtDefine_UnitMemberCombatWeapons ('UnitMemberType',	'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
SELECT ('ART_DEF_UNIT_MEMBER_KNIGHT_TEMPLAR'),						"Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
FROM ArtDefine_UnitMemberCombatWeapons	WHERE (UnitMemberType = 'ART_DEF_UNIT_MEMBER_U_IROQUOIAN_MOHAWKWARRIOR');
 
Top Bottom