Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2578ea4dc1 | |||
| d80e3e4658 | 
| @@ -413,10 +413,10 @@ i.fvtt-ftl-nomad { | ||||
|   background-color: var(--color-light-1); | ||||
| } | ||||
| .fvtt-ftl-nomad .character-biography prose-mirror.inactive { | ||||
|   min-height: 40px; | ||||
|   min-height: 16rem; | ||||
| } | ||||
| .fvtt-ftl-nomad .character-biography prose-mirror.active { | ||||
|   min-height: 150px; | ||||
|   min-height: 16rem; | ||||
| } | ||||
| .fvtt-ftl-nomad .character-biography .field-label { | ||||
|   margin-left: 8px; | ||||
|   | ||||
| @@ -31,6 +31,13 @@ Hooks.once("init", function () { | ||||
|     utils: FTLNomadUtils, | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   // Set an initiative formula for the system | ||||
|   CONFIG.Combat.initiative = { | ||||
|     formula: "2d6 + @skills.combat.value", | ||||
|     decimals: 1 | ||||
|   }; | ||||
|  | ||||
|   CONFIG.Actor.documentClass = documents.FTLNomadActor | ||||
|   CONFIG.Actor.dataModels = { | ||||
|     character: models.FTLNomadCharacter, | ||||
|   | ||||
| @@ -93,6 +93,7 @@ export default class FTLNomadRoll extends Roll { | ||||
|         break | ||||
|       case "damage": | ||||
|         options.weapon = foundry.utils.duplicate(options.rollItem) | ||||
|         formula = options.weapon.system.damage | ||||
|         break | ||||
|       case "weapon": | ||||
|         options.weapon = foundry.utils.duplicate(options.rollItem) | ||||
| @@ -212,11 +213,30 @@ export default class FTLNomadRoll extends Roll { | ||||
|     options.numericModifier = Number(rollData.numericModifier) || 0 | ||||
|     options.skillModifier = Number(rollData.skillModifier) || 0 | ||||
|     options.rangeModifier = Number(rollData.rangeModifier) || 0 | ||||
|     options.finalModifier = options.numericModifier + options.skillModifier + options.rangeModifier | ||||
|     let mod = options.rollItem?.value || 0 | ||||
|  | ||||
|     // Build the dice formula | ||||
|     let diceFormula = `${2 + Math.abs(options.skillModifier)}D6` | ||||
|     if (options.skillModifier > 0) { | ||||
|     let diceFormula = "2d6" | ||||
|     if (options.rollType === "damage") { | ||||
|       let damageFormula = options.weapon.system.damage.toUpperCase().replace(/D/g, "d") | ||||
|       // Extract the mod (if present), like in 3d6+1 | ||||
|       let match = damageFormula.match(/([+-]\d+)$/) | ||||
|       if (match) { | ||||
|         mod += Number(match[1]) | ||||
|         damageFormula = damageFormula.replace(match[1], "") | ||||
|       } | ||||
|       // Replace the D6 by the correct number of D6 | ||||
|       damageFormula = damageFormula.replace(/(\d*)d6/gi, (match, p1) => { | ||||
|         let numDice = Number(p1) || 1 | ||||
|         numDice += Math.abs(options.skillModifier) | ||||
|         return `${numDice}d6` | ||||
|       }) | ||||
|       diceFormula = damageFormula | ||||
|     } else { | ||||
|       diceFormula = `${2 + Math.abs(options.finalModifier)}D6` | ||||
|     } | ||||
|     if (options.finalModifier > 0) { | ||||
|       diceFormula += `kh2 + ${mod}` | ||||
|     } else { | ||||
|       diceFormula += `kl2 + ${mod}` | ||||
|   | ||||
| @@ -35,8 +35,8 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel | ||||
|     schema.health = new fields.SchemaField({ | ||||
|       staminaValue: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), | ||||
|       staminaMax: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), | ||||
|       wounds: new fields.NumberField({ ...requiredInteger, initial:0, min: 0 }), | ||||
|       triageResults:  new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS }) | ||||
|       wounds: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), | ||||
|       triageResults: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS }) | ||||
|     }) | ||||
|  | ||||
|     schema.enc = new fields.SchemaField({ | ||||
| @@ -77,17 +77,17 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel | ||||
|   prepareDerivedData() { | ||||
|     super.prepareDerivedData(); | ||||
|  | ||||
|     let encMax = 10 + (2*this.skills.physical.value) | ||||
|     let encMax = 10 + (2 * this.skills.physical.value) | ||||
|     if (encMax !== this.enc.max) { | ||||
|       this.enc.max = encMax | ||||
|     } | ||||
|     let enc = 0 | ||||
|     let armor = 0 | ||||
|     for (let i of this.parent.items)  { | ||||
|     for (let i of this.parent.items) { | ||||
|       if (i.system?.enc) { | ||||
|         enc += i.system.enc | ||||
|       } | ||||
|       if ( i.system?.protection) { | ||||
|       if (i.system?.protection) { | ||||
|         armor += i.system.protection | ||||
|       } | ||||
|     } | ||||
| @@ -97,7 +97,7 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel | ||||
|     if (armor !== this.armor.value) { | ||||
|       this.armor.value = armor | ||||
|     } | ||||
|     let staminaMax = 14 + (3*this.skills.physical.value) | ||||
|     let staminaMax = 14 + (3 * this.skills.physical.value) | ||||
|     if (staminaMax !== this.health.staminaMax) { | ||||
|       this.health.staminaMax = staminaMax | ||||
|     } | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| MANIFEST-000046 | ||||
| MANIFEST-000051 | ||||
|   | ||||
| @@ -1,11 +1,7 @@ | ||||
| 2025/08/25-21:48:36.909732 7f99c9ffb6c0 Delete type=3 #1 | ||||
| 2025/08/25-21:56:45.440471 7f99c8ff96c0 Level-0 table #49: started | ||||
| 2025/08/25-21:56:45.440527 7f99c8ff96c0 Level-0 table #49: 0 bytes OK | ||||
| 2025/08/25-21:56:45.504826 7f99c8ff96c0 Delete type=0 #47 | ||||
| 2025/08/25-21:56:45.558056 7f99c8ff96c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at '!items!zv9dwgL3p7ThQn7j' @ 385 : 1 | ||||
| 2025/08/25-21:56:45.558080 7f99c8ff96c0 Compacting 1@0 + 0@1 files | ||||
| 2025/08/25-21:56:45.590210 7f99c8ff96c0 Generated table #50@0: 285 keys, 111653 bytes | ||||
| 2025/08/25-21:56:45.590298 7f99c8ff96c0 Compacted 1@0 + 0@1 files => 111653 bytes | ||||
| 2025/08/25-21:56:45.648076 7f99c8ff96c0 compacted to: files[ 0 1 0 0 0 0 0 ] | ||||
| 2025/08/25-21:56:45.648259 7f99c8ff96c0 Delete type=2 #44 | ||||
| 2025/08/25-21:56:45.801444 7f99c8ff96c0 Manual compaction at level-0 from '!items!zv9dwgL3p7ThQn7j' @ 385 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end) | ||||
| 2025/08/26-08:04:22.211637 7f99c9ffb6c0 Recovering log #48 | ||||
| 2025/08/26-08:04:22.223370 7f99c9ffb6c0 Delete type=3 #46 | ||||
| 2025/08/26-08:04:22.223498 7f99c9ffb6c0 Delete type=0 #48 | ||||
| 2025/08/26-08:13:33.915174 7f99c8ff96c0 Level-0 table #54: started | ||||
| 2025/08/26-08:13:33.915296 7f99c8ff96c0 Level-0 table #54: 0 bytes OK | ||||
| 2025/08/26-08:13:33.948896 7f99c8ff96c0 Delete type=0 #52 | ||||
| 2025/08/26-08:13:33.949217 7f99c8ff96c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end) | ||||
|   | ||||
| @@ -1,4 +1,11 @@ | ||||
| 2025/08/25-21:48:36.813932 7f99c9ffb6c0 Log #42: 0 ops saved to Table #45 OK | ||||
| 2025/08/25-21:48:36.814091 7f99c9ffb6c0 Archiving /home/morr/foundry/foundrydata-v13/Data/systems/fvtt-ftl-nomad/packs/ftl-nomad-items/000042.log: OK | ||||
| 2025/08/25-21:48:36.814401 7f99c9ffb6c0 Table #44: 285 entries OK | ||||
| 2025/08/25-21:48:36.843347 7f99c9ffb6c0 **** Repaired leveldb /home/morr/foundry/foundrydata-v13/Data/systems/fvtt-ftl-nomad/packs/ftl-nomad-items; recovered 1 files; 111653 bytes. Some data may have been lost. **** | ||||
| 2025/08/25-21:48:36.909732 7f99c9ffb6c0 Delete type=3 #1 | ||||
| 2025/08/25-21:56:45.440471 7f99c8ff96c0 Level-0 table #49: started | ||||
| 2025/08/25-21:56:45.440527 7f99c8ff96c0 Level-0 table #49: 0 bytes OK | ||||
| 2025/08/25-21:56:45.504826 7f99c8ff96c0 Delete type=0 #47 | ||||
| 2025/08/25-21:56:45.558056 7f99c8ff96c0 Manual compaction at level-0 from '!folders!AuBtSOj1mJmh88qx' @ 72057594037927935 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at '!items!zv9dwgL3p7ThQn7j' @ 385 : 1 | ||||
| 2025/08/25-21:56:45.558080 7f99c8ff96c0 Compacting 1@0 + 0@1 files | ||||
| 2025/08/25-21:56:45.590210 7f99c8ff96c0 Generated table #50@0: 285 keys, 111653 bytes | ||||
| 2025/08/25-21:56:45.590298 7f99c8ff96c0 Compacted 1@0 + 0@1 files => 111653 bytes | ||||
| 2025/08/25-21:56:45.648076 7f99c8ff96c0 compacted to: files[ 0 1 0 0 0 0 0 ] | ||||
| 2025/08/25-21:56:45.648259 7f99c8ff96c0 Delete type=2 #44 | ||||
| 2025/08/25-21:56:45.801444 7f99c8ff96c0 Manual compaction at level-0 from '!items!zv9dwgL3p7ThQn7j' @ 385 : 1 .. '!items!zv9dwgL3p7ThQn7j' @ 0 : 0; will stop at (end) | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -1 +1 @@ | ||||
| MANIFEST-000024 | ||||
| MANIFEST-000029 | ||||
|   | ||||
| @@ -1,11 +1,7 @@ | ||||
| 2025/08/25-21:48:36.994202 7f99ca7fc6c0 Delete type=3 #1 | ||||
| 2025/08/25-21:56:45.505125 7f99c8ff96c0 Level-0 table #27: started | ||||
| 2025/08/25-21:56:45.505238 7f99c8ff96c0 Level-0 table #27: 0 bytes OK | ||||
| 2025/08/25-21:56:45.557727 7f99c8ff96c0 Delete type=0 #25 | ||||
| 2025/08/25-21:56:45.648499 7f99c8ff96c0 Manual compaction at level-0 from '!actors!3pydTJsM73Z4o0V6' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at '!folders!vRnrOJqSMlxbSgyX' @ 92 : 1 | ||||
| 2025/08/25-21:56:45.648514 7f99c8ff96c0 Compacting 1@0 + 0@1 files | ||||
| 2025/08/25-21:56:45.676577 7f99c8ff96c0 Generated table #28@0: 51 keys, 49087 bytes | ||||
| 2025/08/25-21:56:45.676616 7f99c8ff96c0 Compacted 1@0 + 0@1 files => 49087 bytes | ||||
| 2025/08/25-21:56:45.736809 7f99c8ff96c0 compacted to: files[ 0 1 0 0 0 0 0 ] | ||||
| 2025/08/25-21:56:45.736931 7f99c8ff96c0 Delete type=2 #22 | ||||
| 2025/08/25-21:56:45.801488 7f99c8ff96c0 Manual compaction at level-0 from '!folders!vRnrOJqSMlxbSgyX' @ 92 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end) | ||||
| 2025/08/26-08:04:22.229470 7f99caffd6c0 Recovering log #26 | ||||
| 2025/08/26-08:04:22.240597 7f99caffd6c0 Delete type=3 #24 | ||||
| 2025/08/26-08:04:22.240743 7f99caffd6c0 Delete type=0 #26 | ||||
| 2025/08/26-08:13:33.840012 7f99c8ff96c0 Level-0 table #32: started | ||||
| 2025/08/26-08:13:33.840112 7f99c8ff96c0 Level-0 table #32: 0 bytes OK | ||||
| 2025/08/26-08:13:33.862575 7f99c8ff96c0 Delete type=0 #30 | ||||
| 2025/08/26-08:13:33.949166 7f99c8ff96c0 Manual compaction at level-0 from '!actors!3pydTJsM73Z4o0V6' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end) | ||||
|   | ||||
| @@ -1,4 +1,11 @@ | ||||
| 2025/08/25-21:48:36.915000 7f99ca7fc6c0 Log #20: 0 ops saved to Table #23 OK | ||||
| 2025/08/25-21:48:36.915188 7f99ca7fc6c0 Archiving /home/morr/foundry/foundrydata-v13/Data/systems/fvtt-ftl-nomad/packs/ftl-nomad-vehicles/000020.log: OK | ||||
| 2025/08/25-21:48:36.915342 7f99ca7fc6c0 Table #22: 51 entries OK | ||||
| 2025/08/25-21:48:36.932577 7f99ca7fc6c0 **** Repaired leveldb /home/morr/foundry/foundrydata-v13/Data/systems/fvtt-ftl-nomad/packs/ftl-nomad-vehicles; recovered 1 files; 49087 bytes. Some data may have been lost. **** | ||||
| 2025/08/25-21:48:36.994202 7f99ca7fc6c0 Delete type=3 #1 | ||||
| 2025/08/25-21:56:45.505125 7f99c8ff96c0 Level-0 table #27: started | ||||
| 2025/08/25-21:56:45.505238 7f99c8ff96c0 Level-0 table #27: 0 bytes OK | ||||
| 2025/08/25-21:56:45.557727 7f99c8ff96c0 Delete type=0 #25 | ||||
| 2025/08/25-21:56:45.648499 7f99c8ff96c0 Manual compaction at level-0 from '!actors!3pydTJsM73Z4o0V6' @ 72057594037927935 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at '!folders!vRnrOJqSMlxbSgyX' @ 92 : 1 | ||||
| 2025/08/25-21:56:45.648514 7f99c8ff96c0 Compacting 1@0 + 0@1 files | ||||
| 2025/08/25-21:56:45.676577 7f99c8ff96c0 Generated table #28@0: 51 keys, 49087 bytes | ||||
| 2025/08/25-21:56:45.676616 7f99c8ff96c0 Compacted 1@0 + 0@1 files => 49087 bytes | ||||
| 2025/08/25-21:56:45.736809 7f99c8ff96c0 compacted to: files[ 0 1 0 0 0 0 0 ] | ||||
| 2025/08/25-21:56:45.736931 7f99c8ff96c0 Delete type=2 #22 | ||||
| 2025/08/25-21:56:45.801488 7f99c8ff96c0 Manual compaction at level-0 from '!folders!vRnrOJqSMlxbSgyX' @ 92 : 1 .. '!folders!vRnrOJqSMlxbSgyX' @ 0 : 0; will stop at (end) | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -219,10 +219,10 @@ | ||||
| .character-biography { | ||||
|   background-color: var(--color-light-1); | ||||
|   prose-mirror.inactive { | ||||
|     min-height: 40px; | ||||
|     min-height: 16rem; | ||||
|   } | ||||
|   prose-mirror.active { | ||||
|     min-height: 150px; | ||||
|     min-height: 16rem; | ||||
|   } | ||||
|   .field-label { | ||||
|     margin-left: 8px; | ||||
|   | ||||
| @@ -23,12 +23,12 @@ | ||||
|  | ||||
|   <fieldset> | ||||
|     <legend>{{localize "FTLNOMAD.Label.description"}}</legend> | ||||
|     {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}} | ||||
|     {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true class="character-description"}} | ||||
|   </fieldset> | ||||
|  | ||||
|   <fieldset> | ||||
|     <legend>{{localize "FTLNOMAD.Label.notes"}}</legend> | ||||
|     {{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true}} | ||||
|     {{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true class="character-notes"}} | ||||
|   </fieldset> | ||||
| </div> | ||||
| </section> | ||||
		Reference in New Issue
	
	Block a user