[HELP] Working with AbilityDefs.xml

My goal is, given the lack of any direct documentation, to create a documentation that explains how trigger, and mod xml components function, the rules about which each unique behavior works, and what can/cannot be done.

But I would like to start with a simple question:
Is there any way, in an ability to immediately destroy a ship, either at the start of a turn, or on being rewarded/built?

9,034 views 6 replies
Reply #1 Top

through antagonistic you can get a free frigate. Ideology.

Reply #2 Top

Quoting admiralWillyWilber, reply 1

through antagonistic you can get a free frigate. Ideology.

While I don't seek to attack you for stating a fact, that could in the right context be helpful, I would like to state that what you said has nothing to do with my primary question.

Reply #3 Top

Well I can tell ya the first places to look for valid triggers, modifiers, events and actions are the .xsd's because those detail all that is doable in the files.

Additionally I think admiralWilly was trying to be helpful in the face of a question with no answer, there is no answer because there is no such function exposed anywhere in the xml or xsd files. there is the scrap function but it is not callable by anything in the files.

Reply #4 Top

Ok so I have found something that might work for your purposes, havent used it myself and there is only one instance of it being used in the entire game.

Its used when a race demands you remove a starbase and it calls the DestroyObject action.

<ListenerTrigger>
<OnEvent>OnConversationResponse</OnEvent>
<Target>
<TargetType>Starbase</TargetType>
</Target>
<Lifetime>Instant</Lifetime>
<PerformAction>
<Action>DestroyObject</Action>
</PerformAction>
</ListenerTrigger>

This could probably be used in a standard trigger with the TargetType set to Ship.

However it would need to be something interactable that triggers it such as the ship arrives at an anomaly or using OnCostructShip as otherwise there is no way I know of to hook the target specifically.

Hope that helps.

Reply #5 Top

Quoting Deathwynd, reply 4

Ok so I have found something that might work for your purposes, havent used it myself and there is only one instance of it being used in the entire game.

Its used when a race demands you remove a starbase and it calls the DestroyObject action.

<ListenerTrigger>
<OnEvent>OnConversationResponse</OnEvent>
<Target>
<TargetType>Starbase</TargetType>
</Target>
<Lifetime>Instant</Lifetime>
<PerformAction>
<Action>DestroyObject</Action>
</PerformAction>
</ListenerTrigger>

This could probably be used in a standard trigger with the TargetType set to Ship.

However it would need to be something interactable that triggers it such as the ship arrives at an anomaly or using OnCostructShip as otherwise there is no way I know of to hook the target specifically.

Hope that helps.

I came to the same conclusion, and sadly it doesn't work, but thank you!

Reply #6 Top

Another attempt to be helpful on starting a game. In a game that is not made to declare war right off the bat. If everyone started out with initial war technology. In modding you could tweak the trees. Create custom races. I don't know what it is called you could start everyone that gives them the personality to start out with free techs if no one starts out with free techs anymore. Assuming they don't you can change change everyone's priorities for military first then research second making the war tech that starts everything the initial techs. I always found the ai good at researching war techs if you threw it in their laps. This probably will require you to mad or custom everyone. The game is really made to give you time to build up your empire before war.