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 Scripts compatible with Hercules Ultimate Localization Design (HULD) #2233

Open
dastgirp opened this Issue Oct 1, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@dastgirp
Member

dastgirp commented Oct 1, 2018

Issue Prelude

  • I have not modified the source prior to reproducing this issue.
  • I am using the latest version of Hercules.
  • I am aware that this report will be closed or deleted if it becomes obvious that I am stating the false.

Description

Currently, we do not have all the scripts which are compatible with HULD (if you want to know what's HULD, you can visit here: http://herc.ws/board/topic/8687-hercules-ultimate-localization-design/ , but I would be explaining the issue and solution here so it's easy to do)

Currently our translation only recognizes following commands:

mes
select

So, let's take npc/cities/aldebaran.txt (https://github.com/HerculesWS/Hercules/raw/master/npc/cities/aldebaran.txt) for example,

The changes we need to make:

  1. The commands/functions should start with bracket and not space, so

mes "[Munster]";

will be converted to

mes("[Munster]");

  1. concatenation in mes to be replaced with mesf

mes "If you want to sell them to us, you will receive "+ .@kafrapassmoney +" zeny. Would you like to sell these back to the Kafra Corporation?";

will be converted to

mesf("If you want to sell them to us, you will receive %d zeny. Would you like to sell these back to the Kafra Corporation?", .@kafrapassmoney);

Note: mesf is mes + sprintf, if you want more info, you can visit here : https://raw.githubusercontent.com/HerculesWS/Hercules/master/doc/script_commands.txt and search mesf

  1. If the command is not mes and there's concatenation, use following format:

.@list$ += .@Choices[.@i] + "- " + getitemname(.@Choices[.@i+1]) + " " + .@Choices[.@i+2] + " ea:";

To

.@list$ += sprintf(_$("%d- %s %d ea:"), .@Choices[.@i], getitemname(.@Choices[.@i+1]), .@Choices[.@i+2]);

Example 2:

dispbottom("Your Name is "+ strcharinfo(PC_NAME));

To

dispbottom(sprintf(_$("Your Name is %s"), strcharinfo(PC_NAME)));

Note: You may find many more functions/commands for the same, some of them are listed below, but not limited to:

announce
mapannounce
showscript
dispbottom
message
npctalk
mes
select
  1. Select to be converted to comma separated

In some script, the select would be in the following format, which needs to be changed

select("About Insects:End Conversation")

To

select("About Insects", "End Conversation")

  1. Some strings are directly assigned to variable which needs to be changed

.@Changepage$ = "Next items";

To

.@Changepage$ = _("Next items");

Note: Remember, The variables can have either empty suffix or $ as suffix, if it's $ in suffix, it's a string, and %s should be there in sprintf/mesf, for no suffix, %d should be used

Files to be changed:

Files ending with extension .txt in npc/ folder (some files in that folder are already changed to support this, while many are remaining to be changed)

This issue can be done in parts (multiple PR's), as we know that there are lots of scripts to be changed, and a single person cannot do them all

Additional Info

If there's any doubt or need information, you can ask any of the contributor or join the discord channel https://discord.gg/ZUzbRSp

Reference

You can refer to already converted scripts such as:
https://github.com/HerculesWS/Hercules/blob/stable/npc/re/instances/MalangdoCulvert.txt
https://github.com/HerculesWS/Hercules/blob/stable/npc/re/instances/BakonawaLake.txt
https://github.com/HerculesWS/Hercules/blob/stable/npc/re/instances/EclageInterior.txt

@linton-dawson

This comment has been minimized.

Show comment
Hide comment
@linton-dawson

linton-dawson Oct 2, 2018

I am currently working on it. Would it be alright if I ask my doubts here or on the discord channel ?

linton-dawson commented Oct 2, 2018

I am currently working on it. Would it be alright if I ask my doubts here or on the discord channel ?

@dastgirp

This comment has been minimized.

Show comment
Hide comment
@dastgirp

dastgirp Oct 2, 2018

Member

@linton-dawson you can ask your doubts anywhere you feel comfortable

Member

dastgirp commented Oct 2, 2018

@linton-dawson you can ask your doubts anywhere you feel comfortable

@Habilya Habilya referenced this issue Oct 4, 2018

Closed

/npc mes ""; to mes(""); #2257

3 of 3 tasks complete

@linton-dawson linton-dawson referenced this issue Oct 6, 2018

Open

HULD Compatibility for aldebaran.txt #2260

3 of 3 tasks complete

@linton-dawson linton-dawson referenced this issue Oct 8, 2018

Open

HULD Compatibility for aldebaran.txt #2272

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment