Changing which ship classes detonate mines

I've been trying to change the TechSpaceMineDetonate ability so that it is not activated by scout class ships, but I'm having trouble seeing how to do it. I've looked at the entity file and it doesn't look like there is a way to do this.

Am I missing something?

5,549 views 4 replies
Reply #1 Top

i think you just add it to another ship it is a ability so you can just add it modify the entity file for the ship.

Reply #2 Top

I've been trying to change the TechSpaceMineDetonate ability so that it is not activated by scout class ships, but I'm having trouble seeing how to do it. I've looked at the entity file and it doesn't look like there is a way to do this.

Am I missing something?

What you're missing is the impossibility of having ONLY Scout Frigates being unable to detonate mines.

Target filters specify by entity type, not role type. Basically, "Frigates" (which are all ships buildable in the frigate&cruiser menus) and "Capital Ships" (all capital ships) are what is used for target filters.

Which means you either have it so that mines are only detonated by Capital ships (which is pretty lame IMO), or leave them as is.

The alternative is to tweak the Scout Ships' ability files so that they because invulnerable; but that's also pretty lame IMO.

Reply #4 Top

Eh, no.  I got around this problem quite a while back.

 

The scouts need a particular buff in residence, doesn't matter what just as long as they're the only one that has it.

 

You have to rewrite the mine code.  Set the mine kill up as a bounce back using ApplyBuffToLastSpawnerWithTravelNoFilterNoRange.  Put two buffs up from the spawning entity, one to do the damage and bounce back, one to interrupt it.  Then all you need is a finish condition checking for the existence of the buff the scouts have.  Make sure your delays are wide enough to account for process lag and you have a self terminating sequence.  Walla, mine immune scouts.