Jump to content

CVars in XUI windows

Recommended Posts

For those interested, it's not possible through xpath alone. To display your own dynamic values (the stuff surrounded with curly braces) in windows.xml, you need to modify the C# assembly. Look at the parent elements for the "controller" attribute, prefix that value with XUiC_ and you'll have the name of the class you'll need to modify. The method to modify is GetBindingValue.


You could make your own subclass and assign it via the controller attribute, but that wouldn't play as nicely with other mods as creating a patch.


As for giving the player a buff after they destroy a block, this doesn't seem to be implemented as of 17.4. There seems to have been the notion of it in the xml and in the C#, but not an implementation. I've not had the chance to go through 18 just yet to see if that's changed.


I was able to accomplish what I needed by patching Block.OnBlockDestroyedBy and BlockLoot.OnBlockDestroyedBy.


*borrows, disappearing completely*

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...