IP training in 14.9.1
The native Skills window now commits purchased abilities and skills to SQLite. An accepted batch updates its raw values and IP balance in one transaction. The server validates ownership, session state, costs and caps; the client cannot choose its own balance. Repeated ACCEPT packets do not purchase the same points again. Resetting already committed points remains a separate, unimplemented action.
Original resources and calculations
The original kkr.dll has SHA-256
a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0.
The following functions and resources establish the client calculations:
| Resource | Reader | Consumed data |
|---|---|---|
| 1000027, breeds 1-4 | FUN_100ef270 |
Six ability baselines and six absolute maxima |
| 1000210, breeds 1-4 | FUN_100dd9a0 |
Ability price factors, in STR/INT/AGI/SEN/STA/PSY order |
| 1000206, professions 1-12 | FUN_100e9670 |
Skill price factors in tenths, in the reader's explicit 77-stat order |
| 1000209, categories 1-5 | FUN_100ee0e0 |
Six title caps and growth per level |
| 1000200, professions 1-12 | FUN_100e60f0 |
Title thresholds 1, 15, 50, 100, 150, 190 |
| 1000204, skills 100-168 | FUN_100ec8e0 getter |
Six ability weights |
tools/data/extract_ip_training.py writes the consumed data to
server/gamedata/ip_training.yaml and retains source bytes, per-record hashes
and the resource-index hash in local/ip-training-research/resources.json.
It excludes AC fields 90-97 and the additional profession/breed records outside
the supported original player profiles. Original Run Speed weights sum to 110;
the extractor preserves them. It also preserves the original Solitus Strength
maximum of 472 rather than substituting a modern table's 480.
FUN_100751e0 prices the next purchased point from the CURRENT raw value,
clamped to at least 1. Abilities multiply that value by the breed factor;
skills multiply by the profession's integer factor and the native float 0.1.
Neither ability trickle nor direct skill equipment bonuses enter the price.
The exported N3Msg_GetSkillCost explicitly obtains raw stat mode 2 first.
FUN_100755c0 limits abilities to breed baseline + 3 * level, bounded by
the breed maximum. Skill category is the truncated result of
factor * float32(0.1) + 0.5. Its title cap and growth table are separate from
the skill's displayed color. In title 1 the growth limit is 5 + level * growth.
Later titles use the previous title's cap plus growth for
level + 1 - current title start; a separate six-per-level bound also applies.
Skills also have a positive ability-dependent bound: truncate eight times the
UNTRUNCATED native trickle calculation. FUN_10073fa0(stat, 0) includes worn
ability modifiers through FUN_10074a30. The 0.01 single-precision constant
matters: six abilities of 10 can yield a raw cap of 19 rather than 20.
The server checks the final proposed abilities when validating a multi-stat
batch. Existing administrator-set values above a cap may remain unchanged;
they cannot be increased beyond that cap through training.
The shipped help files Improving skills and abilities.txt and IPReset.txt
independently describe breed/profession costs, local draft changes, ACCEPT,
CANCEL and the distinction between purchased values and ability additions.
The February 7, 2003 firsthand post
Truth about Skill Color
supports current-raw-value pricing. Some of its category boundaries and title-1
caps differ from the executable and shipped tables; the implementation follows
the latter. The post was retrieved through its indexed search body; a direct
HTML fetch returned 404.
Native request and synchronization
SkillIIR_t has key 0x3e205660. Constructor FUN_10083ad0, serializer
FUN_10083d60 and shared map writer FUN_10008c00 establish its body:
- Signed 32-bit count, network byte order.
- That many
(stat ID, absolute raw value)signed 32-bit pairs.
The native ACCEPT path sends all 75 entries, stats 16-21 and 100-168, including
unchanged entries. It does not send stat 53, an IP cost, status, or request ID.
FUN_10074380 snapshots the draft; FUN_10074ec0 changes local values and
float IP; FUN_10074130 sends ACCEPT. FUN_100741e0 restores CANCEL locally
without a SkillIIR request.
Receiver FUN_10083d80 assigns authoritative raw values and refreshes the local
Skills view. The server returns this snapshot and an absolute StatIIR update
for IP 53 on acceptance or rejection. It shares accepted raw stats and changed
HP/attack foundations with observers; IP and nano remain private. No historical
failure-status opcode has been established. Malformed packet framing ends the
connection; well-framed invalid purchases receive the unchanged authoritative
snapshot. Database failures publish no successful update.
The shared character-save transaction verifies every written profile and vital column after its final statement and before commit. The check uses the same column list and bound values as the write. A successful UPDATE count alone does not prove that later statements retained the intended skills, IP and resources. An absent or changed row rolls back without advancing saved-state caches or publishing the tentative training. Position checkpoints keep their existing cadence; this check adds no per-movement writes.
Explicit limits of the reconstruction
The server totals exact tenths of IP and rounds the accepted batch up once to its integer IP charge. That policy agrees with the exercised native purchases and prevents large balances or pair ordering from creating free points. The original client's draft uses floats and can depend on editing order or grouping at rounding boundaries. The wire omits both the draft cost and edit history; the ORIGINAL SERVER's fractional/batch rounding remains unverified. The client receives the authoritative result rather than controlling the charge.
Increasing maximum health/nano preserves current resources; it grants no free heal. The historical training-time refill policy remains unverified. Training does not reschedule a weapon cycle already in progress. New-character abilities use the original breed baselines; all raw skills start at 5, including Run Speed. Fresh players are within native training caps. Historical profession skill seeds and starting IP remain unverified; see character creation. The shared solo kill progression now awards XP, advances levels and grants IP. Its historical reward policies and IP Reset remain open.
Training, earned rewards and persistence failures
server/mission_reward_progression_test.go connects a kill award to actual
training and equipment handlers. Its Atrox fixture starts immediately below the
first XP threshold. Level 1 rejects Agility 11 without spending IP. The kill
earns level 2 and 4000 IP without raising the trained ability or current HP.
Mission hand-in retains its promised QL2 glove despite the level change. Wear
still fails at Agility 9; the accepted Agility 11 batch costs exactly 38 IP and
then permits wear, removal and re-wear. A failed training transaction preserves
the reward and earned IP, and retry succeeds. Cold loads retain item identity,
effects, credits, XP and unrelated corpse loot at every equipment step.
This is an integration fixture with seeded XP, a one-hit victim and arranged positions. It tests the earned-cap dependency and conservation, not ordinary combat balance, travel or a complete equipment-purchase loop. The separate ordinary mission run provides native evidence for the current level-1 reward and rejected wear.
server/ip_training_persistence_test.go injects ignored updates, rewritten
abilities/IP, later skill/health changes, deletion and deferred commit failure.
Each failure must retain live and cold stats, IP, health, nano and owned items,
emit no success packets and leave saved-profile caches unchanged. Removing the
fault and repeating the same native request twice trains once at the original
price. Four late-write cases reproduce successful acknowledgement with divergent
saved state before the final verification was added. The regression records are
retained under local/earned-armor/.
The candidate passes go test ./server/... ./tools/data/export_gamedata -count=1
with 1615 top-level tests and 16011 individual results. The separate training and
earned-reward race run passes 16 top-level tests and 73 results. go vet ./server/... passes. Normal native training, page reconnect and an unchanged-DB
cold restart retain the accepted raw skill, IP and exact owned items; see the
issued buff and training run.
server/starter_level_test.go additionally begins with ordinary HTTP character
creation, zero XP and the actual seven issued items. Public training spends
110 IP on Agility, Stamina and Body Development, without refilling current HP;
the issued bat is equipped normally. Fifteen full-health Leets, their ordinary
replacement lives and intervening seated recovery ticks earn level 2 and 4000
IP. Corpse expiry cannot erase that earned progression. Agility 11 is rejected
before leveling and then costs 38 IP; every kill and the final training retain
their state and exact issued-item ownership on a cold load. No XP, resources
or enemy health are reset. The fixture arranges one nearby spawn and controls
damage/drop rolls, so it checks connected server progression rather than
random survival balance or native travel.
It passes normally and with the two earned-reward/failure regressions under
-race (3 top-level tests, 10 results); records are retained in
local/earned-armor/starter-level-test-verification.json.
Verification
client/tests/ip_training.c executes the unchanged lifted implementations
sub_360751E0 and sub_360755C0 from
client/game/kkr.dll/lifted-0034.c. Its 31 cases cover raw point pricing,
fractional factors, category boundaries, title growth, ability-derived bounds,
truncation and breed limits. It is included in the Linux native test target.
server/ip_training_test.go covers all twelve profession Pistol prices, four
breed prices and caps, level/title/ability boundary pairs, proposed abilities,
worn versus stored modifiers, atomic save failure, insufficient IP, reductions,
negative/overflow values, unknown/duplicate/missing fields, malformed snapshots,
wrong owners, dead/inactive/replaced sessions, concurrent duplicate ACCEPT,
large balances, fractional charges, restart persistence, observer/private
updates, world dispatch and movement anchoring. Run Speed prediction now reads
the trained raw value rather than an assumed 100.
The maintained server suite passed (go test ./server/..., server 272.459 s),
as did the training race suite (118.343 s). A final focused run including
integer/fractional charging and low-health movement passed in 34.724 s.
The original-code contract also passed when compiled to WASM and run with Node.
Native Skills window checks
One isolated browser visitor used the unchanged published WASM client against the single HTTPS preview. The profile was set to level 3, Soldier, with 1500 IP; these are controlled starting conditions, not an XP or IP-grant test.
| Native action | Verified result |
|---|---|
| Draft Strength 10 to 11 | Native draft shows 1480 IP; durable profile remains Strength 10/IP 1500 |
| CANCEL and reopen | Strength 10/IP 1500; no SkillIIR ACCEPT sent |
| ACCEPT Strength 10 to 12 | Raw Strength 12/IP 1458, immediately durable |
| ACCEPT raw Pistol 5 to 8 | Displayed Pistol 10/IP 1440; durable raw Pistol 8 |
| Raise Strength to 15, attempt 16 | Native level-cap message; ACCEPT saves 15/IP 1362 |
| Raise Agility and Sense 10 to 15 | Raw Pistol stays 8; displayed Pistol becomes 11/IP 1122 |
| Restart server, reconnect same visitor | Strength/Agility/Sense 15, raw Pistol 8 and IP 1122 survive |
Four actual ACCEPT captures each contain precisely the expected 75 raw entries
in ascending stat order and no IP field. Seven memory/profile captures check
local draft versus authoritative state; tmp_verify.py validates these values.
Native window screenshots verify the effective display and cap feedback.
The final build additionally exercises a controlled Engineer profile with 8 IP:
Nano Resist's next raw point has a 7.5 IP price; the native integer display shows
8 spent. ACCEPT saves raw 6 and IP 0, which also survive another reconnect.
This confirms the exercised single fractional purchase, not the unresolved
original-server rounding policy across arbitrary edit/batch histories.
REA evidence bundles, exact extracted resource bytes, the checking script,
packet captures and screenshots are retained in local/ip-training-research/.
Test browser contexts are closed afterward; the one requested LAN preview stays
available. No production client adapter changes were needed.