Jump to content


Photo

Respawn cave troll lairs

troll cavetroll neutralunits cavetrolllair goblinlair goblin

Best Answer Echo , 07 March 2019 - 07:21 PM

You need to assign a new geometry when you summon the structure. In BFME 1 the default geometry does not work for summoned objects. 

[...]

Behavior = GeometryUpgrade Geom_ModuleTag_ShowNewGeometry
   TriggeredBy = Upgrade_Level1
   HideGeometry = Geom_Dummy
   ShowGeometry = Geom_RealGeom
End

Geometry = BOX
GeometryName = Geom_Dummy
GeometryMajorRadius = 1.0
GeometryMinorRadius = 1.0
GeometryHeight = 1.0
GeometryIsSmall = No

AdditionalGeometry = BOX
GeometryName = Geom_RealGeom
GeometryMajorRadius = 45.6
GeometryMinorRadius = 37.6
GeometryHeight = 20.8
GeometryIsSmall = No

[...]

End

Just make sure that the triggering upgrade is received, either through experiencelevel or the GrantUpgradeCreate module.

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 Frobenius

Frobenius
  • New Members
  • 4 posts

Posted 06 March 2019 - 10:22 PM

So i'm learning how to mod bfme I and i'm trying to figure out how to respawn cave troll lairs or goblin lairs.

 

What i got so far is I made a child object of a IsengardDeployedExplosiveMine with model GPMonument2, that spawns when a cave troll lair is destroyed. The child object has a lifetime of 300000 miliseconds and when it expires it creates a cave troll lair. 

 

So far so good, but the created cave troll lair cannot be attacked by melee units, for example rohirrim hordes or gondor knights, it can only be attacked by ranged units.

 

Does anyone know why this could be and be willing to help me out.

 

Or if anyone has an idea to keep trolls and goblins in game after their lairs have been destroyed it would be appreciated also.

 

Thanks,



#2 Felipe Roll-st

Felipe Roll-st

    Talion

  • Members
  • 83 posts

Posted 07 March 2019 - 01:07 PM

you mean you want to recreate the same mechanics as for bfme 2 where the lairs at the time of being destroyed they have a period of time in which they reconstruct again?



#3 Frobenius

Frobenius
  • New Members
  • 4 posts

Posted 07 March 2019 - 02:24 PM

Exactly, if I could have the lairs to spontaneously respawn that would be great, but for the moment I can only deploy a temporary object when the lair is destroyed which when it expires will respawn a flawed lair that can only be attacked by ranged attacks.

 

thanks



#4 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 07 March 2019 - 07:21 PM   Best Answer

You need to assign a new geometry when you summon the structure. In BFME 1 the default geometry does not work for summoned objects. 

[...]

Behavior = GeometryUpgrade Geom_ModuleTag_ShowNewGeometry
   TriggeredBy = Upgrade_Level1
   HideGeometry = Geom_Dummy
   ShowGeometry = Geom_RealGeom
End

Geometry = BOX
GeometryName = Geom_Dummy
GeometryMajorRadius = 1.0
GeometryMinorRadius = 1.0
GeometryHeight = 1.0
GeometryIsSmall = No

AdditionalGeometry = BOX
GeometryName = Geom_RealGeom
GeometryMajorRadius = 45.6
GeometryMinorRadius = 37.6
GeometryHeight = 20.8
GeometryIsSmall = No

[...]

End

Just make sure that the triggering upgrade is received, either through experiencelevel or the GrantUpgradeCreate module.


Edited by Echo, 07 March 2019 - 07:24 PM.

26285.png


#5 Frobenius

Frobenius
  • New Members
  • 4 posts

Posted 07 March 2019 - 08:08 PM

Whoa, ok, so I have to make sure that the summoned lair has that GeometryUpgrade, I'd have to make a child object of the cavetrolllair I suppose. And add the GrantUpgradeCreate module to the child object? I'll experiment with that, thanks for your reply.



#6 Frobenius

Frobenius
  • New Members
  • 4 posts

Posted 07 March 2019 - 08:59 PM

 

You need to assign a new geometry when you summon the structure. In BFME 1 the default geometry does not work for summoned objects. 

[...]

Behavior = GeometryUpgrade Geom_ModuleTag_ShowNewGeometry
   TriggeredBy = Upgrade_Level1
   HideGeometry = Geom_Dummy
   ShowGeometry = Geom_RealGeom
End

Geometry = BOX
GeometryName = Geom_Dummy
GeometryMajorRadius = 1.0
GeometryMinorRadius = 1.0
GeometryHeight = 1.0
GeometryIsSmall = No

AdditionalGeometry = BOX
GeometryName = Geom_RealGeom
GeometryMajorRadius = 45.6
GeometryMinorRadius = 37.6
GeometryHeight = 20.8
GeometryIsSmall = No

[...]

End

Just make sure that the triggering upgrade is received, either through experiencelevel or the GrantUpgradeCreate module.

 

 

Worked like a charm, thank you very much!



#7 Echo

Echo

    T3A:Online

  • T3A Staff
  • 1,069 posts
  • Location:Germany
  • Projects:Lot3A
  •  ~~
  • Division:BFME
  • Job:T3A Moderator
  • Donated

Posted 08 March 2019 - 12:17 AM

You're welcome! Actually you don't really need 2 separate objects. When an object is first created (also if they're on maps by default) they always receive an upgrade that is given through experiencelevel or GrantUpgradeCreate. If there's an upgrade granted upon creation, the object will receive it no matter what. No need to create a child object. However, if your summoned lair has any attributes that the default one doesn't have, you will need a child object. :)


Edited by Echo, 08 March 2019 - 12:19 AM.

26285.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users