Commit Graph

75 Commits

Author SHA1 Message Date
Hector Franqui
7110c49b42 Spawner: Avoid multiple spawning by not replacing the mg_villages:plotmarker, but just override its definition.
NPC: (WIP) Support change properties on schedules.
2017-06-21 07:16:11 -04:00
Hector Franqui
fd4cec0d63 Spawner: Assign sits, furnaces and storage nodes to spawned NPCs.
Small basic schedule change: NPCs now sit from 12-1 on whatever sit they 'own'.
Fixed /restore_plotmarkers not clearing all metadata.
NPC: Attempted to add a fix for the children growing on their own (due to mobs_redo).
2017-06-19 21:03:24 -04:00
Hector Franqui
3df43ab580 Spawner: Assign sits, furnaces and storage nodes to spawned NPCs.
Small basic schedule change: NPCs now sit from 12-1 on whatever sit they 'own'.
Fixed /restore_plotmarkers not clearing all metadata.
NPC: Attempted to add a fix for the children growing on their own (due to mobs_redo).
2017-06-19 20:54:26 -04:00
Hector Franqui
2530918fe9 Fix various bugs 2017-06-17 12:55:50 -04:00
Hector Franqui
caa39d97ab NPC: Fixed bugs around new logs and npc chat functions.
Fixed bug with child texture.
2017-06-17 10:22:00 -04:00
Hector Franqui
a91160ecc6 NPC: Cleaned up debugging logs.
Standarized logs to have different levels.
Show by default only INFO, ERROR log messages.
Dialogues: Standarized function for NPC chat messages.
Removed trader.lua and trader_test.lua which are part of old 'mobs_npc' mod.
2017-06-17 09:44:25 -04:00
Hector Franqui
bf0f643e3e NPC: Changed general issue with names. Now names are a dedicated variable, not anymore a nametag.
NPC names aren't visible anymore.
Spawner: Added NPC statistics to plotmarkers.
Add statistics-based spawning for a more balanced, family-type spawning of NPCs.
2017-06-17 09:08:29 -04:00
Hector Franqui
adeeecd43e Pathfinding (WIP): Use MarkBu's pathfinder mod as the new pathfinder.
Actions: Modify walk_to_pos to use new pathfinding code.
Allow support for giving positions as strings or tables referring to specific places on Places Map.
Spawner: Assign beds to NPCs.
Increase amount of NPCs now being spawned as they are able to reach top floor beds.
Places: Slight overhaul and changes. Add more info to places.
NPC: Hide nametag.
2017-06-14 18:42:36 -04:00
Hector Franqui
d4e8744cfb Spawner: Assign entrance door to every NPC spawned.
Increased ABM chance to make NPC spawning less laggy.
Improved building scanning, finally now has correct data for scanning nodes.
Places: Finding entrances is limited now to MTG doors.
2017-05-19 14:36:11 -04:00
Hector Franqui
1d1a56592b Actions: Rewrite API to use executor function + constants of commands.
Re-write NPC add action/task functions, do_custom() to use new actions API.
Spawner: Find building entrances (WIP)
Places: Fix numerous bugs with add/get places functions.
Actions: Fix bugs with sittable task.
2017-05-13 13:17:45 -04:00
Hector Franqui
9b3d458872 Spawner: Part 1: Add initial code to find doors front/behind position.
Detect first floor nodes.
2017-05-05 18:34:16 -04:00
Hector Franqui
f4c374314a Actions: Enhance walking reliability by adding a moveto() at the end of every step and just before the next step.
Increase walking speed constants to more normal values.
2017-05-05 09:13:30 -04:00
Zorman2000
a667f538f8 Spawner: Find entrance doors (WIP) 2017-04-08 10:21:51 -04:00
Zorman2000
7f2e1b665a Pathfinding: Cleanup jumper.lua
Add copyright notices to jumper.lua
Remove 'pathfinder2.lua'
2017-04-04 10:11:19 -04:00
Zorman2000
297dd379a6 Pathfinding: Fix for mod security - joining up Jumper library code (WIP) 2017-04-03 21:48:17 -04:00
Zorman2000
d375762d11 NPCs: Add random female and male names.
Spawner: Start adding metadata to spawner, places to NPCs. (WIP)
2017-03-27 14:47:31 -04:00
Zorman2000
b5ef1f8ed8 Spawner: automatic and manual spawning now works completely. 2017-03-27 14:03:40 -04:00
Zorman2000
509bf571b1 Spawner: Fixed spawning. (WIP) 2017-03-27 11:08:18 -04:00
Zorman2000
e937cc4ce4 Spawner: Moved all spawning code to spawner.lua.
Started progress on node timer-based NPC spawning (WIP)
2017-03-22 22:08:41 -04:00
Zorman2000
f5fbda142e Spawner: Adds LBM to replace mg_villages:plotmarker with advanced_npc:auto_spawner (WIP).
Adds initial scan code (WIP).
2017-03-18 10:32:37 -04:00
zorman2000
bd6d735170 Actions: Change use sittable and use bed interface to use them as tasks.
Schedules: Allow tasks to be added as well as actions.
2017-03-09 19:41:44 -05:00
zorman2000
f55757d334 Schedules: Fix bugs, add simple test schedule. 2017-03-09 13:54:37 -05:00
zorman2000
fecdf8ff48 Schedules: Add correct execution interval for times. 2017-03-08 09:36:53 -05:00
zorman2000
1417e35ffb Trade: (WIP) Add custom trading dialogues, custom trading offers and code to show the custom trading options. 2017-02-23 07:27:25 -05:00
zorman2000
fcc1968179 Trade: Added dedicated trader's formspec. 2017-02-01 21:16:31 -05:00
zorman2000
d8b90d95c3 Trade: Add function to store trade offers on NPC data based on the trading status.
Add support to avoid flipping sold items out of stock to buy immediately.
2017-02-01 11:36:20 -05:00
zorman2000
b3b9bf393f Trade: Added basic logic for dedicated traders offers. 2017-01-30 21:51:16 -05:00
zorman2000
75af34beb5 Dialogue: full support for flag-based dialogues.
Added support for nested dialogue trees.
Trade: (WIP) Refactor code to support dedicated trading.
2017-01-26 12:55:04 -05:00
zorman2000
7c3801a5ce NPC: Fix small bug due to actions API change 2017-01-19 21:31:40 -05:00
zorman2000
5d2c820d88 Actions: No longer have 'self' as part of the arguments object for each action. This caused an error with Lua serialization that crashed Minetest while the NPC was executing actions and it got unloaded (like exit game or mapblock unloaded). 2017-01-19 20:42:46 -05:00
zorman2000
dd4d445b3a Actions: Fix unlock not working properly.
Pathfinding: Fix bug of map not generating if difference between z-coordinates is zero.
Code cleanup.
2017-01-19 20:11:11 -05:00
zorman2000
60b847a02a Actions: (WIP) Add locks, unlocks and re-execution of actions if there are interruptions. Need to improve the lock/unlock mechanism.
Dialogues, trading: Add lock and unlock upon starting/finishing an interaction.
Updated README with progress.
Pathfinding: Fix slight bug that avoid a map being generated if the difference of start and end positions' z coordinate is zero.
2017-01-18 19:34:02 -05:00
zorman2000
e265bc283e Actions: Set default walking speed to two nodes per second.
NPC: Set default wandering speed to one node per second.
2017-01-16 12:16:42 -05:00
zorman2000
9556e76b79 Actions: Add ability for NPC to fully use a furnace.
Add ability to add tasks to action queue.
2017-01-13 22:54:27 -05:00
zorman2000
137f02e863 Actions: Add set interval action, that allows to increase the action timer interval to effectively produce wait times. 2017-01-13 07:22:00 -05:00
zorman2000
1cb6eb5dd0 Actions: Add action to freeze/unfreeze mobs redo API. 2017-01-13 07:12:13 -05:00
zorman2000
e3fc7be783 Places: Add correct detection of sittable nodes, including stairs used as benches.
Add staircase detection method, for basic staircases. Ability to detect the bottom, middle and top nodes. Useful for future implementation of being able to use 2nd floors.
2017-01-12 19:40:20 -05:00
zorman2000
7e41e328e8 Actions: Support for sitting on benches and stairs. 2017-01-11 07:54:50 -05:00
zorman2000
e69272c359 Actions: Default doors and cottages' mod doors are fully supported now.
Default bed and cottages' mod beds fully supported now.
2017-01-10 14:22:18 -05:00
zorman2000
641bdd8874 Actions: Fully working 2D pathfinding code, including doors.
Added NPC actions so that it now closes doors after opening them.
Fixed rotations for opening/closing doors and for reaching the goal point.
Added full support to cottages mod gates and half doors.
WIP: Support for cottages beds and sleeping mats.
2017-01-09 11:34:38 -05:00
zorman2000
554fde4643 Adds pathfinding library Jumper by Ronald Yonaba. This includes an implementation of the A* pathfinding algorithm which makes NPC now always get to their goal node.
Pathfinding: Adds functions that allows to map the Minetest 3D map to a 2D array to use by the pathfinding algorithm.
Actions: Use new code for find_path function. Improves door opening while walking on paths, and also now close them. Cottages fence gates and doors are also now supported in addition to the default doors and gates.
Changes to the Readme and the License.
2017-01-06 07:57:42 -05:00
zorman2000
80b7eb6ec9 Actions: Added action to use a bed (from the default beds mod). 2016-12-29 21:34:41 -05:00
zorman2000
7f22a74d7d Actions: Added door opening/closing to walk action. 2016-12-29 19:02:25 -05:00
zorman2000
cffd307cfe Actions: Added action to open/close doors, fence gates and anything that uses the default doors mod. 2016-12-29 17:26:09 -05:00
zorman2000
6549a7e4f9 Actions: Fixed turns walking through paths.
Improved algorithm to include doors and fence gates using default API.
NPC: Improved collisionbox.
2016-12-29 15:09:30 -05:00
zorman2000
d78fee695e Actions: added experimental, still WIP path-finding code in Lua 2016-12-28 22:10:06 -05:00
zorman2000
646b422082 Actions: Added some fundamental movement actions.
Places: Added functions for adding and getting places, and for finding places of specific types. Added beds, chairs and chest as places.
NPC: Added places map and action queue.
2016-12-18 12:32:39 -05:00
zorman2000
a2e38ab85f NPC: Rewrote external inventory methods.
Trade: Added change casual offers timer functionality.
2016-12-17 14:27:23 -05:00
zorman2000
c15e8232d5 Trade: Fully working buy and sell offers.
Improvements to prices and price-related mechanisms.
NPC: Improved get_item_name and get_item_count methods.
2016-12-17 12:01:35 -05:00
zorman2000
72ab610cd8 Added new texture for marriage ring. 2016-12-15 21:33:57 -05:00