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

Open
3 tasks done
dastgirp opened this issue Oct 1, 2018 · 2 comments
Open
3 tasks done
Labels
complexity: 1-straightforward Issue can be resolved easily hacktoberfest-accepted Easy-to-tackle issues

Comments

@dastgirp
Copy link
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

@dastgirp dastgirp added hacktoberfest-accepted Easy-to-tackle issues complexity: 1-straightforward Issue can be resolved easily labels Oct 1, 2018
@linton-dawson
Copy link
Contributor

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

@dastgirp
Copy link
Member Author

dastgirp commented Oct 2, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: 1-straightforward Issue can be resolved easily hacktoberfest-accepted Easy-to-tackle issues
Projects
None yet
Development

No branches or pull requests

2 participants