Hi all,
I was trying to create a "trebuchet tower" by simply taking the fortress expansion and modifying the ini files to suit my tower and add some upgrades on top of that. Everything works as it should but I have decided to add some object around the tower to make it more "interesting" and found an issues I am unable to solve.
I have decided to add some rubble and wood beams at the back to the tower. This is working, and displayed as it should, however, they appear during "awaiting construction" not properly. To explain, you have like 4x phases of construction. The 1) you choose the building and try to find a place where to put it (the model is transparent) - here the model of the tower with the props looks good, 2) you place the building somewhere and the builder is running to build it (after placing the building it steel appears transparent) - here the props are rotated (see the video), 3) it is being build (I have hid the props during this step) and 4) it is done (props are looking ok).
I would like to hide the props during step 2) but cant find a way how to do it.
I have tried to set the ModelCondition equal to Awaiting Construction but it doesn't work, tried even scripts but no success. I am missing some reference to all the attributes of the functions so I am playing sometimes blind. Any idea how to hide the props during g2)?
Video: https://www.design.3...zSaqcFdRAcNataG
This is the part I am trying to change...
Draw = W3DScriptedModelDraw ModuleTag_Draw_gbftrtowc OkToChangeModelColor = Yes DefaultModelConditionState Model = gbftrtowc End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = none End MultiPlayerOnly = Yes End
Whole code:
;------------------------------------------------------------------------------------------ ;Gondor Sentry Tower Object MenTrebuchetTower SelectPortrait = UPGondor_Trebuchet ; *** ART Parameters *** ButtonImage = BRBattleTower ; *** ART Parameters *** Draw = W3DScriptedModelDraw ModuleTag_Draw OkToChangeModelColor = Yes UseStandardModelNames = Yes StaticModelLODMode = Yes // Will append M or L to the skin name depending on GameLOD DefaultModelConditionState Model = GBFTRTOWA End //---Build Up Variation 1--- ModelConditionState = UPGRADE_NUMENOR_STONEWORK ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = GBFTRTOWA_A Texture = GBFortress1.tga GBFortress1_U.tga End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED SNOW Model = GBFTRTOWA_A Texture = GBFortress1.tga GBFortress1_Snow.tga ParticleSysBone = DUSTBONE BuildingContructDust End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = GBFTRTOWA_A ParticleSysBone = DUSTBONE BuildingContructDust End AnimationState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Animation AnimationName = GBFTRTOWA_ASKL.GBFTRTOWA_ABLD AnimationMode = MANUAL End Flags = START_FRAME_FIRST BeginScript CurDrawablePlaySound("GondorBarracksBeginConstruction") EndScript End //---Build Up Variation 2--- ModelConditionState = UPGRADE_NUMENOR_STONEWORK BUILD_VARIATION_TWO ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = GBFTRTOWB_A Texture = GBFortress1.tga GBFortress1_U.tga End ModelConditionState = BUILD_VARIATION_TWO ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED SNOW Model = GBFTRTOWB_A Texture = GBFortress1.tga GBFortress1_Snow.tga ParticleSysBone = DUSTBONE BuildingContructDust End ModelConditionState = BUILD_VARIATION_TWO ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = GBFTRTOWB_A ParticleSysBone = DUSTBONE BuildingContructDust End AnimationState = BUILD_VARIATION_TWO ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Animation AnimationName = GBFTRTOWB_ASKL.GBFTRTOWB_ABLD AnimationMode = MANUAL End Flags = START_FRAME_FIRST BeginScript CurDrawablePlaySound("GondorBarracksBeginConstruction") EndScript End //---Damage States Variation 1--- ModelConditionState = DAMAGED Model = GBFTRTOWA Texture = GBFortress1.tga GBFortress1D.tga End AnimationState = DAMAGED EnteringStateFX = FX_BuildingDamaged End ModelConditionState = REALLYDAMAGED Model = GBFTRTOWA_D2 End AnimationState = REALLYDAMAGED Animation = GBFTRTOWA_ReallyDamaged AnimationName = GBFTRTOWA_D2SK.GBFTRTOWA_D2AN AnimationMode = ONCE End EnteringStateFX = FX_BuildingReallyDamaged End ModelConditionState = RUBBLE Model = GBFTRTOWA_D3 End AnimationState = RUBBLE Animation = GBFARTOWA_ReallyDamaged AnimationName = GBFTRTOWA_D3SK.GBFTRTOWA_D3AN AnimationMode = ONCE End EnteringStateFX = FX_StructureMediumCollapse End //--Damage States Variation 2--- ModelConditionState = BUILD_VARIATION_TWO DAMAGED Model = GBFTRTOWB Texture = GBFortress1.tga GBFortress1D.tga End AnimationState = BUILD_VARIATION_TWO DAMAGED EnteringStateFX = FX_BuildingDamaged End ModelConditionState = BUILD_VARIATION_TWO REALLYDAMAGED Model = GBFTRTOWB_D2 End AnimationState = BUILD_VARIATION_TWO REALLYDAMAGED Animation = GBFTRTOWB_ReallyDamaged AnimationName = GBFTRTOWB_D2SK.GBFTRTOWB_D2AN AnimationMode = ONCE End EnteringStateFX = FX_BuildingReallyDamaged End ModelConditionState = BUILD_VARIATION_TWO RUBBLE Model = GBFTRTOWB_D3 End AnimationState = BUILD_VARIATION_TWO RUBBLE Animation = GBFARTOWB_ReallyDamaged AnimationName = GBFTRTOWB_D3SK.GBFTRTOWB_D3AN AnimationMode = ONCE End EnteringStateFX = FX_StructureMediumCollapse End //---Stonework--- ModelConditionState = UPGRADE_NUMENOR_STONEWORK Model = GBFTRTOWA Texture = GBFortress1.tga GBFortress1_U.tga End ModelConditionState = UPGRADE_NUMENOR_STONEWORK BUILD_VARIATION_TWO Model = GBFTRTOWB Texture = GBFortress1.tga GBFortress1_U.tga End //---Snow--- ModelConditionState = SNOW Model = GBFTRTOWA Texture = GBFortress1.tga GBFortress1_Snow.tga End ModelConditionState = SNOW BUILD_VARIATION_TWO Model = GBFTRTOWB Texture = GBFortress1.tga GBFortress1_Snow.tga End //---Default--- ModelConditionState = BUILD_VARIATION_ONE ; Side Model = GBFTRTOWA End ModelConditionState = BUILD_VARIATION_TWO ; Corner Model = GBFTRTOWB End End Draw = W3DFloorDraw ModuleTag_DrawFloor StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD ModelName = GBFTRTOWC_Bib End ; Draw = W3DFloorDraw ModuleTag_DrawFloor ; StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD ; ModelName = GBBtlTwrS_Bib ; WeatherTexture = SNOWY GBBtlTwrS_Bib_snow.tga ; HideIfModelConditions = AWAITING_CONSTRUCTION ; HideIfModelConditions = PARTIALLY_CONSTRUCTED ; ForceToBack = No ; End Draw = W3DScriptedModelDraw ModuleTag_Draw_HCBanner OkToChangeModelColor = Yes DefaultModelConditionState Model = GBHCBtlTwrS End MultiPlayerOnly = Yes End Draw = W3DScriptedModelDraw ModuleTag_Draw_Debris01 OkToChangeModelColor = Yes DefaultModelConditionState Model = gb_debris04 End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = none End MultiPlayerOnly = Yes End Draw = W3DScriptedModelDraw ModuleTag_Draw_gbftrtowc OkToChangeModelColor = Yes DefaultModelConditionState Model = gbftrtowc End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = none End MultiPlayerOnly = Yes End PlacementViewAngle = 90 // PlacementViewAngle = 0 // ***DESIGN parameters *** DisplayName = OBJECT:TrebuchetExpansion Side = Men EditorSorting = STRUCTURE ThreatLevel = 11.0 IsTrainable = No BuildCost = 5;MEN_TREBUCHETEXPANSION_BUILDCOST BuildTime = 5;MEN_TREBUCHETEXPANSION_BUILDTIME ; in seconds VisionRange = MEN_TREBUCHETEXPANSION_VISION_RANGE ShroudClearingRange = MEN_TREBUCHETEXPANSION_SHROUD_CLEAR CommandSet = SellableCommandSet ; Normal rock version WeaponSet Conditions = None Weapon = PRIMARY GondorTrebuchetRock End ; Special flaming rock version WeaponSet Conditions = PLAYER_UPGRADE Weapon = PRIMARY GondorTrebuchetRockFlaming End ArmorSet Conditions = None Armor = FortressExpansionArmor End ; *** AUDIO Parameters *** #include "..\..\..\Includes\StandardBuildingEvaEvents.inc" VoiceSelect = DwarvenCatapultExpansionSelect VoiceSelectUnderConstruction = BuildingGoodVoiceSelectUnderConstruction SoundOnDamaged = BuildingLightDamageStone SoundOnReallyDamaged = BuildingHeavyDamageStone UnitSpecificSounds UnderConstruction = BuildingConstructionLoop ; Built first time ; UnderRepairFromDamage = NoSound ; Repaired No animation on the building, so don't bother playing sound UnderRepairFromRubble = BuildingConstructionLoop ; Repaired from completely destroyed (not used???) End CampnessValue = CAMPNESS_FORTRESS_EXPANSION ; *** ENGINEERING Parameters *** RadarPriority = STRUCTURE KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE NEED_BASE_FOUNDATION FS_BASE_DEFENSE MADE_OF_STONE Behavior = GettingBuiltBehavior ModuleTag_04 WorkerName = GondorWorkerNoSelect SpawnTimer = DEFAULT_STRUCTURE_HEALDELAY End Body = StructureBody ModuleTag_05 MaxHealth = MEN_TREBUCHETEXPANSION_HEALTH MaxHealthDamaged = MEN_TREBUCHETEXPANSION_HEALTH_DAMAGED MaxHealthReallyDamaged = MEN_TREBUCHETEXPANSION_HEALTH_REALLY_DAMAGED End Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble DestructionDelay = 4000 End Behavior = StructureCollapseUpdate ModuleTag_StructureCollapseUpdate MinCollapseDelay = 000 MaxCollapseDelay = 000 CollapseDamping = .5 MaxShudder = 0.6 MinBurstDelay = 250 MaxBurstDelay = 800 BigBurstFrequency = 4 FXList = INITIAL FX_StructureMediumCollapse FXList = ALMOST_FINAL FX_StructureAlmostCollapse DestroyObjectWhenDone = Yes CollapseHeight = 89 End Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot Radius = 100 ; How far we try to claim ground MaxIncome = 0 ; If we were to get all we wanted, how much we would earn. Linear slope to 0 at 0% claim IncomeInterval = 999999 ; How often (in msec) we give that much money HighPriority = Yes ; A high priority claim gets to pretend it was there first. Visible = No ;// Don't show decal when a resource building is selected. End Behavior = BuildingBehavior BuildingModuleTag NightWindowName = WINDOW_N01 ;FireWindowName = WINDOW_F01 ;GlowWindowName = WINDOW_G01 End Behavior = CastleMemberBehavior ModuleTag_CMB End //---Numenor Stonework--- Behavior = AttributeModifierUpgrade ModuleTag_Reinforced TriggeredBy = Upgrade_MenFortressNumenorStonework AttributeModifier = NumenorStoneworkKeep_Bonus End Behavior = ModelConditionUpgrade ModuleTag_ShowTheStones TriggeredBy = Upgrade_MenFortressNumenorStonework AddConditionFlags = UPGRADE_NUMENOR_STONEWORK Permanent = Yes End ;Behavior = WeaponSetUpgrade ModuleTag_FlamingAttack ; TriggeredBy = Upgrade_GoodFortressFlamingMunitions ;End ; Need this for the flaming rock upgrade. Behavior = WeaponSetUpgrade ModuleTag_FlamingAttack TriggeredBy = Upgrade_GondorFireStones End Behavior = SubObjectsUpgrade ModuleTag_FlamingAttackUpgrade TriggeredBy = Upgrade_GondorFireStones ShowSubObjects = FirePlane End Behavior = ProductionUpdate ProductionUpdateModuleTag End Behavior = GrantUpgradeCreate ModuleTag_ActLikeAnOldUpgrade UpgradeToGrant = Upgrade_TrebuchetTurret GiveOnBuildComplete = Yes ; The ExemptStatus UnderConstruction hack doesn't work on foundation buildings. End Behavior = CommandSetUpgrade ModueTag_TrebCommandSet TriggeredBy = Upgrade_TrebuchetTurret ConflictsWith = Upgrade_HasWallTrebuchet CommandSet = GondorCastleWallUpgradeCommandSetBuyNewTreb End Behavior = CommandSetUpgrade ModueTag_TrebCommandSet3 TriggeredBy = Upgrade_HasWallTrebuchet Upgrade_TrebuchetTurret CommandSet = SellableCommandSet RequiresAllTriggers = Yes End Behavior = ObjectCreationUpgrade MakeTheFreeTreb TriggeredBy = Upgrade_TrebuchetTurret Delay = 0 RemoveUpgrade = Upgrade_WallTrebuchetButtonEnable GrantUpgrade = Upgrade_HasWallTrebuchet DestroyWhenSold = Yes DeathAnimAndDuration = AnimState:DEATH_2 AnimTime:999999 ;Offset = X:12.0 Y:0.0 Z:51.0 Offset = X:-15.0 Y:0.0 Z:51.0 End Behavior = ObjectCreationUpgrade MakeTheFreeTreb2 TriggeredBy = Upgrade_HasWallTrebuchet ConflictsWith = Upgrade_OpenGarrison Upgrade_PosternGate Delay = 0.0 RemoveUpgrade = Upgrade_WallTrebuchetButtonEnable ThingToSpawn = MenTrebuchetTowerObject Offset = X:-15.0 Y:0.0 Z:51.0 FadeInTime = 600 End Behavior = RefundDie ModuleTag_refund UpgradeRequired = Upgrade_MarketplaceUpgradeDefiance BuildingRequired = ANY +GondorMarketPlace RefundPercent = 50% End Behavior = SlaveWatcherBehavior WatchTheTreb RemoveUpgrade = Upgrade_HasWallTrebuchet ;when our slave dies, remove this upgrade, so we can get the upgrade again. GrantUpgrade = Upgrade_WallTrebuchetButtonEnable ;when our slave dies, enable the button that allows us to buy a new one ShareUpgrades = Yes ; So He'll get our Flaming Munitions End Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS MoodAttackCheckRate = 250 End Geometry = BOX GeometryMajorRadius = 40 GeometryMinorRadius = 25 GeometryHeight = 50.0 GeometryOffset = X:0 Y:0 Z:0 GeometryIsSmall = No Shadow = SHADOW_VOLUME BuildCompletion = PLACED_BY_PLAYER GeometryContactPoint = X:8.0 Y:27 Z:0 Repair ; GeometryContactPoint = X:-20 Y:20 Z:0 Repair ; GeometryContactPoint = X:-20 Y:-20 Z:0 Repair ; GeometryContactPoint = X:0 Y:0 Z:5 ; GeometryContactPoint = X:0 Y:0 Z:50 Swoop End