Jump to content


Photo

FireWeaponWhenDeadBehavior problem


  • Please log in to reply
3 replies to this topic

#1 Dickenson

Dickenson
  • Members
  • 20 posts
  • Location:Slovakia
  • Projects:best of - mod

Posted 14 January 2021 - 06:24 PM

Hi guys.

 

i have some problems with my mod. 

 

I have create new spellbook power for isengard. It is upgrade so i use upgrade_anduril upgrade. After purchasing this spell (upgrade) the citadel should summon small forges (IsengardOutpostForges) that make additional money. I have added this code to isengardoutpostkeep.ini :

 

 
    Behavior = FireWeaponWhenDeadBehavior FireDeadTag
        DeathTypes    = ALL
        StartsActive    = Yes
        DelayTime        = 0
        DeathWeapon        = DestroyOutpostForges 
        WeaponOffset    = X:0 Y:0 Z:0    
    End
 
And here is code for weapon:
 
Weapon DestroyOutpostForges 
    RadiusDamageAffects    = ALLIES SELF
    ;FireFX                = FX_GandalfBlast
    DamageNugget
        Damage        = 300000
        Radius        = 100.0    .
        DelayTime     = 0.0
        DamageType    = SIEGE    ; ffs
    
        SpecialObjectFilter        = NONE +IsengardOutpostForges +IsengardOutpostForgesBuilder
        DamageScalar  = 10000% NONE +IsengardOutpostForges +IsengardOutpostForgesBuilder
        DamageScalar  = 0% ANY -IsengardOutpostForges -IsengardOutpostForgesBuilder
    End
End

 

As i started the game, everithing was fine. When was the citadel destroyed, it was destroyed also forges. But when i started the game again nothing had happened. 

Do you have any suggestions how to use fireweaponwhendeadbehavior code? Should i change something in IsengardOutpostForges.ini ?


Edited by Dickenson, 14 January 2021 - 06:25 PM.


#2 Felipe Roll-st

Felipe Roll-st

    Talion

  • Members
  • 83 posts

Posted 15 January 2021 - 05:50 AM

sorry, I didn't quite understand your explanation, you mean the first time you tested the game the forges where there but the second time they weren't?



#3 Dickenson

Dickenson
  • Members
  • 20 posts
  • Location:Slovakia
  • Projects:best of - mod

Posted 15 January 2021 - 07:03 AM

Sorry for bad explanation. I will try again. First time the forges appeared and when citadel was destroyed, also forges was destroyed. Next time (when I restart the game) the forges had appeared but when citadel was destroyed the forges where still there.
I have tested it cupple of times. I changed "kindof" and "health" of forges and it worked again once. I have found second outpost on map, builded everything but when citadel was destroyed, the forges where still there. And from that moment any destroyed citadel was not able to destroy the forges.

 

Perhaps is something wrong with whole .ini file of my mod? It can happen after some time or adding suff to it?



#4 Felipe Roll-st

Felipe Roll-st

    Talion

  • Members
  • 83 posts

Posted 15 January 2021 - 11:48 AM

mm it's strange that happens sometimes only, I don't know if your mod file should be corrupt, if it had errors it wouldn't let you start the game and give you an game.dat error or something like that, indeed you can come across new bugs when you add new features, maybe try adding the behaviour with a back up version of your mod and see what happens.

 

I haven't tried something like that yet but for your problem of the forges still there when the citadel is destroyed, maybe compare the code against a citadel wall, as walls disappear once you destroy the citadel, maybe there's something missing in the kind of.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users