Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RolemasterUnified Official: Initiative improvements and creature fixes. #13567

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 49 additions & 46 deletions RolemasterUnified_Official/rolemasterunified.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
<div class='sheet-rolltemplate-rmurollbox sheet-rolltemplate-rmuinitbox'>
{{actor}} rolls Initialive:<br>
{{total}} = {{bonus}} + {{roll}}
{{#rollLess() maneuver 0}}
+ {{maneuver}}&nbsp;[Maneuver Penalty / 10]
{{/rollLess() maneuver 0}}
</div>
</rolltemplate>

Expand Down Expand Up @@ -3075,27 +3078,27 @@ <h2>RRs</h2>
<span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span name='attr_rr_channeling_info' class='stat_info rr_info'>0</span>
<span class='rr_name'><span data-i18n='channeling'>channeling</span><span data-i18n='in' class='rr_stat'>in</span></span></span><span class='rr_bonus'><button type='action' data-rr='channeling' data-rrpretty='Channeling' class='editbutton rollbutton' name='act_rrrollmod'><span name='attr_rr_channeling_bonus'>0</span></button>
<button type='action' data-rr='channeling' data-rrpretty='Channeling' class='editbutton rollbutton' name='act_rrroll'><span style="font-family:dicefontd10;">j</span></button></span> </div>
<fieldset class='repeating_table: 0x600001330a80subskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<fieldset class='repeating_nilsubskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<div class='rr'>
<span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span name='attr_rr_essence_info' class='stat_info rr_info'>0</span>
<span class='rr_name'><span data-i18n='essence'>essence</span><span data-i18n='em' class='rr_stat'>em</span></span></span><span class='rr_bonus'><button type='action' data-rr='essence' data-rrpretty='Essence' class='editbutton rollbutton' name='act_rrrollmod'><span name='attr_rr_essence_bonus'>0</span></button>
<button type='action' data-rr='essence' data-rrpretty='Essence' class='editbutton rollbutton' name='act_rrroll'><span style="font-family:dicefontd10;">j</span></button></span> </div>
<fieldset class='repeating_table: 0x600001330a80subskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<fieldset class='repeating_nilsubskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<div class='rr'>
<span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span name='attr_rr_mentalism_info' class='stat_info rr_info'>0</span>
<span class='rr_name'><span data-i18n='mentalism'>mentalism</span><span data-i18n='pr' class='rr_stat'>pr</span></span></span><span class='rr_bonus'><button type='action' data-rr='mentalism' data-rrpretty='Mentalism' class='editbutton rollbutton' name='act_rrrollmod'><span name='attr_rr_mentalism_bonus'>0</span></button>
<button type='action' data-rr='mentalism' data-rrpretty='Mentalism' class='editbutton rollbutton' name='act_rrroll'><span style="font-family:dicefontd10;">j</span></button></span> </div>
<fieldset class='repeating_table: 0x600001330a80subskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<fieldset class='repeating_nilsubskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<div class='rr'>
<span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span name='attr_rr_physical_info' class='stat_info rr_info'>0</span>
<span class='rr_name'><span data-i18n='physical'>physical</span><span data-i18n='co' class='rr_stat'>co</span></span></span><span class='rr_bonus'><button type='action' data-rr='physical' data-rrpretty='Physical' class='editbutton rollbutton' name='act_rrrollmod'><span name='attr_rr_physical_bonus'>0</span></button>
<button type='action' data-rr='physical' data-rrpretty='Physical' class='editbutton rollbutton' name='act_rrroll'><span style="font-family:dicefontd10;">j</span></button></span> </div>
<fieldset class='repeating_table: 0x600001330a80subskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<fieldset class='repeating_nilsubskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<div class='rr'>
<span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span name='attr_rr_fear_info' class='stat_info rr_info'>0</span>
<span class='rr_name'><span data-i18n='fear'>fear</span><span data-i18n='sd' class='rr_stat'>sd</span></span></span><span class='rr_bonus'><button type='action' data-rr='fear' data-rrpretty='Fear' class='editbutton rollbutton' name='act_rrrollmod'><span name='attr_rr_fear_bonus'>0</span></button>
<button type='action' data-rr='fear' data-rrpretty='Fear' class='editbutton rollbutton' name='act_rrroll'><span style="font-family:dicefontd10;">j</span></button></span> </div>
<fieldset class='repeating_table: 0x600001330a80subskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>
<fieldset class='repeating_nilsubskill'><div class='skill_subskill'><span><span class="icon" style="font-family: 'Pictos Custom'; color: rgb(150,150,150);">y</span><span class='skill_info' name='attr_info'></span><span class='subskill_name' name='attr_name'></span></span><div class='skill_bonus subskill_bonus'><span name='attr_bonus'></span></div></div></fieldset>

</div>

Expand Down Expand Up @@ -5355,7 +5358,7 @@ <h3>Custom Spell List</h3>

<br>

Revision f76517429e54b66f2c2fb1d2c55efefa3c8eb665
Revision 0e32e4dbcd10426972eb1499037242f2c1e9fae3


<hr>
Expand Down Expand Up @@ -14104,9 +14107,12 @@ <h3>Custom Spell List</h3>
});

onCheck("clicked:rollinitiative", () => {
startRoll('&{template:rmuinit} [[ [[ 2d10 ]] + @{initiative} &{tracker}]] ' +
// roll20 treats floor as round to negative infinity, so ceil since they should be neagtive
startRoll('&{template:rmuinit} [[ [[ 2d10 ]] + @{initiative} + [[ceil(@{maneuver_penalty} / 10)]] &{tracker}]] ' +
'{\{actor=@{character_name} }} ' +
'{\{bonus=@{initiative} }} {\{total=$[[1]]}} {\{roll=$[[0]]}}',
'{\{bonus=@{initiative} }} ' +
'{\{total=$[[2]]}} {\{roll=$[[0]]}} ' +
'{\{maneuver=$[[1]] }}',
(roll) => {
finishRoll(roll.rollId, {});
});
Expand Down Expand Up @@ -14137,34 +14143,35 @@ <h3>Custom Spell List</h3>

// Sorted alphabetically
// Weapon (we) and ranged weapon are special (rw)
weaponcodes = {
be: "Beak",
bi: "Bite",
cl: "Claw",
cr: "Crush",
gr: "Grapple",
ho: "Horn",
ra: "Ram",
sw: "Unarmed Sweeps",
un: "Unarmed Strike",
si: "Stinger",
tr: "Trample",
// Require table and size for each.
creature.weaponcodes = {
be: { table: "Beak", size: 0 },
bi: { table: "Bite", size: 0 },
cl: { table: "Claw", size: 0 },
cr: { table: "Crush", size: 0 },
gr: { table: "Grapple", size: 0 },
ho: { table: "Horn", size: 0 },
ra: { table: "Ram", size: 0 },
sw: { table: "Unarmed Sweeps", size: 0 },
un: { table: "Unarmed Strike", size: 0 },
si: { table: "Stinger", size: 0 },
tr: { table: "Trample", size: 0 },
// FXIME: Hacky
we: "Arming Sword",
da: "Dagger",
rp: "Rapier",
as: "Arming Sword",
bs: "Broadsword",
sc: "Scimitar",
fa: "Falchion",
ma: "Mace",
cu: "Club",
we: { table: "Arming Sword", size: 0 },
da: { table: "Dagger", size: 0 },
rp: { table: "Rapier", size: 0 },
as: { table: "Arming Sword", size: 0 },
bs: { table: "Broadsword", size: 0 },
sc: { table: "Scimitar", size: 0 },
fa: { table: "Falchion", size: 0 },
ma: { table: "Mace", size: 0 },
cu: { table: "Club", size: 0 },
lc: { table: "Club", size: 1 },
sb: "Bow, Short",
lb: "Bow, Long",
sb: { table: "Bow, Short", size: 0 },
lb: { table: "Bow, Long", size: 0 },
ss: { table: "Arming Sword", size: -1 },
ls: { table: "Arming Sword", size: 1 },
fa: "Falchion",
fa: { table: "Falchion", size: 0 },



Expand Down Expand Up @@ -14313,21 +14320,15 @@ <h3>Custom Spell List</h3>
updates[`${prefix}_attacksize`] = size;
updates[`${prefix}_attackersize`] = cdata.size;

if (weaponcodes[type]) {
console.log("Look up", weaponcodes[type]);
const wc = weaponcodes[type];
let table;
let sizemod = 0;
if (typeof(wc == 'string')) {
table = wc;
} else {
table = wc.table;
table = wc.sizemod;
}
if (creature.weaponcodes[type]) {
console.log("Look up", creature.weaponcodes[type]);
const wc = creature.weaponcodes[type];
let table = wc.table;
let sizemode = wc.sizemod;
getCompendiumPage(`AttackTable:${table}`, cdata => {
let nu = {};
// FIXME: Handle errors in size slookup gracefully.
nu[`${prefix}_attackname`] = creature.getLongSize(size) + " " + weaponcodes[type];
nu[`${prefix}_attackname`] = creature.getLongSize(size) + " " + table;
nu[`${prefix}_attacksize`] = size + wc.sizemod;
nu[`${prefix}_attackbasefumble`] = 1; // FIXMEitems.attackaddfumble;
nu[`${prefix}_attacktable`] = table;
Expand Down Expand Up @@ -14656,11 +14657,13 @@ <h3>Custom Spell List</h3>
break;
}
}

if (reported) {
sendMessage(`${cdata.character_name} has an injury`);
addSpecificInjury(injurydata);
}
}
if (updates.hp < 0) {
sendMessage(`${cdata.character_name} is down`);
}
sendMessage(`${cdata.character_name} has ${numerics} applied`);

VrmuSetAttrs(updates);
Expand Down
2 changes: 1 addition & 1 deletion RolemasterUnified_Official/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"legacy": false,
"printable": true,
"compendium": "RMU",
"version": "1732661284"
"version": "1733207371"
}
8 changes: 8 additions & 0 deletions RolemasterUnified_Official/updates.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 2024-12-3

- Initiative modified by maneuver penalty
- Update rolltemplate for initiative to show penalty if present.
- Add tests and validations for creatures.
- All creature weapons now have a size (usually 0)
- Display a message when an injury takes a character to negative hits.

# 2024-11-26

- Handle the knockback results when they have a ' in them.
Expand Down
Loading