From c3dc0a47245b4e3346be1565e8b87bf9ee199464 Mon Sep 17 00:00:00 2001 From: JianmengYu Date: Mon, 2 Jan 2023 19:16:50 +0800 Subject: [PATCH] Text display and custom content fixes Added item name for unidentified Slime Mold. Moved parts name of the Necro Parts before "of". Fixed custom NPCs using an incorrect character pic id. Fixed game hang trying to display a message longer than message box. (Ruin0x11#129) --- 2.05-custom-gx/db_item.hsp | 2 +- 2.05-custom-gx/init.hsp | 12 +++++++++++- 2.05-custom-gx/item_func.hsp | 31 ++++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/2.05-custom-gx/db_item.hsp b/2.05-custom-gx/db_item.hsp index 950406f3..007712c4 100644 --- a/2.05-custom-gx/db_item.hsp +++ b/2.05-custom-gx/db_item.hsp @@ -127285,7 +127285,7 @@ iknownnameref(ITEM_ID_SLIME_MOLD) = "ねばねば" } else { - iknownnameref(ITEM_ID_SLIME_MOLD) = "" + iknownnameref(ITEM_ID_SLIME_MOLD) = "sticky blob" } icolref(ITEM_ID_SLIME_MOLD) = COLOR_DEFAULT ilight(ITEM_ID_NECRO_PARTS) = LIGHT_TYPE_NONE diff --git a/2.05-custom-gx/init.hsp b/2.05-custom-gx/init.hsp index f04df5fe..db15ea0c 100644 --- a/2.05-custom-gx/init.hsp +++ b/2.05-custom-gx/init.hsp @@ -358,7 +358,7 @@ if instr(s,0,%1)!-1{ %c\ #deffunc setunid int setunid_charid, int setunid_unid cdata(CDATA_USERNPC_ID, setunid_charid) = setunid_unid if ( cdata(CDATA_PIC, setunid_charid) < xy2pic(0, 21) | cdata(CDATA_PIC, setunid_charid) > xy2pic(31, 21) ) { - cdata(CDATA_PIC, setunid_charid) = xy2pic(34, 0) + setunid_unid + cdata(CDATA_PIC, setunid_charid) = xy2pic(0, SPRITE_SHEET_ROWS_CHARA) + setunid_unid cdata(CDATA_PIC, setunid_charid) += COLOR_DEFAULT * COLOR_TINT_MULT cdata(CDATA_CHARA_PIC, setunid_charid) = xy2pic(1, 0) } @@ -1197,6 +1197,16 @@ if instr(s,0,%1)!-1{ %c\ break } if ( msglen + p@txtfunc > inf_maxmsglen ) { + if ( p@txtfunc > inf_maxmsglen ) { + msg_newline + p@txtfunc = inf_maxmsglen + mst@txtfunc = strmid(msgtemp, 0, p@txtfunc) + msg(msgline \ inf_maxlog) += mst@txtfunc + msg_write mst@txtfunc + msglen += p@txtfunc + msgtemp = strmid(msgtemp, p@txtfunc, strlen(msgtemp) - p@txtfunc) + continue + } msg_newline continue } diff --git a/2.05-custom-gx/item_func.hsp b/2.05-custom-gx/item_func.hsp index 59072719..cb52cbcd 100644 --- a/2.05-custom-gx/item_func.hsp +++ b/2.05-custom-gx/item_func.hsp @@ -953,7 +953,7 @@ locvar_itemowner_s += "の" } } - if ( inv(INV_ITEM_ID, itemowner_itemid) == ITEM_ID_NECRO_PARTS ) { + if ( inv(INV_ITEM_ID, itemowner_itemid) == ITEM_ID_NECRO_PARTS & jp ) { if ( inv(INV_ITEM_SHOP_SAMPLE, itemowner_itemid) == 1 ) { locvar_itemowner_s += lang("あたま", "head") } @@ -1234,6 +1234,35 @@ locvar_itemowner_s += "custom " } } + if ( inv(INV_ITEM_ID, itemname_itemid) == ITEM_ID_NECRO_PARTS ) { + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_HEAD ) { + locvar_itemowner_s += "head" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_NECK ) { + locvar_itemowner_s += "neck" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_BACK ) { + locvar_itemowner_s += "back" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_BODY ) { + locvar_itemowner_s += "chest" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_HAND ) { + locvar_itemowner_s += "hand" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_RING ) { + locvar_itemowner_s += "finger" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_ARM ) { + locvar_itemowner_s += "arm" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_WAIST ) { + locvar_itemowner_s += "waist" + } + if ( inv(INV_ITEM_SHOP_SAMPLE, itemname_itemid) == EQUIP_SLOT_LEG ) { + locvar_itemowner_s += "leg" + } + } } if ( inv(INV_ITEM_ID, itemname_itemid) == ITEM_ID_MATERIAL_KIT ) { locvar_itemowner_s += "" + mtname(0, inv(INV_ITEM_MATERIAL, itemname_itemid)) + lang("製の", " ")