From b1102b7895ac3b9dc39874566a90e269bfd91af8 Mon Sep 17 00:00:00 2001 From: Auronen Date: Fri, 20 Oct 2023 21:57:55 +0200 Subject: [PATCH] add doc, log and mdl vanilla externals --- docs/zengin/scripts/externals/doc.md | 335 +++++++++++++++++ docs/zengin/scripts/externals/externals.d | 353 ++++++++++++++++++ .../scripts/externals/externals_clean.d | 350 +++++++++++++++++ docs/zengin/scripts/externals/index.md | 3 + docs/zengin/scripts/externals/log.md | 80 ++++ docs/zengin/scripts/externals/mdl.md | 275 ++++++++++++++ 6 files changed, 1396 insertions(+) create mode 100644 docs/zengin/scripts/externals/doc.md create mode 100644 docs/zengin/scripts/externals/externals.d create mode 100644 docs/zengin/scripts/externals/externals_clean.d create mode 100644 docs/zengin/scripts/externals/index.md create mode 100644 docs/zengin/scripts/externals/log.md create mode 100644 docs/zengin/scripts/externals/mdl.md diff --git a/docs/zengin/scripts/externals/doc.md b/docs/zengin/scripts/externals/doc.md new file mode 100644 index 0000000000..84ef2fbf7c --- /dev/null +++ b/docs/zengin/scripts/externals/doc.md @@ -0,0 +1,335 @@ +--- +title: Doc functions +--- +# Doc external functions + +Doc functions are used to control the document manager. They allow you to fine tune the display of maps, letters and books. + +## `Doc_Create` + +Creates a new instance of the document manager and returns its ID. +```dae +func int Doc_Create() {}; +``` + +**Return value** +Returns the ID of the document manager instance. + +!!! Example + ```dae + var int nDocID; // Variable to store the id in + nDocID = Doc_Create(); + ``` + +## `Doc_CreateMap` + +Creates a new instance of the document manager with the arrow showing players position on the map and returns its ID. +```dae +func int Doc_CreateMap() {}; +``` + +**Return value** +Returns the ID of the document manager instance. + +!!! Example + ```dae + var int nDocID; // Variable to store the id in + nDocID = Doc_CreateMap(); + ``` + +## `Doc_SetLevel` + +Set a world level to a map. This maps the texture of the document to the bounding box of the provided level. +```dae +func void Doc_SetLevel(var int docID, var string level) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var string level` - name of the ZEN file + +!!! Example + ```dae + nDocID = Doc_CreateMap(); + Doc_SetLevel(nDocID, "WORLD.ZEN"); + ``` + +## `Doc_SetLevelCoords` + +!!! Warning + This function is only available in Gothic 2 + +Sets the map coordinates. This is used to map smaller portions of the world map to the document map to correctly show players position on the map. +```dae +func void Doc_SetLevelCoords(var int docID, var int left, var int top, var int right, var int bottom) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int left` - left coordinate +- `#!dae var int top` - top coordinate +- `#!dae var int right` - right coordinate +- `#!dae var int bottom` - bottom coordinate + +!!! Example + ```dae + Doc_SetLevelCoords(nDocID, -28000, 50500, 95500, -42500); + ``` + +## `Doc_SetFont` +Sets a `font` to be used on a `page` in a document with `docID`. Can be called multiple times to diplay different lines with different fonts. + +```dae +func void Doc_SetFont(var int docID, var int page, var string font) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int page` - page index, if set to `-1`, fonts will be applied to all pages +- `#!dae var string font` - font to be used + +!!! Example + ```dae + Doc_SetFont(nDocID, -1, "FONT_10_BOOK.TGA"); + ``` + +## `Doc_SetPages` + +Sets the number of pages `numOfPages` of the document. +```dae +func void Doc_SetPages(var int docID, var int numOfPages) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int numOfPages` - number of pages + +!!! Example + ```dae + nDocID = Doc_Create(); + Doc_SetPages(nDocID, 2); + ``` + +## `Doc_SetPage` + +Set `page` to have `texture` as a background with `scale`. +```dae +func void Doc_SetPage(var int docID, var int page, var string texture, var int scale) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int page` - page index, if set to `-1`, settings are applied to all pages +- `#!dae var string texture` - texture of the background +- `#!dae var int scale` - scale of the texture, `TRUE` to scale the page, `FALSE` to not scale + +!!! Example + ```dae + Doc_SetPage(nDocID, 0, "Book_Mage_L.tga", FALSE); + Doc_SetPage(nDocID, 1, "Book_Mage_R.tga", FALSE); + ``` + +## `Doc_SetMargins` + +Sets text margins of the page +```dae +func void Doc_SetMargins(var int docID, + var int page, + var int left, + var int top, + var int right, + var int bottom, + var int pixels) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int page` - page index, if set to `-1`, settings are applied to all pages +- `#!dae var int left` - left margin +- `#!dae var int top` - top margin +- `#!dae var int right` - right margin +- `#!dae var int bottom` - bottom margin +- `#!dae var int pixels` - `TRUE` to use pixels, `FALSE` to use virtual coordinates +!!! Warning + After a thorough examination of this external function in the decompiler, it looks like the function works in pixels only regardless of this parameter. + +!!! Example + ```dae + Doc_SetMargins(nDocID, 0, 275, 20, 30, 20, TRUE); + ``` + +## `Doc_PrintLine` + +Prints a line of `text` (font is set using [Doc_SetFont](#doc_setfont)) onto the document with `docID`, onto the `page`. Does not split the text into multiple lines if they do not fit onto the page. +```dae +func void Doc_PrintLine(var int docID, var int page, var string text) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int page` - page index +- `#!dae var string text` - text to be printed + +!!! Example + ```dae + Doc_PrintLine(nDocID, 0, ""); // insert empty line + Doc_PrintLine(nDocID, 0, "The Book"); + ``` + +## `Doc_PrintLines` + +Prints a line of `text` (font is set using [Doc_SetFont](#doc_setfont)) onto the document with `docID`, onto the `page`. Splits the text into multiple lines if they do not fit onto the page. +```dae +func void Doc_PrintLines(var int docID, var int page, var string text) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID +- `#!dae var int page` - page index +- `#!dae var string text` - text to be printed + +!!! Example + ```dae + Doc_PrintLines(nDocID, 0, "The war had been decided. Varant had lost its seaports, vital to army supplies. King Rhobar had not lingered on the battle fields for a long time, but left his generals to deal with the few remaining enemy troops. Varant had only one large force left, commanded by Lukkor, the most capable warlord of the Varant army, who had more than once turned defeat into victory."); + Doc_PrintLines(nDocID, 0, "But now his army was trapped. The situation was hopeless, even though his army greatly outnumbered the enemy. Lee, a war hero from Myrtana, had lured him into this trap. The heavy cavalry had been unable to fight on the thick, swamped ground of the narrow valley. Lee's soldiers had occupied the range of hills surrounding the swamp, and they had struck repeatedly, decimating the army. The desperate sallies his troops had launched had been cut short in pools of blood. He was beaten."); + ``` + +## `Doc_Show` + +Display the document using the document manager ID +```dae +func void Doc_Show(var int docID) {}; +``` + +**Parameters** + +- `#!dae var int docID` - document manager ID + +!!! Example + ```dae + var int nDocID; // Variable to store the id in + nDocID = Doc_Create(); + + // ... document configuration + + Doc_Show(nDocID); + ``` + +## Externals with docu comments + +```dae +/// Creates a new instance of the document manager and returns its ID. +/// +/// @return Returns the ID of the document manager instance. +func int Doc_Create() {}; + +/// Create a new instance of the document manager with the arrow showing players position on the map and returns its ID. +/// +/// @return Returns the ID of the document manager instance. +func int Doc_CreateMap() {}; + +/// Prints a line of `text` onto the document with `docID`, onto the `page`. +/// Does not line break +/// +/// @param docID document manager ID +/// @param page page index +/// @param text text to be printed +func void Doc_PrintLine(var int docID, var int page, var string text) {}; + +/// Prints a line of `text` onto the document with `docID`, onto the `page`. The `text` is automatically split into multiple lines +/// +/// @param docID document manager ID +/// @param page page index +/// @param text text to be printed +func void Doc_PrintLines(var int docID, var int page, var string text) {}; + +/// Sets a `font` to be used on a `page` in a document with `docID`. Can be called multiple times to diplay different lines with different fonts. +/// +/// @param docID document manager ID +/// @param page page index +/// @param font font to be used +func void Doc_SetFont(var int docID, var int page, var string font) {}; + +/// Sets the number of pages `numOfPages` of the document. +/// +/// @param docID document manager ID +/// @param numOfPages number of pages +func void Doc_SetPages(var int docID, var int numOfPages) {}; + +/// Set `page` to have `texture` as a background with `scale`. +/// +/// @param docID document manager ID +/// @param page page index, if set to `-1`, settings are applied to all pages +/// @param texture texture of the background +/// @param scale scale of the texture, if set to 1, there will be no resizing +func void Doc_SetPage(var int docID, var int page, var string texture, var int scale) {}; + +/// Set a world level to a map. +/// +/// @param docID document manager ID +/// @param level name of the ZEN file +func void Doc_SetLevel(var int docID, var string level) {}; + +/// Sets the map coordinates. +/// +/// @param docID document manager ID +/// @param left left +/// @param top top +/// @param right top +/// @param bottom bottom +func void Doc_SetLevelCoords(var int docID, var int left, var int top, var int right, var int bottom) {}; + +/// Sets text margins of the page +/// +/// @param docID document manager ID +/// @param page page index, if set to `-1`, settings are applied to all pages +/// @param left left margin +/// @param top top margin +/// @param right right margin +/// @param bottom bottom margin +/// @param pixels `TRUE` to use pixels, `FALSE` to use virtual coordinates +func void Doc_SetMargins(var int docID, + var int page, + var int left, + var int top, + var int right, + var int bottom, + var int pixels) {}; + +/// Display the document using the document manager ID +/// +/// @param docID document manager ID +func void Doc_Show(var int docID) {}; + + + +/// deprecated +func void Doc_Open (var string Texture) {}; + +/// deprecated +func void Doc_Font(var string Font) {}; + +/// deprecated +func void Doc_Print (var string Text) {}; + +/// deprecated +func void Doc_MapCoordinates(var string s0, + var float r1, + var float r2, + var float r3, + var float r4, + var float r5, + var float r6, + var float r7, + var float r8) {}; +``` + + diff --git a/docs/zengin/scripts/externals/externals.d b/docs/zengin/scripts/externals/externals.d new file mode 100644 index 0000000000..529fcb5b2f --- /dev/null +++ b/docs/zengin/scripts/externals/externals.d @@ -0,0 +1,353 @@ +func void AI_AimAt(var c_npc attacker, var c_npc target) {}; +func void AI_AlignToFP(var c_npc self) {}; +func void AI_AlignToWP(var c_npc self) {}; +func void AI_AskText(var c_npc self, var func funcyes, var func funcno, var string stryes, var string strno) {}; +func void AI_Ask(var c_npc self, var func anseryes, var func answerno) {}; +func void AI_Attack(var c_npc self) {}; +func void AI_CanSeeNpc(var instance n0, var instance n1, var func f2) {}; +func void AI_CombatReactToDamage(var instance n0) {}; +func void AI_ContinueRoutine(var c_npc self) {}; +func void AI_Defend(var c_npc self) {}; +func void AI_Dodge(var c_npc npc) {}; +func void AI_DrawWeapon(var c_npc n0) {}; +func void AI_DropItem(var c_npc self, var int itemid) {}; +func void AI_DropMob(var instance n0) {}; +func void AI_EquipArmor(var c_npc owner, var c_item armor_from_owners_inventory) {}; +func void AI_EquipBestArmor(var c_npc self) {}; +func void AI_EquipBestMeleeWeapon(var c_npc self) {}; +func void AI_EquipBestRangedWeapon(var c_npc self) {}; +func void AI_FinishingMove(var c_npc self, var c_npc other) {}; +func void AI_Flee(var c_npc self) {}; +func void AI_GotoFP(var c_npc self, var string fpname) {}; +func void AI_GotoItem(var c_npc self, var c_item item) {}; +func void AI_GotoNextFP(var c_npc self, var string fpname) {}; +func void AI_GotoNpc(var c_npc self, var c_npc other) {}; +func void AI_GotoSound(var c_npc n0) {}; +func void AI_GotoWP(var c_npc n0, var string s0) {}; +func void AI_LookAtNpc(var c_npc self, var c_npc other) {}; +func void AI_LookAt(var c_npc self, var string name) {}; +func void AI_LookForItem(var c_npc self, var int instance) {}; +func void AI_OutputSVM_Overlay(var c_npc self, var c_npc target, var string svmname) {}; +func void AI_OutputSVM(var c_npc self, var c_npc target, var string svmname) {}; +func void AI_Output(var c_npc self, var c_npc target, var string outputname) {}; +func void AI_PlayAniBS(var c_npc npc, var string aniname, var int bodystate) {}; +func void AI_PlayAni(var c_npc n0, var string s0) {}; +func void AI_PlayCutscene(var c_npc self, var string csname) {}; +func void AI_PlayFX(var instance n0, var instance n1, var string s2) {}; +func void AI_PointAtNpc(var c_npc self, var c_npc other) {}; +func void AI_PointAt(var c_npc self, var string name) {}; +func int AI_PrintScreen(var string s0, var int i1, var int i2, var string s3, var int i4) {}; +func void AI_ProcessInfos(var instance n0) {}; +func void AI_Quicklook(var c_npc self, var c_npc other) {}; +func void AI_QuickLook(var instance n0, var instance n1) {}; +func void AI_ReadyMeleeWeapon(var c_npc self) {}; +func void AI_ReadyRangedWeapon(var c_npc self) {}; +func void AI_ReadySpell(var c_npc self, var int spellid, var int investmana) {}; +func void AI_RemoveWeapon(var c_npc n0) {}; +func void AI_SetNpcsToState(var c_npc self, var func aistatefunc, var int radius) {}; +func void AI_SetWalkmode(var c_npc n, var int n0) {}; +func void AI_SetWalkMode(var instance n0, var int i1) {}; +func void AI_ShootAt(var c_npc attacker, var c_npc target) {}; +func void AI_Snd_Play(var instance n0, var string s1) {}; +func void AI_Snd_Play3D(var instance n0, var instance n1, var string s2) {}; +func void AI_StandUpQuick(var c_npc self) {}; +func void AI_StandUp(var c_npc self) {}; +func void AI_StartState(var c_npc self, var func what, var int statebehaviour, var string wpname) {}; +func void AI_StopAim(var c_npc attacker) {}; +func void AI_StopFX(var instance n0, var string s1) {}; +func void AI_StopLookAt(var c_npc self) {}; +func void AI_StopPointAt(var c_npc self) {}; +func void AI_StopProcessInfos(var c_npc npc) {}; +func void AI_TakeItem(var c_npc self, var c_item item) {}; +func void AI_TakeMob(var instance n0, var string s1) {}; +func void AI_Teleport(var c_npc self, var string waypoint) {}; +func void AI_TurnAway(var c_npc n0, var c_npc n1) {}; +func void AI_TurnToNpc(var c_npc n0, var c_npc n1) {}; +func void AI_TurnToSound(var c_npc self) {}; +func void AI_UnequipArmor(var c_npc self) {}; +func void AI_UnequipWeapons(var c_npc self) {}; +func void AI_UnreadySpell(var c_npc self) {}; +func void AI_UseItemToState(var c_npc self, var int iteminstance, var int state) {}; +func void AI_UseItem(var c_npc self, var int iteminstance) {}; +func int AI_UseMob(var c_npc self, var string schemename, var int targetstate) {}; +func void AI_WaitForQuestion(var c_npc self, var func scriptfunc) {}; +func void AI_WaitMS(var instance n0, var int i1) {}; +func void AI_WaitTillEnd(var c_npc self, var c_npc other) {}; +func void AI_Wait(var c_npc n0, var float n1) {}; +func void AI_WhirlAroundToSource(var instance n0) {}; +func void AI_WhirlAround(var c_npc self, var c_npc other) {}; +func void Apply_Options_Audio() {}; +func void Apply_Options_Controls() {}; +func void Apply_Options_Game() {}; +func void Apply_Options_Performance() {}; +func void Apply_Options_Video() {}; +func string ConcatStrings(var string str1, var string str2) {}; +func void CreateInvItems(var c_npc n0, var int n1, var int n2) {}; +func void CreateInvItem(var c_npc n0, var int n1) {}; + +func int Doc_Create() {}; +func int Doc_CreateMap() {}; +func void Doc_Font (var string Font) {}; +func void Doc_Font(var string s0) {}; +func void Doc_MapCoordinates (var string Level, var float GameX1, var float GameY1, var float PixelX1, var float PixelY1, var float GameX2, var float GameY2, var float PixelX2, var float PixelY2) {}; +func void Doc_MapCoordinates(var string s0, var float r1, var float r2, var float r3, var float r4, var float r5, var float r6, var float r7, var float r8) {}; +func void Doc_Open(var string s0) {}; +func void Doc_Open (var string Texture) {}; +func void Doc_PrintLines(var int document, var int page, var string text) {}; +func void Doc_PrintLine(var int document, var int page, var string text) {}; +func void Doc_Print(var string s0) {}; +func void Doc_Print (var string Text) {}; +func void Doc_SetFont(var int document, var int page, var string font) {}; +func void Doc_SetLevelCoords(var int document, var int left, var int top, var int right, var int bottom) {}; +func void Doc_SetLevel(var int document, var string level) {}; +func void Doc_SetMargins(var int document, var int page, var int left, var int top, var int right, var int bottom, var int pixels) {}; +func void Doc_SetPages(var int document, var int count) {}; +func void Doc_SetPage(var int document, var int page, var string texture, var int scale) {}; +func void Doc_Show(var int document) {}; + +func void EquipItem(var c_npc n0, var int n1) {}; +func void ExitGame() {}; +func void ExitSession() {}; +func int FloatToInt(var float x) {}; +func string FloatToString(var float r0) {}; +func void Game_InitEnglish() {}; +func void Game_InitGerman() {}; +func int Hlp_CutscenePlayed(var string csname) {}; +func int Hlp_GetInstanceID(var c_item item) {}; +func c_npc Hlp_GetNpc(var int instancename) {}; +func int Hlp_IsItem(var c_item item, var int instancename) {}; +func int Hlp_IsValidItem(var c_item item) {}; +func int Hlp_IsValidNpc(var c_npc self) {}; +func int Hlp_Random(var int n0) {}; +func int Hlp_StrCmp(var string s1, var string s2) {}; +func void Info_AddChoice(var int i0, var string s1, var func f2) {}; +func void Info_ClearChoices(var int i0) {}; +func int InfoManager_HasFinished() {}; +func void IntroduceChapter(var string titel, var string untertitel, var string texture, var string sound, var int waittime) {}; +func float IntToFloat(var int x) {}; +func string IntToString(var int x) {}; + +/// Creates a new log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param logSection [LOG_MISSION, LOG_NOTE] indicates in which section to create the topic in +func void Log_CreateTopic(var string topicName, var int logSection) {}; +/// Adds an entry to a log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param entry content of the new entry +func void Log_AddEntry(var string topicName, var string entry) {}; +/// Changes the status of the topic with the name `topicName` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param status [LOG_RUNNING, LOG_SUCCESS, LOG_FAILED, LOG_OBSOLETE] the status to be set +func void Log_SetTopicStatus(var string TopicName, var int status) {}; + +func void Mdl_ApplyOverlayMDSTimed(var c_npc self, var string overlayname, var float timeticks) {}; +func void Mdl_ApplyOverlayMdsTimed(var instance n0, var string s1, var int i2) {}; +func void Mdl_ApplyOverlayMds(var c_npc n0, var string s1) {}; +func void Mdl_ApplyOverlayMDS(var instance n0, var string s1) {}; +func void Mdl_ApplyRandomAniFreq(var c_npc n0, var string s1, var float f2) {}; +func void Mdl_ApplyRandomAni(var c_npc n0, var string s1, var string s2) {}; +func void Mdl_ApplyRandomFaceAni(var c_npc self, var string name, var float timemin, var float timeminvar, var float timemax, var float timemaxvar, var float probmin) {}; +func void Mdl_RemoveOverlayMDS(var c_npc self, var string overlayname) {}; +func void Mdl_SetModelFatness(var c_npc self, var float fatness) {}; +func void Mdl_SetModelScale(var c_npc self, var float x, var float y, var float z) {}; +func void Mdl_SetVisualBody(var instance n0, var string s1, var int i2, var int i3, var string s4, var int i5, var int i6, var int i7) {}; +func void Mdl_SetVisual(var instance n0, var string s1) {}; +func void Mdl_StartFaceAni(var c_npc self, var string name, var float intensity, var float holdtime) {}; + +func void Mis_AddMissionEntry(var instance n0, var string s1) {}; +func int Mis_GetStatus(var int missionname) {}; +func int Mis_OnTime(var int missionname) {}; +func void Mis_RemoveMission(var instance n0) {}; +func void Mis_SetStatus(var int missionname, var int newstatus) {}; +func void Mob_CreateItems(var string mobname, var int iteminstance, var int amount) {}; +func int Mob_HasItems(var string mobname, var int iteminstance) {}; +func int Npc_AreWeStronger(var c_npc self, var c_npc other) {}; +func int Npc_CanSeeItem(var c_npc npc1, var c_item item) {}; +func int Npc_CanSeeNpcFreeLOS(var c_npc self, var c_npc other) {}; +func int Npc_CanSeeNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_CanSeeSource(var c_npc self) {}; +func void Npc_ClearAIQueue(var c_npc self) {}; +func void Npc_ClearInventory(var instance n0) {}; +func void Npc_CreateSpell(var c_npc self, var int spellnr) {}; +func int Npc_DeleteNews(var instance n0, var int i1) {}; +func void Npc_ExchangeRoutine(var c_npc self, var string routinename) {}; +func int Npc_GetActiveSpellCat(var c_npc self) {}; +func int Npc_GetActiveSpellIsScroll(var instance n0) {}; +func int Npc_GetActiveSpellLevel(var c_npc self) {}; +func int Npc_GetActiveSpell(var c_npc self) {}; +func int Npc_GetAttitude(var c_npc self, var c_npc other) {}; +func int Npc_GetBodyState(var c_npc self) {}; +func int Npc_GetComrades(var instance n0) {}; +func string Npc_GetDetectedMob(var c_npc self) {}; +func int Npc_GetDistToItem(var c_npc npc, var c_item item) {}; +func int Npc_GetDistToNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_GetDistToPlayer(var c_npc npc1) {}; +func int Npc_GetDistToWP(var c_npc self, var string wpname) {}; +func c_item Npc_GetEquippedArmor(var c_npc n0) {}; +func c_item Npc_GetEquippedMeleeWeapon(var c_npc n0) {}; +func c_item Npc_GetEquippedRangedWeapon(var c_npc n0) {}; +func int Npc_GetGuildAttitude(var c_npc npc, var c_npc npc) {}; +func int Npc_GetHeightToItem(var instance n0, var instance n1) {}; +func int Npc_GetHeightToNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_GetInvItemBySlot(var c_npc self, var int category, var int slotnr) {}; +func c_item Npc_GetInvItem(var c_npc self, var int iteminstance) {}; +func int Npc_GetLastHitSpellCat(var c_npc self) {}; +func int Npc_GetLastHitSpellID(var c_npc self) {}; +func instance Npc_GetLookAtTarget(var instance n0) {}; +func string Npc_GetNearestWP(var c_npc self) {}; +func c_npc Npc_GetNewsOffender(var c_npc self, var int newsnumber) {}; +func c_npc Npc_GetNewsVictim(var c_npc self, var int newsnumber) {}; +func c_npc Npc_GetNewsWitness(var c_npc self, var int newsnumber) {}; +func int Npc_GetNextTarget(var c_npc self) {}; +func string Npc_GetNextWP(var c_npc self) {}; +func int Npc_GetPermAttitude(var c_npc self, var c_npc other) {}; +func int Npc_GetPortalGuild(var instance n0) {}; +func instance Npc_GetPortalOwner(var instance n0) {}; +func c_item Npc_GetReadiedWeapon(var c_npc n0) {}; +func int Npc_GetStateTime(var c_npc self) {}; +func int Npc_GetTalentSkill(var instance n0, var int i1) {}; +func int Npc_GetTalentValue(var instance n0, var int i1) {}; +func int Npc_GetTarget(var c_npc self) {}; +func int Npc_GetTrueGuild(var c_npc npc) {}; +func int NPC_GiveInfo(var c_npc npc, var int important) {}; +func int Npc_GiveInfo(var instance n0, var int i1) {}; +func void Npc_GiveItem(var c_npc n0, var c_item n1, var c_npc n2) {}; +func int Npc_HasBodyFlag(var c_npc self, var int bodyflag) {}; +func int Npc_HasDetectedNpc(var c_npc self, var c_npc other) {}; +func int Npc_HasEquippedArmor(var c_npc self) {}; +func int Npc_HasEquippedMeleeWeapon(var c_npc self) {}; +func int Npc_HasEquippedRangedWeapon(var c_npc self) {}; +func int Npc_HasEquippedWeapon(var c_npc self) {}; +func int Npc_HasFightTalent(var c_npc self, var int tal) {}; +func int Npc_HasItems(var c_npc n0, var int iteminstance) {}; +func int Npc_HasNews(var c_npc self, var int newsid, var c_npc offender, var c_npc victim) {}; +func int Npc_HasOffered(var c_npc self, var c_npc other, var int iteminstance) {}; +func int Npc_HasRangedWeaponWithAmmo(var c_npc npc) {}; +func int Npc_HasReadiedMeleeWeapon(var c_npc self) {}; +func int Npc_HasReadiedRangedWeapon(var c_npc self) {}; +func int Npc_HasReadiedWeapon(var c_npc self) {}; +func int Npc_HasSpell(var c_npc self, var int spellid) {}; +func int Npc_HasTalent(var c_npc self, var int tal) {}; +func void Npc_ChangeAttribute(var c_npc self, var int atr, var int value) {}; +func int Npc_CheckAvailableMission(var c_npc npc, var int missionstate, var int important) {}; +func int Npc_CheckInfo(var c_npc npc, var int important) {}; +func int Npc_CheckOfferMission(var c_npc npc, var int important) {}; +func int Npc_CheckRunningMission(var c_npc npc, var int important) {}; +func int Npc_IsAiming(var c_npc self, var c_npc other) {}; +func int Npc_IsDead(var c_npc n0) {}; +func int Npc_IsDetectedMobOwnedByGuild(var c_npc user, var int ownerguild) {}; +func int Npc_IsDetectedMobOwnedByNpc(var c_npc user, var c_npc owner) {}; +func int Npc_IsDrawingSpell(var instance n0) {}; +func int Npc_IsDrawingWeapon(var instance n0) {}; +func int Npc_IsInCutscene(var c_npc self) {}; +func int Npc_IsInFightMode(var c_npc self, var int fmode) {}; +func int Npc_IsInPlayersRoom(var instance n0) {}; +func int Npc_IsInRoutine(var c_npc self, var func state) {}; +func int Npc_IsInState(var c_npc self, var func state) {}; +func int Npc_IsNear(var c_npc self, var c_npc other) {}; +func int Npc_IsNewsGossip(var c_npc self, var int newsnumber) {}; +func int Npc_IsNextTargetAvailable(var c_npc self) {}; +func int Npc_IsOnFP(var c_npc self, var string name) {}; +func int Npc_IsPlayerInMyRoom(var c_npc npc) {}; +func int Npc_IsPlayer(var c_npc player) {}; +func int Npc_IsVoiceActive(var instance n0) {}; +func int Npc_IsWayBlocked(var c_npc self) {}; +func int Npc_KnowsInfo(var c_npc self, var int infoinstance) {}; +func int Npc_KnowsPlayer(var c_npc self, var c_npc player) {}; +func void Npc_LearnSpell(var c_npc self, var int spellnr) {}; +func void Npc_MemoryEntryGuild(var c_npc self, var int source, var c_npc offender, var int newsid, var c_npc victimguild) {}; +func void Npc_MemoryEntry(var c_npc self, var int source, var c_npc offender, var int newsid, var c_npc victim) {}; +func int Npc_OwnedByGuild(var c_item item, var int guild) {}; +func int Npc_OwnedByNpc(var c_item item, var c_npc npc) {}; +func void Npc_PercDisable(var c_npc self, var int percid) {}; +func void Npc_PerceiveAll(var c_npc self) {}; +func void Npc_PercEnable(var c_npc self, var int percid, var func function) {}; +func void Npc_PlayAni(var instance n0, var string s1) {}; +func int Npc_RefuseTalk(var c_npc self) {}; +func void Npc_RemoveInvItems(var c_npc owner, var int iteminstance, var int amount) {}; +func void Npc_RemoveInvItem(var c_npc owner, var int iteminstance) {}; +func void Npc_SendPassivePerc(var c_npc npc1, var int perc_type, var c_npc npc2, var c_npc npc3) {}; +func void Npc_SendSinglePerc(var c_npc self, var c_npc target, var int percid) {}; +func int Npc_SetActiveSpellInfo(var c_npc npc, var int i1) {}; +func void Npc_SetAttitude(var c_npc self, var int att) {}; +func void Npc_SetKnowsPlayer(var c_npc self, var c_npc player) {}; +func void Npc_SetPercTime(var c_npc self, var float seconds) {}; +func void Npc_SetRefuseTalk(var c_npc self, var int timesec) {}; +func void Npc_SetStateTime(var c_npc self, var int seconds) {}; +func void Npc_SetTalentSkill(var instance n0, var int i1, var int i2) {}; +func void Npc_SetTalentValue(var instance n0, var int i1, var int i2) {}; +func void Npc_SetTarget(var c_npc self, var c_npc other) {}; +func void Npc_SetTeleportPos(var c_npc self) {}; +func void Npc_SetTempAttitude(var c_npc self, var int att) {}; +func void Npc_SetToFightMode(var c_npc self, var int weapon) {}; +func void Npc_SetToFistMode(var c_npc self) {}; +func int Npc_SetTrueGuild(var c_npc npc, var int guildid) {}; +func int Npc_StartItemReactModules(var c_npc self, var c_npc other, var c_item item) {}; +func void Npc_StopAni(var instance n0, var string s1) {}; +func int Npc_WasInState(var c_npc self, var func state) {}; +func int Npc_WasPlayerInMyRoom(var c_npc npc) {}; +func void Perc_SetRange(var int percid, var int range) {}; +func int PlayVideoEx(var string filename, var int screenblend, var int exitsession) {}; +func int PlayVideo(var string filename) {}; +func void PrintDebugCh(var int ch, var string text) {}; +func void PrintDebugInstCh(var int ch, var string text) {}; +func void PrintDebugInst(var string text) {}; +func void PrintDebug(var string s) {}; +func int PrintDialog(var int i0, var string s1, var int i2, var int i3, var string s4, var int i5) {}; +func void PrintMulti(var string s0, var string s1, var string s2, var string s3, var string s4) {}; +func void PrintScreen(var string msg, var int posx, var int posy, var string font, var int timesec) {}; +func void Print(var string s0) {}; +func void Rtn_Exchange(var string oldroutine, var string newroutine) {}; +func void SetPercentDone(var int percentdone) {}; +func int Snd_GetDistToSource(var c_npc self) {}; +func int Snd_IsSourceItem(var c_npc self) {}; +func int Snd_IsSourceNpc(var c_npc self) {}; +func void Snd_Play(var string s0) {}; +func void Snd_Play3D(var c_npc n0, var string s1) {}; +func void TA_BeginOverlay(var c_npc self) {}; +func void TA_CS(var c_npc self, var string csname, var string rolename) {}; +func void TA_EndOverlay(var c_npc self) {}; +func void Tal_Configure(var int i0, var int i1) {}; +func void TA_Min(var c_npc self, var int start_h, var int start_m, var int stop_h, var int stop_m, var func state, var string waypoint) {}; +func void TA_RemoveOverlay(var c_npc self) {}; +func void TA(var c_npc self, var int start_h, var int stop_h, var func state, var string waypoint) {}; +func void Update_ChoiceBox(var string s0) {}; +func void Wld_AssignRoomToGuild(var string s0, var int guild) {}; +func void Wld_AssignRoomToNpc(var string s0, var c_npc roomowner) {}; +func int Wld_DetectItem(var c_npc self, var int flags) {}; +func int Wld_DetectNpcExAtt(var instance n0, var int i1, var func f2, var int i3, var int i4, var int i5) {}; +func int Wld_DetectNpcEx(var instance n0, var int i1, var func f2, var int i3, var int i4) {}; +func int Wld_DetectNpc(var c_npc self, var int instance, var func aistate, var int guild) {}; +func int Wld_DetectPlayer(var c_npc self) {}; +func void Wld_ExchangeGuildAttitudes(var string name) {}; +func int Wld_GetDay() {}; +func int Wld_GetFormerPlayerPortalGuild() {}; +func c_npc Wld_GetFormerPlayerPortalOwner() {}; +func int Wld_GetGuildAttitude(var int guild1, var int guild2) {}; +func int Wld_GetMobState(var c_npc self, var string schemename) {}; +func int Wld_GetPlayerPortalGuild() {}; +func c_npc Wld_GetPlayerPortalOwner() {}; +func void Wld_InsertItem(var int iteminstance, var string spawnpoint) {}; +func void Wld_InsertNpcAndRespawn(var int instance, var string spawnpoint, var float spawndelay) {}; +func void Wld_InsertNpc(var int npcinstance, var string spawnpoint) {}; +func void Wld_InsertObject(var string s0, var string s1) {}; +func int Wld_IsFPAvailable(var c_npc self, var string fpname) {}; +func int Wld_IsFpAvailable(var instance n0, var string s1) {}; +func int Wld_IsMobAvailable(var c_npc self, var string schemename) {}; +func int Wld_IsNextFPAvailable(var c_npc self, var string fpname) {}; +func int Wld_IsNextFpAvailable(var instance n0, var string s1) {}; +func int Wld_IsRaining() {}; +func int Wld_IsTime(var int hour1, var int min1, var int hour2, var int min2) {}; +func void Wld_PlayEffect(var string effectinstance, var int originvob, var int targetvob, var int effectlevel, var int damage, var int damagetype, var int bisprojectile) {}; +func int Wld_RemoveItem(var c_item item) {}; +func void Wld_RemoveNpc(var int i0) {}; +func void Wld_SendTrigger(var string vobname) {}; +func void Wld_SendUntrigger(var string vobname) {}; +func void Wld_SetGuildAttitude(var int guild1, var int attitude, var int guild2) {}; +func void Wld_SetMobRoutine(var int hour1, var int min1, var string objname, var int state) {}; +func void Wld_SetObjectRoutine(var int hour1, var int min1, var string objname, var int state) {}; +func void Wld_SetTime(var int hour, var int min) {}; +func void Wld_SpawnNpcRange(var instance n0, var int i1, var int i2, var float r3) {}; diff --git a/docs/zengin/scripts/externals/externals_clean.d b/docs/zengin/scripts/externals/externals_clean.d new file mode 100644 index 0000000000..1591d52b6f --- /dev/null +++ b/docs/zengin/scripts/externals/externals_clean.d @@ -0,0 +1,350 @@ +func void AI_AimAt(var c_npc attacker, var c_npc target) {}; +func void AI_AlignToFP(var c_npc self) {}; +func void AI_AlignToWP(var c_npc self) {}; +func void AI_AskText(var c_npc self, var func funcyes, var func funcno, var string stryes, var string strno) {}; +func void AI_Ask(var c_npc self, var func anseryes, var func answerno) {}; +func void AI_Attack(var c_npc self) {}; +func void AI_CanSeeNpc(var instance n0, var instance n1, var func f2) {}; +func void AI_CombatReactToDamage(var instance n0) {}; +func void AI_ContinueRoutine(var c_npc self) {}; +func void AI_Defend(var c_npc self) {}; +func void AI_Dodge(var c_npc npc) {}; +func void AI_DrawWeapon(var c_npc n0) {}; +func void AI_DropItem(var c_npc self, var int itemid) {}; +func void AI_DropMob(var instance n0) {}; +func void AI_EquipArmor(var c_npc owner, var c_item armor_from_owners_inventory) {}; +func void AI_EquipBestArmor(var c_npc self) {}; +func void AI_EquipBestMeleeWeapon(var c_npc self) {}; +func void AI_EquipBestRangedWeapon(var c_npc self) {}; +func void AI_FinishingMove(var c_npc self, var c_npc other) {}; +func void AI_Flee(var c_npc self) {}; +func void AI_GotoFP(var c_npc self, var string fpname) {}; +func void AI_GotoItem(var c_npc self, var c_item item) {}; +func void AI_GotoNextFP(var c_npc self, var string fpname) {}; +func void AI_GotoNpc(var c_npc self, var c_npc other) {}; +func void AI_GotoSound(var c_npc n0) {}; +func void AI_GotoWP(var c_npc n0, var string s0) {}; +func void AI_LookAtNpc(var c_npc self, var c_npc other) {}; +func void AI_LookAt(var c_npc self, var string name) {}; +func void AI_LookForItem(var c_npc self, var int instance) {}; +func void AI_OutputSVM_Overlay(var c_npc self, var c_npc target, var string svmname) {}; +func void AI_OutputSVM(var c_npc self, var c_npc target, var string svmname) {}; +func void AI_Output(var c_npc self, var c_npc target, var string outputname) {}; +func void AI_PlayAniBS(var c_npc npc, var string aniname, var int bodystate) {}; +func void AI_PlayAni(var c_npc n0, var string s0) {}; +func void AI_PlayCutscene(var c_npc self, var string csname) {}; +func void AI_PlayFX(var instance n0, var instance n1, var string s2) {}; +func void AI_PointAtNpc(var c_npc self, var c_npc other) {}; +func void AI_PointAt(var c_npc self, var string name) {}; +func int AI_PrintScreen(var string s0, var int i1, var int i2, var string s3, var int i4) {}; +func void AI_ProcessInfos(var instance n0) {}; +func void AI_Quicklook(var c_npc self, var c_npc other) {}; +func void AI_QuickLook(var instance n0, var instance n1) {}; +func void AI_ReadyMeleeWeapon(var c_npc self) {}; +func void AI_ReadyRangedWeapon(var c_npc self) {}; +func void AI_ReadySpell(var c_npc self, var int spellid, var int investmana) {}; +func void AI_RemoveWeapon(var c_npc n0) {}; +func void AI_SetNpcsToState(var c_npc self, var func aistatefunc, var int radius) {}; +func void AI_SetWalkmode(var c_npc n, var int n0) {}; +func void AI_SetWalkMode(var instance n0, var int i1) {}; +func void AI_ShootAt(var c_npc attacker, var c_npc target) {}; +func void AI_Snd_Play(var instance n0, var string s1) {}; +func void AI_Snd_Play3D(var instance n0, var instance n1, var string s2) {}; +func void AI_StandUpQuick(var c_npc self) {}; +func void AI_StandUp(var c_npc self) {}; +func void AI_StartState(var c_npc self, var func what, var int statebehaviour, var string wpname) {}; +func void AI_StopAim(var c_npc attacker) {}; +func void AI_StopFX(var instance n0, var string s1) {}; +func void AI_StopLookAt(var c_npc self) {}; +func void AI_StopPointAt(var c_npc self) {}; +func void AI_StopProcessInfos(var c_npc npc) {}; +func void AI_TakeItem(var c_npc self, var c_item item) {}; +func void AI_TakeMob(var instance n0, var string s1) {}; +func void AI_Teleport(var c_npc self, var string waypoint) {}; +func void AI_TurnAway(var c_npc n0, var c_npc n1) {}; +func void AI_TurnToNpc(var c_npc n0, var c_npc n1) {}; +func void AI_TurnToSound(var c_npc self) {}; +func void AI_UnequipArmor(var c_npc self) {}; +func void AI_UnequipWeapons(var c_npc self) {}; +func void AI_UnreadySpell(var c_npc self) {}; +func void AI_UseItemToState(var c_npc self, var int iteminstance, var int state) {}; +func void AI_UseItem(var c_npc self, var int iteminstance) {}; +func int AI_UseMob(var c_npc self, var string schemename, var int targetstate) {}; +func void AI_WaitForQuestion(var c_npc self, var func scriptfunc) {}; +func void AI_WaitMS(var instance n0, var int i1) {}; +func void AI_WaitTillEnd(var c_npc self, var c_npc other) {}; +func void AI_Wait(var c_npc n0, var float n1) {}; +func void AI_WhirlAroundToSource(var instance n0) {}; +func void AI_WhirlAround(var c_npc self, var c_npc other) {}; +func void Apply_Options_Audio() {}; +func void Apply_Options_Controls() {}; +func void Apply_Options_Game() {}; +func void Apply_Options_Performance() {}; +func void Apply_Options_Video() {}; +func string ConcatStrings(var string str1, var string str2) {}; +func void CreateInvItems(var c_npc n0, var int n1, var int n2) {}; +func void CreateInvItem(var c_npc n0, var int n1) {}; +func int Doc_Create() {}; +func int Doc_CreateMap() {}; +func void Doc_Font (var string Font) {}; +func void Doc_Font(var string s0) {}; +func void Doc_MapCoordinates (var string Level, var float GameX1, var float GameY1, var float PixelX1, var float PixelY1, var float GameX2, var float GameY2, var float PixelX2, var float PixelY2) {}; +func void Doc_MapCoordinates(var string s0, var float r1, var float r2, var float r3, var float r4, var float r5, var float r6, var float r7, var float r8) {}; +func void Doc_Open(var string s0) {}; +func void Doc_Open (var string Texture) {}; +func void Doc_PrintLines(var int document, var int page, var string text) {}; +func void Doc_PrintLine(var int document, var int page, var string text) {}; +func void Doc_Print(var string s0) {}; +func void Doc_Print (var string Text) {}; +func void Doc_SetFont(var int document, var int page, var string font) {}; +func void Doc_SetLevelCoords(var int document, var int left, var int top, var int right, var int bottom) {}; +func void Doc_SetLevel(var int document, var string level) {}; +func void Doc_SetMargins(var int document, var int page, var int left, var int top, var int right, var int bottom, var int pixels) {}; +func void Doc_SetPages(var int document, var int count) {}; +func void Doc_SetPage(var int document, var int page, var string texture, var int scale) {}; +func void Doc_Show(var int document) {}; +func void EquipItem(var c_npc n0, var int n1) {}; +func void ExitGame() {}; +func void ExitSession() {}; +func int FloatToInt(var float x) {}; +func string FloatToString(var float r0) {}; +func void Game_InitEnglish() {}; +func void Game_InitGerman() {}; +func int Hlp_CutscenePlayed(var string csname) {}; +func int Hlp_GetInstanceID(var c_item item) {}; +func c_npc Hlp_GetNpc(var int instancename) {}; +func int Hlp_IsItem(var c_item item, var int instancename) {}; +func int Hlp_IsValidItem(var c_item item) {}; +func int Hlp_IsValidNpc(var c_npc self) {}; +func int Hlp_Random(var int n0) {}; +func int Hlp_StrCmp(var string s1, var string s2) {}; +func void Info_AddChoice(var int i0, var string s1, var func f2) {}; +func void Info_ClearChoices(var int i0) {}; +func int InfoManager_HasFinished() {}; +func void IntroduceChapter(var string titel, var string untertitel, var string texture, var string sound, var int waittime) {}; +func float IntToFloat(var int x) {}; +func string IntToString(var int x) {}; + +/// Creates a new log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param logSection [LOG_MISSION, LOG_NOTE] indicates in which section to create the topic in +func void Log_CreateTopic(var string topicName, var int logSection) {}; +/// Adds an entry to a log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param entry content of the new entry +func void Log_AddEntry(var string topicName, var string entry) {}; +/// Changes the status of the topic with the name `topicName` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param status [LOG_RUNNING, LOG_SUCCESS, LOG_FAILED, LOG_OBSOLETE] the status to be set +func void Log_SetTopicStatus(var string TopicName, var int status) {}; + +func void Mdl_ApplyOverlayMDSTimed(var c_npc self, var string overlayname, var float timeticks) {}; +func void Mdl_ApplyOverlayMdsTimed(var instance n0, var string s1, var int i2) {}; +func void Mdl_ApplyOverlayMds(var c_npc n0, var string s1) {}; +func void Mdl_ApplyOverlayMDS(var instance n0, var string s1) {}; +func void Mdl_ApplyRandomAniFreq(var c_npc n0, var string s1, var float f2) {}; +func void Mdl_ApplyRandomAni(var c_npc n0, var string s1, var string s2) {}; +func void Mdl_ApplyRandomFaceAni(var c_npc self, var string name, var float timemin, var float timeminvar, var float timemax, var float timemaxvar, var float probmin) {}; +func void Mdl_RemoveOverlayMDS(var c_npc self, var string overlayname) {}; +func void Mdl_SetModelFatness(var c_npc self, var float fatness) {}; +func void Mdl_SetModelScale(var c_npc self, var float x, var float y, var float z) {}; +func void Mdl_SetVisualBody(var instance n0, var string s1, var int i2, var int i3, var string s4, var int i5, var int i6, var int i7) {}; +func void Mdl_SetVisual(var instance n0, var string s1) {}; +func void Mdl_StartFaceAni(var c_npc self, var string name, var float intensity, var float holdtime) {}; +func void Mis_AddMissionEntry(var instance n0, var string s1) {}; +func int Mis_GetStatus(var int missionname) {}; +func int Mis_OnTime(var int missionname) {}; +func void Mis_RemoveMission(var instance n0) {}; +func void Mis_SetStatus(var int missionname, var int newstatus) {}; +func void Mob_CreateItems(var string mobname, var int iteminstance, var int amount) {}; +func int Mob_HasItems(var string mobname, var int iteminstance) {}; +func int Npc_AreWeStronger(var c_npc self, var c_npc other) {}; +func int Npc_CanSeeItem(var c_npc npc1, var c_item item) {}; +func int Npc_CanSeeNpcFreeLOS(var c_npc self, var c_npc other) {}; +func int Npc_CanSeeNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_CanSeeSource(var c_npc self) {}; +func void Npc_ClearAIQueue(var c_npc self) {}; +func void Npc_ClearInventory(var instance n0) {}; +func void Npc_CreateSpell(var c_npc self, var int spellnr) {}; +func int Npc_DeleteNews(var instance n0, var int i1) {}; +func void Npc_ExchangeRoutine(var c_npc self, var string routinename) {}; +func int Npc_GetActiveSpellCat(var c_npc self) {}; +func int Npc_GetActiveSpellIsScroll(var instance n0) {}; +func int Npc_GetActiveSpellLevel(var c_npc self) {}; +func int Npc_GetActiveSpell(var c_npc self) {}; +func int Npc_GetAttitude(var c_npc self, var c_npc other) {}; +func int Npc_GetBodyState(var c_npc self) {}; +func int Npc_GetComrades(var instance n0) {}; +func string Npc_GetDetectedMob(var c_npc self) {}; +func int Npc_GetDistToItem(var c_npc npc, var c_item item) {}; +func int Npc_GetDistToNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_GetDistToPlayer(var c_npc npc1) {}; +func int Npc_GetDistToWP(var c_npc self, var string wpname) {}; +func c_item Npc_GetEquippedArmor(var c_npc n0) {}; +func c_item Npc_GetEquippedMeleeWeapon(var c_npc n0) {}; +func c_item Npc_GetEquippedRangedWeapon(var c_npc n0) {}; +func int Npc_GetGuildAttitude(var c_npc npc, var c_npc npc) {}; +func int Npc_GetHeightToItem(var instance n0, var instance n1) {}; +func int Npc_GetHeightToNpc(var c_npc npc1, var c_npc npc2) {}; +func int Npc_GetInvItemBySlot(var c_npc self, var int category, var int slotnr) {}; +func c_item Npc_GetInvItem(var c_npc self, var int iteminstance) {}; +func int Npc_GetLastHitSpellCat(var c_npc self) {}; +func int Npc_GetLastHitSpellID(var c_npc self) {}; +func instance Npc_GetLookAtTarget(var instance n0) {}; +func string Npc_GetNearestWP(var c_npc self) {}; +func c_npc Npc_GetNewsOffender(var c_npc self, var int newsnumber) {}; +func c_npc Npc_GetNewsVictim(var c_npc self, var int newsnumber) {}; +func c_npc Npc_GetNewsWitness(var c_npc self, var int newsnumber) {}; +func int Npc_GetNextTarget(var c_npc self) {}; +func string Npc_GetNextWP(var c_npc self) {}; +func int Npc_GetPermAttitude(var c_npc self, var c_npc other) {}; +func int Npc_GetPortalGuild(var instance n0) {}; +func instance Npc_GetPortalOwner(var instance n0) {}; +func c_item Npc_GetReadiedWeapon(var c_npc n0) {}; +func int Npc_GetStateTime(var c_npc self) {}; +func int Npc_GetTalentSkill(var instance n0, var int i1) {}; +func int Npc_GetTalentValue(var instance n0, var int i1) {}; +func int Npc_GetTarget(var c_npc self) {}; +func int Npc_GetTrueGuild(var c_npc npc) {}; +func int NPC_GiveInfo(var c_npc npc, var int important) {}; +func int Npc_GiveInfo(var instance n0, var int i1) {}; +func void Npc_GiveItem(var c_npc n0, var c_item n1, var c_npc n2) {}; +func int Npc_HasBodyFlag(var c_npc self, var int bodyflag) {}; +func int Npc_HasDetectedNpc(var c_npc self, var c_npc other) {}; +func int Npc_HasEquippedArmor(var c_npc self) {}; +func int Npc_HasEquippedMeleeWeapon(var c_npc self) {}; +func int Npc_HasEquippedRangedWeapon(var c_npc self) {}; +func int Npc_HasEquippedWeapon(var c_npc self) {}; +func int Npc_HasFightTalent(var c_npc self, var int tal) {}; +func int Npc_HasItems(var c_npc n0, var int iteminstance) {}; +func int Npc_HasNews(var c_npc self, var int newsid, var c_npc offender, var c_npc victim) {}; +func int Npc_HasOffered(var c_npc self, var c_npc other, var int iteminstance) {}; +func int Npc_HasRangedWeaponWithAmmo(var c_npc npc) {}; +func int Npc_HasReadiedMeleeWeapon(var c_npc self) {}; +func int Npc_HasReadiedRangedWeapon(var c_npc self) {}; +func int Npc_HasReadiedWeapon(var c_npc self) {}; +func int Npc_HasSpell(var c_npc self, var int spellid) {}; +func int Npc_HasTalent(var c_npc self, var int tal) {}; +func void Npc_ChangeAttribute(var c_npc self, var int atr, var int value) {}; +func int Npc_CheckAvailableMission(var c_npc npc, var int missionstate, var int important) {}; +func int Npc_CheckInfo(var c_npc npc, var int important) {}; +func int Npc_CheckOfferMission(var c_npc npc, var int important) {}; +func int Npc_CheckRunningMission(var c_npc npc, var int important) {}; +func int Npc_IsAiming(var c_npc self, var c_npc other) {}; +func int Npc_IsDead(var c_npc n0) {}; +func int Npc_IsDetectedMobOwnedByGuild(var c_npc user, var int ownerguild) {}; +func int Npc_IsDetectedMobOwnedByNpc(var c_npc user, var c_npc owner) {}; +func int Npc_IsDrawingSpell(var instance n0) {}; +func int Npc_IsDrawingWeapon(var instance n0) {}; +func int Npc_IsInCutscene(var c_npc self) {}; +func int Npc_IsInFightMode(var c_npc self, var int fmode) {}; +func int Npc_IsInPlayersRoom(var instance n0) {}; +func int Npc_IsInRoutine(var c_npc self, var func state) {}; +func int Npc_IsInState(var c_npc self, var func state) {}; +func int Npc_IsNear(var c_npc self, var c_npc other) {}; +func int Npc_IsNewsGossip(var c_npc self, var int newsnumber) {}; +func int Npc_IsNextTargetAvailable(var c_npc self) {}; +func int Npc_IsOnFP(var c_npc self, var string name) {}; +func int Npc_IsPlayerInMyRoom(var c_npc npc) {}; +func int Npc_IsPlayer(var c_npc player) {}; +func int Npc_IsVoiceActive(var instance n0) {}; +func int Npc_IsWayBlocked(var c_npc self) {}; +func int Npc_KnowsInfo(var c_npc self, var int infoinstance) {}; +func int Npc_KnowsPlayer(var c_npc self, var c_npc player) {}; +func void Npc_LearnSpell(var c_npc self, var int spellnr) {}; +func void Npc_MemoryEntryGuild(var c_npc self, var int source, var c_npc offender, var int newsid, var c_npc victimguild) {}; +func void Npc_MemoryEntry(var c_npc self, var int source, var c_npc offender, var int newsid, var c_npc victim) {}; +func int Npc_OwnedByGuild(var c_item item, var int guild) {}; +func int Npc_OwnedByNpc(var c_item item, var c_npc npc) {}; +func void Npc_PercDisable(var c_npc self, var int percid) {}; +func void Npc_PerceiveAll(var c_npc self) {}; +func void Npc_PercEnable(var c_npc self, var int percid, var func function) {}; +func void Npc_PlayAni(var instance n0, var string s1) {}; +func int Npc_RefuseTalk(var c_npc self) {}; +func void Npc_RemoveInvItems(var c_npc owner, var int iteminstance, var int amount) {}; +func void Npc_RemoveInvItem(var c_npc owner, var int iteminstance) {}; +func void Npc_SendPassivePerc(var c_npc npc1, var int perc_type, var c_npc npc2, var c_npc npc3) {}; +func void Npc_SendSinglePerc(var c_npc self, var c_npc target, var int percid) {}; +func int Npc_SetActiveSpellInfo(var c_npc npc, var int i1) {}; +func void Npc_SetAttitude(var c_npc self, var int att) {}; +func void Npc_SetKnowsPlayer(var c_npc self, var c_npc player) {}; +func void Npc_SetPercTime(var c_npc self, var float seconds) {}; +func void Npc_SetRefuseTalk(var c_npc self, var int timesec) {}; +func void Npc_SetStateTime(var c_npc self, var int seconds) {}; +func void Npc_SetTalentSkill(var instance n0, var int i1, var int i2) {}; +func void Npc_SetTalentValue(var instance n0, var int i1, var int i2) {}; +func void Npc_SetTarget(var c_npc self, var c_npc other) {}; +func void Npc_SetTeleportPos(var c_npc self) {}; +func void Npc_SetTempAttitude(var c_npc self, var int att) {}; +func void Npc_SetToFightMode(var c_npc self, var int weapon) {}; +func void Npc_SetToFistMode(var c_npc self) {}; +func int Npc_SetTrueGuild(var c_npc npc, var int guildid) {}; +func int Npc_StartItemReactModules(var c_npc self, var c_npc other, var c_item item) {}; +func void Npc_StopAni(var instance n0, var string s1) {}; +func int Npc_WasInState(var c_npc self, var func state) {}; +func int Npc_WasPlayerInMyRoom(var c_npc npc) {}; +func void Perc_SetRange(var int percid, var int range) {}; +func int PlayVideoEx(var string filename, var int screenblend, var int exitsession) {}; +func int PlayVideo(var string filename) {}; +func void PrintDebugCh(var int ch, var string text) {}; +func void PrintDebugInstCh(var int ch, var string text) {}; +func void PrintDebugInst(var string text) {}; +func void PrintDebug(var string s) {}; +func int PrintDialog(var int i0, var string s1, var int i2, var int i3, var string s4, var int i5) {}; +func void PrintMulti(var string s0, var string s1, var string s2, var string s3, var string s4) {}; +func void PrintScreen(var string msg, var int posx, var int posy, var string font, var int timesec) {}; +func void Print(var string s0) {}; +func void Rtn_Exchange(var string oldroutine, var string newroutine) {}; +func void SetPercentDone(var int percentdone) {}; +func int Snd_GetDistToSource(var c_npc self) {}; +func int Snd_IsSourceItem(var c_npc self) {}; +func int Snd_IsSourceNpc(var c_npc self) {}; +func void Snd_Play(var string s0) {}; +func void Snd_Play3D(var c_npc n0, var string s1) {}; +func void TA_BeginOverlay(var c_npc self) {}; +func void TA_CS(var c_npc self, var string csname, var string rolename) {}; +func void TA_EndOverlay(var c_npc self) {}; +func void Tal_Configure(var int i0, var int i1) {}; +func void TA_Min(var c_npc self, var int start_h, var int start_m, var int stop_h, var int stop_m, var func state, var string waypoint) {}; +func void TA_RemoveOverlay(var c_npc self) {}; +func void TA(var c_npc self, var int start_h, var int stop_h, var func state, var string waypoint) {}; +func void Update_ChoiceBox(var string s0) {}; +func void Wld_AssignRoomToGuild(var string s0, var int guild) {}; +func void Wld_AssignRoomToNpc(var string s0, var c_npc roomowner) {}; +func int Wld_DetectItem(var c_npc self, var int flags) {}; +func int Wld_DetectNpcExAtt(var instance n0, var int i1, var func f2, var int i3, var int i4, var int i5) {}; +func int Wld_DetectNpcEx(var instance n0, var int i1, var func f2, var int i3, var int i4) {}; +func int Wld_DetectNpc(var c_npc self, var int instance, var func aistate, var int guild) {}; +func int Wld_DetectPlayer(var c_npc self) {}; +func void Wld_ExchangeGuildAttitudes(var string name) {}; +func int Wld_GetDay() {}; +func int Wld_GetFormerPlayerPortalGuild() {}; +func c_npc Wld_GetFormerPlayerPortalOwner() {}; +func int Wld_GetGuildAttitude(var int guild1, var int guild2) {}; +func int Wld_GetMobState(var c_npc self, var string schemename) {}; +func int Wld_GetPlayerPortalGuild() {}; +func c_npc Wld_GetPlayerPortalOwner() {}; +func void Wld_InsertItem(var int iteminstance, var string spawnpoint) {}; +func void Wld_InsertNpcAndRespawn(var int instance, var string spawnpoint, var float spawndelay) {}; +func void Wld_InsertNpc(var int npcinstance, var string spawnpoint) {}; +func void Wld_InsertObject(var string s0, var string s1) {}; +func int Wld_IsFPAvailable(var c_npc self, var string fpname) {}; +func int Wld_IsFpAvailable(var instance n0, var string s1) {}; +func int Wld_IsMobAvailable(var c_npc self, var string schemename) {}; +func int Wld_IsNextFPAvailable(var c_npc self, var string fpname) {}; +func int Wld_IsNextFpAvailable(var instance n0, var string s1) {}; +func int Wld_IsRaining() {}; +func int Wld_IsTime(var int hour1, var int min1, var int hour2, var int min2) {}; +func void Wld_PlayEffect(var string effectinstance, var int originvob, var int targetvob, var int effectlevel, var int damage, var int damagetype, var int bisprojectile) {}; +func int Wld_RemoveItem(var c_item item) {}; +func void Wld_RemoveNpc(var int i0) {}; +func void Wld_SendTrigger(var string vobname) {}; +func void Wld_SendUntrigger(var string vobname) {}; +func void Wld_SetGuildAttitude(var int guild1, var int attitude, var int guild2) {}; +func void Wld_SetMobRoutine(var int hour1, var int min1, var string objname, var int state) {}; +func void Wld_SetObjectRoutine(var int hour1, var int min1, var string objname, var int state) {}; +func void Wld_SetTime(var int hour, var int min) {}; +func void Wld_SpawnNpcRange(var instance n0, var int i1, var int i2, var float r3) {}; diff --git a/docs/zengin/scripts/externals/index.md b/docs/zengin/scripts/externals/index.md new file mode 100644 index 0000000000..173b2a37d8 --- /dev/null +++ b/docs/zengin/scripts/externals/index.md @@ -0,0 +1,3 @@ +# Externals +External functions are Daedalus functions (defined in the engine itself), that are used to interface with the engine. Gothic 1 and Gothic 2 implements slightly different set of external functions. +There are some external functions, that were used in the course of Gothics development, but are now obsolete/deprecated because the underlying systems implemented in the engine were either turned off, or broken all together. diff --git a/docs/zengin/scripts/externals/log.md b/docs/zengin/scripts/externals/log.md new file mode 100644 index 0000000000..7bdc1d34e0 --- /dev/null +++ b/docs/zengin/scripts/externals/log.md @@ -0,0 +1,80 @@ +--- +title: Log functions +--- +# Log external functions +Log externals are used to manipulate players log and to track quest progress. + + +## Log_CreateTopic +Creates a new log topic with the name `topicName` under the section `logSection` + +```dae +func void Log_CreateTopic(var string topicName, var int logSection) {}; +``` + +- `topicName` - unique string used to identifiy and name the topic +- `logSection` - indicates in which section to create the topic in +Takes constants `LOG_MISSION`, `LOG_NOTE` as values + +## Log_AddEntry +Adds an entry to a log topic with the name `topicName` under the section `logSection` + +```dae +func void Log_AddEntry(var string topicName, var string entry) {}; +``` + +- `topicName` - unique string used to identifiy and name the topic +- `entry` - content of the new entry + +!!! Info + In the engine the `#!dae Log_AddEntry()` is wrapped in a `#!dae B_LogEntry()` function. This function also handles printing the "New Journal Entry" message to the screen and playing the sound effect. + ```dae + func void B_LogEntry(var string topic, var string entry) + { + PrintDebugNpc(PD_ZS_DETAIL, "B_LogEntry"); // Logging + + Log_AddEntry(topic, entry); + + PrintScreen(NAME_NewLogEntry, -1, _YPOS_MESSAGE_LOGENTRY, "font_old_10_white.tga", _TIME_MESSAGE_LOGENTRY); + Snd_Play("LogEntry"); + }; + ``` + +## Log_SetTopicStatus +Changes the status of the topic with the name `topicName` + +```dae +func void Log_SetTopicStatus(var string topicName, var int status) {}; +``` + +- `topicName` - unique string used to identify and name the topic +- `status` - the status to be set +Takes constants `LOG_RUNNING`, `LOG_SUCCESS`, `LOG_FAILED`, `LOG_OBSOLETE` as values + + +## zParserExtender +The log external function selection is missing functions to retrieve the status of a log entry. There are only functions to read the log status (as discussed on [Inside Gothic](https://ataulien.github.io/Inside-Gothic/QuestLog/)). As a result of this the original scriptwriters had to define additional variable to track the log status in the scripts, even though the value is being already tracked by the engine. +zParserExtender fixes this by introducing new [log external functions](../../extenders/zparserextender/externals/log/). + + +## Externals with docu comments + +```dae +/// Creates a new log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param logSection [LOG_MISSION, LOG_NOTE] indicates in which section to create the topic in +func void Log_CreateTopic(var string topicName, var int logSection) {}; + +/// Creates a new log topic with the name `topicName` under the section `logSection` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param logSection [LOG_MISSION, LOG_NOTE] indicates in which section to create the topic in +func void Log_AddEntry(var string topicName, var string entry) {}; + +/// Changes the status of the topic with the name `topicName` +/// +/// @param topicName unique string used to identifiy and name the topic +/// @param status [LOG_RUNNING, LOG_SUCCESS, LOG_FAILED, LOG_OBSOLETE] the status to be set +func void Log_SetTopicStatus(var string topicName, var int status) {}; +``` diff --git a/docs/zengin/scripts/externals/mdl.md b/docs/zengin/scripts/externals/mdl.md new file mode 100644 index 0000000000..dd74605acf --- /dev/null +++ b/docs/zengin/scripts/externals/mdl.md @@ -0,0 +1,275 @@ +--- +title: MDL functions +--- +# MDL functions +Functions to tweak animation and other model related settings. + +## Mdl_ApplyOverlayMDS +Apply an animation overlay with `overlay_name` for the specified `npc` +```dae +func void Mdl_ApplyOverlayMDS(var c_npc npc, var string overlay_name) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the overlay to +- `#!dae var string overlay_name` - name of the animation overlay + +## Mdl_ApplyOverlayMDSTimed +Apply an animation overlay with `overlay_name` for the specified `npc` for `duration` milliseconds +```dae +func void Mdl_ApplyOverlayMDSTimed(var c_npc npc, var string overlay_name, var float duration) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the overlay to +- `#!dae var string overlay_name` - name of the animation overlay +- `#!dae var float duration` - overlay duration in milliseconds + +## Mdl_RemoveOverlayMDS +Remove the animation overlay `overlay_name` from specified `npc` +```dae +func void Mdl_RemoveOverlayMDS(var c_npc npc, var string overlay_name) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to remove the overlay from +- `#!dae var string overlay_name` - name of the animation overlay + +## Mdl_ApplyRandomAni +Assign a random animation `ani2` to random animation list of animation `ani1` +```dae +func void Mdl_ApplyRandomAni(var c_npc npc, var string ani1, var string ani2) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC owning the animation +- `#!dae var string ani1` - the animation to asign random animation to +- `#!dae var string ani2` - animation to be assigned + + +## Mdl_ApplyRandomAniFreq +Sets the random animation frequency for animation `ani1` +```dae +func void Mdl_ApplyRandomAniFreq(var c_npc npc, var string ani1, var float frequency) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC owning the animation +- `#!dae var string ani1` - the animation to set the random frequency +- `#!dae var float frequency` - number of seconds between random animations + +!!! Example + ```dae + // Attach T_WOUNDED_TRY animation to the S_WOUNDED animation + Mdl_ApplyRandomAni(self, "S_WOUNDED", "T_WOUNDED_TRY"); + // Make the random animation attached play every 8 seconds + Mdl_ApplyRandomAniFreq(self, "S_WOUNDED", 8); + ``` + +## Mdl_SetModelFatness +Set the procedural model fatness +```dae +func void Mdl_SetModelFatness(var c_npc npc, var float fatness) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the fatness to +- `#!dae var float fatness` - fatness value + + +## Mdl_SetModelScale +Set model scale per axis +```dae +func void Mdl_SetModelScale(var c_npc npc, var float x, var float y, var float z) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the scale to +- `#!dae var float x` - scale along the x axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% +- `#!dae var float y` - scale along the y axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% +- `#!dae var float z` - scale along the z axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% + + +## Mdl_SetVisualBody +Sets up the visual of an NPC +```dae +func void Mdl_SetVisualBody(var instance npc, + var string body_mesh, + var int body_tex, + var int skin, + var string head_mesh, + var int head_tex, + var int teeth_tex, + var int armor_inst ) {}; +``` + +**Parameters** + +- `#!dae var instance npc` - NPC to be affected +- `#!dae var string body_mesh` - mesh to be used as the body e.g. `HUN_BODY_NAKED0` +- `#!dae var int body_tex` - body texture assigned to this body mesh +- `#!dae var int skin` - body texture variant +- `#!dae var string head_mesh` - head mesh +- `#!dae var int head_tex` - head texture +- `#!dae var int teeth_tex` - teeth texture +- `#!dae var int armor_inst` - armor (C_ITEM instance) to be equipped or `-1` for no armor + +## Mdl_SetVisual +Set the animation set (also dictates models you can set using the `Mdl_SetVisualBody`) +```dae +func void Mdl_SetVisual(var instance npc, var string animation_set) {}; +``` + +**Parameters** + +- `#!dae var instance npc` - NPC to apply the animation set to +- `#!dae var string animation_set` - name of the MDS file that contains the animation set + +## Mdl_StartFaceAni +Start a face animation +```dae +func void Mdl_StartFaceAni(var c_npc npc, + var string name, + var float intensity, + var float holdtime) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the animation to +- `#!dae var string name` - animation name +- `#!dae var float intensity` - intensity of the animation 0.0 to 1.0 +- `#!dae var float holdtime` - how long should the animation be held for `-2` will use the MMS defined value, '-1' will make the hold time infinite + +## Mdl_ApplyRandomFaceAni +Start a random face animation +```dae +func void Mdl_ApplyRandomFaceAni(var c_npc npc, + var string name, + var float timemin, + var float timeminvar, + var float timemax, + var float timemaxvar, + var float probmin) {}; +``` + +**Parameters** + +- `#!dae var c_npc npc` - NPC to apply the animation to +- `#!dae var string name` - animation name +- `#!dae var float timemin` - minimum time after which the ani should be started (in seconds) +- `#!dae var float timeminvar` - minimum boundary variation (in seconds) +- `#!dae var float timemax` - maximum time after which the ani should be started (in seconds) +- `#!dae var float timemaxvar` - maximum boundary variation (in seconds) +- `#!dae var float probmin` - probablity (0.0 to 1.0) to choose the lower boundary time + +## Externals with docu comments + +```dae +/// Apply an animation overlay with `overlay_name` for the specified `npc` +/// +/// @param npc NPC to apply the overlay to +/// @param overlay_name name of the animation overlay +func void Mdl_ApplyOverlayMDS(var c_npc npc, var string overlay_name) {}; + +/// Apply an animation overlay with `overlay_name` for the specified `npc` for `duration` milliseconds +/// +/// @param npc NPC to apply the overlay to +/// @param overlay_name name of the animation overlay +/// @param duration overlay duration in milliseconds +func void Mdl_ApplyOverlayMDSTimed(var c_npc npc, var string overlay_name, var float duration) {}; + +/// Remove the animation overlay `overlay_name` from specified `npc` +/// +/// @param npc NPC to remove the overlay from +/// @param overlay_name name of the animation overlay +func void Mdl_RemoveOverlayMDS(var c_npc npc, var string overlay_name) {}; + +/// Assign a random animation `ani2` to random animation list of animation `ani1` +/// +/// @param npc NPC owning the animation +/// @param ani1 the animation to asign random animation to +/// @param ani2 animation to be assigned +func void Mdl_ApplyRandomAni(var c_npc npc, var string ani1, var string ani2) {}; + +/// Sets the random animation frequency for animation `ani1` +/// +/// @param npc NPC owning the animation +/// @param ani1 the animation to set the random frequency +/// @param frequency number of seconds between random animations +func void Mdl_ApplyRandomAniFreq(var c_npc npc, var string ani1, var float frequency) {}; + +/// Set the procedural model fatness +/// +/// @param npc NPC to apply the fatness to +/// @param fatness fatness value +func void Mdl_SetModelFatness(var c_npc npc, var float fatness) {}; + +/// Set model scale per axis +/// +/// @param npc NPC to apply the scale to +/// @param x scale along the x axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% +/// @param y scale along the y axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% +/// @param z scale along the z axis, 1.0 = 100%, 1.5 = 150%, 0.9 = 90% +func void Mdl_SetModelScale(var c_npc npc, var float x, var float y, var float z) {}; + +/// Sets up the visual of an NPC +/// +/// @param npc NPC to be affected +/// @param body_mesh mesh to be used as the body e.g. `HUN_BODY_NAKED0` +/// @param body_tex body texture assigned to this body mesh +/// @param skin body texture variant +/// @param head_mesh head mesh +/// @param head_tex head texture +/// @param teeth_tex teeth texture +/// @param armor_inst armor (C_ITEM instance) to be equipped or `-1` for no armor +func void Mdl_SetVisualBody(var instance npc, + var string body_mesh, + var int body_tex, + var int skin, + var string head_mesh, + var int head_tex, + var int teeth_tex, + var int armor_inst ) {}; + +/// Set the animation set (also dictates models you can set using the `Mdl_SetVisualBody`) +/// +/// @param npc NPC to apply the animation set to +/// @param animation_set name of the MDS file that contains the animation set +func void Mdl_SetVisual(var instance npc, var string animation_set) {}; + +/// Start a face animation +/// +/// @param npc NPC to apply the animation to +/// @param name animation name +/// @param intensity intensity of the animation 0.0 to 1.0 +/// @param holdtime how long should the animation be held for `-2` will use the MMS defined value, '-1' will make the hold time infinite +func void Mdl_StartFaceAni(var c_npc npc, + var string name, + var float intensity, + var float holdtime) {}; + +/// Start a random face animation +/// +/// @param npc NPC to apply the animation to +/// @param name animation name +/// @param timemin minimum time after which the ani should be started (in seconds) +/// @param timeminvar minimum boundary variation (in seconds) +/// @param timemax maximum time after which the ani should be started (in seconds) +/// @param timemaxvar maximum boundary variation (in seconds) +/// @param probmin probablity (0.0 to 1.0) to choose the lower boundary time +func void Mdl_ApplyRandomFaceAni(var c_npc npc, + var string name, + var float timemin, + var float timeminvar, + var float timemax, + var float timemaxvar, + var float probmin) {}; +```