Mining covers ore from map points, cutting ore into resources at an NPC and moving resources into the bag. The kinds of ore, resources, batteries and auto-miners are item tables (OreItem, ResourceItem, BatteryItem, UNmannedminer, the “Items” category); this page describes the cutting table Script\OreCutting.dat.
How it works
Mining points are map dummies *0dr (zones with different speed), *1dr (30 s), *2dr (not mined manually). The client sends the server the point index from its Map.edf, so the client's point list is assembled from the same dummies in the same order.
The tool is a weapon with m_nType = 10; the battery holds charge in seconds of mining; rows 6–9 of BatteryItem are auto-miner batteries, manual mining rejects them (checked by row number).
Cutting (OreCutting): for every ore the server collects all rows with its code (up to 100), finds the resource by code and sums the weights. The roll is a number 0…2³¹; the first row whose cumulative sum exceeds the roll is taken. A weight is a share of 2³¹; weight 0 never drops; if the sum is below 2³¹, the remainder goes to the last row of the ore.
OreItem: rows of one colour are consecutive in the order +3, +2, +1, starting at a number divisible by 3, otherwise manual mining yields ore of the neighbouring colour. m_dwOreProbability is not a mining chance but the threshold of the “golden box” event.
What matters when editing
Ore and resource codes must exist; the weight sum should be about 2³¹ (0x7FFF8000), a shortfall is a warning.
m_nmin_C_random ≤ m_nmax_C_random; 0/0 — the ore is not cut into resources, but the cutting fee is charged.
Files of the category
1 in the registry
File
Side
Format
Level
Corpora
Record
Digest
Note
script\OreCutting.dat
server
dat
ready for full
AoP ✓, GU ✓, Sirin ✓
AoP 136, GU 136, Sirin 136
mining.md
mining.md §1.2
“ready for full” — the format is understood and the fields are described; “derived” — the file is assembled from another; “opaque” — the format is not fully known; “postponed” and “out of scope” — the studio does not edit the file.
Used parameters
Fields read by the server or the client, or assembled from other files. The description says what the field means and how it acts; below it — where that was established.
script\OreCutting.datserver file
Total 4Known 4Derived 0Unused 0
Schema
Scripts\strs AOP\OreCutting.strs
Registry level
ready for full
Digest
mining.md §1.2
Offset
Field
What it is and how it acts
Goes to client as
Server readers
Role
Status
Data
+0x000
m_dwIndex
row number
mining.md §1.2
—
—
—
known
685 values; most often 0 (0%)
+0x004
m_strCode
ore code; the server goes through all rows with this code (not necessarily consecutive)
mining.md §1.2
—
—
—
known
20 values; most often ioblu03 (6%)
+0x044
m_strResource_Item
resource code; must exist
mining.md §1.2, §8
—
—
—
known
74 values; most often irhst05 (3%)
+0x084
m_nCutting_probability
Row share = weight / 2³¹; each resource is a separate roll. Weight 0 never drops. Up to 100 rows per ore
mining.md §3.4 (digest row)
—
—
—
known
21 values; most often 644235 (20%)
Unused parameters
This category has no unused parameters: every field is read by the server, the client or the build.