My custom counter units have stopped working (again!)

ww2commander

Emperor
Joined
Aug 23, 2003
Messages
1,243
Location
Australia
Well to cut a long story short, I developed some custom counter-type units a while back which I had an issue with in the vanilla version of Civ5. Basically the unit was there on the map and could be selected, but was always invisible.

After one of the early G&K patches, the units all of a sudden started working properly in that they appeared on the map just fine. Problem was solved. Here is a screenshot of the working units: http://forums.civfanatics.com/showpost.php?p=11632593&postcount=44

However, after the most recent G&K patch (1.0.2.13) all my units have again gone into invisible mode :cry:. Something in the most recent change has broken my counters within the artdef tables!

I have ignored the problem for the past few weeks as I have had so many other things to complete in my mod and I only got around to looking into the issue today.

I have tried countless things including:
- Recreate artdef entries
- Confirm scale size
- Confirm no typos or errors in logs
- Removed a huge chunk of units incase it was a limit/cap issue with units
- Made sure no important fields are empty or missing across any of the artdef tables

The strange thing is that if I change one of my units to a vanilla artdef entry, then it displays that vanilla model correctly on the map.

At this stage I am all out of ideas so was hoping someone might be able to test the attached file for me and see what might be wrong.

Here are the SQL artdef entries I use for the attached file:
Code:
INSERT INTO "ArtDefine_UnitInfos" VALUES('ART_DEF_UNIT_GER_INF_1',1,'UnFormed');
INSERT INTO "ArtDefine_UnitInfoMemberInfos" VALUES('ART_DEF_UNIT_GER_INF_1','ART_DEF_UNIT_MEMBER_GER_INF_1',1);
INSERT INTO "ArtDefine_UnitMemberInfos" VALUES('ART_DEF_UNIT_MEMBER_GER_INF_1',7,NULL,'','Ger_Inf_Div_Type1.fxsxml','CLOTH','FLESH');
INSERT INTO "ArtDefine_UnitMemberCombats" VALUES('ART_DEF_UNIT_MEMBER_GER_INF_1','Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,1,NULL,0,1,1,NULL,NULL,NULL,NULL,NULL,'');

Thanks in advance for any help.
 

Attachments

  • Ger_Inf_Div_Type1.zip
    14.1 KB · Views: 38
Your SQL syntax(i think its called syntax) is out of whack, not even sure it is causing the iisue but there be no harm in sorting it out.
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) 
VALUES									('ART_DEF_UNIT_MEMBER_UNITNAME',			'Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady Walk AttackCharge',		null,			null,		null,			 null,		   null,		 null,				 null,	   null,		  null,		   null,		null,			   null,			  null,		   null,		null,		  null,			null,			null,		  null,			1,				  null,				   null,			   null,			   null,					  null,				    1,				null,						null,			     null,				 null,			 null,						   null,					  null);

Code:
INSERT INTO ArtDefine_UnitMemberCombatWeapons	(UnitMemberType,							"Index", SubIndex, ID,   VisKillStrengthMin, VisKillStrengthMax,   ProjectileSpeed, ProjectileTurnRateMin,	ProjectileTurnRateMax,	HitEffect,													HitEffectScale, HitRadius, ProjectileChildEffectScale, AreaDamageDelay, ContinuousFire, WaitForEffectCompletion, TargetGround, IsDropped, WeaponTypeTag,	WeaponTypeSoundOverrideTag)
VALUES											('ART_DEF_UNIT_MEMBER_UNITNAME',			0,		 0,				 null, 1.0,          1.0,				   null,			null,				    null,					'ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)',		0.2,			15,		   null,					   null,			1,				null,					 null,		   null,	  'BULLETHC',		'BULLETHC');

Code:
INSERT INTO ArtDefine_UnitInfoMemberInfos	(UnitInfoType,						UnitMemberInfoType,								NumMembers)
VALUES										('ART_DEF_UNIT_UNITNAME',			'ART_DEF_UNIT_MEMBER_UNITNAME',					2);

Code:
INSERT INTO ArtDefine_UnitInfos	(Type,								DamageStates,	Formation)
VALUES							('ART_DEF_UNIT_UNITNAME',			1,			'TwoBigGuns');

Code:
INSERT INTO ArtDefine_UnitMemberInfos	(Type,										Scale,					ZOffset,	Domain,		Model,																			MaterialTypeTag,	 MaterialTypeSoundOverrideTag)
VALUES									('ART_DEF_UNIT_MEMBER_UNITNAME',			6,					null,		null,		'FolderName/UnitName.fxsxml',

It should look like this. Also i do not think levaing entries blank is a wise thing, highlighted in red:-

INSERT INTO "ArtDefine_UnitMemberCombats" VALUES('ART_DEF_UNIT_MEMBER_GER_INF_1','Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,1,NULL,0,1,1,NULL,NULL,NULL,NULL,NULL,'');
 
Just in case check the VFS property of the art files, I had that strange problem once: all reset to false without me having changed anything...
 
Horem's post shows how to specify column for each individual piece of data (you can tab it to line up in nice looking columns in ModBuddy). You can add data to tables without specifying columns, but that doesn't mean you should... (If Firaxis added a column somewhere in the middle, then all your data will be added out of frame. Much better to avoid this.)
 
Just in case check the VFS property of the art files, I had that strange problem once: all reset to false without me having changed anything...

Nope...this is not the issue. All are set to true.

Horem's post shows how to specify column for each individual piece of data (you can tab it to line up in nice looking columns in ModBuddy). You can add data to tables without specifying columns, but that doesn't mean you should... (If Firaxis added a column somewhere in the middle, then all your data will be added out of frame. Much better to avoid this.)

I normally do all my SQL the way you describe with neat column tabbing, but the above artdef SQL was quick and nasty conversion using SQL Lite Manager to convert my units to G&K a while back. From memory I followed some instructions Gedemon outlined to quickly convert units over from Vanilla to G&K.

I will convert a handful of units using Horem's code and see if it is indeed a rogue column post patch.
 
Tried Horem's approach but still no go :(. I checked that there were no missing columns across any artdef entries.

I am starting to think it is the model that the new patch does not like. Can anyone actually get the counter to display in their game?

EDIT: I have tried several more things and unfortunately I have exhausted all ideas! This is a major show stopper for my Eastern Front mod which is really upsetting me :cry:.
 
Refusing to give up on solving this issue.

So far I think I can confirm that the model is indeed causing the issue as I substituted one of darnell ww2 unit's fxsxml files and the artdef entries worked fine.

Unfortunately I don't know much on how to troubleshoot the model and creating it was a challenge from the beginning given the guides I followed did not apply to a single static counter model.
 
Can no one else confirm if the attached unit works for them.:please:

Please help as this is problem is driving me up the wall.

On a side note, I heard that Firaxis is releasing a "patch-patch fix" to resolve a large amount of the graphics related problems. Apparantly the way graphics was handled ingame did change!
 
Based on the lack of response I gather there still is a shortage of unit gurus on this board :(

I tried to recreate the unit counters again via Blender and the NexisBuddy tool but got the same result....no unit showing up in the game.

I also tried another civ 4 unit conversion using a bunker but the same result.....invisible! I figure something I am doing in blender or the nexus tool is no longer compatible with the current version.

Thus I pose the question as to how others are doing unit creation???
 
Did you solve your gloss problem you had listed in the other thread?


I'm having the issue with leaders - trying to get the first 3D ledaerhead in.

If I use NexusBuddy to do leader materials it breaks. BUt if I use the old GrannyMaterialHacker V2 (GMH)is works but it gets a weird gloss layer that is either the lighting or smething else. My guess on Nexus buddy (by verifying with granny viewer) is that there are no materials submapped but I can get that if I use GMH.

Note I take the fbx and make a GR2 using NexusBuddy then have to conver that gr2 by using GMH.

The problem with granny hacker is many:
- it only shows the SREF map and you can't edit anything or it crashes.
- it copies the materials over in order and if you used a merged mesh for leaders you only get the first one which is often teeth, eye "glassy" gloss, or metal objects.
- you can't add anythinga nd the "unbind" function appears to do nothing




My next test will be to split the mesh and assign materials in blender that match another leaders.

Sadly, I contacted Lemmy and they loss their source code a long time ago so no other code gurus can get in there and fix their tools. If there are any coders that can work on a new tool - if anything a fix to unit material swapping it would be appreciated.
 
I will start by saying that I know zip about 3D/unit modding. These counters (which still refuse work again) were done using the tutorial . However by the looks of it, your a few hundred leaps ahead in knowledge and experience.

To quote how I fixed it (not sure if this is what you read):
EDIT: Ok, I did some further investigating and noticed that IndieStone's Nexus unit tool has a section labelled SREFMap which has the entry rifleman_sref.dds by default. I opened this file and got an exact match for the phantom unit. My question now is what do I replace this entry with and is there a way to correct this without exporting all my units again (extremely long and painful process that's taken 3 days )???

The subsequent step I took after posting this was to create an SREFMap dds file that was the same size as the current one being references and fill the alpha channel with a single shade of grey that eliminated the gloss effect but did not make the counters look too flat. I don't know if this is the best solution for a leader as various shadings would need to be applied, especially around things like metal objects (i.e crowns).

Hope this makes sense!
 
Top Bottom