Lights: real values in world.jsonl again; distant / LOD lights; timecycle modifier regions #255
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!255
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/255/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 06:53 UTC · original
holdmysocks:six-168-lights→master· +464 −42 · 6 files · 1 commits · merged 2026-11-25 07:03 UTCThree lighting exports from
sixng lights, all from one pass over the map files.Placed lights: real values again (SIX-168)
Since the light fields got their names (
intensity,lightType,falloff, ...),lights.rsstill looked them up by hash, soworld.jsonlwrote intensity, range and type as 0 for every placed light. Light fields are now read by member hash (Meta::scalars_by_hash), so new names can't change what the export reads.world.jsonlnow carries every field of the light: time flags, falloff exponent, corona, volumetric and fade fields, second and third colours, tangent, and every scalar field by name underfields.Checked against the 2026-11-20 export with the same bbox: 145,157 lights, none at 0. Of the 114,816 lights both exports share, 99.4 % match on type, intensity, range, cone and colour. The rest are archetypes with more than one light set, where the first set wins as before.
Distant / LOD lights (SIX-192)
Each
CMapDatahasDistantLODLightsSOAandLODLightsSOA, structures of arrays with one value per light. Their hashes are the joaat of the GTA V names. Each distant light file is paired with the LOD light file whoseparentis its name, and the two are joined by index.distant.jsonl: 492,298 lights from 2,873 files, 2,871 of them paired. Each has world position, colour, intensity, type, flags, hash and a half-float time multiplier. From the LOD file it gets direction, range, falloff exponent and cone (u8 = degrees × 255 / 180). Raw columns are kept underdistant_rawandlod_raw.distant_groups.jsonl: per distant file, its name, flags (2 or 3) and the members that aren't one value per light, such as the light groups (boxes with index lists) and the category.lod.jsonl: LOD lights with no distant file to pair with (none inlevels.rpf).Check: of 725 sampled distant lights, 709 sit within 5 cm of a placed light with the same direction and type, and their ranges and cones match.
Timecycle modifier regions (SIX-179)
CMapData.timeCycleModifiersis empty in every file. The boxes are in anotherCMapDataarray (8471928b, struct3bc4ac19): 586 boxes in 221 files. Each has the modifier name hash,center,rotation,scale,range,percentage,startHour,endHourand three fields not identified yet. 581 of the names resolve tosixng timecyclemodifiers.Interior rooms (
CMloRoomDef) havetimecycleName,secondaryTimecycleNameandblend: 4,364 rooms. Both kinds go totc_modifiers.jsonl.Also
Meta::member_valuedecodes a single member. Arrays of arrays (element type0x52, 16-byte headers) now decode instead of showing up as a placeholder.cargo check --workspace --all-targetsandcargo test -p sixng-core -p sixng-gui --releasepass.