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
Make some hardcoded terms customizable #414
Conversation
Thanks for the PR :). Some minor changes I ask for:
What is This is not mandatory but in some cases it makes your life easier (simpler rebasing, you can just nuke the 2nd commit) when contributing to liblcf when you make two commits: |
There is one problem with that non-printable sentinel value that doesn't matter for savegames but for other files: Due to our ForEachString code that sentinel value will be seen by lcftrans and written into the po-translation files. I don't really want to add special handling everywhere because of this. For the translation code we also use some "in-band signalling" stuff that has the structure |
|
Well, while the first hex value in the |
right. Make all upper case instead. 😅 |
Addressed the issues in the first comment now. |
Unfortunately I'm lost on your second comment due to my lack of knowledge about lcftrans. I don't understand this "in-band signaling stuff". And I take any suggestion for a "print-friendly" sentinel, because I haven't got any good ideas for a "print-friendly" sentinel value. |
lcftrans creates translation files. They are basicly a mapping of source to target string, e.g.
So the "Source string" must be something that is printable. But yeah lets wait for other suggestions. In-Band-Signalling means that e.g. in a protocol when transfering text you have special text strings that indicate commands that shall be executed. We use something like this in lcftrans, e.g. when you translate a page with "easyrpg:delete_page" the message box is deleted completely. |
Maybe we can use |
Or |
I went with |
Sorry now I got one more idea 😅. You have these nice descriptions of the fields in your pr message. You could put them in the CSV as last argument (instead of "String") Anyway you get my approval now |
The following database settings have been added: - Term 200: Item number separator - Term 201: Skill cost separator - Term 202: Equipment window arrow - Term 203: Status scene Name - Term 204: Status scene Class - Term 205: Status scene Title - Term 206: Status scene Condition - Term 207: Status scene Front - Term 208: Status scene Back - Term 209: Order scene Confirm - Term 210: Order scene Redo - Term 211: RPG Maker 2003 battle monster Double Attack notification - Term 212: RPG Maker 2003 battle monster Defend notification - Term 213: RPG Maker 2003 battle monster Observe notification - Term 214: RPG Maker 2003 battle monster Charge notification - Term 215: RPG Maker 2003 battle monster Self-Destruct notification - Term 216: RPG Maker 2003 battle monster Escape notification - Term 217: Message for back and pincer attack
Your proposal is a good one, this makes understanding some settings easier. I have updated this PR accordingly. |
jenkins: test this please |
@rueter37 |
@Ghabry here you go: https://github.com/rueter37/player/tree/custom-terms-1. It contains the non-battle related terms. |
This doesnt look very invasive. Nice! |
Here is a patch that adds a new function to lcf::rpg::Terms (TermOrDefault): You can apply the patch in the liblcf dir with Example Usage in the Player:
|
Generator: Support static functions
I have added your patch now and updated https://github.com/rueter37/player/tree/custom-terms-1 using the new |
Jenkins: test this please. This is still some damage from the server error ... -_- |
Thanks. You can file the PR against Player now. |
This pull requests add some EasyRPG-customizable terms. They will only work in EasyRPG, and will be overriden if someone attemps to edit the project in RPG Maker 2000/2003. Some allow to replace hardcoded things (like terms in the Status scene), while others allow to customise messages per item or per skill. * Introduced in [liblcf#419](EasyRPG/liblcf#419) * `@easyrpg_using_message` in `RPG::Item`: per-item custom message about using the item, * `@easyrpg_battle_message_2k3` in `RPG::Skill`: per-skill custom message about using the skill, * `easyrpgAnnBattleItem2k3` term: generic message before using a skill (allows %S, %O placeholders) * `easyrpgAnnBattleSkill2k3` term: generic message before using an item (allows %S, %O, %U placeholders) * Introduced in [liblcf#414](EasyRPG/liblcf#414): * ``easyrpgItemNumberSeparator`` term: Item number separator * ``easyrpgSkillCostSeparator`` term: Skill cost separator * ``easyrpgEquipmentArrow`` term: Equipment window arrow * ``easyrpgStatusSceneName`` term: Status scene Name * ``easyrpgStatusSceneClass`` term: Status scene Class * ``easyrpgStatusSceneTitle`` term: Status scene Title * ``easyrpgStatusSceneCondition`` term: Status scene Condition * ``easyrpgStatusSceneFront`` term: Status scene Front * ``easyrpgStatusSceneBack`` term: Status scene Back * ``easyrpgOrderSceneConfirm`` term: Order scene Confirm * ``easyrpgOrderSceneRedo`` term: Order scene Redo * ``easyrpgAnnBattleDoubleAttack2k3`` term: RPG Maker 2003 battle monster Double Attack notification * ``easyrpgAnnBattleDefend2k3`` term: RPG Maker 2003 battle monster Defend notification * ``easyrpgAnnBattleObserve2k3`` term: RPG Maker 2003 battle monster Observe notification * ``easyrpgAnnBattleCharge2k3`` term: RPG Maker 2003 battle monster Charge notification * ``easyrpgAnnBattleSelfdestruct2k3`` term: RPG Maker 2003 battle monster Self-Destruct notification * ``easyrpgAnnBattleEscape2k3`` term: RPG Maker 2003 battle monster Escape notification * ``easyrpgAnnBattleSpecialCombatBack2k3`` term: Message for back and pincer attack
This pull requests add some EasyRPG-customizable terms. To allow making optional terms, Terms is rewritten from an array into a normal object. The newly-added terms will only work in EasyRPG, and will be overriden if someone attemps to edit the project in RPG Maker 2000/2003. Some allow to replace hardcoded things (like terms in the Status scene), while others allow to customise messages per item or per skill. * Introduced in [liblcf#419](EasyRPG/liblcf#419) * `@easyrpg_using_message` in `RPG::Item`: per-item custom message about using the item, * `@easyrpg_battle_message_2k3` in `RPG::Skill`: per-skill custom message about using the skill, * `easyrpgAnnBattleItem2k3` term: generic message before using a skill (allows %S, %O placeholders) * `easyrpgAnnBattleSkill2k3` term: generic message before using an item (allows %S, %O, %U placeholders) * Introduced in [liblcf#414](EasyRPG/liblcf#414): * ``easyrpgItemNumberSeparator`` term: Item number separator * ``easyrpgSkillCostSeparator`` term: Skill cost separator * ``easyrpgEquipmentArrow`` term: Equipment window arrow * ``easyrpgStatusSceneName`` term: Status scene Name * ``easyrpgStatusSceneClass`` term: Status scene Class * ``easyrpgStatusSceneTitle`` term: Status scene Title * ``easyrpgStatusSceneCondition`` term: Status scene Condition * ``easyrpgStatusSceneFront`` term: Status scene Front * ``easyrpgStatusSceneBack`` term: Status scene Back * ``easyrpgOrderSceneConfirm`` term: Order scene Confirm * ``easyrpgOrderSceneRedo`` term: Order scene Redo * ``easyrpgAnnBattleDoubleAttack2k3`` term: RPG Maker 2003 battle monster Double Attack notification * ``easyrpgAnnBattleDefend2k3`` term: RPG Maker 2003 battle monster Defend notification * ``easyrpgAnnBattleObserve2k3`` term: RPG Maker 2003 battle monster Observe notification * ``easyrpgAnnBattleCharge2k3`` term: RPG Maker 2003 battle monster Charge notification * ``easyrpgAnnBattleSelfdestruct2k3`` term: RPG Maker 2003 battle monster Self-Destruct notification * ``easyrpgAnnBattleEscape2k3`` term: RPG Maker 2003 battle monster Escape notification * ``easyrpgAnnBattleSpecialCombatBack2k3`` term: Message for back and pincer attack
This pull requests add some EasyRPG-customizable terms. To allow making optional terms, Terms is rewritten from an array into a normal object. The newly-added terms will only work in EasyRPG, and will be overriden if someone attemps to edit the project in RPG Maker 2000/2003. Some allow to replace hardcoded things (like terms in the Status scene), while others allow to customise messages per item or per skill. * Introduced in [liblcf#419](EasyRPG/liblcf#419) * `@easyrpg_using_message` in `RPG::Item`: per-item custom message about using the item, * `@easyrpg_battle_message_2k3` in `RPG::Skill`: per-skill custom message about using the skill, * `easyrpgAnnBattleItem2k3` term: generic message before using a skill (allows %S, %O placeholders) * `easyrpgAnnBattleSkill2k3` term: generic message before using an item (allows %S, %O, %U placeholders) * Introduced in [liblcf#414](EasyRPG/liblcf#414): * ``easyrpgItemNumberSeparator`` term: Item number separator * ``easyrpgSkillCostSeparator`` term: Skill cost separator * ``easyrpgEquipmentArrow`` term: Equipment window arrow * ``easyrpgStatusSceneName`` term: Status scene Name * ``easyrpgStatusSceneClass`` term: Status scene Class * ``easyrpgStatusSceneTitle`` term: Status scene Title * ``easyrpgStatusSceneCondition`` term: Status scene Condition * ``easyrpgStatusSceneFront`` term: Status scene Front * ``easyrpgStatusSceneBack`` term: Status scene Back * ``easyrpgOrderSceneConfirm`` term: Order scene Confirm * ``easyrpgOrderSceneRedo`` term: Order scene Redo * ``easyrpgAnnBattleDoubleAttack2k3`` term: RPG Maker 2003 battle monster Double Attack notification * ``easyrpgAnnBattleDefend2k3`` term: RPG Maker 2003 battle monster Defend notification * ``easyrpgAnnBattleObserve2k3`` term: RPG Maker 2003 battle monster Observe notification * ``easyrpgAnnBattleCharge2k3`` term: RPG Maker 2003 battle monster Charge notification * ``easyrpgAnnBattleSelfdestruct2k3`` term: RPG Maker 2003 battle monster Self-Destruct notification * ``easyrpgAnnBattleEscape2k3`` term: RPG Maker 2003 battle monster Escape notification * ``easyrpgAnnBattleSpecialCombatBack2k3`` term: Message for back and pincer attack
This PR adds the following database settings: