Skip to content

Insert hero after script initialization - #1074

Merged
Try merged 1 commit into
Try:masterfrom
thokkat:hero-initialize
Nov 29, 2026
Merged

Try merged 1 commit into
Try:masterfrom
thokkat:hero-initialize

Conversation

@thokkat

@thokkat thokkat commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

zspy confirmation:

-4-	25:27 Info:  3 U:       GAM: Startup-Script finished. .... <oGame.cpp,#866>
-4-	25:27 Info:  3 U:       GAM: Calling Init-Script ... .... <oGame.cpp,#888>
.....
-3-	25:27 Warn:  0 C:       SCRIPT: last parser func-name: INIT_NEWWORLD .... <oGameExternal.cpp,#262>
-3-	25:27 Warn:  0 C:       SCRIPT: AI_GotoWP(): illegal param: "INIT_NEWWORLD.HERO" is NULL. .... <oGameExternal.cpp,#252>
-3-	25:27 Warn:  0 C:       SCRIPT: last parser func-name: INIT_NEWWORLD .... <oGameExternal.cpp,#262>
-3-	25:27 Warn:  0 C:       SCRIPT: Npc_CreateInvItem(): illegal param: "HERO" is NULL. .... <oGameExternal.cpp,#252>
-3-	25:27 Warn:  0 C:       SCRIPT: last parser func-name: INIT_NEWWORLD .... <oGameExternal.cpp,#262>
-3-	25:27 Warn:  0 C:       SCRIPT: AI_EquipBestMeleeWeapon(): illegal param: "INIT_NEWWORLD.HERO" is NULL. .... <oGameExternal.cpp,#252>
-3-	25:27 Warn:  0 C:       SCRIPT: last parser func-name: INIT_NEWWORLD .... <oGameExternal.cpp,#262>
-3-	25:27 Warn:  0 C:       SCRIPT: EquipItem(): illegal param: "HERO" is NULL. .... <oGameExternal.cpp,#252>
-3-	25:27 Warn:  0 C:       SCRIPT: last parser func-name: INIT_NEWWORLD .... <oGameExternal.cpp,#262>
-4-	25:27 Info: 10 U:       (oCWorld::CreateVob) 11471 .... <oWorld.cpp,#315>
-4-	25:27 Info:  9 U:       NPC: Loading Script-NPC  .... <oNpc.cpp,#1624>
-4-	25:27 Info:  7 U:       NPC: NPC - Instance : PC_HERO .... <oNpc.cpp,#1627>
-4-	25:27 Info:  8 C:       MAG: constructed magbook .... <oMagic.cpp,#249>
-4-	25:27 Info:  9 U:       NPC: Finished Script-NPC. .... <oNpc.cpp,#1703>
-4-	25:27 Info:  3 U:       GAM: Init-Script finished. .... <oGame.cpp,#892>
-4-	25:27 Info:  3 B:     ---------- 92% ---------- .... <zViewProgressbar.cpp,#142>
-4-	25:27 Info:  9 B:     (oCGame::EnterWorld) .... <oGame.cpp,#3011>
-4-	25:27 Info:  3 B:     ---------- 93% ---------- .... <zViewProgressbar.cpp,#142>
-4-	25:27 Info: 10 U:     (oCWorld::CreateVob) PC_HERO .... <oWorld.cpp,#307>
-4-	25:27 Info: 10 U:     (oCWorld::CreateVob) 11471 .... <oWorld.cpp,#315>
-4-	25:27 Info:  9 U:     NPC: Loading Script-NPC  .... <oNpc.cpp,#1624>
-4-	25:27 Info:  7 U:     NPC: NPC - Instance : PC_HERO .... <oNpc.cpp,#1627>
-4-	25:27 Info:  8 C:     MAG: constructed magbook .... <oMagic.cpp,#249>
-4-	25:27 Info:  9 U:     NPC: Finished Script-NPC. .... <oNpc.cpp,#1703>

fixes #826.

Found the same issue in Battle of the Kings 3 mod where start gold is higher than in vanilla due to some extra gold creation before hero exists.

@Try
Try merged commit 8453b23 into Try:master Nov 29, 2026
8 checks passed
@Try

Try commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LHiver Mod: warning messages at start

2 participants