Nert's Coding Questions
#61
Posted 22 July 2009 - 09:48 PM
Actually, if you want some more in-depth help with stuff feel free to PM me and I can probably take a look at it. I've basically finished up work on my mod (Jeth Calark is doing the audio and I'm just handling the finishing touches, PR, and Admin type stuff) and I have a little bit of free time.
-Gto
Click on my Sig to go to my BFME Modding site where you can download my mods.
Kings of the West Mod Leader
*Retired. PM me if you need to get a hold of me as I'll get an email notification and should reply within a day or so*
#62
Posted 23 July 2009 - 01:04 AM
In the raven's ini:
TriggeredBy = Upgrade_RavenSight
ConflictsWith = Upgrade_RavenSpeed Upgrade_RavenStealth
Delay = 0.0
RemoveUpgrade = Upgrade_RavenSpeed Upgrade_RavenStealth
ThingToSpawn = DwarfRavenSightObject
Offset = X:0.0 Y:0.0 Z:0.0
FadeInTime = 0
End
Behavior = SlaveWatcherBehavior WatcherForVisionLoss
RemoveUpgrade = Upgrade_RavenSight
End
Behavior = ObjectCreationUpgrade RemoveVisionBonus_1
TriggeredBy = Upgrade_RavenSpeed
ConflictsWith = Upgrade_RavenSight Upgrade_RavenStealth
Delay = 0.0
ThingToSpawn = DwarfRavenSightKillerEgg
Offset = X:0.0 Y:0.0 Z:0.0
FadeInTime = 0
End
Behavior = ObjectCreationUpgrade RemoveVisionBonus_2
TriggeredBy = Upgrade_RavenStealth
ConflictsWith = Upgrade_RavenSight Upgrade_RavenSpeed
Delay = 0.0
ThingToSpawn = DwarfRavenSightKillerEgg
Offset = X:0.0 Y:0.0 Z:0.0
FadeInTime = 0
End
Two new objects:
Object DwarfRavenSightObject
Draw = W3DScriptedModelDraw ModuleTag_Draw
DefaultModelConditionState
Model = None
End
End
ShroudClearingRange = 100
Side = Neutral
EditorSorting = UNIT
ThreatLevel = 2.0
TransportSlotCount = 1
CrushableLevel = 5 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CrusherLevel = 0
IsTrainable = No
RadarPriority = NOT_ON_RADAR
ThingClass = CHARACTER_UNIT
KindOf = PRELOAD IGNORE_FOR_VICTORY IGNORES_SELECT_ALL CREEP NOT_AUTOACQUIRABLE ;UNATTACKABLE
ArmorSet
Conditions = None
Armor = NoArmor
DamageFX = NormalDamageFX
End
Body = ActiveBody ModuleTag_MakesKillWork
MaxHealth = 10000
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
AILuaEventsList = WargRiderFunctions
End
LocomotorSet
Locomotor = FellBeastLocomotor
Condition = SET_NORMAL
Speed = 999
End
Behavior = SlavedUpdate ModuleTag_Slave
GuardMaxRange = 2
GuardWanderRange = 1
End
End
;------------------------------------------------------------------------------
Object DwarfRavenSightKillerEgg
Draw = W3DScriptedModelDraw ModuleTag_Draw
DefaultModelConditionState
Model = None
End
End
KindOf = INERT IMMOBILE UNATTACKABLE
Body = ActiveBody ModuleTag_MakesKillWork
MaxHealth = 1
End
Behavior = LifetimeUpdate ModuleTag_HatchTrigger
MinLifetime = 0.0
MaxLifetime = 0.0
End
;Behavior = SlowDeathBehavior ModuleTag_HatchProcess
; DestructionDelay = 4000
; FX = INITIAL FX_BalrogSummoningStart
; FX = FINAL FX_BalrogSummoningFinish
; OCL = FINAL OCL_BalrogSummoningFinish
; Weapon = FINAL BalrogSummoning
;End
Behavior = FireWeaponWhenDeadBehavior ModuleTag_07
StartsActive = Yes
DeathWeapon = DwarfRavenSightKillerWeapon
End
End
In weapon.ini:
Weapon DwarfRavenSightKillerWeapon
DamageNugget ; A basic Nugget that just does damage
Damage = 1
Radius = 999999.0
DelayTime = 0
DamageType = FORCE
DeathType = NORMAL
DamageScalar = 9999999% NONE +DwarfRavenSightObject
End
End
Set the ShroudClearingRange of the DwarfRavenSightObject to whatever you want the new vision range to be.
What the above code (should) do: upon purchasing the upgrade, the raven spawns a new, invisible object (DwarfRavenSightObject), which has a larger ShroudClearingRange, thus making it appear that the raven's sight has been upgraded. The DwarfRavenSightObject is a slave of the raven, so it'll follow the raven around the map. The small ranges in the SlavedUpdate, combined with the object's high speed, should ensure that it will mirror the raven's every move.
When a different upgrade is purchased, another object is spawned (DwarfRavenSightKillerEgg), which dies immediately and fires a weapon that destroys all DwarfRavenSightObject units on the map. The SlaveWatcherBehavior in the raven's ini causes the sight upgrade to be removed when the raven's sight object is killed.
It's a rather complex, convoluted solution, but it's also the only one I could come up with.
Edited by The Shadow, 23 July 2009 - 01:07 AM.
#63
Posted 23 July 2009 - 03:11 PM
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#64
Posted 10 August 2009 - 03:17 PM
CommandButton Command_SpellBookDwarfVengeance Command = SPELL_BOOK Options = NEED_TARGET_ENEMY_OBJECT TextLabel = CONTROLBAR:DwarfSpellVengeance DescriptLabel = CONTROLBAR:DwarfSpellVengeanceTooltip SpecialPower = SpellBookDwarvesVowVengeance CursorName = EvilAbilityObj InvalidCursorName = GenericInvalid ButtonImage = UIDwarf_Spell_Vengeance ButtonBorderType = ACTION EndThe power is a basic module like this...
Behavior = SpecialPowerModule ModuleTag_VowVengeances SpecialPowerTemplate = SpellBookDwarvesVowVengeance AttributeModifier = SpellBookDwarvesVowVengeance AttributeModifierAffects = NONE +HERO UpdateModuleStartsAttack = No AvailableAtStart = No EndAnd the attribute modifier triggered...
ModifierList SpellBookDwarvesVowVengeance Category = WEAPON Modifier = ARMOR -35% Duration = 0;WARNING if you change this you must change the system life of the FX below (FXList.ini) FX = FX_LurtzCrippleStrike End
So in theory, you should only be able to target it on heroes, though I would settle for being able to target it on anything. Problem here is that it can't be targeted at anything at all :( no matter the object type, the targeting cursor shows invalid. Help?
(The other spellbook is similar, but targetable only on a friendly hero)
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#65
Posted 10 August 2009 - 06:48 PM
You may want to try basing your powers on war chant, instead. It's not exactly like what I think you want, but it will still respect your AttributeModifierAffects kindof, and can be targeted, just not at a specific unit. You could make the radius pretty small to compensate.
#67
Posted 10 August 2009 - 09:36 PM
edit - coincidentally, I can't get that to work either.
Behavior = SpecialPowerModule ModuleTag_VowVengeances SpecialPowerTemplate = SpellBookDwarvesVowVengeance AttributeModifier = SpellBookDwarvesVowVengeance AttributeModifierRange = 10 AttributeModifierAffects = ANY ENEMIES -INFANTRY -CAVALRY +MONSTER +HERO AntiFX = FX_AntiLeadership TriggerFX = FX_SpellWarChant UpdateModuleStartsAttack = No TargetAllSides = Yes AvailableAtStart = No End
This should, I think, set the target filter properly, but if i cast it on an enemy hero, nothing happens. I made a large and garish effect for when it's working, and that doesn't appear. Am I missing some sort of "allow enemies" thing?
Edited by Nertea, 10 August 2009 - 11:09 PM.
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#69
Posted 13 August 2009 - 08:53 PM
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#71
Posted 14 August 2009 - 03:24 AM
SpecialPower SpellBookDwarvesVowVengeance Enum = SPECIAL_AT_VISIBLE_OBJECT ReloadTime = 60000 RequiredSciences = Whatever ObjectFilter = NONE +HERO ;CRIPPLE_STRIKE_OBJECT_FILTER End
Now the commandbutton:
CommandButton Command_SpellBookDwarvesVowVengeance Command = SPELL_BOOK;SPECIAL_POWER SpecialPower = SpellBookDwarvesVowVengeance Options = NEED_TARGET_ENEMY_OBJECT TextLabel = CONTROLBAR:DwarfSpellVengeance CursorName = EvilAbilityObj InvalidCursorName = GenericInvalid ButtonImage = UIDwarf_Spell_Vengeance ButtonBorderType = ACTION DescriptLabel = CONTROLBAR:DwarfSpellVengeanceTooltip End
Spell book behaviors:
Behavior = SpecialPowerModule ModuleTag_CrippleStarter SpecialPowerTemplate = SpellBookDwarvesVowVengeance UpdateModuleStartsAttack = Yes StartsPaused = No InitiateSound = LurtzVoiceAttackCripplingStrike End Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CrippleUpdate SpecialPowerTemplate = SpellBookDwarvesVowVengeance UnpackTime = 1 PreparationTime = 1 PersistentPrepTime = 1 PackTime = 1 MustFinishAbility = Yes AwardXPForTriggering = 0 StartAbilityRange = 999999999;LURTZ_CRIPPLE_RANGE_ABILTY_START SpecialWeapon = DwarvesVowVengeanceWeapon End
weapon
Weapon DwarvesVowVengeanceWeapon AttackRange = 999999999;LURTZ_CRIPPLE_RANGE_WEAPON FireFX = FX_LurtzCripplingStrike HitPercentage = 100 ScatterRadius = 0.0 PreAttackDelay = 1 PreAttackType = PER_SHOT //Do the delay each time we attack a new target FiringDuration = 1000 //Duration of the archer firing shot is 500ms. ProjectileNugget ProjectileTemplateName = LurtzArrowProjectile; can make it a dud WarheadTemplateName = DwarvesVowVengeanceWeaponWarhead SpecialObjectFilter = NONE +HERO;ALL -MACHINE End End ;----------------------------------- Weapon DwarvesVowVengeanceWeaponWarhead ProjectileCollidesWith = ENEMIES NEUTRAL RadiusDamageAffects = ENEMIES NEUTRALS HitStoredTarget = Yes; Always hits initial target. DamageNugget ; A basic Nugget that just does damage Damage = 0 Radius = 0.0; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody. DelayTime = 0 DamageType = HERO DamageFXType = EVIL_ARROW_PIERCE DeathType = NORMAL End AttributeModifierNugget AttributeModifier = SpellBookDwarvesVowVengeance DamageFXType = EVIL_ARROW_PIERCE SpecialObjectFilter = NONE +HERO End End
ModifierList SpellBookDwarvesVowVengeance Category = WEAPON Modifier = ARMOR -35% Duration = 0;WARNING if you change this you must change the system life of the FX below (FXList.ini) FX = FX_LurtzCrippleStrike End
#72
Posted 24 August 2009 - 08:35 PM
This is the unit's primary code. Nothing special here.
Object DwarfTrueSilverMine ; *** ART Parameters *** SelectPortrait = BPDwarf_AdvMine ;day Draw = W3DScriptedModelDraw ModuleTag_Draw OkToChangeModelColor = Yes UseStandardModelNames = No StaticModelLODMode = No; Will append M or L to the skin name depending on GameLOD DefaultModelConditionState Model = dbmineadv_skn End IdleAnimationState Animation = IDLE AnimationName = dbmineadv_skl.dbmineadv_idla AnimationMode = ONCE AnimationBlendTime = 0 End BeginScript Prev = CurDrawablePrevAnimationState() if Prev == "BeingConstructed" then ; Don't play completed sound when canceling build-in-progress or when ; destroyed halfway if not CurDrawableModelcondition( "DYING" ) then CurDrawablePlaySound("CampSoldierCompleteFarm") end end EndScript End ;-- building being constructed ModelConditionState = AWAITING_CONSTRUCTION Model = dbmineadv_bld ; ParticleSysBone = NONE BuildingDoughnutCloud End; AnimationState = AWAITING_CONSTRUCTION Animation = dbmineadv_bld AnimationName = dbmineadv_bld.dbmine_bld AnimationMode = MANUAL End Flags = START_FRAME_FIRST End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = dbmineadv_bld ParticleSysBone = DUSTBONE BuildingContructDust End AnimationState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Animation = dbmineadv_bld AnimationName = dbmineadv_bld.dbmineadv_bld AnimationMode = MANUAL End Flags = START_FRAME_FIRST StateName = BeingConstructed BeginScript CurDrawablePlaySound("GondorBarracksBeginConstruction") EndScript End ;--damaged building ModelConditionState = DESTROYED_FRONT DEATH_2 Model = dbmine_D2 ParticleSysBone Fire01 FireBuildingLarge ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = DESTROYED_FRONT DEATH_2 BeginScript CurDrawableHideSubObject("GBFarm_01") EndScript End ModelConditionState = DESTROYED_RIGHT DEATH_2 Model = dbmine_D2 ParticleSysBone Fire01 FireBuildingLarge ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire3 SmokeBuildingLarge End AnimationState = DESTROYED_RIGHT DEATH_2 BeginScript CurDrawableHideSubObject("GBFarm_02") EndScript End ModelConditionState = DESTROYED_BACK DEATH_2 Model = dbmine_D2 ParticleSysBone Fire01 FireBuildingLarge ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = DESTROYED_BACK DEATH_2 BeginScript CurDrawableHideSubObject("GBFarm_03") EndScript End ModelConditionState = DESTROYED_LEFT DEATH_2 Model = dbmine_D2 ParticleSysBone Fire01 FireBuildingLarge ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = DESTROYED_LEFT DEATH_2 BeginScript CurDrawableHideSubObject("GBFarm_04") EndScript End ModelConditionState = DAMAGED DEATH_2 Model = dbmine_D1 ParticleSysBone Fire01 FireBuildingMedium ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = DAMAGED EnteringStateFX = FX_BuildingDamaged End ModelConditionState = REALLYDAMAGED DEATH_2 Model = dbmine_D2 ParticleSysBone Fire01 FireBuildingLarge ParticleSysBone Fire02 FireBuildingLarge ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = REALLYDAMAGED DEATH_2 EnteringStateFX = FX_BuildingReallyDamaged End ModelConditionState = RUBBLE DEATH_2 Model = dbmine_D2 ParticleSysBone Fire03 SmokeBuildingLarge End AnimationState = RUBBLE DEATH_2 BeginScript CurDrawableHideSubObject("GBFarm_01") CurDrawableHideSubObject("GBFarm_02") CurDrawableHideSubObject("GBFarm_03") CurDrawableHideSubObject("GBFarm_04") EndScript End ModelConditionState = POST_RUBBLE DEATH_2 Model = None ParticleSysBone NONE SmokeBuildingMediumRubble End ModelConditionState = POST_COLLAPSE DEATH_2 Model = None ParticleSysBone NONE SmokeBuildingMediumRubble End End Draw = W3DFloorDraw ModuleTag_DrawFloor StaticModelLODMode = Yes ; THIS NEEDS TO BE COMMENTED OUT WHEN ENGINEERING ENABLES LOD'S IN THE FLOOR DRAW ModelName = dbmineadv_Bib End ; ***DESIGN parameters *** EditorSorting = STRUCTURE ThreatLevel = 1.0 PlacementViewAngle = 45 VisionRange = 160.0 ; Shroud clearing distance DisplayName = OBJECT:DwarfTruesilverMine Description = OBJECT:DwarfTruesilverMineDescription Side = Dwarves BuildCost = TDH_DWARVES_ADVMINE_BUILDCOST BuildTime = TDH_DWARVES_ADVMINE_BUILDTIME ; in seconds BountyValue = TDH_DWARVES_ADVMINE_BOUNTY_VALUE ShroudClearingRange = TDH_DWARVES_ADVMINE_SHROUD_CLEAR WeaponSet Conditions = None End ArmorSet Conditions = None Armor = DwarfStructureArmor End CommandSet = DwarfTruesilverMineCommandSet ; *** AUDIO Parameters *** VoiceSelect = GondorFarmSelect SoundOnDamaged = BuildingLightDamageWood SoundOnReallyDamaged = BuildingHeavyDamageWood VoiceSelectUnderConstruction = BuildingGoodVoiceSelectUnderConstruction 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 ; *** ENGINEERING Parameters *** RadarPriority = STRUCTURE KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE SCORE MADE_OF_STONE Body = StructureBody ModuleTag_05 MaxHealth = TDH_DWARVES_ADVMINE_HEALTH MaxHealthDamaged = TDH_DWARVES_ADVMINE_HEALTH_DAMAGED MaxHealthReallyDamaged = TDH_DWARVES_ADVMINE_HEALTH_REALLY_DAMAGED DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK End Behavior = GettingBuiltBehavior GetBuiltBehaviorTag WorkerName = DwarfWorkerNoSelect End Behavior = AutoDepositUpdate AutoDepositModuleTag DepositTiming = TDH_DWARVES_ADVMINE_MONEY_TIME ; in milliseconds DepositAmount = TDH_DWARVES_ADVMINE_MONEY_AMOUNT ; cash amount to deposit every DepositTiming InitialCaptureBonus = 0 ; no initial bonus End Behavior = CastleMemberBehavior ModuleTag_CMB ; Special Eva events when attacked UnderAttackEvaEventIfKeep = EconPlotUnderAttack UnderAttackAllyEvaEventIfKeep = None ; Special Eva events if an econ plot is taken down CampDestroyedOwnerEvaEvent = EconPlotDestroyed CampDestroyedAllyEvaEvent = AllyEconPlotDestroyed CampDestroyedAttackerEvaEvent = EnemyEconPlotDestroyed End Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon AutoAcquireEnemiesWhenIdle = Yes MoodAttackCheckRate = 250 End Behavior = BuildingBehavior BuildingModuleTag NightWindowName = WINDOW_N01 FireWindowName = WINDOW_F01 GlowWindowName = WINDOW_G01 ; FireName = FIRE01 End Geometry = BOX GeometryName = Geom_Orig GeometryMajorRadius = 15.2 GeometryMinorRadius = 28.5 GeometryHeight = 34 GeometryOffset = X:1.1 Y:7 Z:0 AdditionalGeometry = BOX GeometryName = Geom_Orig GeometryMajorRadius = 20 GeometryMinorRadius = 23 GeometryHeight = 20 GeometryOffset = X:13.45 Y:-15 Z:0 AdditionalGeometry = BOX GeometryName = Geom_Orig GeometryMajorRadius = 11 GeometryMinorRadius = 13 GeometryHeight = 36 GeometryOffset = X:-0.24 Y:0.4 Z:27 GeometryIsSmall = No Shadow = SHADOW_VOLUME BuildCompletion = PLACED_BY_PLAYER GeometryContactPoint = X:13.27 Y:-0.4 Z:0 Repair GeometryContactPoint = X:-8.2 Y:30 Z:0 GeometryContactPoint = X:5 Y:-34 Z:0 GeometryContactPoint = X:2.1 Y:7.7 Z:61 Swoop End
I have a childobject which is the summmoned version of this mine. It posesses a lifetimeupdate, which has as its DeathType the FADED identifier. Then I have 2 slowdeathbehaviours, one playing when anything except the FADED identifier is used, and the other when the FADED identifier is not. When the timer expires then, the building should fade out - if it's killed before that, it should use the OCL and spawn some treasure.
ChildObject DwarfTruesilverMinePower DwarfTrueSilverMine Behavior = LifetimeUpdate ModuleTag_HatchTrigger MinLifetime = TDH_DWARVES_SPELL_TRUESILVER_LIFETIME;duration of the life MaxLifetime = TDH_DWARVES_SPELL_TRUESILVER_LIFETIME DeathType = FADED End Behavior = SlowDeathBehavior ModuleTag_DropTreasure DeathTypes = ALL -FADED DeathFlags = DEATH_2 OCL = FINAL OCL_SpawnTruesilverTreasure End Behavior = SlowDeathBehavior ModuleTag_FadeOut DeathTypes = NONE +FADED FadeDelay = 1000 FadeTime = 5000 DestructionDelay = 0 DeathFlags = DEATH_1 End End
Ingame, the building doesn't fade when the timer runs out (it just flickers out) and when it's killed prematurely it doesn't drop treasure. Anything I've missed? As far as I can tell this is exactly the way all the other summon fade/die codes work, the main difference being that this is a building.
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#73
Posted 24 August 2009 - 10:14 PM
As for the Dwarf Mine, I see several issues. One, you forgot the faded animation:
AnimationState = DEATH_1 Animation = FadeOut AnimationName = dbmineadv_skl.dbmineadv_idla AnimationMode = LOOP End End
Try putting that above DESTROYED_FRONT DEATH_2.
As for the treasure, try this:
Behavior = SlowDeathBehavior ModuleTag_DropTreasure DeathTypes = ALL -FADED DeathFlags = DEATH_2 DestructionDelay = 1000 OCL = FINAL OCL_SpawnTruesilverTreasure End
If that does not work, I have other suggestions. Hard to know as a lot is trial and error .
#74
Posted 27 August 2009 - 06:09 PM
Are you referring to the power discussed in the previous posts? If so, no, not working. I'm leaving that for a while, trying to get everything I have *partially* working *completely* working.
Also, trial and error is easier over msn or something
Edited by Nertea, 27 August 2009 - 06:10 PM.
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.
#76
Posted 07 October 2009 - 08:52 PM
I am having the strangest problem. I have a couple of wall upgrades that spawn an object like the Gondor Trebuchet Rampart does. These spawned units (a Dwarf catapult and a hidden healing object) are mysteriously dying. The upgrade rampart bit stays there, but the units die. The only thing that could do this is the actuall wall upgrade's death weapon, which looks like this
Behavior = FireWeaponWhenDeadBehavior FireDeadTag1 DeathTypes = ALL StartsActive = Yes ActiveDuringConstruction = Yes DeathWeapon = CastleUpgradeDeath End
Weapon CastleUpgradeDeath RadiusDamageAffects = ALLIES DamageNugget Damage = 1000 Radius = 80.0 DelayTime = 0 DamageType = FORCE DeathType = EXTRA_2 DamageScalar = 10000% NONE +MACHINE; Affect these... DamageScalar = 0% ALL -MACHINE ; ...and nothing else End DamageNugget Damage = 100000 Radius = 80.0 DelayTime = 0 DamageType = FORCE DeathType = EXTRA_2 DamageScalar = 10000% NONE +DwarfCastleWellObject; Affect these... DamageScalar = 0% ALL -DwarfCastleWellObject; ...and nothing else End End
Again, the functionality is identical to the original Gondor trebuchet upgrades. But - here's the strange part: the units are dying whenever a tech is purchased. More specifically, every time a PLAYER upgrade is granted, whether it's by researching, being granted by a spellbook power or being granted on a unit spawn. Somehow this fires the DeathWeapon!
My upgrades are laughably simple. They're in many cases just flags like this:
Upgrade Upgrade_DainExists Type = PLAYER EndOr a standard tech-type code. I have 180 upgrades, so no limit problem. I have no clue what could be causing this! I did a test with Gondor Trebs and researching some upgrades - no problems there, so there is no global thing that I broke.
Here's the object code...
; This is the demonic file for the castle hub upgrade, which contains a well, 2 banners and the mangonel
;----------------------------------------------------------------------------------------------
Object DwarfCastleHubUpgrade
; *** ART Parameters ***
SelectPortrait = BPEDwarf_Foundation4
; **** this draw module is for the mangonel
Draw = W3DScriptedModelDraw Draw_Mangonel
OkToChangeModelColor = No
AffectedByStealth = No
; ****** default state
DefaultModelConditionState
Model = dbcastu1man_skn
End
; ****** worldbuilder look
ModelConditionState = WORLD_BUILDER
Model = dbcastu1man_skn
End
IdleAnimationState
StateName = Complete
BeginScript
CurDrawableHideModule("Draw_Mangonel")
EndScript
End
ModelConditionState = SOLD
Model = dbcastu1man_bld
End
; ****** this is the build anim played backward when sold
AnimationState = SOLD
Animation
AnimationName = dbcastu1man_bld.dbcastu1man_bld
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 2.0 2.0
End
Flags = START_FRAME_LAST
EnteringStateFX = FX_BuildingContructDustCastles
End
; ****** when damaged switch to dbcampurave_d1
ModelConditionState = USER_2 DAMAGED
Model = dbcastu1man_D1
End
AnimationState = USER_2 DAMAGED
End
; ****** when really damaged switch to dbcampurave_d2 and play animation
ModelConditionState = USER_2 REALLYDAMAGED
Model = dbcastu1man_D2
End
AnimationState = USER_2 REALLYDAMAGED
Animation = ReallyDamagedanimation
AnimationName = dbcastu1man_D2.dbcastu1man_D2
AnimationMode = ONCE
End
End
; ****** when killed switch to dbcampurave_d3 and play animation
ModelConditionState = USER_2 RUBBLE
Model = dbcastu1man_D3
End
AnimationState = USER_2 RUBBLE
StateName = Complete
Animation = Death
AnimationName = dbcastu1man_D3.dbcastu1man_D3
AnimationMode = ONCE
End
EnteringStateFX = FX_WallDie
End
ModelConditionState = USER_2 POST_RUBBLE
Model = None
End
ModelConditionState = USER_2 POST_COLLAPSE
Model = None
End
; ****** when building, let's build
TransitionState = TRANS_IdleToBuild
Animation
AnimationName = dbcastu1man_bld.dbcastu1man_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_MANGONEL_BUILD_SPEED TDH_DWARVES_HUB_MANGONEL_BUILD_SPEED
End
EnteringStateFX = FX_BuildingContructDustCastles
End
ModelConditionState = USER_2
Model = dbcastu1man_bld
End
AnimationState = USER_2
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Complete" then CurDrawableSetTransitionAnimState("TRANS_IdleToBuild") end
EndScript
Flags = START_FRAME_LAST
Animation
AnimationName = dbcastu1man_bld.dbcastu1man_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_MANGONEL_BUILD_SPEED TDH_DWARVES_HUB_MANGONEL_BUILD_SPEED
End
End
End
;----------------------------------------------------------------------------------------------
;;
;; Newly-created field: the OverrideTooltip field! Notes
;;
;; So this field has limitations, first and foremost being that it should
;; only be applied to one drawModule. When objects are drawn, all drawModules are used; so
;; if you add OverrideTooltips to multiple drawModules, the lowest one (defined in the ini)
;; will always take precedence over any others.
;;
;; ReferenceDisplayName is a keyword to the drawable which tells it to ... reference the
;; DisplayName of the object.
;;
; ***** this draw module is a picker object, hidden.
Draw = W3DScriptedModelDraw Draw_Picker
; Don't want to change the hidden state of this when the postern gate is stealthed.
AffectedByStealth = No
DefaultModelConditionState
Model = dbcastu1pic_skn
End
End
;----------------------------------------------------------------------------------------------
; ***** this draw module is the plot icon that is hidden/unhidden when various upgrades are purchased
Draw = W3DScriptedModelDraw Draw_Decal
AffectedByStealth = No
DefaultModelConditionState
Model = dbcastu1plo_skn
End
; ********* normally draw picker + decal
IdleAnimationState
BeginScript
CurDrawableShowModule("Draw_Decal")
CurDrawableShowModule("Draw_Picker")
EndScript
End
; ********* takes a bit for the decal to show up when wall is built, but you can still click
AnimationState = JUST_BUILT
BeginScript
CurDrawableHideModule("Draw_Decal")
CurDrawableShowModule("Draw_Picker")
EndScript
End
; ********* hide the decal for a bit when the object is sold
AnimationState = SOLD
BeginScript
CurDrawableHideModule("Draw_Decal"); since the command is not yet available
EndScript
End
; ********* when wall is gone, hide decal and picker
AnimationState = RUBBLE
BeginScript
CurDrawableHideModule("Draw_Decal")
CurDrawableHideModule("Draw_Picker")
EndScript
End
; ********* when we upgrade to well, draw well
AnimationState = USER_1
BeginScript
CurDrawableShowModule("Draw_Well")
CurDrawableHideModule("Draw_Decal")
CurDrawableHideModule("Draw_BannerRoyal")
CurDrawableHideModule("Draw_BannerRaven")
CurDrawableHideModule("Draw_Mangonel")
CurDrawableHideModule("Draw_Picker")
EndScript
End
; ********* when we upgrade to mangonel....
AnimationState = USER_2
BeginScript
CurDrawableShowModule("Draw_Mangonel")
CurDrawableHideModule("Draw_Decal")
CurDrawableHideModule("Draw_BannerRoyal")
CurDrawableHideModule("Draw_BannerRaven")
CurDrawableHideModule("Draw_Well")
CurDrawableHideModule("Draw_Picker")
EndScript
End
; ********* when we upgrade to raven banner, draw...
AnimationState = USER_4
BeginScript
CurDrawableShowModule("Draw_BannerRaven")
CurDrawableHideModule("Draw_Decal")
CurDrawableHideModule("Draw_Mangonel")
CurDrawableHideModule("Draw_BannerRoyal")
CurDrawableHideModule("Draw_Well")
CurDrawableHideModule("Draw_Picker")
EndScript
End
; ********* when we upgrade to royal banner, draw...
AnimationState = USER_3
BeginScript
CurDrawableShowModule("Draw_BannerRoyal")
CurDrawableHideModule("Draw_Decal")
CurDrawableHideModule("Draw_Mangonel")
CurDrawableHideModule("Draw_Well")
CurDrawableHideModule("Draw_BannerRaven")
CurDrawableHideModule("Draw_Picker")
EndScript
End
End
;----------------------------------------------------------------------------------------------
; ********* ok when we build a ROYAL banner....
Draw = W3DScriptedModelDraw Draw_BannerRoyal
DefaultModelConditionState
Model = dbcastu1roy_skn
End
IdleAnimationState
BeginScript
CurDrawableHideModule("Draw_BannerRoyal")
EndScript
End
ModelConditionState = SOLD
Model = dbcastu1roy_bld
End
AnimationState = SOLD
Animation
AnimationName = dbcastu1roy_bld.dbcastu1roy_bld
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 3.0 3.0
End
Flags = START_FRAME_LAST
EnteringStateFX = FX_BuildingContructDustCastlesCentre
End
ModelConditionState = USER_3 DAMAGED
Model = dbcastu1roy_D1
End
AnimationState = USER_3 DAMAGED
; EnteringStateFX = FX_MinWallATransitionDamaged
End
ModelConditionState = USER_3 REALLYDAMAGED
Model = dbcastu1roy_D2
End
AnimationState = USER_3 REALLYDAMAGED
Animation = ReallyDamagedanimation
AnimationName = dbcastu1roy_D2.dbcastu1roy_D2
AnimationMode = ONCE
End
; EnteringStateFX = FX_MinWallATransitionReallyDamaged
End
ModelConditionState = USER_3 RUBBLE
Model = dbcastu1roy_D3
End
AnimationState = USER_3 RUBBLE
Animation = Death
AnimationName = dbcastu1roy_D3.dbcastu1roy_D3
AnimationMode = ONCE
End
; EnteringStateFX = FX_MinWallATransitionRubble
EnteringStateFX = FX_WallDie
End
ModelConditionState = USER_3 POST_RUBBLE
Model = None
End
ModelConditionState = USER_3 POST_COLLAPSE
Model = None
End
ModelConditionState = USER_3
Model = dbcastu1roy_bld
End
AnimationState = USER_3
Animation
AnimationName = dbcastu1roy_bld.dbcastu1roy_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_BANNER1_BUILD_SPEED TDH_DWARVES_HUB_BANNER1_BUILD_SPEED
End
EnteringStateFX = FX_BuildingContructDustCastlesCentre
End
End
; ********* ok when we build a RAVEN banner....
Draw = W3DScriptedModelDraw Draw_BannerRaven
DefaultModelConditionState
Model = dbcastu1rav_skn
End
IdleAnimationState
BeginScript
CurDrawableHideModule("Draw_BannerRaven")
EndScript
End
ModelConditionState = SOLD
Model = dbcastu1rav_bld
End
AnimationState = SOLD
Animation
AnimationName = dbcastu1rav_bld.dbcastu1rav_bld
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 3.0 3.0
End
Flags = START_FRAME_LAST
EnteringStateFX = FX_BuildingContructDustCastlesCentre
End
ModelConditionState = USER_4 DAMAGED
Model = dbcastu1rav_D1
End
AnimationState = USER_4 DAMAGED
; EnteringStateFX = FX_MinWallATransitionDamaged
End
ModelConditionState = USER_4 REALLYDAMAGED
Model = dbcastu1rav_D2
End
AnimationState = USER_4 REALLYDAMAGED
Animation = ReallyDamagedanimation
AnimationName = dbcastu1rav_D2.dbcastu1rav_D2
AnimationMode = ONCE
End
; EnteringStateFX = FX_MinWallATransitionReallyDamaged
End
ModelConditionState = USER_4 RUBBLE
Model = dbcastu1rav_D3
End
AnimationState = USER_4 RUBBLE
Animation = Death
AnimationName = dbcastu1rav_D3.dbcastu1rav_D3
AnimationMode = ONCE
End
; EnteringStateFX = FX_MinWallATransitionRubble
EnteringStateFX = FX_WallDie
End
ModelConditionState = USER_4 POST_RUBBLE
Model = None
End
ModelConditionState = USER_4 POST_COLLAPSE
Model = None
End
ModelConditionState = USER_4
Model = dbcastu1rav_bld
End
AnimationState = USER_4
Animation
AnimationName = dbcastu1rav_bld.dbcastu1rav_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_BANNER2_BUILD_SPEED TDH_DWARVES_HUB_BANNER2_BUILD_SPEED
End
EnteringStateFX = FX_BuildingContructDustCastlesCentre
End
End
;----------------------------------------------------------------------------------------------
; ************** and what about the well?
Draw = W3DScriptedModelDraw Draw_Well
; Don't want to change the hidden state of this when the postern gate is stealthed.
AffectedByStealth = No
DefaultModelConditionState
Model = dbcastu1wel_skn
WeaponLaunchBone = PRIMARY ARROW
End
; This idle state is required simply to make sure the tower visual
; mesh is invisible so we can't pick it when it's underground.
; The actual state is not needed.
IdleAnimationState
StateName = Complete
BeginScript
CurDrawableHideModule("Draw_Well")
EndScript
End
ModelConditionState = SOLD
Model = dbcastu1wel_bld
End
AnimationState = SOLD
Animation
AnimationName = dbcastu1wel_bld.dbcastu1wel_bld
AnimationMode = ONCE_BACKWARDS
AnimationSpeedFactorRange = 10 10
End
Flags = START_FRAME_LAST
EnteringStateFX = FX_BuildingContructDustCastles
End
ModelConditionState = USER_1 DAMAGED
Model = dbcastu1wel_d1
End
AnimationState = USER_1 DAMAGED
; EnteringStateFX = FX_MinWallATransitionDamaged
End
ModelConditionState = USER_1 REALLYDAMAGED
Model = dbcastu1wel_D2
End
AnimationState = USER_1 REALLYDAMAGED
Animation = ReallyDamagedanimation
AnimationName = dbcastu1wel_D2.dbcastu1wel_D2
AnimationMode = ONCE
End
; EnteringStateFX = FX_MinWallATransitionReallyDamaged
End
ModelConditionState = USER_1 RUBBLE
Model = dbcastu1wel_D3
End
AnimationState = USER_1 RUBBLE
StateName = Complete
Animation = Death
AnimationName = dbcastu1wel_D3.dbcastu1wel_D3
AnimationMode = ONCE
End
EnteringStateFX = FX_WallDie
End
ModelConditionState = USER_1 POST_RUBBLE
Model = None
End
ModelConditionState = USER_1 POST_COLLAPSE
Model = None
End
TransitionState = TRANS_IdleToBuild
Animation
AnimationName = dbcastu1wel_bld.dbcastu1wel_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_WELL_BUILD_SPEED TDH_DWARVES_HUB_WELL_BUILD_SPEED
End
EnteringStateFX = FX_BuildingContructDustCastles
End
ModelConditionState = USER_1
Model = dbcastu1wel_bld
End
; Just play the last frame, so we don't get the build anim again.
AnimationState = USER_1
; If we're complete then transition via showing and build anim.
BeginScript
Prev = CurDrawablePrevAnimationState()
if Prev == "Complete" then CurDrawableSetTransitionAnimState("TRANS_IdleToBuild") end
EndScript
Flags = START_FRAME_LAST
Animation
AnimationName = ducastu1wel_bld.ducastu1wel_bld
AnimationMode = ONCE
AnimationSpeedFactorRange = TDH_DWARVES_HUB_WELL_BUILD_SPEED TDH_DWARVES_HUB_WELL_BUILD_SPEED
End
End
End
;----------------------- AUDIO -------------------------
VoiceSelect = Gui_PlotSelect
SoundOnDamaged = BuildingLightDamageStone
SoundOnReallyDamaged = BuildingHeavyDamageStone
VoiceSelectUnderConstruction = BuildingEvilVoiceSelectUnderConstruction
; Change selection sounds based on upgrades
ClientBehavior = UpgradeSoundSelectorClientBehavior ModuleTag_UpgradeSoundSelector
SoundUpgrade = Upgrade_CastleMangonel ; EVERYTHING on this line must be present
ExcludedUpgrades = Upgrade_CastleWell Upgrade_CastleBannerRoyal Upgrade_CastleBannerRaven ; NOTHING on this line can be present
VoiceSelect = GondorPosternGateSelect
End
SoundUpgrade = Upgrade_CastleWell ; EVERYTHING on this line must be present
ExcludedUpgrades = Upgrade_CastleMangonel Upgrade_CastleBannerRoyal Upgrade_CastleBannerRaven ; NOTHING on this line can be present
VoiceSelect = GondorBattleTowerSelect
End
SoundUpgrade = Upgrade_CastleBannerRoyal ; EVERYTHING on this line must be present
ExcludedUpgrades = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven ; NOTHING on this line can be present
VoiceSelect = GondorArmorySelect
End
SoundUpgrade = Upgrade_CastleBannerRaven ; EVERYTHING on this line must be present
ExcludedUpgrades = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal ; NOTHING on this line can be present
VoiceSelect = GondorArmorySelect
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:DwarfCastleHubUpgrade
EditorSorting = STRUCTURE
Side = Dwarves
IsTrainable = No
ArmorSet
Conditions = None
Armor = DwarfCastleHubUpgrade
DamageFX = MinasWallADamageFX
End
ArmorSet
Conditions = AS_TOWER
Armor = DwarfCastleHubUpgradeRampart
DamageFX = MinasWallADamageFX
End
ArmorSet
Conditions = PLAYER_UPGRADE
Armor = DwarfCastleHubUpgradeRampart
DamageFX = MinasWallADamageFX
End
; -- Default no weapons
WeaponSet
Conditions = None
End
Behavior = ProductionUpdate ProductionUpdateModuleTag
; nothing, but is required if we have any Object-level Upgrades!
End
Body = ActiveBody ModuleTag_02
MaxHealth = TDH_DWARVES_HUB_UPGRADE_HEALTH
End
; WELL --- Commandset upgrade
Behavior = CommandSetUpgrade CastleWellCommandset
TriggeredBy = Upgrade_CastleWell
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleMangonel Upgrade_CastleBannerRaven
CommandSet = SellableCommandSet
End
; WELL --- Build sound loop
Behavior = AudioLoopUpgrade ModuleTag_WellBuildLoop
TriggeredBy = Upgrade_CastleWell
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleMangonel Upgrade_CastleBannerRaven
SoundToPlay = BuildingConstructionLoop
KillOnDeath = Yes
KillAfterMS = 16000 ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
End
; WELL --- Armorset upgrade
Behavior = ArmorUpgrade ArmorUpgradeModuleWell
TriggeredBy = Upgrade_CastleWell
ArmorSetFlag = PLAYER_UPGRADE
End
; WELL --- Tooltip upgrade
Behavior = TooltipUpgrade ModuleTag_WellTooltip
TriggeredBy = Upgrade_CastleWell
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleMangonel Upgrade_CastleBannerRaven
DisplayName = OBJECT:DwarfCastleWell
Description = OBJECT:DwarfCastleWellDescription
End
; WELL --- Spawn the actual object
Behavior = ObjectCreationUpgrade WellObjectSpawner
TriggeredBy = Upgrade_CastleWell
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleMangonel Upgrade_CastleBannerRaven
Delay = TDH_DWARVES_HUB_WELL_DELAY
ThingToSpawn = DwarfCastleWellObject
Offset = X:-5.38 Y:0.88 Z:60.91
FadeInTime = 2000
DestroyWhenSold = Yes
End
; WELL --- Geometry upgrade
Behavior = GeometryUpgrade ModueTag_WellGeom
TriggeredBy = Upgrade_CastleWell
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleMangonel Upgrade_CastleBannerRaven
ShowGeometry = WellGeom
HideGeometry = Banner1Geom Banner2Geom MangonelGeom
CustomAnimAndDuration = AnimState:USER_1 AnimTime:0
End
; Mangonel --- Geometry upgrade
Behavior = GeometryUpgrade ModueTag_MangonelGeom
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
ShowGeometry = MangonelGeom
HideGeometry = Banner1Geom Banner2Geom WellGeom
CustomAnimAndDuration = AnimState:USER_2 AnimTime:0
End
; MANGONEL --- Build Sound Loop
Behavior = AudioLoopUpgrade ModuleTag_MangonelBuildLoop
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
SoundToPlay = BuildingConstructionLoop
KillOnDeath = Yes
KillAfterMS = 16000 ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
End
; MANGONEL --- Commandset Upgrades
Behavior = CommandSetUpgrade ModueTag_MangonelCommandSet
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_HasMangonel Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
CommandSet = DwarfCastleHubUpgradeBuyNewMangonelCS
End
Behavior = CommandSetUpgrade ModueTag_MangCs2
TriggeredBy = Upgrade_HasMangonel Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
CommandSet = SellableCommandSet
RequiresAllTriggers = Yes
End
; MANGONEL --- Armor upgrade
Behavior = ArmorUpgrade ArmorUpgradeModuleTagMangonel
TriggeredBy = Upgrade_CastleMangonel
ArmorSetFlag = AS_TOWER
End
; MANGONEL --- Tooltip upgrade
Behavior = TooltipUpgrade ModuleTag_MangonelTooltip
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
DisplayName = OBJECT:DwarfCastleMangonel
Description = OBJECT:DwarfCastleMangonelDescription
End
; MANGONEL - OCLs to create trebuchet
Behavior = ObjectCreationUpgrade MakeThebuttongoawayfastlike
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
Delay = 0.0 ;TDH_DWARVES_HUB_MANGONEL_DELAY
RemoveUpgrade = Upgrade_CastleMangonelButtonEnable
DestroyWhenSold = Yes
;DeathAnimAndDuration = AnimState:DEATH_2 AnimTime:999999
Offset = X:-5.38 Y:0.88 Z:39.91
End
Behavior = ObjectCreationUpgrade MakeTheFreeMangonel
TriggeredBy = Upgrade_CastleMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
Delay = TDH_DWARVES_HUB_MANGONEL_DELAY
RemoveUpgrade = Upgrade_CastleMangonelButtonEnable
GrantUpgrade = Upgrade_HasMangonel
DestroyWhenSold = Yes
;DeathAnimAndDuration = AnimState:DEATH_2 AnimTime:999999
Offset = X:-5.38 Y:0.88 Z:39.91
End
Behavior = ObjectCreationUpgrade MakeTheFreeTreb2
TriggeredBy = Upgrade_HasMangonel
ConflictsWith = Upgrade_CastleBannerRoyal Upgrade_CastleWell Upgrade_CastleBannerRaven
Delay = 0
RemoveUpgrade = Upgrade_CastleMangonelButtonEnable
ThingToSpawn = DwarfMangonelWall
Offset = X:-5.38 Y:0.88 Z:39.91
FadeInTime = 1000
End
Behavior = SlaveWatcherBehavior WatchTheTreb
RemoveUpgrade = Upgrade_HasMangonel ;when our slave dies, remove this upgrade, so we can get the upgrade again.
GrantUpgrade = Upgrade_CastleMangonelButtonEnable ;when our slave dies, enable the button that allows us to buy a new one
End
; ROYAL BANNER --- Commandset upgrade
Behavior = CommandSetUpgrade ModueTag_RoyalBannerCommandSet
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
CommandSet = SellableCommandSet
End
; ROYAL BANNER --- ????? upgrade
Behavior = AttributeModifierUpgrade DontShootWhilstBuilding3 ; Required for the buiding canceling - don't ask.
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
AttributeModifier = PreventFromShooting
End
; ROYAL BANNER --- Geometry upgrade
Behavior = GeometryUpgrade ModueTag_RoyalBannerGeom
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
ShowGeometry = Banner1Geom
HideGeometry = Banner2Geom WellGeom MangonelGeom
CustomAnimAndDuration = AnimState:USER_3 AnimTime:0
End
; ROYAL BANNER --- Build Loop Sound
Behavior = AudioLoopUpgrade ModuleTag_RoyalBannerBuildLoop
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
SoundToPlay = BuildingConstructionLoop
KillOnDeath = Yes
KillAfterMS = 15000 ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
End
; ROYAL BANNER --- Tooltip upgrade
Behavior = TooltipUpgrade ModuleTag_RoyalBannerTooltip
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
DisplayName = OBJECT:DwarfCastleRoyalBanner
Description = OBJECT:DwarfCastleRoyalBannerDescription
End
; ROYAL BANNER --- Armorset upgrade
Behavior = ArmorUpgrade ArmorUpgradeModuleTag3
TriggeredBy = Upgrade_CastleBannerRoyal
ArmorSetFlag = PLAYER_UPGRADE
End
; ROYAL BANNER --- Bonus enabler
Behavior = AttributeModifierAuraUpdate ModuleTag_RoyalBannerLeadership
TriggeredBy = Upgrade_CastleBannerRoyal
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRaven
StartsActive = No
BonusName = DwarfCastleRoyalBannerLeadership ;RohanWallPassiveLeadership
RefreshDelay = 1000
;Range = 120
ObjectFilter = ANY +INFANTRY +CAVALRY +MACHINE -IMMOBILE -HERO
End
; RAVEN BANNER --- Commandset upgrade
Behavior = CommandSetUpgrade ModueTag_RavenBannerCommandSet
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
CommandSet = SellableCommandSet
End
; RAVEN BANNER --- ????? upgrade
Behavior = AttributeModifierUpgrade DontShootWhilstBuilding4 ; Required for the buiding canceling - don't ask.
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
AttributeModifier = PreventFromShooting
End
; RAVEN BANNER --- Geometry upgrade
Behavior = GeometryUpgrade ModueTag_RavenBannerGeom
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
ShowGeometry = Banner2Geom
HideGeometry = Banner1Geom WellGeom MangonelGeom
CustomAnimAndDuration = AnimState:USER_4 AnimTime:0
End
; RAVEN BANNER --- Build Loop Sound
Behavior = AudioLoopUpgrade ModuleTag_RavenBannerBuildLoop
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
SoundToPlay = BuildingConstructionLoop
KillOnDeath = Yes
KillAfterMS = 15000 ; Should match the length of the build-up animation [Or a little shorter since sounds take a little while to die]
End
; RAVEN BANNER --- Tooltip upgrade
Behavior = TooltipUpgrade ModuleTag_RavenBannerTooltip
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
DisplayName = OBJECT:DwarfCastleBannerRaven
Description = OBJECT:DwarfCastleBannerRavenDescription
End
; RAVEN BANNER --- Armorset upgrade
Behavior = ArmorUpgrade ArmorUpgradeModuleTag4
TriggeredBy = Upgrade_CastleBannerRaven
ArmorSetFlag = PLAYER_UPGRADE
End
; RAVEN BANNER --- Bonus enabler
Behavior = AttributeModifierAuraUpdate ModuleTag_RavenBannerLeadership
TriggeredBy = Upgrade_CastleBannerRaven
ConflictsWith = Upgrade_CastleMangonel Upgrade_CastleWell Upgrade_CastleBannerRoyal
StartsActive = No
BonusName = DwarfCastleRavenBannerLeadership ;RohanWallPassiveLeadership
RefreshDelay = 1000
;Range = 120
ObjectFilter = ANY +INFANTRY +CAVALRY +MACHINE -IMMOBILE -HERO
End
Behavior = CastleMemberBehavior ModuleTag_CMB
StoreUpgradePrice = Yes ; We want to overload the refund price with any upgrades purchased.
CountsForEvaCastleBreached = No ; This is just the floating button
End
Behavior = FoundationAIUpdate ModuleTag_FoundationAI
End
Behavior = WallUpgradeUpdate ModuleTag_Update
End
Behavior = AIUpdateInterface ModuleTag_SoWeCanUseWeapon
AutoAcquireEnemiesWhenIdle = Yes
MoodAttackCheckRate = 250
AILuaEventsList = GarrisonableFunctions
End
Behavior = FireWeaponWhenDeadBehavior FireDeadTag1
DeathTypes = ALL
StartsActive = Yes
ActiveDuringConstruction = Yes
DeathWeapon = CastleUpgradeDeath
End
KindOf = STRUCTURE SELECTABLE IMMOBILE CHUNK_VENDOR CAN_ATTACK WALL_UPGRADE WALK_ON_TOP_OF_WALL NOT_AUTOACQUIRABLE ;;;;;;;; This needs to go in when being obscured by the wall is fixed -> ATTACK_NEEDS_LINE_OF_SIGHT GARRISON
RadarPriority = STRUCTURE
CommandSet = DwarfCastleHubUpgradeCommandSet
VisionRange = TDH_GONDOR_ARCHER_VISION_RANGE
KeepSelectableWhenDead = No
GeometryIsSmall = No
Geometry = BOX
GeometryMajorRadius = 11.5
GeometryMinorRadius = 11.5
GeometryHeight = 16.0
GeometryOffset = X:-4.7 Y:-0.6 Z:0
GeometryName = DummyGeom
GeometryActive = Yes
AdditionalGeometry = BOX
GeometryMajorRadius = 11.5
GeometryMinorRadius = 11.5
GeometryHeight = 16.0
GeometryOffset = X:-4.7 Y:-0.6 Z:0
GeometryName = WellGeom
GeometryActive = No
AdditionalGeometry = BOX
GeometryMajorRadius = 11
GeometryMinorRadius = 10
GeometryHeight = 39
GeometryOffset = X:-4.17 Y:0.6 Z:0
GeometryName = Banner1Geom
GeometryActive = No
AdditionalGeometry = BOX
GeometryMajorRadius = 11
GeometryMinorRadius = 10
GeometryHeight = 39
GeometryOffset = X:-4.17 Y:0.6 Z:0
GeometryName = Banner2Geom
GeometryActive = No
AdditionalGeometry = BOX
GeometryMajorRadius = 11
GeometryMinorRadius = 10
GeometryHeight = 39.2
GeometryOffset = X:-4.89 Y:0.512 Z:0
GeometryName = MangonelGeom
GeometryActive = No
GeometryContactPoint = X: 37.0 Y:-16.0 Z:120 Swoop
GeometryContactPoint = X: 37.0 Y: 0.0 Z:0 Grab
GeometryContactPoint = X: 37.0 Y: 16.0 Z:120 Swoop
Shadow = SHADOW_VOLUME
End
;------------------------------------------------------------------------------
; Dwarf Well ini
;------------------------------------------------------------------------------
Object DwarfCastleWellObject
Draw = W3DScriptedModelDraw ModuleTag_Draw
DefaultModelConditionState
Model = None
ParticleSysBone = None WellHealFX
Shadow = SHADOW_ALPHA_DECAL
ShadowSizeX = 200;
ShadowSizeY = 200;
ShadowTexture = decal_hero_good;
End
End
; ***DESIGN parameters ***
DisplayName = OBJECT:DwarfWell
Description = OBJECT:DwarfWellDescription
Side = Dwarves
IsTrainable = No
EditorSorting = STRUCTURE
RadarPriority = NOT_ON_RADAR
KindOf = PRELOAD MACHINE IGNORE_FOR_VICTORY IGNORES_SELECT_ALL NOT_AUTOACQUIRABLE
Body = ActiveBody ModuleTag_MakesKillWork
MaxHealth = 10000
End
Behavior = SlowDeathBehavior ModuleTag_SlowDeathWithoutRubble
DeathTypes = ALL
DestructionDelay = 1
End
Behavior = PassiveAreaEffectBehavior ModuleTag_SplashOfHealingWater_Ahh
EffectRadius = 120 ; please update the decal size in experience lvl INI if you change this... the value there is about 2.2x the value here
PingDelay = 2000;msec
HealPercentPerSecond = 2%
AllowFilter = ANY +INFANTRY +CAVALRY -MACHINE -IMMOBILE
End
Behavior = BannerCarrierUpdate BannerCarrierUpdateModuleTag
IdleSpawnRate = 8000 ; spawn a new member every n seconds when idle (in miliseconds)
UnitSpawnFX = FX_BannerCarrierSpawnUnit ; name of particle FX to use when the BannerCarrier spawns a new unit
ReplenishNearbyHorde = Yes
ScanHordeDistance = 120
End
Geometry = BOX
GeometryMajorRadius = 1
GeometryMinorRadius = 1
GeometryHeight = 1
BuildCompletion = PLACED_BY_PLAYER
End
Edited by Nertea, 07 October 2009 - 10:01 PM.
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.