Jump to content


Photo

EvilSentryTower Tower Upgrade


  • Please log in to reply
4 replies to this topic

#1 Trevor533

Trevor533
  • Members
  • 7 posts

Posted 22 March 2022 - 12:14 AM

Hello ive been trying to create an upgrade for evilsentrytowers in my mod since they are really weak and i decided id like a gondor like or flame arrow upgrade

 

weapon.ini

 

;------------------------------------------------------------------------------
Weapon EvilSentryTowerFireBow      ; BALANCE Archer Weapon
  AttackRange               = KEEP_ARCHER_RANGE
  WeaponSpeed               = 321       ; dist/sec 
  MinWeaponSpeed            = 241
  MaxWeaponSpeed            = 481        ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
  FireFX                    = FX_RohanArcherBowWeapon
  ScaleWeaponSpeed          = Yes        ; Used for lob weapons, scales speed proportional to range
  HitPercentage             = 100        ;When this weapon is used it will hit exactly 50% of the time.
  ScatterRadius             = 16.0        ;When this weapon misses it can randomly miss by as much as this distance.
  DelayBetweenShots         = Min:KEEP_BOW_DELAYBETWEENSHOTS_MIN Max:KEEP_BOW_DELAYBETWEENSHOTS_MAX
  PreAttackDelay            = KEEP_BOW_PREATTACKDELAY   ; 1467 is the prep time for archer.
  PreAttackType             = PER_SHOT    ; Do the delay each time we attack a new target
  FiringDuration            = KEEP_BOW_DELAYBETWEENSHOTS_MAX    ; Duration of the archer firing shot is 500ms.
  IsAimingWeapon            = Yes
  AntiAirborneVehicle        = Yes
  AntiAirborneMonster        = Yes
  HitPassengerPercentage    = 20%
  AcceptableAimDelta        = 360.0    ; We want to be able to shoot all round, as we canit move.
 
  CanBeDodged = Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent
 
  ProjectileNugget          ; Default arrow
    ProjectileTemplateName  = GoodFactionArrow
    WarheadTemplateName     = EvilSentryTowerFireBowWarhead
    ForbiddenUpgradeNames   = Upgrade_EvilSentryTowersToUseFireArrows
  End
 
;    The fire arrow upgrades - one nugget per faction, because they have one each.
 
  ProjectileNugget          ; Upgraded arrow
    ProjectileTemplateName  = UpgradedGoodFactionArrow
    WarheadTemplateName     = EvilSentryUpgradeBowWarheadUpgrade
    RequiredUpgradeNames    = Upgrade_EvilSentryTowersToUseFireArrows
  End
 
End
 
;----------------------------
Weapon EvilSentryTowerFireBowWarhead
  ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
  HitStoredTarget = Yes    ; Always hits initial target.
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = WALL_TOWER_BOW_DAMAGE
    Radius        = 0.0    ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
    DelayTime     = 0
    DamageType    = PIERCE
    DamageFXType  = GOOD_ARROW_PIERCE
    DeathType     = NORMAL
  End
End
 
;----------------------------
Weapon EvilSentryUpgradeBowWarheadUpgrade
  ProjectileCollidesWith = ENEMIES NEUTRAL STRUCTURES WALLS 
  RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR ;ALLIES
  HitStoredTarget = Yes    ; Always hits initial target.
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = WALL_TOWER_BOW_DAMAGE_UPGRADE
    Radius        = 0.0    ; HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
    DelayTime     = 0
    DamageType    = PIERCE
    DamageFXType  = GOOD_ARROW_PIERCE
    DeathType     = NORMAL
  End
End
 
;------------------------------------------------------------------------------
 
upgrade.ini
 
Upgrade Upgrade_EvilSentryTowersToUseFireArrows
    DisplayName    = UPGRADE:StoneworkerUpgradeToUseFireArrows
    Type        = PLAYER
    BuildCost        = 25000
    BuildTime        = 30.0 
    ResearchSound    = CampSoldierUpgradeGarrison
End

;------------------------------------------------------------------------------

 

evilfactionbuildings.ini - object IsengardArmory

 

under enginering

 

Behavior = CastleUpgrade ModuleTag_AssignEvilSentryTowersToUseFireArrows
        TriggeredBy    = Upgrade_EvilSentryTowersToUseFireArrows
        Upgrade        = Upgrade_EvilSentryTowersToUseFireArrows
End
;------------------------------------------------------------------------------
evilfactionbuildings.ini - object evilsentrytow
 
under enginering
 
Behavior = WeaponSetUpgrade ModuleTag_FireArrows
        TriggeredBy            = Upgrade_EvilSentryTowersToUseFireArrows
End
 
;------------------------------------------------------------------------------
 
commandbutton.ini
 
CommandButton Command_UpgradeEvilSentryTowersToUseFireArrows
    Command                = CASTLE_UPGRADE
    Options                = CANCELABLE
    ButtonImage            = BGStoneworker_ArrowUpgrade
    ButtonBorderType    = UPGRADE
    Upgrade                = Upgrade_EvilSentryTowersToUseFireArrows
    Radial                = Yes
    InPalantir               = Yes
    TextLabel            = CONTROLBAR:ConstructGarrisonUpgrade
    DescriptLabel            = CONTROLBAR:ToolTipBuildGarrisonUpgrade
End
 
;------------------------------------------------------------------------------
commandset.ini
 
in under isengardarmory commandset:
 
  5    = Command_UpgradeEvilSentryTowersToUseFireArrows
;------------------------------------------------------------------------------
 

In the game i click the button in armory and the when the upgrade is completed, it just doesnt upgrade my Evil sentry towers.

 

Seems like theres no mistake it just doesnt upgrade the towers. What am i missing ?

 

Ill be glad for any help, thanks.



#2 Lusta

Lusta
  • Members
  • 98 posts
  • Location:Hungary

Posted 22 March 2022 - 06:54 AM

Hello

 

I see no problem for the first look.

How much stronger is your WALL_TOWER_BOW_DAMAGE_UPGRADE then WALL_TOWER_BOW_DAMAGE?

Is the arrow changes look?


(Lusta means Lazy)

my mod beta is linked here


#3 Trevor533

Trevor533
  • Members
  • 7 posts

Posted 23 March 2022 - 07:15 AM

The arrow looks the same after the upgrade, with the same damage, so it seems like the towers just dont get the upgrade.

 

Upgraded = 90

nonupgraded = 40



#4 Lusta

Lusta
  • Members
  • 98 posts
  • Location:Hungary

Posted 27 March 2022 - 09:09 AM

Well, I see no problem still.

Is there other changes in you mod or just this?

If it is the the only change then it is probably doesn't load.


(Lusta means Lazy)

my mod beta is linked here


#5 Trevor533

Trevor533
  • Members
  • 7 posts

Posted 27 March 2022 - 10:22 PM

Maybe i miss adding something in other ini files. Not sure, ill post down if i eventually figure it out, but now im working on adding new models and not much time so, will see

 

thanks for help tho


Edited by Trevor533, 27 March 2022 - 10:22 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users