Jump to content

Haru

Administrators
  • Content Count

    382
  • Joined

  • Days Won

    38

Reputation Activity

  1. Upvote
    Haru got a reaction from Skyline in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    @@Oxxy 49 66 20 79 6F 75 20 70 72 65 66 65 72 20 72 65 61 64 69 6E 67 20 6E 75 6D 62 65 72 73 20 74 68 61 6E 20 77 6F 72 64 73 2C 20 6E 6F 74 68 69 6E 67 20 70 72 65 76 65 6E 74 73 20 79 6F 75 20 66 72 6F 6D 20 64 65 66 69 6E 69 6E 67 20 74 68 6F 73 65 20 6E 75 6D 62 65 72 73 20 61 73 20 63 6F 6E 73 74 61 6E 74 73 2C 20 62 79 20 65 64 69 74 69 6E 67 20 63 6F 6E 73 74 61 6E 74 73 2E 63 6F 6E 66 2E. Sarcasm aside, it's just ASCII codes. If you decode it, it contains a solution that should work for you.
     
    @@vykimo If you're not pleased, you can use any other emulator. We provide both content updates and architecture modernization, and we will keep doing so as long as the project lives. If you want to stick to the early 2000's coding practices *and* use Hercules at the same time, then feel free to make your own fork, and undo the changes you don't like. As you can see in my post, I specified the related commits, so they're easy to revert.
  2. Upvote
    Haru got a reaction from fourxhackd in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Rationale:
    This is part of the NPC scripts standardization project. In the past, NPCs were defined with numeric View IDs, while now we've replaced most of them with more human-readable (and as such easier to maintain) constants - the same constants that AEGIS scripts use, making the numeric IDs obsolete (and deprecated).
     
    Contents:
    When the NPC View IDs were converted to constants, the only leftover was the special ID '-1' we use for invisible / floating NPCs, that didn't have an equivalent constant defined at the time.
    This changeset defines a constant 'FAKE_NPC' for it, and replaces all the '-1' view IDs with the new constant.
    The exception for the -1 case is removed from the code (making it effectively deprecated, just like the other numeric IDs).
     
    Impact:
    The impact of this changeset on custom scripts is low. All old code will still work (but it'll throw a deprecation warning).
    It's recommended to update all the affected code as soon as possible - the support for the old style IDs may be removed from the code at any time in the future (after at least a month from the commit).
     
    Details:
    The use of the sprite ID '-1' in NPC headers to specify an invisible NPC is now deprecated. 'FAKE_NPC' should be used instead. This affects all NPC types (script, shop, trader, duplicate, etc)
    /* Before: */ - script TurboTrap#tt_main -1,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 -1,0,0 /* Now: */ - script TurboTrap#tt_main FAKE_NPC,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 FAKE_NPC,0,0 Merge Date:Thu, 31 Dec 2015 23:40:48 +0100
     
    Related Pull Requests:
    - #1000 - https://github.com/HerculesWS/Hercules/pull/1000 - define FAKE_NPC as -1 in const.txt [AnnieRuru]
     
    Related Commits:
    - ef171a8 - https://github.com/HerculesWS/Hercules/commit/ef171a8 - Mon, 21 Dec 2015 19:59:38 +0800 define FAKE_NPC as -1 in const.txt [AnnieRuru]
    - efaaf84 - https://github.com/HerculesWS/Hercules/commit/efaaf84 - Mon, 21 Dec 2015 20:12:45 +0800 Replace -1,{ with FAKE_NPC,{ replace using Notepad++ [AnnieRuru]
    - b4c99db - https://github.com/HerculesWS/Hercules/commit/b4c99db - Tue, 29 Dec 2015 02:16:49 +0100 Replaced leftover -1 view IDs with FAKE_NPC [Haru]
    - 32a42ee - https://github.com/HerculesWS/Hercules/commit/32a42ee - Tue, 29 Dec 2015 02:17:26 +0100 Extended the numeric view ID deprecation to '-1' (FAKE_NPC) [Haru]
    - 0e99004 - https://github.com/HerculesWS/Hercules/commit/0e99004 - Thu, 31 Dec 2015 23:40:48 +0100 Merge branch 'AnnieRuru-request_29' into hercules [Haru]
     
    Trivia:
    Commit efaaf84 was done with a find and replace in Notepad++, to globally replace '-1' view IDs with 'FAKE_NPC' (as described in the commit notes).
    Commit b4c99db caught the leftovers (less common cases where the -1 is not followed by ',{'), and was powered by vim macros and grep (and vimgrep). It also features manual clean up of trailing whitespace or extra tabs in a small subset of the affected lines.
  3. Upvote
    Haru got a reaction from JulioCF in [2016-01-13] ConstDB converted to libconfig format, added doc/constants.md   
    Rationale:
    This is an (unplanned) episode in the txt->libconfig conversion project. The reason for the conversion is that we suddenly needed a way to add attributes (specifically, "deprecated" to some constants, since simply removing them would mean that any scripts using them would silently fail (talk about terrible script engine).
     
    Contents:
    The Constants Database (db/const.txt) has been converted to the usual libconfig format. This allows us to add new attributes to the constants.
    Old, unused, constants have been marked as deprecated using the facilities provided by the new database format (mostly, Job_Alchem, VAR_*), and their use will now trigger a warning at parse time (previously, it would result in a value of zero being used silently, in a very nasty way).
    A new docuemntation file (doc/constants.md) is provided, listing all the constants available to the scripting engine (coming from Constants DB, Item DB, Mob DB, Skill DB or even hardcoded in source), since there wasn't any centralized place where all the constants were listed. The file will get automatically updated in future through the HerculesWSAPI bot.
    The document is readily available online through the following link: https://github.com/HerculesWS/Hercules/blob/master/doc/constants.md (it will always point to the latest version)
     
    Impact:
    The impact of this changeset on customizations is low. If using custom constants in const.txt, users can either use the provided script to re-generate their constants.conf, or add the entries manually.
     
    Details:
    The format of constants.conf is the following:

    constants_db: { /************* Entry structure (short) ************************************ Identifier: value // (int) ************* Entry structure (full) ************************************* Identifier: { Value: value // (int) Parameter: true // (boolean) Defaults to false. Deprecated: true // (boolean) Defaults to false. } **************************************************************************/ (each entry can use either the short or full format).
     
    A special "comment__" field can be added, to generate a corresponding title in the documentation file. Comments will have no other effects (they're not normally parsed, but they're available to plugins).
     
    Merge Date:
    Wed, 13 Jan 2016 19:22:45 +0300
     
    Related Pull Requests:
    - #1088 - https://github.com/HerculesWS/Hercules/pull/1088 - Constdb revamp [Haru]
    - #908 - https://github.com/HerculesWS/Hercules/pull/908 - Add EQP_ = Equipment Position constants [AnnieRuru]
    - #1124 - https://github.com/HerculesWS/Hercules/pull/1124 - Constdb2doc plugin (doc/constants.md) [Haru]
     
    Related Commits:
    - a815472 - https://github.com/HerculesWS/Hercules/commit/a815472 - Sun, 10 Jan 2016 02:01:55 +0100 Converted const.txt to libconfig format [Haru]
    - 6ae9045 - https://github.com/HerculesWS/Hercules/commit/6ae9045 - Sun, 10 Jan 2016 02:33:15 +0100 Added support to mark constants in db/constants.conf as deprecated [Haru]
    - 3f56ffc - https://github.com/HerculesWS/Hercules/commit/3f56ffc - Sun, 10 Jan 2016 02:33:41 +0100 Marked Job_Alchem and Job_Baby_Alchem as deprecated [Haru]
    - 99f707e - https://github.com/HerculesWS/Hercules/commit/99f707e - Wed, 13 Jan 2016 11:47:47 +0100 Added converter script from const.txt to constants.conf [Haru]
    - 49081f4 - https://github.com/HerculesWS/Hercules/commit/49081f4 - Wed, 13 Jan 2016 19:22:45 +0300 Merge pull request #1088 from HerculesWS/constdb [Andrei Karas]
    - 9e48e2a - https://github.com/HerculesWS/Hercules/commit/9e48e2a - Wed, 13 Jan 2016 17:23:31 +0100 HPM Hooks Update [Hercules.ws] (dastgir/master)
    - de33b02 - https://github.com/HerculesWS/Hercules/commit/de33b02 - Fri, 15 Jan 2016 20:34:26 +0100 Fixed a typo in the constdb converter script [Haru]
    - a1310e2 - https://github.com/HerculesWS/Hercules/commit/a1310e2 - Wed, 6 Jan 2016 16:38:43 +0800 Remove VAR_ constants - there are 2 same constants for setlook script command, remove the wrong one - VAR_ constant added by l
    one_wolf is invalid https://github.com/HerculesWS/Hercules/commit/f4278f36db32f35e535a0ea8feb1cf83ca95019e, so use the LOOK_ constant [AnnieRuru]
    - 7610346 - https://github.com/HerculesWS/Hercules/commit/7610346 - Sat, 16 Jan 2016 20:23:57 +0100 Merge pull request #908 from AnnieRuru/request_26 [Haru]
    - e3253b4 - https://github.com/HerculesWS/Hercules/commit/e3253b4 - Mon, 25 Jan 2016 16:52:27 +0100 Added source support for special comments in the constdb [Haru]
    - 72a75cb - https://github.com/HerculesWS/Hercules/commit/72a75cb - Mon, 25 Jan 2016 15:53:56 +0100 Added constdb2doc plugin [Haru]
    - 15bca8f - https://github.com/HerculesWS/Hercules/commit/15bca8f - Mon, 25 Jan 2016 16:00:44 +0100 Generated doc/constants.md [Haru] (HEAD -> constdb2doc, origin/constdb2doc)
     
    Trivia:
    The constdb2doc plugin introduced in 72a75cb is based on my 'vimsyntaxgen' plugin (see https://github.com/HerculesWS/StaffPlugins/tree/master/Haru/vimsyntaxgen).
  4. Upvote
    Haru got a reaction from Legend in [2016-01-13] ConstDB converted to libconfig format, added doc/constants.md   
    Rationale:
    This is an (unplanned) episode in the txt->libconfig conversion project. The reason for the conversion is that we suddenly needed a way to add attributes (specifically, "deprecated" to some constants, since simply removing them would mean that any scripts using them would silently fail (talk about terrible script engine).
     
    Contents:
    The Constants Database (db/const.txt) has been converted to the usual libconfig format. This allows us to add new attributes to the constants.
    Old, unused, constants have been marked as deprecated using the facilities provided by the new database format (mostly, Job_Alchem, VAR_*), and their use will now trigger a warning at parse time (previously, it would result in a value of zero being used silently, in a very nasty way).
    A new docuemntation file (doc/constants.md) is provided, listing all the constants available to the scripting engine (coming from Constants DB, Item DB, Mob DB, Skill DB or even hardcoded in source), since there wasn't any centralized place where all the constants were listed. The file will get automatically updated in future through the HerculesWSAPI bot.
    The document is readily available online through the following link: https://github.com/HerculesWS/Hercules/blob/master/doc/constants.md (it will always point to the latest version)
     
    Impact:
    The impact of this changeset on customizations is low. If using custom constants in const.txt, users can either use the provided script to re-generate their constants.conf, or add the entries manually.
     
    Details:
    The format of constants.conf is the following:

    constants_db: { /************* Entry structure (short) ************************************ Identifier: value // (int) ************* Entry structure (full) ************************************* Identifier: { Value: value // (int) Parameter: true // (boolean) Defaults to false. Deprecated: true // (boolean) Defaults to false. } **************************************************************************/ (each entry can use either the short or full format).
     
    A special "comment__" field can be added, to generate a corresponding title in the documentation file. Comments will have no other effects (they're not normally parsed, but they're available to plugins).
     
    Merge Date:
    Wed, 13 Jan 2016 19:22:45 +0300
     
    Related Pull Requests:
    - #1088 - https://github.com/HerculesWS/Hercules/pull/1088 - Constdb revamp [Haru]
    - #908 - https://github.com/HerculesWS/Hercules/pull/908 - Add EQP_ = Equipment Position constants [AnnieRuru]
    - #1124 - https://github.com/HerculesWS/Hercules/pull/1124 - Constdb2doc plugin (doc/constants.md) [Haru]
     
    Related Commits:
    - a815472 - https://github.com/HerculesWS/Hercules/commit/a815472 - Sun, 10 Jan 2016 02:01:55 +0100 Converted const.txt to libconfig format [Haru]
    - 6ae9045 - https://github.com/HerculesWS/Hercules/commit/6ae9045 - Sun, 10 Jan 2016 02:33:15 +0100 Added support to mark constants in db/constants.conf as deprecated [Haru]
    - 3f56ffc - https://github.com/HerculesWS/Hercules/commit/3f56ffc - Sun, 10 Jan 2016 02:33:41 +0100 Marked Job_Alchem and Job_Baby_Alchem as deprecated [Haru]
    - 99f707e - https://github.com/HerculesWS/Hercules/commit/99f707e - Wed, 13 Jan 2016 11:47:47 +0100 Added converter script from const.txt to constants.conf [Haru]
    - 49081f4 - https://github.com/HerculesWS/Hercules/commit/49081f4 - Wed, 13 Jan 2016 19:22:45 +0300 Merge pull request #1088 from HerculesWS/constdb [Andrei Karas]
    - 9e48e2a - https://github.com/HerculesWS/Hercules/commit/9e48e2a - Wed, 13 Jan 2016 17:23:31 +0100 HPM Hooks Update [Hercules.ws] (dastgir/master)
    - de33b02 - https://github.com/HerculesWS/Hercules/commit/de33b02 - Fri, 15 Jan 2016 20:34:26 +0100 Fixed a typo in the constdb converter script [Haru]
    - a1310e2 - https://github.com/HerculesWS/Hercules/commit/a1310e2 - Wed, 6 Jan 2016 16:38:43 +0800 Remove VAR_ constants - there are 2 same constants for setlook script command, remove the wrong one - VAR_ constant added by l
    one_wolf is invalid https://github.com/HerculesWS/Hercules/commit/f4278f36db32f35e535a0ea8feb1cf83ca95019e, so use the LOOK_ constant [AnnieRuru]
    - 7610346 - https://github.com/HerculesWS/Hercules/commit/7610346 - Sat, 16 Jan 2016 20:23:57 +0100 Merge pull request #908 from AnnieRuru/request_26 [Haru]
    - e3253b4 - https://github.com/HerculesWS/Hercules/commit/e3253b4 - Mon, 25 Jan 2016 16:52:27 +0100 Added source support for special comments in the constdb [Haru]
    - 72a75cb - https://github.com/HerculesWS/Hercules/commit/72a75cb - Mon, 25 Jan 2016 15:53:56 +0100 Added constdb2doc plugin [Haru]
    - 15bca8f - https://github.com/HerculesWS/Hercules/commit/15bca8f - Mon, 25 Jan 2016 16:00:44 +0100 Generated doc/constants.md [Haru] (HEAD -> constdb2doc, origin/constdb2doc)
     
    Trivia:
    The constdb2doc plugin introduced in 72a75cb is based on my 'vimsyntaxgen' plugin (see https://github.com/HerculesWS/StaffPlugins/tree/master/Haru/vimsyntaxgen).
  5. Upvote
    Haru got a reaction from Kubix in [2016-01-13] ConstDB converted to libconfig format, added doc/constants.md   
    Rationale:
    This is an (unplanned) episode in the txt->libconfig conversion project. The reason for the conversion is that we suddenly needed a way to add attributes (specifically, "deprecated" to some constants, since simply removing them would mean that any scripts using them would silently fail (talk about terrible script engine).
     
    Contents:
    The Constants Database (db/const.txt) has been converted to the usual libconfig format. This allows us to add new attributes to the constants.
    Old, unused, constants have been marked as deprecated using the facilities provided by the new database format (mostly, Job_Alchem, VAR_*), and their use will now trigger a warning at parse time (previously, it would result in a value of zero being used silently, in a very nasty way).
    A new docuemntation file (doc/constants.md) is provided, listing all the constants available to the scripting engine (coming from Constants DB, Item DB, Mob DB, Skill DB or even hardcoded in source), since there wasn't any centralized place where all the constants were listed. The file will get automatically updated in future through the HerculesWSAPI bot.
    The document is readily available online through the following link: https://github.com/HerculesWS/Hercules/blob/master/doc/constants.md (it will always point to the latest version)
     
    Impact:
    The impact of this changeset on customizations is low. If using custom constants in const.txt, users can either use the provided script to re-generate their constants.conf, or add the entries manually.
     
    Details:
    The format of constants.conf is the following:

    constants_db: { /************* Entry structure (short) ************************************ Identifier: value // (int) ************* Entry structure (full) ************************************* Identifier: { Value: value // (int) Parameter: true // (boolean) Defaults to false. Deprecated: true // (boolean) Defaults to false. } **************************************************************************/ (each entry can use either the short or full format).
     
    A special "comment__" field can be added, to generate a corresponding title in the documentation file. Comments will have no other effects (they're not normally parsed, but they're available to plugins).
     
    Merge Date:
    Wed, 13 Jan 2016 19:22:45 +0300
     
    Related Pull Requests:
    - #1088 - https://github.com/HerculesWS/Hercules/pull/1088 - Constdb revamp [Haru]
    - #908 - https://github.com/HerculesWS/Hercules/pull/908 - Add EQP_ = Equipment Position constants [AnnieRuru]
    - #1124 - https://github.com/HerculesWS/Hercules/pull/1124 - Constdb2doc plugin (doc/constants.md) [Haru]
     
    Related Commits:
    - a815472 - https://github.com/HerculesWS/Hercules/commit/a815472 - Sun, 10 Jan 2016 02:01:55 +0100 Converted const.txt to libconfig format [Haru]
    - 6ae9045 - https://github.com/HerculesWS/Hercules/commit/6ae9045 - Sun, 10 Jan 2016 02:33:15 +0100 Added support to mark constants in db/constants.conf as deprecated [Haru]
    - 3f56ffc - https://github.com/HerculesWS/Hercules/commit/3f56ffc - Sun, 10 Jan 2016 02:33:41 +0100 Marked Job_Alchem and Job_Baby_Alchem as deprecated [Haru]
    - 99f707e - https://github.com/HerculesWS/Hercules/commit/99f707e - Wed, 13 Jan 2016 11:47:47 +0100 Added converter script from const.txt to constants.conf [Haru]
    - 49081f4 - https://github.com/HerculesWS/Hercules/commit/49081f4 - Wed, 13 Jan 2016 19:22:45 +0300 Merge pull request #1088 from HerculesWS/constdb [Andrei Karas]
    - 9e48e2a - https://github.com/HerculesWS/Hercules/commit/9e48e2a - Wed, 13 Jan 2016 17:23:31 +0100 HPM Hooks Update [Hercules.ws] (dastgir/master)
    - de33b02 - https://github.com/HerculesWS/Hercules/commit/de33b02 - Fri, 15 Jan 2016 20:34:26 +0100 Fixed a typo in the constdb converter script [Haru]
    - a1310e2 - https://github.com/HerculesWS/Hercules/commit/a1310e2 - Wed, 6 Jan 2016 16:38:43 +0800 Remove VAR_ constants - there are 2 same constants for setlook script command, remove the wrong one - VAR_ constant added by l
    one_wolf is invalid https://github.com/HerculesWS/Hercules/commit/f4278f36db32f35e535a0ea8feb1cf83ca95019e, so use the LOOK_ constant [AnnieRuru]
    - 7610346 - https://github.com/HerculesWS/Hercules/commit/7610346 - Sat, 16 Jan 2016 20:23:57 +0100 Merge pull request #908 from AnnieRuru/request_26 [Haru]
    - e3253b4 - https://github.com/HerculesWS/Hercules/commit/e3253b4 - Mon, 25 Jan 2016 16:52:27 +0100 Added source support for special comments in the constdb [Haru]
    - 72a75cb - https://github.com/HerculesWS/Hercules/commit/72a75cb - Mon, 25 Jan 2016 15:53:56 +0100 Added constdb2doc plugin [Haru]
    - 15bca8f - https://github.com/HerculesWS/Hercules/commit/15bca8f - Mon, 25 Jan 2016 16:00:44 +0100 Generated doc/constants.md [Haru] (HEAD -> constdb2doc, origin/constdb2doc)
     
    Trivia:
    The constdb2doc plugin introduced in 72a75cb is based on my 'vimsyntaxgen' plugin (see https://github.com/HerculesWS/StaffPlugins/tree/master/Haru/vimsyntaxgen).
  6. Upvote
    Haru got a reaction from jaBote in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Rationale:
    This is part of the NPC scripts standardization project. In the past, NPCs were defined with numeric View IDs, while now we've replaced most of them with more human-readable (and as such easier to maintain) constants - the same constants that AEGIS scripts use, making the numeric IDs obsolete (and deprecated).
     
    Contents:
    When the NPC View IDs were converted to constants, the only leftover was the special ID '-1' we use for invisible / floating NPCs, that didn't have an equivalent constant defined at the time.
    This changeset defines a constant 'FAKE_NPC' for it, and replaces all the '-1' view IDs with the new constant.
    The exception for the -1 case is removed from the code (making it effectively deprecated, just like the other numeric IDs).
     
    Impact:
    The impact of this changeset on custom scripts is low. All old code will still work (but it'll throw a deprecation warning).
    It's recommended to update all the affected code as soon as possible - the support for the old style IDs may be removed from the code at any time in the future (after at least a month from the commit).
     
    Details:
    The use of the sprite ID '-1' in NPC headers to specify an invisible NPC is now deprecated. 'FAKE_NPC' should be used instead. This affects all NPC types (script, shop, trader, duplicate, etc)
    /* Before: */ - script TurboTrap#tt_main -1,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 -1,0,0 /* Now: */ - script TurboTrap#tt_main FAKE_NPC,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 FAKE_NPC,0,0 Merge Date:Thu, 31 Dec 2015 23:40:48 +0100
     
    Related Pull Requests:
    - #1000 - https://github.com/HerculesWS/Hercules/pull/1000 - define FAKE_NPC as -1 in const.txt [AnnieRuru]
     
    Related Commits:
    - ef171a8 - https://github.com/HerculesWS/Hercules/commit/ef171a8 - Mon, 21 Dec 2015 19:59:38 +0800 define FAKE_NPC as -1 in const.txt [AnnieRuru]
    - efaaf84 - https://github.com/HerculesWS/Hercules/commit/efaaf84 - Mon, 21 Dec 2015 20:12:45 +0800 Replace -1,{ with FAKE_NPC,{ replace using Notepad++ [AnnieRuru]
    - b4c99db - https://github.com/HerculesWS/Hercules/commit/b4c99db - Tue, 29 Dec 2015 02:16:49 +0100 Replaced leftover -1 view IDs with FAKE_NPC [Haru]
    - 32a42ee - https://github.com/HerculesWS/Hercules/commit/32a42ee - Tue, 29 Dec 2015 02:17:26 +0100 Extended the numeric view ID deprecation to '-1' (FAKE_NPC) [Haru]
    - 0e99004 - https://github.com/HerculesWS/Hercules/commit/0e99004 - Thu, 31 Dec 2015 23:40:48 +0100 Merge branch 'AnnieRuru-request_29' into hercules [Haru]
     
    Trivia:
    Commit efaaf84 was done with a find and replace in Notepad++, to globally replace '-1' view IDs with 'FAKE_NPC' (as described in the commit notes).
    Commit b4c99db caught the leftovers (less common cases where the -1 is not followed by ',{'), and was powered by vim macros and grep (and vimgrep). It also features manual clean up of trailing whitespace or extra tabs in a small subset of the affected lines.
  7. Upvote
    Haru got a reaction from Legend in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Rationale:
    This is part of the NPC scripts standardization project. In the past, NPCs were defined with numeric View IDs, while now we've replaced most of them with more human-readable (and as such easier to maintain) constants - the same constants that AEGIS scripts use, making the numeric IDs obsolete (and deprecated).
     
    Contents:
    When the NPC View IDs were converted to constants, the only leftover was the special ID '-1' we use for invisible / floating NPCs, that didn't have an equivalent constant defined at the time.
    This changeset defines a constant 'FAKE_NPC' for it, and replaces all the '-1' view IDs with the new constant.
    The exception for the -1 case is removed from the code (making it effectively deprecated, just like the other numeric IDs).
     
    Impact:
    The impact of this changeset on custom scripts is low. All old code will still work (but it'll throw a deprecation warning).
    It's recommended to update all the affected code as soon as possible - the support for the old style IDs may be removed from the code at any time in the future (after at least a month from the commit).
     
    Details:
    The use of the sprite ID '-1' in NPC headers to specify an invisible NPC is now deprecated. 'FAKE_NPC' should be used instead. This affects all NPC types (script, shop, trader, duplicate, etc)
    /* Before: */ - script TurboTrap#tt_main -1,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 -1,0,0 /* Now: */ - script TurboTrap#tt_main FAKE_NPC,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 FAKE_NPC,0,0 Merge Date:Thu, 31 Dec 2015 23:40:48 +0100
     
    Related Pull Requests:
    - #1000 - https://github.com/HerculesWS/Hercules/pull/1000 - define FAKE_NPC as -1 in const.txt [AnnieRuru]
     
    Related Commits:
    - ef171a8 - https://github.com/HerculesWS/Hercules/commit/ef171a8 - Mon, 21 Dec 2015 19:59:38 +0800 define FAKE_NPC as -1 in const.txt [AnnieRuru]
    - efaaf84 - https://github.com/HerculesWS/Hercules/commit/efaaf84 - Mon, 21 Dec 2015 20:12:45 +0800 Replace -1,{ with FAKE_NPC,{ replace using Notepad++ [AnnieRuru]
    - b4c99db - https://github.com/HerculesWS/Hercules/commit/b4c99db - Tue, 29 Dec 2015 02:16:49 +0100 Replaced leftover -1 view IDs with FAKE_NPC [Haru]
    - 32a42ee - https://github.com/HerculesWS/Hercules/commit/32a42ee - Tue, 29 Dec 2015 02:17:26 +0100 Extended the numeric view ID deprecation to '-1' (FAKE_NPC) [Haru]
    - 0e99004 - https://github.com/HerculesWS/Hercules/commit/0e99004 - Thu, 31 Dec 2015 23:40:48 +0100 Merge branch 'AnnieRuru-request_29' into hercules [Haru]
     
    Trivia:
    Commit efaaf84 was done with a find and replace in Notepad++, to globally replace '-1' view IDs with 'FAKE_NPC' (as described in the commit notes).
    Commit b4c99db caught the leftovers (less common cases where the -1 is not followed by ',{'), and was powered by vim macros and grep (and vimgrep). It also features manual clean up of trailing whitespace or extra tabs in a small subset of the affected lines.
  8. Upvote
    Haru got a reaction from JulioCF in [2016-01-10] Enable debug information in configure by default   
    Rationale:
    Historically, we've received several crash reports or null pointer reports that were of barely any use, because they were produced by servers built without debug information.
     
    Contents:
    The default build mode, when using the UNIX ./configure && make build scripts, is now set to include debug information.
     
    Impact:
    The performance decrease when built in debug mode should be negligible. In any case, it's still possible to disable the debug mode while compiling.
    Users concerned with minimal performance improvements, who don't want a readable backtrace in case of issues, can still pass --disable-debug to the configure script.
     
    Details:
    The configure script provides a command line flag to enable/disable/configure the debug mode options:
     
    Before this commit, the default, when passing no options, was equivalent to:
     
    ./configure --disable-debug
     
    After this commit, the default will be:
     
    ./configure --enable-debug
     
    Another recommended option worth mentioning, that might improve the debugger's ability to produce meaningful information (in case of gdb) is:
     
    ./configure --enable-debug=gdb
     
    Merge Date:
    Sun, 10 Jan 2016 18:34:56 +0300
     
    Related Pull Requests:
    - #1090 - https://github.com/HerculesWS/Hercules/pull/1090 - Enable debug information in configure by default. [Andrei Karas]
     
    Related Commits:
    - d0af903 - https://github.com/HerculesWS/Hercules/commit/d0af903 - Sun, 10 Jan 2016 18:34:56 +0300 Enable debug information in configure by default. [Andrei Karas]
    - c01f745 - https://github.com/HerculesWS/Hercules/commit/c01f745 - Sun, 10 Jan 2016 18:41:19 +0100 Merge pull request #1090 from 4144/enabledebug [Haru]
  9. Upvote
    Haru got a reaction from jTynne in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    That's certainly true, the RO population is declining and all, but please understand that Hercules has very little to do with the number of players playing the game.
     
    I'm not here to implement the latest NPCs or to obtain information from official servers (I don't even have an account on official servers, nor I have access to any inside information or leaks), but you can't deny that other developers in the Hercules team are constantly adding new features or adapting to game mechanics changes. My role here is to oversee the development, review code, and bring architectural improvements when they're necessary.
     
    Please also keep in mind that, while Hercules is mostly a Ragnarok Online emulator, it provides a foundation that can be used with other games (see The Mana World / evol online for an example).
  10. Upvote
    Haru got a reaction from jTynne in [2016-01-10] Enable debug information in configure by default   
    Rationale:
    Historically, we've received several crash reports or null pointer reports that were of barely any use, because they were produced by servers built without debug information.
     
    Contents:
    The default build mode, when using the UNIX ./configure && make build scripts, is now set to include debug information.
     
    Impact:
    The performance decrease when built in debug mode should be negligible. In any case, it's still possible to disable the debug mode while compiling.
    Users concerned with minimal performance improvements, who don't want a readable backtrace in case of issues, can still pass --disable-debug to the configure script.
     
    Details:
    The configure script provides a command line flag to enable/disable/configure the debug mode options:
     
    Before this commit, the default, when passing no options, was equivalent to:
     
    ./configure --disable-debug
     
    After this commit, the default will be:
     
    ./configure --enable-debug
     
    Another recommended option worth mentioning, that might improve the debugger's ability to produce meaningful information (in case of gdb) is:
     
    ./configure --enable-debug=gdb
     
    Merge Date:
    Sun, 10 Jan 2016 18:34:56 +0300
     
    Related Pull Requests:
    - #1090 - https://github.com/HerculesWS/Hercules/pull/1090 - Enable debug information in configure by default. [Andrei Karas]
     
    Related Commits:
    - d0af903 - https://github.com/HerculesWS/Hercules/commit/d0af903 - Sun, 10 Jan 2016 18:34:56 +0300 Enable debug information in configure by default. [Andrei Karas]
    - c01f745 - https://github.com/HerculesWS/Hercules/commit/c01f745 - Sun, 10 Jan 2016 18:41:19 +0100 Merge pull request #1090 from 4144/enabledebug [Haru]
  11. Upvote
    Haru got a reaction from Skyline in [2016-01-10] Enable debug information in configure by default   
    Rationale:
    Historically, we've received several crash reports or null pointer reports that were of barely any use, because they were produced by servers built without debug information.
     
    Contents:
    The default build mode, when using the UNIX ./configure && make build scripts, is now set to include debug information.
     
    Impact:
    The performance decrease when built in debug mode should be negligible. In any case, it's still possible to disable the debug mode while compiling.
    Users concerned with minimal performance improvements, who don't want a readable backtrace in case of issues, can still pass --disable-debug to the configure script.
     
    Details:
    The configure script provides a command line flag to enable/disable/configure the debug mode options:
     
    Before this commit, the default, when passing no options, was equivalent to:
     
    ./configure --disable-debug
     
    After this commit, the default will be:
     
    ./configure --enable-debug
     
    Another recommended option worth mentioning, that might improve the debugger's ability to produce meaningful information (in case of gdb) is:
     
    ./configure --enable-debug=gdb
     
    Merge Date:
    Sun, 10 Jan 2016 18:34:56 +0300
     
    Related Pull Requests:
    - #1090 - https://github.com/HerculesWS/Hercules/pull/1090 - Enable debug information in configure by default. [Andrei Karas]
     
    Related Commits:
    - d0af903 - https://github.com/HerculesWS/Hercules/commit/d0af903 - Sun, 10 Jan 2016 18:34:56 +0300 Enable debug information in configure by default. [Andrei Karas]
    - c01f745 - https://github.com/HerculesWS/Hercules/commit/c01f745 - Sun, 10 Jan 2016 18:41:19 +0100 Merge pull request #1090 from 4144/enabledebug [Haru]
  12. Upvote
    Haru got a reaction from evilpuncker in [2016-01-06] TBL_* typedefs and BL_CAST() variants   
    January! Fixed, thank you (the one in the title was correct)
  13. Upvote
    Haru got a reaction from AnnieRuru in [2016-01-06] TBL_* typedefs and BL_CAST() variants   
    Rationale:
    This is part of a larger source cleanup project. Following the code style guidelines we decided to adopt (linux kernel guidelines), typedefs should be avoided except where necessary.
    At the same time, we noticed that we have far too many explicit casts through the code, that might easily hide a coding error (for example a variable that changed type), so we're going to try and remove as many of those as possible as well.
     
    Contents:
    The various TBL_* typedefs are completely unnecessary (they're only needed for internal use by the BL_CAST() macro). As such, they shouldn't be used through the code, so they have been deprecated (they're not marked as deprecated yet, due to technical reasons, but you can assume they are).
    Taking the chance, the BL_CAST() macro was changed to a family of macros (BL_CAST, BL_CCAST, BL_UCAST, BL_UCCAST), each with different behavior and purpose:
     
    - BL_CAST(): Casts its argument to the specified type, after ensuring the block list was of the correct type. The argument must be non-constant, and it may be evaluated more than once (i.e. unsafe to use with mapit->next(x))
    - BL_CCAST(): Same as BL_CAST, but it takes a const block list pointer, and returns a const object.
    - BL_UCAST(): Casts its argument to the specified type, without verifying the source block list (it is the caller's care to do that). The argument is guaranteed to be evaluated only once, making it suitable to be used with mapit->next(x) or similar functions.
    - BL_UCCAST(): Same as BL_UCAST(), but takes a const block list pointer, and returns a const object.
     
    Impact:
    Custom code may stop compiling until the appropriate changes are made. Changes are easy/trivial (mostly doable as a find and replace)
     
    Details:
    Any use of the TBL_* typedefs must be replaced with the corresponding struct:
     
    - TBL_PC -> struct map_session_data
    - TBL_NPC -> struct npc_data
    - TBL_MOB -> struct mob_data
    - TBL_ITEM -> struct flooritem_data
    - TBL_CHAT -> struct chat_data
    - TBL_SKILL -> struct skill_unit
    - TBL_PET -> struct pet_data
    - TBL_HOM -> struct homun_data
    - TBL_MER -> struct mercenary_data
    - TBL_ELEM -> struct elemental_data
     
    Any explicit casts of a struct block_list to any of the above types, should be replaced with the most appropriate BL_CAST() variant (as described above).
     
    Merge Date:
    Wed, 6 Jan 2016 17:36:33 +0300
     
    Related Pull Requests:
    - #1034 - https://github.com/HerculesWS/Hercules/pull/1034 - Changed all TBL_* to the appropriate structs [Haru]
    - #1024 - https://github.com/HerculesWS/Hercules/pull/1024 - Change all TBL_* to actual struct to follow unix kernel syntax [hemagx]
     
    Related Commits:
    - b69f7b8 - https://github.com/HerculesWS/Hercules/commit/b69f7b8 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_PC to struct map_session_data as per style guidelines [hemagx]
    - 1249dc2 - https://github.com/HerculesWS/Hercules/commit/1249dc2 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_MOB to struct mob_data as per strly guidelines [hemagx]
    - 3364658 - https://github.com/HerculesWS/Hercules/commit/3364658 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_HOM to struct homun_data as per style guidelines [hemagx]
    - 00c95f6 - https://github.com/HerculesWS/Hercules/commit/00c95f6 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_MER to struct mercenary_data as per style guidelines [hemagx]
    - b040c61 - https://github.com/HerculesWS/Hercules/commit/b040c61 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_SKILL to struct skill_data as per style guidelines [hemagx]
    - 829ebdd - https://github.com/HerculesWS/Hercules/commit/829ebdd - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_PET to struct pet_data as per style guidelines [hemagx]
    - 1f71f41 - https://github.com/HerculesWS/Hercules/commit/1f71f41 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_ELEM to struct elemental_data as per style guidelines [hemagx]
    - 3007a37 - https://github.com/HerculesWS/Hercules/commit/3007a37 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_NPC to struct npc_data as per style guidelines [hemagx]
    - a1b0dae - https://github.com/HerculesWS/Hercules/commit/a1b0dae - Sun, 27 Dec 2015 17:35:25 +0100 Introduced the BL_UCAST() macro as an alternative to explicit casts [Haru]
    - aa574e3 - https://github.com/HerculesWS/Hercules/commit/aa574e3 - Mon, 28 Dec 2015 15:14:22 +0100 Added const variants of BL_CAST/BL_UCAST: BL_CCAST/BL_UCCAST [Haru]
    - b3c722e - https://github.com/HerculesWS/Hercules/commit/b3c722e - Sun, 27 Dec 2015 18:17:24 +0100 Replaced some explicit casts with BL_UCAST/BL_UCCAST [Haru]
    - f878d5e - https://github.com/HerculesWS/Hercules/commit/f878d5e - Mon, 28 Dec 2015 00:16:39 +0100 Replaced some explicit casts with BL_UCAST/BL_UCCAST [Haru]
    - 2055585 - https://github.com/HerculesWS/Hercules/commit/2055585 - Mon, 28 Dec 2015 00:24:24 +0100 Replaced some map->id2sd calls with the proper map->id2XX function [Haru]
    - 5db8be9 - https://github.com/HerculesWS/Hercules/commit/5db8be9 - Mon, 28 Dec 2015 02:05:09 +0100 Moved status_get_homXXX macros to status.c [Haru]
    - 0e05c1e - https://github.com/HerculesWS/Hercules/commit/0e05c1e - Mon, 28 Dec 2015 15:13:02 +0100 Replaced some explicit casts with BL_UCAST [Haru]
    - e3eac13 - https://github.com/HerculesWS/Hercules/commit/e3eac13 - Mon, 28 Dec 2015 15:41:36 +0100 Replaced the remaining explicit casts with BL_CAST/BL_UCAST [Haru]
    - d5199ce - https://github.com/HerculesWS/Hercules/commit/d5199ce - Wed, 6 Jan 2016 17:36:33 +0300 Merge pull request #1034 from HerculesWS/bl_cast [Andrei Karas]
    - f0fb759 - https://github.com/HerculesWS/Hercules/commit/f0fb759 - Wed, 6 Jan 2016 15:37:16 +0100 HPM Hooks Update [Hercules.ws]
    - 0772dd0 - https://github.com/HerculesWS/Hercules/commit/0772dd0 - Wed, 6 Jan 2016 23:56:48 +0300 Fix null pointer access after previous commits. [Andrei Karas]
    - 2af2132 - https://github.com/HerculesWS/Hercules/commit/2af2132 - Fri, 8 Jan 2016 16:51:59 +0100 Fixed a mapserver crash (too small allocation) [Haru]
     
    Trivia:
    While many of the changes here would have been possible with find and replace, I decided to review each and every of them (the actual replacement was mostly done with a vim macro, but not fully automated so I could see what the code was, and possibly do additional cleanup by hand), in order to review up some old, wrong code. It turned out that we were casting things that we didn't need to cast, or using wrong map->bl2XX() functions in several places. It costed some hours of work, but it was definitely worth it.
  14. Upvote
    Haru got a reaction from hemagx in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    The constants don't need to be looked up, since they have somewhat of a meaning (they already tell you if a NPC is a man, a woman, an animal, a monster or a thing for example, and they describe in a way or another what it looks like). Numbers on the other hand, are just numbers, and don't have any descriptive meaning. It's discouraged to use numbers, since they're too easy to mistake (and several errors in the past, both in scripts and in source, were caused by misplaced numbers, very hard to detect while reviewing code)
  15. Upvote
    Haru got a reaction from evilpuncker in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    The constants don't need to be looked up, since they have somewhat of a meaning (they already tell you if a NPC is a man, a woman, an animal, a monster or a thing for example, and they describe in a way or another what it looks like). Numbers on the other hand, are just numbers, and don't have any descriptive meaning. It's discouraged to use numbers, since they're too easy to mistake (and several errors in the past, both in scripts and in source, were caused by misplaced numbers, very hard to detect while reviewing code)
  16. Upvote
    Haru got a reaction from evilpuncker in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Not intentional, I'll look into it
     
    Okay, checked. The reason is that we don't parse the view ID, if the shop NPC is floating. I'll probably change that (I believe it's a good idea to enforce the syntax more strictly, to avoid unexpected issues later)
  17. Upvote
    Haru got a reaction from jaBote in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    @@Oxxy 49 66 20 79 6F 75 20 70 72 65 66 65 72 20 72 65 61 64 69 6E 67 20 6E 75 6D 62 65 72 73 20 74 68 61 6E 20 77 6F 72 64 73 2C 20 6E 6F 74 68 69 6E 67 20 70 72 65 76 65 6E 74 73 20 79 6F 75 20 66 72 6F 6D 20 64 65 66 69 6E 69 6E 67 20 74 68 6F 73 65 20 6E 75 6D 62 65 72 73 20 61 73 20 63 6F 6E 73 74 61 6E 74 73 2C 20 62 79 20 65 64 69 74 69 6E 67 20 63 6F 6E 73 74 61 6E 74 73 2E 63 6F 6E 66 2E. Sarcasm aside, it's just ASCII codes. If you decode it, it contains a solution that should work for you.
     
    @@vykimo If you're not pleased, you can use any other emulator. We provide both content updates and architecture modernization, and we will keep doing so as long as the project lives. If you want to stick to the early 2000's coding practices *and* use Hercules at the same time, then feel free to make your own fork, and undo the changes you don't like. As you can see in my post, I specified the related commits, so they're easy to revert.
  18. Upvote
    Haru got a reaction from JulioCF in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Rationale:
    This is part of the NPC scripts standardization project. In the past, NPCs were defined with numeric View IDs, while now we've replaced most of them with more human-readable (and as such easier to maintain) constants - the same constants that AEGIS scripts use, making the numeric IDs obsolete (and deprecated).
     
    Contents:
    When the NPC View IDs were converted to constants, the only leftover was the special ID '-1' we use for invisible / floating NPCs, that didn't have an equivalent constant defined at the time.
    This changeset defines a constant 'FAKE_NPC' for it, and replaces all the '-1' view IDs with the new constant.
    The exception for the -1 case is removed from the code (making it effectively deprecated, just like the other numeric IDs).
     
    Impact:
    The impact of this changeset on custom scripts is low. All old code will still work (but it'll throw a deprecation warning).
    It's recommended to update all the affected code as soon as possible - the support for the old style IDs may be removed from the code at any time in the future (after at least a month from the commit).
     
    Details:
    The use of the sprite ID '-1' in NPC headers to specify an invisible NPC is now deprecated. 'FAKE_NPC' should be used instead. This affects all NPC types (script, shop, trader, duplicate, etc)
    /* Before: */ - script TurboTrap#tt_main -1,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 -1,0,0 /* Now: */ - script TurboTrap#tt_main FAKE_NPC,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 FAKE_NPC,0,0 Merge Date:Thu, 31 Dec 2015 23:40:48 +0100
     
    Related Pull Requests:
    - #1000 - https://github.com/HerculesWS/Hercules/pull/1000 - define FAKE_NPC as -1 in const.txt [AnnieRuru]
     
    Related Commits:
    - ef171a8 - https://github.com/HerculesWS/Hercules/commit/ef171a8 - Mon, 21 Dec 2015 19:59:38 +0800 define FAKE_NPC as -1 in const.txt [AnnieRuru]
    - efaaf84 - https://github.com/HerculesWS/Hercules/commit/efaaf84 - Mon, 21 Dec 2015 20:12:45 +0800 Replace -1,{ with FAKE_NPC,{ replace using Notepad++ [AnnieRuru]
    - b4c99db - https://github.com/HerculesWS/Hercules/commit/b4c99db - Tue, 29 Dec 2015 02:16:49 +0100 Replaced leftover -1 view IDs with FAKE_NPC [Haru]
    - 32a42ee - https://github.com/HerculesWS/Hercules/commit/32a42ee - Tue, 29 Dec 2015 02:17:26 +0100 Extended the numeric view ID deprecation to '-1' (FAKE_NPC) [Haru]
    - 0e99004 - https://github.com/HerculesWS/Hercules/commit/0e99004 - Thu, 31 Dec 2015 23:40:48 +0100 Merge branch 'AnnieRuru-request_29' into hercules [Haru]
     
    Trivia:
    Commit efaaf84 was done with a find and replace in Notepad++, to globally replace '-1' view IDs with 'FAKE_NPC' (as described in the commit notes).
    Commit b4c99db caught the leftovers (less common cases where the -1 is not followed by ',{'), and was powered by vim macros and grep (and vimgrep). It also features manual clean up of trailing whitespace or extra tabs in a small subset of the affected lines.
  19. Upvote
    Haru got a reaction from evilpuncker in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    Rationale:
    This is part of the NPC scripts standardization project. In the past, NPCs were defined with numeric View IDs, while now we've replaced most of them with more human-readable (and as such easier to maintain) constants - the same constants that AEGIS scripts use, making the numeric IDs obsolete (and deprecated).
     
    Contents:
    When the NPC View IDs were converted to constants, the only leftover was the special ID '-1' we use for invisible / floating NPCs, that didn't have an equivalent constant defined at the time.
    This changeset defines a constant 'FAKE_NPC' for it, and replaces all the '-1' view IDs with the new constant.
    The exception for the -1 case is removed from the code (making it effectively deprecated, just like the other numeric IDs).
     
    Impact:
    The impact of this changeset on custom scripts is low. All old code will still work (but it'll throw a deprecation warning).
    It's recommended to update all the affected code as soon as possible - the support for the old style IDs may be removed from the code at any time in the future (after at least a month from the commit).
     
    Details:
    The use of the sprite ID '-1' in NPC headers to specify an invisible NPC is now deprecated. 'FAKE_NPC' should be used instead. This affects all NPC types (script, shop, trader, duplicate, etc)
    /* Before: */ - script TurboTrap#tt_main -1,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 -1,0,0 /* Now: */ - script TurboTrap#tt_main FAKE_NPC,{ // ... } in_moc_16,65,162,0 duplicate(SinTrap) 02_2 FAKE_NPC,0,0 Merge Date:Thu, 31 Dec 2015 23:40:48 +0100
     
    Related Pull Requests:
    - #1000 - https://github.com/HerculesWS/Hercules/pull/1000 - define FAKE_NPC as -1 in const.txt [AnnieRuru]
     
    Related Commits:
    - ef171a8 - https://github.com/HerculesWS/Hercules/commit/ef171a8 - Mon, 21 Dec 2015 19:59:38 +0800 define FAKE_NPC as -1 in const.txt [AnnieRuru]
    - efaaf84 - https://github.com/HerculesWS/Hercules/commit/efaaf84 - Mon, 21 Dec 2015 20:12:45 +0800 Replace -1,{ with FAKE_NPC,{ replace using Notepad++ [AnnieRuru]
    - b4c99db - https://github.com/HerculesWS/Hercules/commit/b4c99db - Tue, 29 Dec 2015 02:16:49 +0100 Replaced leftover -1 view IDs with FAKE_NPC [Haru]
    - 32a42ee - https://github.com/HerculesWS/Hercules/commit/32a42ee - Tue, 29 Dec 2015 02:17:26 +0100 Extended the numeric view ID deprecation to '-1' (FAKE_NPC) [Haru]
    - 0e99004 - https://github.com/HerculesWS/Hercules/commit/0e99004 - Thu, 31 Dec 2015 23:40:48 +0100 Merge branch 'AnnieRuru-request_29' into hercules [Haru]
     
    Trivia:
    Commit efaaf84 was done with a find and replace in Notepad++, to globally replace '-1' view IDs with 'FAKE_NPC' (as described in the commit notes).
    Commit b4c99db caught the leftovers (less common cases where the -1 is not followed by ',{'), and was powered by vim macros and grep (and vimgrep). It also features manual clean up of trailing whitespace or extra tabs in a small subset of the affected lines.
  20. Upvote
    Haru got a reaction from JulioCF in Flux Control Panel for Hercules   
    For a fact, the FluxCP project doesn't really have a maintainer right now. It's an open source project, though, and it's on github, so anyone can make a pull request if there's a bug (and someone will merge it).
     
    I have never audited the entire fluxcp code / structure (and probably never will, it's over-complicated), but only parts of it.
  21. Upvote
    Haru got a reaction from vBrenth in Flux Control Panel for Hercules   
    For a fact, the FluxCP project doesn't really have a maintainer right now. It's an open source project, though, and it's on github, so anyone can make a pull request if there's a bug (and someone will merge it).
     
    I have never audited the entire fluxcp code / structure (and probably never will, it's over-complicated), but only parts of it.
  22. Upvote
    Haru got a reaction from AnnieRuru in Suggestion to scripts in order to help localization   
    That way won't really solve it though. It needs to be collapsed into one string (in languages like Italian, the sentence order is different, so you can't keep the "how much do" and the "cost" parts separate, but you need to reorder them - see my sprintf example above
     
     
    This is a proof of concept of what the NPC scripts would look like with this change (I only did the Parmy Gianino NPC): https://gist.github.com/MishimaHaruna/4b0e735d8f6fffb005ad
     
     
     
    ---
     
     
    Okay, since AnnieRuru brought up a good argument in favor of hard-wrapping strings in some languages (specifically, Eastern Asian languages), I went and tested a bit, and it turns out that the client understands the r character:
     
    See image:
     
     
     
    That allows us to use sprintf this way:
    mes sprintf(_("How much dor" "12 %s,r" "1 %sr" "and 5 %s costr" "after a 24 %% discount?"), getitemname(Red_Potion), getitemname(Wing_Of_Butterfly), getitemname(Wing_Of_Fly));
  23. Upvote
    Haru got a reaction from jTynne in Mob DB file structure overhaul   
    Yes, it's pretty much ready, I fixed various issues yesterday. It still needs more testing, but I should be able to pull request it today
  24. Upvote
    Haru got a reaction from Angelmelody in Mob DB file structure overhaul   
    Yes, it's pretty much ready, I fixed various issues yesterday. It still needs more testing, but I should be able to pull request it today
  25. Upvote
    Haru got a reaction from jowy in Hercules WPE Free - June 14th Patch   
    1. If the key passes the test on that URL, you can use it on all clients, yes (provided that you compile Hercules with the same key)
     
    2. That URL will tell you. I don't really know how to generate a strong key, but I observed that the second key must be an odd number (ending with 1, 3, 5, 7, 9, B, D, F). If it's an even number, it will repeat after a few iterations. Not all the sets with an odd key are strong, but all sets where the second key is even, are weak (that happens because of the key schedule function that Gravity uses).
     
    3. I'll try to explain it briefly.
    After each packet sent, the client (and the server), applies a function to the current encryption (sub-)key to make it different for each packet sent (this is what prevents tools such as WPE from working for packet spamming, because if the key changes, a packet can't be re-played as it is).
    Each packet will be a different encryption/decryption sub-key, which is derived from the three original keys, by applying some sort of mathematical function (this is called the key schedule). The page you linked, runs the key schedule algorithm over and over (iterates it) several times, checking if the encryption sub-key changes every time. When it detects that the key didn't change, it reports a failure. The iteration number is how many times the key schedule function was applied before it started repeating the same key.
     
    I hope it makes any sense
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.