How to prevent deletion of some buildings like wonders
-
- Posts: 112
- Joined: 27 Jun 2021, 16:10
- Has thanked: 45 times
- Been thanked: 13 times
How to prevent deletion of some buildings like wonders
I'm curious if it's possible to mod the game so some other buildings, like wonders for example, can't be deleted only destroyed.
- Dr.MonaLisa
- High Representative
- Posts: 8711
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: How to prevent deletion of some buildings like wonders
I would use the Area Effect (which by the way already exists, no need to add):
DDF:
Code: Select all
DbAreaEffectInfo PreventDeletion
{
effects = [
EffectPreventDeletion {
range = Unit
player = Self
}
]
}
DDF:
Code: Select all
UnitType MyWonder
{
abilities = [
LOS { range = 13 }
AreaEffect {
effects = [
PreventDeletion
]
}
]
}
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
- These users thanked the author Dr.MonaLisa for the post:
- PaulStretch
-
- Posts: 112
- Joined: 27 Jun 2021, 16:10
- Has thanked: 45 times
- Been thanked: 13 times
Re: How to prevent deletion of some buildings like wonders
thanks
Added after 15 minutes 13 seconds:
Not being able to delete roads is hardcoded? That area effect isn't being used by roads. or is it that the unit itself isn't owned by any player?
Added after 15 minutes 13 seconds:
Not being able to delete roads is hardcoded? That area effect isn't being used by roads. or is it that the unit itself isn't owned by any player?
- Dr.MonaLisa
- High Representative
- Posts: 8711
- Joined: 17 Jun 2010, 11:21
- Location: Poland
- Has thanked: 49 times
- Been thanked: 109 times
Re: How to prevent deletion of some buildings like wonders
I'm not sure, but I think the second thing. Roads have probably "Owner" parameter in DDF, so players don't get distracted attacking them piece by piece while invading.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains