Mokha's Hacks Sundries

ClassChg Expansion

Download here

a rework of Old promotion expansion, enable unit promote to no more than 6 classes.

image

1. Custom Usage

1.1. Vanilla table

Vanilla table of 2 selectable classes has been retained. You can also config on old table to diy branched promotion classes.

1.2. Expansion

At the same time, there are two list for promotion expansion:

  1. gPromoJidLutExpa
    A 0x100 * 4 linear table according to class index.
    You can config 4 additional class to promote.You can also config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandList.txt

  2. gClassChgExpaMods
    A table for promotion with higher degrees of freedom. A unit can promote to ClassChgExpaMod::jid_promo if:

  • The configed class index is matched
  • The configed character index is matched
  • The configed item is used for promotion
  • The configed event flag is set

You can config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandModulearList.txt

1.3. Trainees

As for auto-promotion for trainee class, there is also a reworked table for configuration. gpTraineesRe , with two element jid and level .

You can also config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandTrainee.txt

Custom Build

If you want to modify on source code, please refer to CHAX template, note that the C-Lib use the ver.2023.07.31.

You can also write your own jid-getter function and add the function to the list gGetClasschgListFuncs.

/**
 * r0: unit struct
 * r1: protion item
 * r2: out buffer
 * r3: length of the out-buffer, DO NOT overflow!
 *
 * return: amount of the classes to promote
 */
typedef int (* GetClasschgListFunc_t)(struct Unit * unit, u16 item, u8 * out, int len);
extern const GetClasschgListFunc_t gGetClasschgListFuncs[];

Note that this patch has been embedded to the latest version of SkillSystem, you can directly use the FEB patches without installing for skillsys users.

14 Likes