Quick answer: Godot 4 RichTextLabel [table] cells with multi-line content showing reordered? Table layout pass uses cell index but multi-line wraps misorder - use single-line cells or escape newlines.

Stats table: rows in order. Content includes line breaks; rendered table has scrambled rows.

Single-line cell content

Replace \n with [br]. Layout treats each row as one unit; ordering preserved.

Or use multiple tables

Each row as its own table. Costs setup; orders correctly.

Verify with single-line test

Same content, single-line. Order should be perfect. If so, multi-line wrap is the cause.

“Table layout assumes single-line cells. Multi-line content breaks the assumption.”

For stats displays, prefer Grid-based UI over RichTextLabel tables. More control; predictable behavior.

Related reading