Load Powers.cfg at world boot

PowerParser loads Powers.cfg into PowerTemplate._powers. The 22 header
fields are named after the client loader's error messages (0x56E410);
ACTION= lines keep trains, duration, curve and stack fields; prereqs,
curves, flags, messages and CONDITION blocks are kept. Keys compare
case-insensitively, as in the client. Four keys the client ignores
(APPLYDAMAGESELF=, APPLYEFFECTCASTER=, APPLYEFFECTTARGET= and a
POWEREND= typo) are skipped; any other unknown key fails the load.

Numbers are read like the client's atoi/atof with a warning when a
token isn't clean: PRL-033 init time "2.9.0" -> 2.9 and SGE-001
precision "10.0" -> 10, which matches the DB. Ten EQPREREQ lines end
without a required flag, which the client reads as 0.

Needs the fixed Powers.cfg (SRDX-DB header had "SPELL 15 Unknown"
pasted twice; fixed in MBDATA, findings section 6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-22 11:19:14 -04:00
1 parent 623f7c4ae6
commit bd145b1e55
5 files changed
+497 -3

No files matched your search

+10
View File
@@ -43,10 +43,12 @@ import engine.parsers.objects.wpak.CompoundCurveTemplate;
import engine.parsers.objects.wpak.EffectTemplate;
import engine.parsers.objects.wpak.ModTypeTemplate;
import engine.parsers.objects.wpak.PowerActionTemplate;
import engine.parsers.objects.wpak.PowerTemplate;
import engine.parsers.wpak.CompoundCurveParser;
import engine.parsers.wpak.EffectParser;
import engine.parsers.wpak.ModTypeParser;
import engine.parsers.wpak.PowerActionParser;
import engine.parsers.wpak.PowerParser;
import engine.powers.RunePowerEntry;
import engine.powers.RuneSkillAdjustEntry;
import engine.server.MBServerStatics;
@@ -374,6 +376,14 @@ public class WorldServer {
exit(1);
}
Logger.info("Loading Powers");
PowerTemplate._powers = PowerParser.parsePowersFile();
if (PowerTemplate._powers == null || PowerTemplate._powers.isEmpty()) {
Logger.error("ABORT! Powers failed to load!");
exit(1);
}
Logger.info("Loading PromotionClasses");
PromotionClass.LoadAllPromotions();