Major update

Created top hak for crafting dialog.  Moved Bioware creature abilities to top hak.  Fixed DMFI wand handouts.  Added DMFI language handouts.  Added CCOH 6.  Disabled PC corpse system.  Modified new player startup system.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-09-17 13:24:57 -04:00
parent 5d27edafba
commit 903f023230
626 changed files with 57291 additions and 9788 deletions

View File

@@ -0,0 +1,71 @@
//////////////////////////////////////////////////////////////////////////////
// mk_inc_tlk.nss
//////////////////////////////////////////////////////////////////////////////
#include "mk_inc_language"
#include "mk_inc_tools"
const string MK_TLK_2DA_FILE = "mk_tlk";
string MK_TLK_GetStringByStrRef(int nStrRef, int nGender=GENDER_MALE);
// tries to get s string from the tlk by reading its strref from column sStrRef.
// If that fails it reads the string from column sLabel.
string MK_TLK_Get2DAStringByStrRef(string s2DA, int nRow, string sStrRef="STRREF", string sLabel="LABEL", int nGender=GENDER_MALE);
string MK_TLK_Get2DAString(string sColumn, int nRow)
{
return Get2DAString(MK_TLK_2DA_FILE, sColumn, nRow);
}
string MK_TLK_GetTLKColumn(int nGender)
{
string sColumn = MK_LANG_GetLanguageID();
if (MK_LANG_GetLanguageHasDialogF()==1)
{
sColumn += ("_"+IntToString(nGender));
}
return sColumn;
}
string MK_TLK_GetStringByStrRef(int nStrRef, int nGender)
{
if (nStrRef>=0) return GetStringByStrRef(nStrRef, nGender);
string sColumn, sString;
int iGender;
for (iGender=nGender; iGender>=GENDER_MALE; iGender--)
{
sColumn = MK_TLK_GetTLKColumn(iGender);
sString = MK_TLK_Get2DAString(sColumn, -nStrRef);
if (sString=="-1") return "";
if (sString!="") return sString;
}
return MK_TLK_Get2DAString("en", -nStrRef);
}
string MK_TLK_Get2DAStringByStrRef(string s2DA, int nRow, string sStrRef, string sLabel, int nGender)
{
string sString = "";
int nStrRef = MK_Get2DAInt(s2DA, sStrRef, nRow, 0);
if (nStrRef!=0)
{
sString = MK_TLK_GetStringByStrRef(nStrRef, nGender);
}
if ((nStrRef==0) || (GetStringLeft(sString,9)=="BadStrRef"))
{
sString = Get2DAString(s2DA, sLabel, nRow);
}
return sString;
}
/*
void main()
{
}
/**/