Skip to content

Commit

Permalink
Merge pull request #1443 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
0.10.7
  • Loading branch information
snap01 authored Nov 19, 2023
2 parents 0cb540d + d83c60c commit 245c717
Show file tree
Hide file tree
Showing 38 changed files with 671 additions and 571 deletions.
361 changes: 342 additions & 19 deletions .github/ABANDONED.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ Happy gaming !

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

## Version 0.10.7

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

- Fix a bug where token image wasn't set properly with generic icon
- Fix CoC ID filtering by language/era issues, and regression issues caused by #1435, thanks to @Technus #1418 and #1439
- Fix dholehouse importer for characters with a single item on their possesions. Fixes #1423, thanks to @pconcepcion #1424
- Fix guessing CoC ID on spells doesn't save on first attempt.
- Fix investigator wizard occupation skills max if personal skills is blank
- Fix Lock / Unlock / Roll / mode change not supported on actors in compendium. Fixes #1432
- Fix targeting system not being able to calculate distance from the minimized sheet #1426
- Add optional occupation personal skill text. #1436
- Add system manual button to Game Settings sidebar tab
- Add system setting to not trigger an error message for ranged token distance calculations if playing theatre of the mind
- Add translated characteristics to investigator wizard age reduction headers, thanks to @Technus #1438
- When an actor that has rollable characteristics or skills is dragged onto a scene prompted whether those should be rolled or averaged.
- Update to French localization, thanks to @vonv #1415
- Update to Italian localization, thanks to @Stefano1975t #1419, #1422, and #1429
- Update to Polish localization, thanks to @Technus #1438

## Version 0.10.6

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.
Expand Down
475 changes: 50 additions & 425 deletions .github/TRANSLATIONS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The system automates most of the regular tasks and rules involved with running a

Several parts of the actor sheets have pop up tooltips that trigger after two seconds, this delay can be changed in the settings

This documentation can be reopened under Compendiums -> JournalEntry -> System manual -> Call of Cthulhu 7th Edition [en]
This documentation can be reopened under Game Settings -> Help and Documentation -> View CoC7 System Manual

# Recent changes

Expand Down
2 changes: 1 addition & 1 deletion docs/en/chases.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Here you can set up your participant. Dragging an actor from the Actors sidebar

1. Dragging the questionmark onto a token will set the details to that token.

One you drag an actor or select a token you can set up the participant
Once you drag an actor or select a token you can set up the participant

![](../../assets/manual/chases/new_participant_setup.webp)

Expand Down
2 changes: 1 addition & 1 deletion docs/en/first_investigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Click on the Items Directory tab then Create Item give this a name e.g. New Inve

On the Description tab to set the description click the button to get an editor.

On the Details tab click the on the Biography Sections to add any sections you require from the Create a Backstory step of investigator creation. Click on the Compendium Packs tab then under the Item heading open up the Items Examples Item (CoC7) and drag the [_Punch_] onto the setup.
On the Details tab click the on the Biography Sections to add any sections you require from the Create a Backstory step of investigator creation. Click on the Compendium Packs tab then under the Item heading open up the Items Examples Item (CoC7) and drag the [_Punch_] onto the setup.

On the Characteristics tab you can customise how investigator characteristics are rolled / bought

Expand Down
2 changes: 1 addition & 1 deletion docs/en/link_creation_window.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Link creation tool

The system includes a tool to help you create links easily.
It's located on the left side bar. Click on the icon.
It's located on the left side bar. Click on the icon.
This tools is available to GM only.

![Creation tool](../../assets/manual/links/links-creation-tool.webp)
Expand Down
12 changes: 6 additions & 6 deletions generate-translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const abandoned = {}
const source = jsonfile.readFileSync('./lang/en.json')
const keys = Object.keys(source)

const maxMissingKeys = 153
const maxMissingKeys = 50

glob('./lang/*.json', {}, async function (er, files) {
await Promise.all(
Expand Down Expand Up @@ -65,11 +65,11 @@ glob('./lang/*.json', {}, async function (er, files) {
'** translation is currently up to date\n\n'
}
if (Object.keys(abandoned).length > 0) {
output =
output +
'The following translations have more than ' + maxMissingKeys + ' untranslated strings **' +
Object.keys(abandoned).join('**, **') +
'**, [are you able to help?](./ABANDONED.md)\n\n'
output = output + 'The following translations have more than ' + maxMissingKeys + ' untranslated strings [are you able to help?](./ABANDONED.md)\n\n'
Object.entries(abandoned).forEach(([key, values]) => {
output = output + '[' + key + '.json (' + Object.entries(abandoned[key]).length + ' untranslated strings)](./ABANDONED.md#' + (key + '.json').toLowerCase().replace(/[^a-zA-Z0-9]+/g, '') + ')\n\n'
})
output = output + '\n\n'
}
if (missing.length > 0) {
output = output + '|Key|'
Expand Down
13 changes: 11 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@
"CoC7.EmptySkillList": "Add a skill by dropping it here.",
"CoC7.EmptyItemList": "Add an item by dropping it here.",
"CoC7.EmptyCharacterSkillList": "Add a setup, occupation, or skill by dropping it here.",
"CoC7.PersonalSpeciality": "Number of personal or era specialty",
"CoC7.PersonalSpecialityPlaceholder": "other skill(s) as personal or era specialties",
"CoC7.AdditionalSkills": "Additional Skills",
"CoC7.SkillSelectionWindow": "Select optional skills",
"CoC7.SelectPersonalSkills": "Select {number} skill(s) as personal interest skills",
Expand Down Expand Up @@ -1005,6 +1005,8 @@
"CoC7.Migrate.ErrorItem": "Failed CoC7 system migration for Item {name}: {message}",
"CoC7.Migrate.ErrorActor": "Failed CoC7 system migration for Actor {name}: {message}",

"CoC7.System.Documentation": "View CoC7 System Manual",

"CoC7.Settings.CoreRules.Title": "Core Rule Book Optional Rules",
"CoC7.Settings.Rules.Name": "Variant/Optional Rules",
"CoC7.Settings.Rules.Label": "Configure Variant/Optional Rules",
Expand Down Expand Up @@ -1186,6 +1188,8 @@
"SETTINGS.ChaseShowTokenMovementHint": "Show movement on the grid when a token is moved to the next location.",
"SETTINGS.UseContextMenus": "Use context menus",
"SETTINGS.UseContextMenusHint": "[EXPERIMENTAL] Use context menus for rolls instead of key combination.",
"SETTINGS.SceneDistanceNotCalcualtedNoError": "Don't show error for ranged distance",
"SETTINGS.SceneDistanceNotCalcualtedNoErrorHint": "When starting a ranged combat if playing theatre of the mind do not show the unable to calculate distance message.",

"CoC7.getTheExample": "Copy Example",
"CoC7.Copied": "Copied the Example Text to Clipboard",
Expand Down Expand Up @@ -1289,5 +1293,10 @@
"CoC7.CoCIDFlag.error.documents-not-found": "Documents were not found in world or Compendia matching the CoC IDs ({cocids}), language \"{lang}\", and era \"{era}\". Please check your Era for the world setting.",

"CoC7.CoCIDBatch.title": "Batch set System ID (CoC ID)",
"CoC7.CoCIDBatch.summary": "The CoC7 System has introduced a System ID (CoC ID). This allows the system to identify FoundryVTT documents for example skills. This page will allow you to set the id for existing {type} documents. The System ID should use the English translation of the name to support localization across all languages."
"CoC7.CoCIDBatch.summary": "The CoC7 System has introduced a System ID (CoC ID). This allows the system to identify FoundryVTT documents for example skills. This page will allow you to set the id for existing {type} documents. The System ID should use the English translation of the name to support localization across all languages.",

"CoC7.TokenCreationRoll.Title": "Rollable detected",
"CoC7.TokenCreationRoll.Prompt": "This token has rollables characteristics or skills.<br>What do you want to do ?",
"CoC7.TokenCreationRoll.ButtonRoll": "Roll all",
"CoC7.TokenCreationRoll.ButtonAverage": "Average all"
}
4 changes: 4 additions & 0 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@
"CoC7.EraPulp": "Cthulhu Pulp",
"CoC7.EraModern": "Moderne",
"CoC7.EraModernPulp": "Moderne - Pulp",
"CoC7.EraRegency": "Regency Cthulhu - Standard",
"CoC7.EraRegencyPulp": "Regency Cthulhu - Pulp",
"CoC7.Eras": "Époques Cthulhiennes",
"CoC7.EraAvailability": "Disponibilité",

Expand Down Expand Up @@ -566,6 +568,7 @@
"CoC7.DeleteSanityLossEncounter": "Supprimer une perte de SAN liée à une Rencontre",
"CoC7.DeleteSanityLossImmunity": "Supprimer une immunité aux pertes de SAN",

"CoC7.SanityLossType": "Type",
"CoC7.SanityLossTypeDialogTitle": "Nouvelle immunité ou perte de SAN liée à une Rencontre",
"CoC7.SanityLossTypeDialogBody": "Ajouter une Confrontation au Mythe, Perte de SAN, ou Immunité à ce personnage.",
"CoC7.SanityLossTypeReason": "Raison",
Expand Down Expand Up @@ -723,6 +726,7 @@
"CoC7.ErrorBeneficiaryAtMaxBonus": "le bénéficiaire {name} a déjà le max de dés bonus",
"CoC7.ErrorParticipantAtMaxBonus": "{participantUuid} a déjà le max de dés bonus",
"CoC7.ErrorTokenNotOnScene": "Le token n'appartient pas à la scène de cette étape",
"CoC7.ErrorTokenIncorrect": "Impossible de trouver le token sélectionné",
"CoC7.AddParticipant": "Ajouter un protagoniste",
"CoC7.RemoveParticipant": "Enlever un protagoniste",
"CoC7.RemoveParticipantHint": "Le protagoniste va être totalement supprimé de la poursuite",
Expand Down
6 changes: 6 additions & 0 deletions lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
"CoC7.DeleteSanityLossEncounter": "Elimina la perdita di Sanità per l'incontro",
"CoC7.DeleteSanityLossImmunity": "Elimina l'immunità alla perdita di Sanità",

"CoC7.SanityLossType": "Tipo",
"CoC7.SanityLossTypeDialogTitle": "Nuova perdita o immunità di Sanità",
"CoC7.SanityLossTypeDialogBody": "Aggiungi al personaggio un nuovo incontro dei Miti, una perdita di Sanità, o un'immunità alla Sanità.",
"CoC7.SanityLossTypeReason": "Causa",
Expand Down Expand Up @@ -729,6 +730,7 @@
"CoC7.ErrorBeneficiaryAtMaxBonus": "Il destinatario {name} ha già il massimo dei dadi bonus",
"CoC7.ErrorParticipantAtMaxBonus": "{participantUuid} ha già il massimo dei dadi bonus",
"CoC7.ErrorTokenNotOnScene": "La Pedina non appartiene alla scena di questo luogo",
"CoC7.ErrorTokenIncorrect": "Impossibile trovare la pedina selezionata",
"CoC7.AddParticipant": "Aggiungi Partecipante",
"CoC7.RemoveParticipant": "Rimuovi Partecipante",
"CoC7.RemoveParticipantHint": "Il Partecipante verrà completamente rimosso dall'inseguimento",
Expand Down Expand Up @@ -1007,6 +1009,8 @@
"CoC7.Migrate.ErrorItem": "E' fallita la migrazione del sistema CoC7 per l'Oggetto {name}: {message}",
"CoC7.Migrate.ErrorActor": "E' fallita la migrazione del sistema CoC7 per il Personaggio {name}: {message}",

"CoC7.System.Documentation": "Visione del Manuale del Sistema CoC7",

"CoC7.Settings.CoreRules.Title": "Regole opzionali del regolamento base",
"CoC7.Settings.Rules.Name": "Regole opzionali/variazioni",
"CoC7.Settings.Rules.Label": "Configurazione delle regole opzionali/variazioni",
Expand Down Expand Up @@ -1188,6 +1192,8 @@
"SETTINGS.ChaseShowTokenMovementHint": "Mostra movimento sulla griglia quando una pedina viene mossa nel luogo successivo.",
"SETTINGS.UseContextMenus": "Usa menu contestuali",
"SETTINGS.UseContextMenusHint": "[SPERIMENTALE] Usa i menu contestuali per i tiri invece della combinazione di tasti.",
"SETTINGS.SceneDistanceNotCalcualtedNoError": "Non mostrare un errore per la distanza",
"SETTINGS.SceneDistanceNotCalcualtedNoErrorHint": "Quando si inizia un combattimento a distanza, e si sta usando il teatro della mente, non viene mostrato il messaggio sull'impossibilità di calcolare la distanza.",

"CoC7.getTheExample": "Copia Esempio",
"CoC7.Copied": "Copiato il testo di esempio negli Appunti",
Expand Down
17 changes: 13 additions & 4 deletions lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@
"CoC7.EmptySkillList": "Dodaj umiejętność, upuszczając ją tutaj.",
"CoC7.EmptyItemList": "Dodaj przedmiot, upuszczając go tutaj.",
"CoC7.EmptyCharacterSkillList": "Dodaj ustawienie, zawód lub umiejętność, przeciągając je tutaj.",
"CoC7.PersonalSpeciality": "Liczba specjalizacji osobistych lub z epoki",
"CoC7.PersonalSpecialityPlaceholder": "z umiejętności osobistych lub epoki",
"CoC7.AdditionalSkills": "Dowolna Umiejętność",
"CoC7.SkillSelectionWindow": "Wybierz opcjonalne umiejętności",
"CoC7.SelectPersonalSkills": "Wybierz {number} umiejętność(i) jako umiejętności związane z zainteresowaniami osobistymi",
Expand Down Expand Up @@ -1005,6 +1005,8 @@
"CoC7.Migrate.ErrorItem": "Migracja Przedmiotu {name} nie powiodła się: {message}",
"CoC7.Migrate.ErrorActor": "Migracja Aktora {name} nie powiodła się: {message}",

"CoC7.System.Documentation": "Zajrzyj do Instrukcji Systemu CoC7",

"CoC7.Settings.CoreRules.Title": "Opcjonalne zasady z Podręcznika Podstawowego",
"CoC7.Settings.Rules.Name": "Alternatywne/opcjonalne Zasady",
"CoC7.Settings.Rules.Label": "Skonfiguruj alternatywne/opcjonalne Zasady",
Expand Down Expand Up @@ -1186,6 +1188,8 @@
"SETTINGS.ChaseShowTokenMovementHint": "Pokaż ruch tokena na siatce, gdy jest przenoszony do nowej lokacji.",
"SETTINGS.UseContextMenus": "Używaj menu kontekstowego",
"SETTINGS.UseContextMenusHint": "[EKSPERYMENTALNE] Używaj menu kontekstowego dla rzutów zamiast kombinacji klawiszy.",
"SETTINGS.SceneDistanceNotCalcualtedNoError": "Nie pokazuj błędów dla zasięgu",
"SETTINGS.SceneDistanceNotCalcualtedNoErrorHint": "Zaczynając walkę nie wyświetlaj błędów dla obliczania zasięgu jeśli wybrany jest teatr umysłu.",

"CoC7.getTheExample": "Skopiuj przykład",
"CoC7.Copied": "Skopiowano przykładowy tekst do schowka",
Expand Down Expand Up @@ -1241,8 +1245,8 @@
"CoC7.InvestigatorWizard.AgeRange": "Wiek (15-89):",
"CoC7.InvestigatorWizard.MakeEDUImprovementCheck": "Wykonaj test rozwoju WYK",
"CoC7.InvestigatorWizard.MakeEDUImprovementChecks": "Wykonaj {total} testy rozwoju WYK",
"CoC7.InvestigatorWizard.DeductPointsFromCharacteristics": "Odejmij {total} punkty z {from}",
"CoC7.InvestigatorWizard.ReducePointsFromCharacteristic": "Zmniejsz {from} do {total}",
"CoC7.InvestigatorWizard.DeductPointsFromCharacteristics": "Odejmij {total} z {from}",
"CoC7.InvestigatorWizard.ReducePointsFromCharacteristic": "Zmniejsz {from} o {total}",
"CoC7.InvestigatorWizard.RollTwiceForLuck": "Rzuć ponownie na Szczęście",
"CoC7.InvestigatorWizard.OccupationPage": "Zawód daje Ci dodatkowe punkty, które możesz rozdać między osiem umiejętności i Majętność",
"CoC7.InvestigatorWizard.OccupationSelect": "Wybierz swój Zawód",
Expand Down Expand Up @@ -1289,5 +1293,10 @@
"CoC7.CoCIDFlag.error.documents-not-found": "Nie znaleziono dokumentów w świecie i komendium dla wybranego CoC ID\"{cocid}\", języka \"{lang}\", i epoki \"{era}\". Sprawdź ustawienia Epoki dla twojego Świata.",

"CoC7.CoCIDBatch.title": "Ustawienia System ID (CoC ID)",
"CoC7.CoCIDBatch.summary": "System CoC7 wprowadził CoC ID. Pozwala ono na identyfikowanie dokumentów FoundryVTT, na przykład umiejętności. Ta strona pozwala na ustawienie identyfikatorów dla istniejących dokumentów typu \"{type}\". ID powinno używać angielskiej wersji nazw, żeby umożliwić poprawną lokalizację"
"CoC7.CoCIDBatch.summary": "System CoC7 wprowadził CoC ID. Pozwala ono na identyfikowanie dokumentów FoundryVTT, na przykład umiejętności. Ta strona pozwala na ustawienie identyfikatorów dla istniejących dokumentów typu \"{type}\". ID powinno używać angielskiej wersji nazw, żeby umożliwić poprawną lokalizację",

"CoC7.TokenCreationRoll.Title": "Wykryto formuły rzutów",
"CoC7.TokenCreationRoll.Prompt": "Token ma formuły rzutów na cechy i/lub umiejętności.<br>Co chcesz zrobić?",
"CoC7.TokenCreationRoll.ButtonRoll": "Rzucaj koścmi",
"CoC7.TokenCreationRoll.ButtonAverage": "Wybierz średnią"
}
28 changes: 21 additions & 7 deletions module/actors/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1623,13 +1623,13 @@ export class CoCActor extends Actor {
return this.items.find(i => i.flags?.CoC7?.cocidFlag?.id === cocid)
}

parseFormula (formula) {
let parsedFormula = formula
for (const [key, value] of Object.entries(COC7.formula.actor)) {
parsedFormula = parsedFormula.replace(key, value)
}
return parsedFormula
}
// parseFormula (formula) {
// let parsedFormula = formula
// for (const [key, value] of Object.entries(COC7.formula.actor)) {
// parsedFormula = parsedFormula.replace(key, value)
// }
// return parsedFormula
// }

parseCharacteristics () {
const parsed = {}
Expand Down Expand Up @@ -2802,6 +2802,20 @@ export class CoCActor extends Actor {
return game.actors.get(key) || null
}

get hasRollableCharacteristics () {
for (const [, value] of Object.entries(this.system.characteristics)) {
if (isNaN(Number(value.formula))) return true
}
return false
}

get hosRollableSkills () {
for (const skill of this.skills) {
if (isNaN(skill.system?.value)) return true
}
return false
}

/**
* Use the formula if available to roll some characteritics.
*/
Expand Down
Loading

0 comments on commit 245c717

Please sign in to comment.