Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making custom map names show up on the world map #113

Open
wants to merge 1 commit into
base: work
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions 2.05-custom-gx/map_user.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,19 @@
gosub *prompt_word
if ( inputlog == "" ) {
txt lang("名前をつけるのはやめた。", "You changed your mind.")
adata(ADATA_FESTIVAL, gdata(GDATA_AREA)) = 0
//adata(ADATA_FESTIVAL, gdata(GDATA_AREA)) = 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the case when the player wants to remove the custom name of the current map? I think that could be the purpose of this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the unmodified game, entering nothing in the prompt doesn't reset the name to default. I think that might be nice functionality to have, but if that's supposed to be the purpose of this code, it doesn't work. In any event, the player can just enter "Shop", "Crop", etc. and achieve the same thing so I didn't think it was important to add.

}
else {
mdatan(MDATAN_NAME) = "" + inputlog
// Immediately save the new name to the corresponding tmp file so it can be read when leaving the map
folder = exedir + "tmp\\"
file = folder + "mdatan_" + gdata(GDATA_AREA) + "_" + (100 + gdata(GDATA_LEVEL)) + ".s2"
fmode = "mdatan"
fread = 0
arrayfilewrapper
adata(ADATA_FESTIVAL, gdata(GDATA_AREA)) = 9999
txt lang("" + mdatan(MDATAN_NAME) + "という名前で呼ぶことにした。", "You named " + him(tc) + " " + cdatan(CDATAN_NAME, tc) + ".")
gosub *screen_refreshFull
gosub *screen_refreshFull
txt lang("" + mdatan(MDATAN_NAME) + "という名前で呼ぶことにした。", "You named it " + mdatan(MDATAN_NAME) + ".")
}
gosub *screen_refresh
goto *pc_turn
Expand Down
13 changes: 13 additions & 0 deletions 2.05-custom-gx/text.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -2687,6 +2687,19 @@
s += lang("《覚醒》", "Awaken")
}
}
if ( adata(ADATA_FESTIVAL, mapname_mapid) == 9999 ) {
exist exedir + "tmp\\" + "mdatan_" + mapname_mapid + "_101.s2"
if ( strsize == (-1) ) {
exist exedir + "save\\" + playerid + "\\mdatan_" + mapname_mapid + "_101.s2"
if ( strsize != (-1) ) {
noteload exedir + "save\\" + playerid + "\\mdatan_" + mapname_mapid + "_101.s2"
}
}
else {
noteload exedir + "tmp\\" + "mdatan_" + mapname_mapid + "_101.s2"
}
noteget s, 0
}
if ( mapname_arg2 == 1 ) {
if ( adata(ADATA_ID, mapname_mapid) == AREA_SISTER_MANSION | adata(ADATA_ID, mapname_mapid) == AREA_OBLIVION_PALACE | (gdata(GDATA_FLAG_SUB_BEYOND_THE_GENERATIONS) < 8 & adata(ADATA_ID, mapname_mapid) == AREA_IRMA_THALIA_WORKSHOP) ) {
return ""
Expand Down