Archived

This topic is now archived and is closed to further replies.

Mystery

[2016-02-05] MobDB2SQL plugin and Mob DB improvements

Recommended Posts

Rationale:
This is a follow-up to the Mob DB conversion to libconfig format from some months ago, and brings it on par with the Item DB.

Contents:
- The JName field has been restored (and made optional), for the entries that need it.
- Several numeric values in the mob DB have been replaced with constants (race, size, element), to make it more readable.
- The db2sql plugin can now produce SQL scripts for both item and mob databases.
- Some floating point rounding errors have been fixed (i.e. before this update, the 100% of 820 was, apparently, 819).

Impact:
- This changeset does not affect backwards compatibility of the mob database, although it's recommended to update any custom entries to use the new constants.
- When running the db2sql plugin, only the current mode (renewal or pre-renewal) is generated. If both are wanted, both the core and the plugin will need to be compiled twice, in each of the modes.

Details:

The format of Mob DB entries was changed (but the old format is still supported, although not recommended):
{ /* Before */
	Id: 1001
	SpriteName: "SCORPION"
	Name: "Scorpion"
	Lv: 24
	// ...
	ViewRange: 10
	ChaseRange: 12
	Size: 0
	Race: 4
	Element: (3, 1)
	Mode: {
		// ...
	}
	MoveSpeed: 200
	// ...
},

{ /* After */
	Id: 1001
	SpriteName: "SCORPION"
	Name: "Scorpion"
	Lv: 24
	// ...
	ViewRange: 10
	ChaseRange: 12
	Size: "Size_Small"
	Race: "RC_Insect"
	Element: ("Ele_Fire", 1)
	Mode: {
		// ...
	}
	MoveSpeed: 200
	// ...
},

The mob_db scripts are now updated automatically by the HerculesWSAPI bot, like the Item Database.

Merge Date:
Fri, 5 Feb 2016 00:19:58 +0300

Related Pull Requests:
- #993 - https://github.com/HerculesWS/Hercules/pull/993 - Mob DB support for the db2sql plugin [Haru]

Related Commits:
- 50de6b4 - https://github.com/HerculesWS/Hercules/commit/50de6b4 - Mon, 7 Dec 2015 02:58:02 +0100 - Modified Mob DB loader to behave like the Item DB loader [Haru]
- b7c5b53 - https://github.com/HerculesWS/Hercules/commit/b7c5b53 - Sat, 19 Dec 2015 18:15:04 +0100 - Added apply_percentrate and apply_percentrate64 functions [Haru]
- 8121e1d - https://github.com/HerculesWS/Hercules/commit/8121e1d - Sun, 20 Dec 2015 02:24:07 +0100 - Replaced several floating-point operations with integer operations [Haru]
- 84a16af - https://github.com/HerculesWS/Hercules/commit/84a16af - Sat, 19 Dec 2015 16:07:22 +0100 - Removed duplicate code from the db2sql plugin [Haru]
- 9e92231 - https://github.com/HerculesWS/Hercules/commit/9e92231 - Sat, 19 Dec 2015 16:11:43 +0100 - Changed DB2SQL plugin to not cross-convert databases [Haru]
- 25451ef - https://github.com/HerculesWS/Hercules/commit/25451ef - Sun, 6 Dec 2015 18:40:27 +0100 - Renamed some db2sql* plugin functions to itemdb2sql* [Haru]
- e1c5556 - https://github.com/HerculesWS/Hercules/commit/e1c5556 - Mon, 7 Dec 2015 04:29:55 +0100 - Added modb2sql converter to the db2sql plugin [Haru]
- 519263f - https://github.com/HerculesWS/Hercules/commit/519263f - Sun, 20 Dec 2015 02:53:44 +0100 - Preliminary update of the mob_db sql scripts to the latest txt snapshot [Haru]
- 867b94b - https://github.com/HerculesWS/Hercules/commit/867b94b - Sun, 20 Dec 2015 03:27:24 +0100 - Replaced numeric elements with Ele_* constants in the mob database [Haru]
- 2e13fef - https://github.com/HerculesWS/Hercules/commit/2e13fef - Sun, 20 Dec 2015 13:35:20 +0100 - Replaced numeric races with RC_* constants in the mob db [Haru]
- ca40527 - https://github.com/HerculesWS/Hercules/commit/ca40527 - Sun, 20 Dec 2015 13:38:45 +0100 - Replaced numeric sizes with Size_* constants in the mob db [Haru]
- 0426f8c - https://github.com/HerculesWS/Hercules/commit/0426f8c - Sun, 20 Dec 2015 03:28:55 +0100 - Re-added support for the JName field in the mob db [Haru]
- f434a9f - https://github.com/HerculesWS/Hercules/commit/f434a9f - Sun, 20 Dec 2015 05:03:08 +0100 - Re-added JName for the monsters that require it [Haru]
- dcc9ee4 - https://github.com/HerculesWS/Hercules/commit/dcc9ee4 - Sun, 20 Dec 2015 05:19:46 +0100 - Updated Mob Skill DB SQL script [Haru]
- 88a6bbe - https://github.com/HerculesWS/Hercules/commit/88a6bbe - Fri, 5 Feb 2016 00:19:58 +0300 - Merge pull request #993 from HerculesWS/mobdb2sql [Andrei Karas]
- 3414587 - https://github.com/HerculesWS/Hercules/commit/3414587 - Thu, 4 Feb 2016 22:20:40 +0100 - HPM Hooks Update [Hercules.ws]
- f6ee3f1 - https://github.com/HerculesWS/Hercules/commit/f6ee3f1 - Thu, 4 Feb 2016 22:20:42 +0100 - ItemDB SQL Sync [Hercules.ws]

View the full article

Share this post


Link to post
Share on other sites