• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Need help remove Vulture from EnemyAnimalsDesert group

xxx73

Refugee
Hi

I'm trying to remove Vulture in EnemyAnimalsDesert group with using xpath. Since my xpath experience is like 0 I have not manged to do this correctly. This is what I have tried so far.

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'][@entity name="animalZombieVulture']" />

</configs>
[/CODE]


Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'] />
		<entity name="animalZombieVulture"/>

</configs>
What am I doing wrong, how should it look correctly?

 
HiI'm trying to remove Vulture in EnemyAnimalsDesert group with using xpath. Since my xpath experience is like 0 I have not manged to do this correctly. This is what I have tried so far.

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'][@entity name="animalZombieVulture']" />

</configs>
[/CODE]
...

What am I doing wrong, how should it look correctly?

I would think it should be more like this:

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert']/entity[@name='animalZombieVulture']" />

</configs>
The @ notation is ONLY to denote attributes. "entitygroup" and "entity" are called elements, their parameters like "name" are called attributes.

You also used " once instead of ' in the first xpath. And the second xpath missed one ".
 
Last edited by a moderator:
I would think it should be more like this:

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert']/entity[@name='animalZombieVulture']" />

</configs>
[/CODE]

The @ notation is ONLY to denote attributes. "entitygroup" and "entity" are called elements, their parameters like "name" are called attributes.

You also used " once instead of ' in the first xpath. And the second xpath missed one ".

Thanks for your reply, and thank for your explanation, will try it later.
 
Last edited by a moderator:
Back
Top