coding problems
#1
Posted 17 February 2008 - 09:50 AM
- i give mithlond sentry a power (slayer) to give them a new weapon set and an attribute modifier , early i face some fx error and finally solve it . only the weapon set i haven't solve it yet .here are the codes to make it more understandable,
in the unit ini
[codebox] AnimationState = FIRING_OR_PREATTACK_B WEAPONLOCK_SECONDARY
Animation = ATKA
AnimationName = EUMthlnd_SKL.EUMthlnd_ATKA
AnimationMode = ONCE
UseWeaponTiming = Yes
End
End
WeaponSet
Conditions = None
Weapon = PRIMARY MithlondSentryPike ;BALANCE Isengard Pikeman Weapon
Weapon = SECONDARY MithlondSentryThrustPower ;;.;; Added for 2.02
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT ;;.;; Added for 2.02
End
;----------------------------------SLAYER---------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_KnifeEnabler
SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
TriggeredBy = Upgrade_PikemenWall
End
Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
Duration = 20000 ;;.;; 30000 ; Needs to match SpecialAbilityAragornBladeMaster
AttributeModifier = MithlondSentryStand
;LockWeaponSlot = SECONDARY
WeaponSetFlags = WEAPONSET_TOGGLE_1 ;;.;; Uncommented for 2.02
StartsPaused = Yes
; InitiateSound = DwarfZerkVoiceLeap ;this doesn't work
End[/codebox]
in the horde
[codebox] WeaponSet
Conditions = None
Weapon = PRIMARY TowerGuardHordeRangefinder
Weapon = SECONDARY MithlondSentryThrustPowerHordeRangefinder
AutoChooseSources = SECONDARY NONE ;;.;; Added for 2.02
End
;----------------------------------SLAYER---------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_KnifeEnabler
SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
TriggeredBy = Upgrade_PikemenWall
End
Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
Duration = 20000 ;;.;; 30000 ; Needs to match SpecialAbilityAragornBladeMaster
AttributeModifier = MithlondSentryStand
;LockWeaponSlot = SECONDARY
WeaponSetFlags = WEAPONSET_TOGGLE_1 ;;.;; Uncommented for 2.02
StartsPaused = Yes
; InitiateSound = DwarfZerkVoiceLeap ;this doesn't work
End[/codebox]
in the weapon ini
[codebox];------------------------------------------------------------------------------
Weapon MithlondSentryThrustPower
LeechRangeWeapon = Yes
AttackRange = 36
MeleeWeapon = Yes ; Sorry, stand off doesn't work. This is just a melee weapon.
DelayBetweenShots = ELVEN_MITHLONDSENTRY_PIKE_DELAYBETWEENSHOTS ; time between shots, msec
PreAttackDelay = ELVEN_MITHLONDSENTRY_PIKE_PREATTACKDELAY
PreAttackType = PER_SHOT ; Do the delay each time we attack
FireFX = FX_GondorSwordHit
FireFlankFX = FX_Flanking
FiringDuration = ELVEN_MITHLONDSENTRY_PIKE_FIRINGDURATION
DamageNugget ; A basic Nugget that just does damage
Damage = 150
Radius = 0.0
DelayTime = 0
DamageType = SPECIALIST
DamageFXType = SWORD_SLASH
DeathType = NORMAL
End
MetaImpactNugget ; A Nugget that throws things back with force
HeroResist = .5
ShockWaveAmount = 25.0
ShockWaveRadius = 10.0
ShockWaveTaperOff = .75
DelayTime = 0
ShockWaveZMult = 1.2
SpecialObjectFilter = ALL ENEMIES NEUTRAL ; No ally knockdown
End
End
;------------------------------------------------------------------------------
Weapon MithlondSentryThrustPowerHordeRangefinder
AttackRange = 36
DelayBetweenShots = 1000 ; one second.
AcceptableAimDelta = 45
MeleeWeapon = Yes
FinishAttackOnceStarted = No
HordeAttackNugget
LockWeaponSlot = SECONDARY
End
End[/codebox]
the problem is that they don't impact enemies no matter what . can anyone help?
best regard
#2
Posted 21 February 2008 - 11:09 PM
so you should do something like they use for the hero Lurtz which is a temporary weapon toggle:
[codebox]
WeaponSet
Conditions = WEAPONSET_HERO_MODE
Weapon = PRIMARY LurtzCarnageWeapon
End
;;; LURTZ CARNAGE (aka rampage) ;;;-----------------------------------------------------------------------------
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_LurtzCarnage
SpecialPowerTemplate = SpecialAbilityLurtzCarnage
TriggeredBy = Upgrade_LurtzCarnage
End
Behavior = SpecialPowerModule ModuleTag_LurtzCarnageStarter ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
SpecialPowerTemplate = SpecialAbilityLurtzCarnage
StartsPaused = Yes
AttributeModifier = LurtzCarnage
AttributeModifierAffectsSelf = Yes
End
Behavior = HeroModeSpecialAbilityUpdate ModuleTag_CarnageUpdate ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
SpecialPowerTemplate = SpecialAbilityLurtzCarnage
HeroEffectDuration = 15000 ; ;30000
UnpackTime = 1 ; how long the weaponset is active
RequiredConditions = WEAPON_TOGGLE
End
[/codebox]
i hope you do know that when lurtz uses his carnage it uses a special power template of the WEAPONSET_HERO_MODE
which allows lurtz to use that weapon temporarily.
I think this is what you wanted to know, if it isnt then you should pm me about it!
#3
Posted 22 February 2008 - 12:20 AM
well , i used differnt special power like blade master and slayer and even carnage , i put it in both the unit and the horde. my question
is in the weapon why don't they impact enemies i tried several weapon set with no luck here are some code i tried
in unit
WeaponSet Conditions = WEAPONSET_HERO_MODE Weapon = PRIMARY MithlondSentryThrustPower End
in horde
WeaponSet Conditions = WEAPONSET_HERO_MODE Weapon = PRIMARY MithlondSentryThrustPowerHordeRangefinder Endin weapon
;------------------------------------------------------------------------------ Weapon MithlondSentryThrustPower LeechRangeWeapon = Yes AttackRange = 36 MeleeWeapon = Yes; Sorry, stand off doesn't work. This is just a melee weapon. DelayBetweenShots = ELVEN_MITHLONDSENTRY_PIKE_DELAYBETWEENSHOTS ; time between shots, msec PreAttackDelay = ELVEN_MITHLONDSENTRY_PIKE_PREATTACKDELAY PreAttackType = PER_SHOT ; Do the delay each time we attack FireFX = FX_GondorSwordHit FireFlankFX = FX_Flanking FiringDuration = ELVEN_MITHLONDSENTRY_PIKE_FIRINGDURATION DamageNugget ; A basic Nugget that just does damage Damage = 110 Radius = 0.0 DelayTime = 10 DamageType = SPECIALIST DamageFXType = SWORD_SLASH DeathType = NORMAL End MetaImpactNugget ; A Nugget that throws things back with force HeroResist = .5 ShockWaveAmount = 55.0 ShockWaveRadius = 10.0 ShockWaveTaperOff = .75 DelayTime = 0 ShockWaveZMult = 1.2 SpecialObjectFilter = ALL ENEMIES NEUTRAL; No ally knockdown End End ;------------------------------------------------------------------------------ Weapon MithlondSentryThrustPowerHordeRangefinder AttackRange = 36 DelayBetweenShots = 1000; one second. AcceptableAimDelta = 45 MeleeWeapon = Yes FinishAttackOnceStarted = No HordeAttackNugget LockWeaponSlot = SECONDARY End End
i just want them to give an ImpactNugget to throw enemies .
and thanx in advance
#4
Posted 22 February 2008 - 02:25 PM
Weapon MirkwoodArcherSilverthornBowWarhead RadiusDamageAffects = ENEMIES HitStoredTarget = Yes ; Always hits initial target. ; Damage to structures is the same as before DamageNugget ;SpecialObjectFilter = NONE +STRUCTURE Damage = ELVEN_MIRKWOOD_ARCHER_DAMAGE_UPGRADE_PIERCE Radius = 0.0 DelayTime = 0 DamageType = PIERCE DamageFXType = GOOD_ARROW_PIERCE DeathType = EXPLODED End DamageNugget ;SpecialObjectFilter = ALL -STRUCTURE Damage = ELVEN_MIRKWOOD_ARCHER_DAMAGE_UPGRADE_MAGIC Radius = 0.0 DelayTime = 0 DamageType = MAGIC DamageFXType = MAGIC DeathType = EXPLODED DamageScalar = 25% NONE +STRUCTURE +SUMMONED ; ; End MetaImpactNugget ShockWaveAmount = 50.0 ShockWaveRadius = 10.0 ShockWaveTaperOff = 1.0 ShockWaveSpeed = 0.0 ShockWaveZMult = 1.0 EndEnd
Who cares about the part that its a warhead (i also removed some unneccesary things).
look at the METAIMPACTNUGGET,
as far as i see in all the codes that push units back there is no DelayTime in the nuggets
And for the part of only hurting enemies try to add this code to your weapon (not the damagenugget):
RadiusDamageAffects = ENEMIES; you can try adding neutral!and remove your special object filter in the damage nugget.
the damage nugget itself might be confused by some of the things you put in it, so try to look the codebox up there and compare it a bit!
the example up there isnt the best but i think if you look at some other weapons you can figure it out.
BTW thanks for bringing this interesting thing up, I might add this to my WEAPONS tutorial when we have solved this!
If it still doesn't work then just tell me, and ill try again
#5
Posted 23 February 2008 - 08:03 AM
from the unit . like mirkwood they have three weapon sets with diffrent conditions
WeaponSet Conditions = None Weapon = PRIMARY MirkwoodArcherBow Weapon = TERTIARY MirkwoodArcherBowBombard AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI. End WeaponSet Conditions = PLAYER_UPGRADE Weapon = PRIMARY MirkwoodArcherSilverthornBow Weapon = TERTIARY MirkwoodArcherSilverthornBowBombard AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI. End WeaponSet Conditions = CLOSE_RANGE CONTESTING_BUILDING Weapon = PRIMARY RohanArcherBowMelee Weapon = TERTIARY MirkwoodArcherBowBombard AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI. End
but in the horde there is only one weapon
WeaponSet Conditions = None Weapon = PRIMARY MirkwoodArcherMissileHordeRangefinder Weapon = TERTIARY MirkwoodArcherMissileHordeRangefinderBombard AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT ; Not AI. End
maybe this is for archers and maybe the problem isn't in weapon set .( i hope not , knowing where the error is better than not )..
thanx rider for replaying
best regard
#6
Posted 23 February 2008 - 09:53 AM
you don't have to change the horde weapon!
and add a second weaponset on the unit for the special move thing,
it should work im almost 100% sure since the horde weapon is just for everyone in the horde to attack a unit.
if you send me your units entire code (including the one with the horde's code) i might be able to fix it for you.
(i figured that the way im trying to explain this is not the best way so i might just fix your code for you!)
#7
Posted 24 February 2008 - 03:21 AM
it in special power and an upgrade trigger , is it possible ? also making them move after the formation triggerd
like in bfme1.
thanx in advance
#8
Posted 24 February 2008 - 10:34 AM
thanx i'll send it to you , btw i have another question i want to change the formation of a horde and i want
it in special power and an upgrade trigger , is it possible ? also making them move after the formation triggerd
like in bfme1.
thanx in advance
That should be possible, since you say it exists in BFME I.
If you could maybe explain exactly what the do in BFME I i might be able to find out faster.
Ill have a look and post about that later
Edited by Ridder Geel, 24 February 2008 - 10:40 AM.
#9
Posted 24 February 2008 - 07:56 PM
you know like wedge and line formation it don't have an upgrade trigger in bfme1 , also in rotwk
any pike should have Porcupine here some codes
ChildObject ElvenMithlondSentryHordePorcupine ElvenMithlondSentryHorde // Note - for alternate formations, all info outside of the Contain Behavior module is ignored. // Any modifications need to be done via the Attribute Modifiers in the contain module. Behavior = HordeContain ModuleTag_HordeContain FrontAngle = 360 // Can't be flanked FlankedDelay = 2000 ObjectStatusOfContained = InitialPayload = ElvenMithlondSentry 15 Slots = 12 ; Originally 15 PassengerFilter = NONE +INFANTRY ShowPips = No ThisFormationIsTheMainFormation = No //Used to determine which armorset to use (and anything else we want!) RandomOffset = X:2 Y:1 RanksToReleaseWhenAttacking = 0 RanksToJustFreeWhenAttacking = 0 AttributeModifiers = ElvenMithlondSentryHordePorcupine IsPorcupineFormation = Yes MinimumHordeSize = 5 AlternateFormation = ElvenMithlondSentryHorde VisionRearOverride = 100% VisionSideOverride = 100% NotComboFormation = Yes // this formation is not suitable for combo, so it will switch out of this when combo-ing // Banner Carrier info BannerCarriersAllowed = ElvenBanner // types of units that are allowed as banner carriers BannerCarrierPosition = UnitType:ElvenMithlondSentry Pos:X:0.0 Y:0.0 // (DEFAULT) position of banner carrier RankInfo = RankNumber:1 UnitType:ElvenMithlondSentry Position:X:20 Y:0 Position:X:-16.18 Y:11.76 Position:X:6.18 Y:-19.02 Position:X:6.18 Y:19.02 Position:X:-16.18 Y:-11.76 Position:X:36.54 Y:16.27 Position:X:-39.13 Y:8.32 Position:X:26.77 Y:-29.73 Position:X:-4.18 Y:39.78 Position:X:-20 Y:-34.64 Position:X:26.77 Y:29.73 Position:X:-39.13 Y:-8.32 Position:X:36.54 Y:-16.27 Position:X:-20 Y:34.64 Position:X:-4.18 Y:-39.78 End End
as you can see there is only an AttributeModifiers no upgrade no special power , i want an upgrade
but i can't figure it out .. any help would appreciated.
best regard
#10
Posted 25 February 2008 - 05:32 PM
I have PM'd it to you!
Ill have a look at the other question now
Please tell me if you liked what i have done!
#11
Posted 25 February 2008 - 09:41 PM
#12
Posted 26 February 2008 - 05:11 PM
you want to have them be able to do a power ONLY when doing that 'kind-of' formation?
Or do you want them to need an upgrade to be able to get in that formation?
For me to help you please specify which of the above you want, or whatever else u want!
#13
Posted 26 February 2008 - 07:05 PM
#14
Posted 26 February 2008 - 10:32 PM
eiether by upgrade or a special power just to make it work.
so you just want to add a own formation?
#15
Posted 27 February 2008 - 03:08 PM
lately the ai do something unexpected , in rotwk ea makes the ai build walls around his base but in my
mod he build walls and around his base BUT ALL HIS TROPPS IS INSIDE THE BASE ( TRAPPED).
i don't know why , i only edited some codes in skirmishaidata.ini like ArmyMemberDefinition not only that
i take the original file that comes from ea and replace it with the i edited and nothing change .
i hope someone can figure this out and thanx in advance
#16
Posted 27 February 2008 - 03:15 PM
sorry, forget about the formation issue . i'v another problem about ai :
lately the ai do something unexpected , in rotwk ea makes the ai build walls around his base but in my
mod he build walls and around his base BUT ALL HIS TROPPS IS INSIDE THE BASE ( TRAPPED).
i don't know why , i only edited some codes in skirmishaidata.ini like ArmyMemberDefinition not only that
i take the original file that comes from ea and replace it with the i edited and nothing change .
i hope someone can figure this out and thanx in advance
It might have something to do with the faction's BASE files...
you might want to check those out.
#17
Posted 27 February 2008 - 03:50 PM
what im looking for . i don't have any idea about WB and i never mess with it so what do i have to do ? is there any tutorial?
note : does the base files in bfme2 affect rotwk ?
#18
Posted 27 February 2008 - 06:17 PM
the BASE files seem confused to me because i open the base file in rotwk WB and see all the faction but i don't know
what im looking for . i don't have any idea about WB and i never mess with it so what do i have to do ? is there any tutorial?
note : does the base files in bfme2 affect rotwk ?
oh in that case, (you not knowing anything about BASE file)
you might have done something in skirmishaidata.ini that caused the ai to do wierd things,
try to work back what you changed and see if the enemy works then.
If it doesn't then you did something else
oh ya and no the base files from BFME II shouldn't effect the ones from the witchking
Edited by Ridder Geel, 27 February 2008 - 06:18 PM.
#19
Posted 03 March 2008 - 09:17 AM
leads to nowhere , i open WB looking for something to change ( like coding ) and i ended with the script.
well it only shows the ai power points , so what can i change in the Base files ?.
note : how did ea makes the ai build walls , is it via coding or with WB ?
thanx in advance
#20
Posted 03 March 2008 - 02:48 PM
a question : the past days i've tried to learn about the BASE files but it seem like my learning
leads to nowhere , i open WB looking for something to change ( like coding ) and i ended with the script.
well it only shows the ai power points , so what can i change in the Base files ?.
note : how did ea makes the ai build walls , is it via coding or with WB ?
thanx in advance
walls are made by the ai on certain maps that allow it, using the wall hub template.
Base files are what the ai builds on a map(s).
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users