PDA

View Full Version : MoreCore Initiative Order



Meliath1742
February 10th, 2018, 10:42
I'm using MoreCore for a new game called Oubliettes, Sorcery and Reavers (OS&R). It uses a low number initiative for combat. I can make the Combat Tracker work in the right initiative order by inputting a negative number (i.e. -7). I'm wondering if it would be possible to create an option to select a reverse order initiative on the next version of the rule set? Probably not a ton of games that use a reverse order, it's just something to consider. Btw, MoreCore is excellent! Thanks to all who created it. :)

Bidmaron
February 10th, 2018, 14:27
Unless you or anyone else using the ruleset never want access to the DOE extensions, you might want to consider basing your ruleset on the new DORCore ruleset by Dulux, the same guy who makes the DOEs. Unless it is an undocumented feature, his ruleset does not support reverse initiative though.

Ikael
February 10th, 2018, 14:55
With the latest CoreRPG version you can use API to set ascending initiative order. From release notes:

DEV][CoreRPG+] EffectManager.setInitAscending function added to support systems where a single initiative value is used, but in ascending order.

This would be extension but would be very simple to do.

Bidmaron
February 10th, 2018, 15:22
Wow, great addition. Since MoreCore builds on CoreRPG, this should be easy. However, my point about the DOE extensions remains. Anyone not basing their ruleset on DORCore or one of the automatically updated rulesets will not have access to the DOEs in the future.

Meliath1742
February 10th, 2018, 15:31
Thanks Ikael! It sounds doable, but it's out of my expertise.

Ikael
February 10th, 2018, 15:43
Actually that API trick did not work but it's easy to do it anyways, see the extension.

For learning purposes here is the whole extension code:



<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" logo="logo.png">
<properties>
<name>Ascending Init Order</name>
<version>1.0</version>
<author>Aki Heikkinen (Ikael)</author>
<description>Ascending Initiative Order v1.0</description>
<ruleset>Any</ruleset>
</properties>
<announcement text="Ascending Initiative Order v1.0" font="emotefont" />
<base>
<script name="AscInitOrder">
function onInit()
CombatManager.setCustomSort(sortfuncAscending)
end
function sortfuncAscending(...)
return not CombatManager.sortfuncStandard(...)
end
</script>
</base>
</root>

Meliath1742
February 10th, 2018, 15:55
Incredible! Thanks Ikael!

Btw Ikael, the extension works great!

Moon Wizard
February 10th, 2018, 19:12
The effect manager function that Ikael mentioned is required to make sure that effects expire correctly when using a descending order initiative system. So, you would need that in addition to Ikael's code, if you care when effects expire. It might not be an issue, since you're running using a generic system.

Regards,
JPG

Meliath1742
February 10th, 2018, 20:20
Yeah, it always nice to have more bells and whistles, but it shouldn't be a problem. Thanks for the info.

damned
February 11th, 2018, 03:02
Actually that API trick did not work but it's easy to do it anyways, see the extension.

For learning purposes here is the whole extension code:



<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" logo="logo.png">
<properties>
<name>Ascending Init Order</name>
<version>1.0</version>
<author>Aki Heikkinen (Ikael)</author>
<description>Ascending Initiative Order v1.0</description>
<ruleset>Any</ruleset>
</properties>
<announcement text="Ascending Initiative Order v1.0" font="emotefont" />
<base>
<script name="AscInitOrder">
function onInit()
CombatManager.setCustomSort(sortfuncAscending)
end
function sortfuncAscending(...)
return not CombatManager.sortfuncStandard(...)
end
</script>
</base>
</root>


Thanks Aki I was just starting to look into how to support this for Meliath1742


Incredible! Thanks Ikael!

Btw Ikael, the extension works great!

Fantastic! I will look to see if this can be easily optioned into MoreCore.


The effect manager function that Ikael mentioned is required to make sure that effects expire correctly when using a descending order initiative system. So, you would need that in addition to Ikael's code, if you care when effects expire. It might not be an issue, since you're running using a generic system.

All Effects in MoreCore are descriptive only - there is no mechanical support for them. Expiring exactly on time is probably not as big an issue.

Ikael
February 11th, 2018, 10:51
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)



<?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>

damned
February 11th, 2018, 11:46
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)


more Ikael brilliance

Much appreciated Ikael.
May I reuse in MoreCore?

Ikael
February 11th, 2018, 12:14
Much appreciated Ikael.
May I reuse in MoreCore?

Sure, be my guest

Meliath1742
February 11th, 2018, 12:51
Fantastic work Gents!

damned
February 11th, 2018, 13:44
With Ikaels permission Ive tested and included the code into the new release of MoreCore.

Meliath1742
February 11th, 2018, 13:46
With Ikaels permission Ive tested and included the code into the new release of MoreCore.

Awesome! It's ready for download?

damned
February 11th, 2018, 13:48
Awesome! It's ready for download?

Nah... I usually wait till I have a little more before I push out a new build.
3 or 4 minor changes in this build so far.

Meliath1742
February 11th, 2018, 13:50
Nah... I usually wait till I have a little more before I push out a new build.
3 or 4 minor changes in this build so far.

Still awesome!

damned
September 19th, 2018, 03:44
Bit of a thread necro here but MoreCore has a whole slew of new Initiative options now.

You can ASC and DESC initiative.
You can choose from built in aut init options for d4, d6, d10, 2d10, d10, d20, d100
You can have static init
You can have static init modifiers/bonuses
And there is also a /init roll that lets you use any standard dice string for your init - eg /2d6+1d10+4

Oh and options for auto rolling, auto rolling for NPCs only.
And options for having no init but still tracking who has acted.