Skip to content

Commit

Permalink
Text display and custom content fixes
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
JianmengYu committed Jan 2, 2023
1 parent 9bfd8af commit c3dc0a4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 2.05-custom-gx/db_item.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion 2.05-custom-gx/init.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}
Expand Down
31 changes: 30 additions & 1 deletion 2.05-custom-gx/item_func.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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("製の", " ")
Expand Down

0 comments on commit c3dc0a4

Please sign in to comment.