Skip to content

Commit

Permalink
Merge pull request #13137 from nashidau/master
Browse files Browse the repository at this point in the history
Rolmaster Unified Official: Bug fixes and enchancements to creatures
  • Loading branch information
NBrooks-Roll20 authored Jul 30, 2024
2 parents 2962884 + 9b692ee commit 6784512
Show file tree
Hide file tree
Showing 3 changed files with 279 additions and 18 deletions.
38 changes: 21 additions & 17 deletions RolemasterUnified_Official/rolemasterunified.html
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ <h2>Saving Character...</h2>

<div class='rmusheet compendium-drop-target creature Creature'>

<input name="attr_drop_name" type="hidden" accept="name">
<input name="attr_drop_name" type="hidden" accept="Name">
<input name="attr_drop_category" type="hidden" accept="Category">
<input name="attr_drop_data" type="hidden" accept="data">
<input name='attr_drop_creature' type='hidden' accept='Creature'>
Expand Down Expand Up @@ -4971,7 +4971,7 @@ <h3>Recalculate</h3>

<hr>

Revision cc3f628489966030459e95315984c2dad682d062
Revision 58e41aa1c4bd458fb8d6a614d5c0b34e2644d3d6


<hr>
Expand Down Expand Up @@ -6551,7 +6551,7 @@ <h3>Recalculate</h3>

function updateSkill(skill, catbonus, catlog) {
const aname = skill.aname;
getAttrs([aname + "_ranks_misc", aname + "_pbonus", aname + "_misc"], (attrs) => {
getAttrs([aname + "_ranks_misc", aname + "_pbonus", aname + "_misc", aname + "_ranks"], (attrs) => {
let bonus = 0;
let log = skill.display + ":\n";

Expand Down Expand Up @@ -6590,6 +6590,8 @@ <h3>Recalculate</h3>

if (ranks != 0) {
setAttrs({[aname + "_ranks"] : ranks});
} else if (attrs[aname + "_ranks"] && attrs[name + "_ranks"] != "") {
setAttrs({[aname + "_ranks"] : ""});
}
setAttrs({[aname + "_bonus"] : bonus});
}
Expand Down Expand Up @@ -10246,17 +10248,23 @@ <h3>Recalculate</h3>
{ // Scope the whole file: Use let/const only ;-)

RMUInventory.itemDrop = function (name, datastr) {
console.log("Item drop in inventory");
const data = JSON.parse(datastr);
// Add slot:
const rowid = generateRowID();
const prefix = `repeating_stuff_${rowid}`;

setAttrs({
[`${prefix}_itemname`]: name,
const update = {
[`${prefix}_itemname`]: name,
[`${prefix}_itemweight`]: data.Weight,
[`${prefix}_itemcount`]: 1,
[`${prefix}_itemsystem`]: datastr,
[`${prefix}_itemnotes`]: data.Notes})
}
if (data.Notes) {
update[`${prefix}_itemnotes`] = data.Notes;
}

VrmuSetAttrs(update);
}


Expand Down Expand Up @@ -10612,28 +10620,24 @@ <h3>Recalculate</h3>

let drop = {};

/* this does nothing */

onCheck("change:drop_data", event => drop.handleDrop());


drop.handleDrop = function() {
console.log("Handle drop");

getAttrs(['drop_name', 'drop_data', 'drop_category'], (drop) => {
console.log(drop);
getAttrs(['drop_name', 'drop_data', 'drop_category', 'drop_creature'], (drop) => {
console.log("Drop data", drop);
if (drop.drop_category === 'Item') {
RMUInventory.itemDrop(drop.drop_name, drop.drop_data);
} else if (drop.drop_category == 'Creature') {
creature.newCreature(drop.drop_data);
creature.newCreature(drop.drop_name, drop.drop_data);
} else {
console.log("Don't know how to handle a ", drop.drop_category);
}
});
}


/**/



Expand Down Expand Up @@ -11692,9 +11696,9 @@ <h3>Recalculate</h3>
updates[`${prefix}_attackskill`] = items.attackaddskill;
updates[`${prefix}_attackri`] = items.attackaddri;

updates[`${prefix}_attackmin`] = cdata.data.min.match(/\d+/)[0] || 0;
updates[`${prefix}_attackmax`] = cdata.data.max.match(/\d+/)[0] || 0;
updates[`${prefix}_attackdata`] = cdata.data['data-attack'] || "";
updates[`${prefix}_attackmin`] = cdata?.data?.min?.match(/\d+/)[0] || 0;
updates[`${prefix}_attackmax`] = cdata?.data?.max?.match(/\d+/)[0] || 0;
updates[`${prefix}_attackdata`] = cdata?.data['data-attack'] || "";
// Once we have set it, update them all
setAttrs(updates, updateAttackBonuses);
});
Expand Down Expand Up @@ -12086,7 +12090,7 @@ <h3>Recalculate</h3>



creature.newCreature = function(jdata) {
creature.newCreature = function(name, jdata) {
let cdata = JSON.parse(jdata);
console.log(cdata);
let 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": "1721747722"
"version": "1722351238"
}
257 changes: 257 additions & 0 deletions RolemasterUnified_Official/updates.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 2024-7-30

- Lots more work on Creatures on the backend.
- Big thanks to Scott C on the roll20 discord for his aid.
- Override 0 ranks when set. Thanks to Hurin for this bug
- Handle not having compendium when adding attacks. Thanks to Christoffer Holm for the report

# 2024-7-23

- Start of Injury tracking
Expand All @@ -12,3 +19,253 @@
- Targetable NPC sheet.
- Support Roman numeral style creature size
- Don't update RRs on creature sheets.
- Inititive for creatures
- Start of creature attacks
- Internal:
- Add a validating rmuSetAttrs

# 2024-7-18

- SCR now includes stat modifier.
- Improve layout of hits/injuries/endurance etc
- AP Tracking for spells: So cast a spell with 2AP, -50 mod. Optional checkbox to enable
- Handle Spell Trickery
- Put a gradient on buttons... make them a little more obvious about action.

# 2024-7-16

- Display "No Voice" instead of "none" in spells
- Show all the modifier in the casting log all the time.
- Can edit spell names
- Spell results show RR targets for F, Fm and I spells.
- No PP spells now longer check or require PP
- Cap passive dodge & passive block at 50
- Fix calculation of partial dodge when encumbered (Thanks @filroden)
- No stats is equal to a 50. Makes NPCs super easy.

# 2024-7-9

- First version of individual spell casting
- With compendium; click a spell to cast it
- Spells get own css file now
- Tests for some spell casting function
- New misc Flattern for inline summaries
- Tweaks to edit spell list

# 2024-6-24

- Remove HP & PP from side list on main page (tracked in status)
- Internal
- Ignore (generated) inventory files
- Compendium
- Fix issue with Claw Table missing a row causing wierd misses.
- Improvements for content for the character creation chapter

# 2024-06-17

- Bugs
- Handle 0 running ranks in DB calculations
- Fix over zealous const in culture ranks
- Fix 4th Crafting skill in Urban Culture
- Fix display of running ranks in DB info
- Charactermancer:
- Make the pbonus & knack totals text, not entries.
- Save languages from charactermancer for all cultures.
- Special button to edit spells (reorder and delete)
- Fix knacks using short name for attributes (without the misc)
- Set critreduction by default

# 2024-06-10

- Attacks:
- Attacks have a proper pop up
- Add useful error messages for bad attacks
- Hide the error message when we show/hide the attack add box
- update data when items are added.
- Bugs
- Hybrid fix 'own realm'
- Fix dependancies when building CSS for sheet
- Deleted the mysterious 'Skills' race
- fix swapepd fumble and ranks on attack listing
- Show attack ranks (not rank)
- Correctly scale non-medium attacks
- Inventory
- (Internal) Move to own file for html
- Delete items
- Modify item count (update encumberance)
- Can add equipment
- Can add Armor - by location
- Can add shields - db bonus and # attacks
- Handle numeric weights as well as strings (x%)
- Handle a few more error states for bad equipment.
- Expertise skills now show as 0 for 0 ranks (not -25)
- Spells have * or • afer them (compendium)
- Tests
- Added tests for hybrid own realm
- Add some styling to updates.
- Internal
- Attacks are a little less verbose.
- Update documentation on attacks

# 2024-06-03

- Add attacks: Fully(?) customisable:
- Any pubished attack table
- Any listed attack skill
- Modifiers
- Fumble
- etc
- Default skill values for Dynamic Specialisations
- Clear levelup purchases option (button - click it!)
- most buttons are now styled
- Added settings tab to character.
- Added discord link
- Bugs:
- Handle missing regions and lores for culture ranks.
- Fix subskill rolls
- Remove "Immortal" talent from Elves - it's not a thing
- Internal
- Add test framework for level up
- Remove some dead code
- (Need to do rake)

# 2024-05-27

- Charactermancer:
- Fix material and creature lore specializations
- Really hit with a hammer the hide chaactermancer button.
Hide directly at end of charactermancer.
- Direct critical roll (eg roll an C Electricity)
- Rest to recover Fatigue penalties
- Count the weight of items < 1 lbs
- Update total maneuver penalty when fatigue changes
- Stat info show potential (clearly)
- Fix Talents applying on level up
- Bugs:
- Fix some internal calls using terrible way of saving ranks
- Fix for targets smaller than attacker (no more insane DBs)
- Update Weight Allowance when strength changes.
- Fix alignment of stat info hover
- Fix adding skills failing on error
- Stat gain:
- Show the potential and temporary for stat gains
- Add and remove stat gains tracked correctly
- Extra stat gains are now required
- Stat gains persist through level up
- Internal:
- Remove unused charmancer.html.gvz
- Less logging on feats of strength
- RMU Async functions a bit more verbose on error

# 2024-05-20

- Fatigue rolls
- Track HP
- Calculate total maneuver:
- Fatigue
- Injury
- HP Loss
- RR rolls
- (internal) Async calls now timeout and unblock if too long
- Charactermancer:
- Toggle button dissapears more often (when it should)
- Back from languages goes back one, not two.
- Show region selectors in culture ranks
- Fix selection of Region Lore Skills
- Fancy navigation buttons
- Fix most skills (not Material Lore and Languages)

# 2024-05-13

- Add support for the targetting button.

# 2024-05-06

- Attacks:
- HP Scaling (based on size - beta rules)
- Add missing criticals to attack results. So all crits on attack tables should resolve
- Add DB Bonus for small attacks
- Fix bug: Attack scaling based on Attack size not attacker size.
- Fix bug finding attack types (eg Greater Hafted)
- AP tracking
- With hacky messages!
- Update preview image to something a little more relevance.

# 2024-04-29

- Attacks!

# 2024-04-14

- Fix bug in parseIntDefault to return the default if passed a 0
- Add test for parseIntDefault
- Roll buttons updated
- The die rolls with a modifier.
- The (skill) number rolls natural.
- Fix a layout issue on safari (I hope)

# 2024-04-07

- Fix grammar when casting spells; "cast from Spells List, not casts Spell List"
- Weight Allowance calculation now shows
- Fix DB blocking calculation
- Talents:
- Fix change of tier tracking
- Make removal work
- Levelup Talents now persist
- Fix typo on 'received'

# 2024-03-31

- More roll template improvements
- Generalize
- Fix dynamic specializations
- Initiative roller
- Spell & Spell Mastery rolls
- Add support for scr_misc
- support for eloquence and friends.
- Info and edit buttons merge
- Can edit names of Skill specialisations
- Levelup stat gain fix

# 2024-03-26

- Improvements to the roll template layout
- Charactermancer fix realm
- Fix open ended rolls from skills
- Handle rmuasync errors by continuing
- Sort translations.json to reduce deltas

# 2024-03-24

- Skill rolls
- Fix height and weight craziness
- Lots of creation bug fixes.
- Fix some update function on derived/frontpage

# 2024-03-17

- Add specialisations
- Edit specialisations
- Add Spell lists on sheet
- Edit spells
- Bug: Fix skill ranks purchase for specialized skills

# 2024-03-10

- Skill specialisations now work in Favourite skills
Use Ambush: Shields or Ambush:Shields
- Inventory: Handle item removals.
- Gender saved on sheet
- Height and Weight updates:
- S/M/B handled
- Build supported
- Variance added to racial data
- Race previews
- Culture previews
- Fancy buttons
- Edit skills (including fixed specialisations)
- Edit stats
- Use icons for edit/info
- Other misc fixes.

0 comments on commit 6784512

Please sign in to comment.