Changelog
tilttek/dicePas encore traduite
Cette page n'est pas encore traduite en français ; elle est présentée en anglais.
All notable changes to tilttek/dice will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
0.1.0-alpha - 2026-11-11
Added
- The expression model:
Poolof instructions with their comments,Dice,ComputedDicewhose count or sides are rolled first,ValueList,PreviousDice,Constant,OperationwithOperator—+ - * / % ^—,Negation,FunctionCallwithMathFunction—floor ceil round abs min max repeat, every function but the three that round keeping the rounding of the roll —, and the diceStandardDie,FudgeDieweighted or not,RangeDieandCustomDie, numeric dice rolling their own faces. - The language of instructions:
Referenceto the result of an instruction before or its item,InstructionDicetaking the dice of instructions again, bound or merged,Groupjudging the totals of its expressions as dice,TextListwith itsListItems drawn by weight or range, unique or joined,Sentencewith itsPlaceholders andPlaceholderKind,ConditionalandChoicewith itsSwitchCases, exclusive or not, with a default branch and the scope of their conditions. Modifiers, applied in a fixed order:Rerollrepeated or once (Repetition), unique dice,Explosionspread, compound or penetrating and limited by a number or a roll, dice all the same, floors and ceilings,Transform, filters,SelectionwithSelectionMode, successes and failures,Occurrences, groups reaching a sum,Criticalmarks,Looktokens andSort; only numeric dice take modifiers, contradictory modifiers are refused, and a roll that would never end is refused.- Validators:
Validator,ComparisonwithComparator—!=included —,Range,Modulo,CompositewithJunction—&,|,^—, andConditionwith itsScope: each final value, each die, all, any, the total. - Custom dice:
Facewith its label, value, colour,Shapeand image — never told by its colour alone —,DieDefinitionandCustomDice; a roll tallies faces by symbol and sums them when they carry values. NotationandNotations: the letters of a language, German, Danish, Norwegian and Swedish built in, found by locale with a fallback on the language.LexerandDiceParser: the notation read without regular expressions, letters in either case,d%,dFanddF.1,d[a..b],d{name}, counts and sides between parentheses, lists[…],@,kh kl dh dl,kanddalone,advanddis,randro,uanduo,!,!!,!pand their limit,a,t,min,max,t[…],f[…], successes by comparison orc[…], failuresf,o,g,cs,cf,look[…],s,sa,sd, validators between brackets with their scope, functions, integer arithmetic with parentheses, negation, remainder and power; instructions separated by;or,,$1and$1[0],@1,b[…]andm[…], groups{…}, text listsL[…]withu,n, weights and ranges, texts between double quotes with their escapes and placeholders,i[…]{…}{…},S[…]{…}andS^,repeat(), comments#,//and between brackets, macros$nameread as one token and resolved byContract\Macrosinto their tree — a macro of several instructions written alone being the whole pool —; a text or a list refused in arithmetic, a reference only to an instruction before; errors with their position and reason; nesting bounded; a fuzz target.RolisteamReader: a command of Rolisteam's DiceParser read into the library's tree —k,kl,K,r,R,eand its limit,a,c,s,sl,T[…]{…},p[…],o2,7, the scopes*,.,:and?of a validator, and every construct both notations write alike —, its tokens written again in the library's notation, macros included, errors placed in the command as written,yand the merge or bind of every instruction refused; a fuzz target.Limits: dice, sides, explosions, rerolls, repetitions, instructions, length and the characters of a text, refused rather than truncated; rolled counts and sides checked once rolled, every repeated operator counted, the items drawn from text lists counted as dice, every branch counted when parsed.NotationWriterandExpressionWriter: the canonical form of every construct, with every count written, the modifiers in the order they apply, no more parentheses than needed, the items of a text list quoted when they need it — and written alone bywriteItem()— and the escapes a text needs.Roller,Arithmeticand the resultsPoolResult,ExpressionResult,DiceResult,ConstantResult,OperationResult,NegationResult,FunctionResult,TextResult,ListResult,BranchResult,ReferenceResultandRolledDiewithDieOriginandMark: a result is a number, a text or a list, written byOutputs; every die kept with its rolls, every modifier applied, explosions, rerolls and repetitions counted across the pool, stable selections, occurrences listed, groups that reach a sum the most the dice form up to 12 dice and found greedily beyond with aNotice, instructions rolled in order and merged instructions giving no total, only the branch that holds rolled, integer arithmetic whose divisions round as the caller says — down by default — unlessfloor(),ceil()orround()say otherwise, overflow refused, plain arrays for a journal.Seed,Commitment,FairRollerandVerifiableRoll: verifiable rolls by seed commitment, a client seed and a nonce, onXoshiro256**seeded by an HMAC-SHA256, verified with their rounding, the whole language covered.ReplayerandReplayableRoll: rolls with an identifier, a seed and a rounding, replayed die for die.Dialect,Translation,UnsupportedandDialects, withRoll20,FoundryVtt,AvraeandRolisteamDiceParser: a pool written in a table's notation — rerolls, explosions, floors, successes and failures, critical marks, sorting, lists, functions, remainders and powers where the table writes them the same —, one command per expression or, for DiceParser, every instruction in one command with references, branches, text lists, sentences, groups andrepeat(), divisions written rounded down with a notice when the roll rounds another way, and what a dialect cannot write reported, the constructs of instructions included;separator()andrangeDie()for a dialect to override.DiceRoller, the library in one object: parsing with the macros given, reading a command of DiceParser, rolling and translating with the rounding the caller gives.DiceException, implemented byInvalidExpressionwith its input, position and reason,LimitExceeded,CannotRoll,InvalidDefinitionandUntranslatableExpression.- The documentation in
doc/, one file per topic, indexed by the README. CONTRIBUTING.md,SECURITY.mdandCODE_OF_CONDUCT.md.