• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

setattribute to 'all' - mod amending existing record - is this doable?

When I try to setattribute on an existing record to change the count to "all", in loot.xml, the game rejects it on loading.

I can create a new record with count="all",  but if I remove and re-add an existing record the game also red-inks me on loading because the record is momentarily absent.

Is there some way to do this?

 
I don't think you'd use a setattribute. I believe that's only for adding some new attribute to a node. You'd want to do something like this:

<set xpath="/lootcontainers/lootcontainer[@id="256"]/@count">all</set>

as an example.

 
Last edited by a moderator:
Thanks, it was actually "set" I was having the problem with too, but I went through a barrage of attempts to fix it and got lost along the way, seeing your example made me realise what I'd done wrong!

NOW though, it works and the loot.xml in the configsdump shows the "all" values where I want them, but the game still pops the console open on loading the game and complains about the "all" in red ink.

(This was what originally started me trying other things and ending up in the situation which prompted this post)

ERR XML loader : Loading and parsing 'loot.xlm' failed
Exception : Parsing error count 'all'

It's doing the changes I want, but with an intrusive exception I'd like to avoid. Is there some way to do this and prevent the exception?

This happens with 'setattribute' when adding a count to an entry which did not have one, and 'set' when changing an existing count.

 
Back
Top