Here would be the code if you want to allow user to select initiative order as option (didn't bother make it .ext, just the code copy-pasted here)
Code:<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" logo="logo.png">
<properties>
<name>Initiative Order</name>
<version>1.0</version>
<author>Aki Heikkinen (Ikael)</author>
<description>New option to define initiative order</description>
<ruleset>Any</ruleset>
</properties>
<announcement text="Initiative Order v1.0" font="emotefont" />
<base>
<string name="option_label_INAD">Initiative: Order</string>
<string name="option_val_desc">Descending</string>
<string name="option_val_asc">Ascending</string>
<script name="AscInitOrder">
function onInit()
OptionsManager.registerOption2("INAD", true, "option_header_combat", "option_label_INAD", "option_entry_cycler",
{ labels = "option_val_asc", values = "asc", baselabel = "option_val_desc", baseval = "desc", default = "desc" })
OptionsManager.registerCallback("INAD", onOptionUpdate)
onOptionUpdate()
end
function onOptionUpdate()
if OptionsManager.isOption("INAD", "desc") then
CombatManager.setCustomSort(sortfuncDescending)
EffectManager.setInitAscending(false)
else
CombatManager.setCustomSort(sortfuncAscending)
EffectManager.setInitAscending(true)
end
end
function sortfuncDescending(...)
return CombatManager.sortfuncStandard(...)
end
function sortfuncAscending(...)
return not CombatManager.sortfuncStandard(...)
end
</script>
</base>
</root>