Commit Graph

67 Commits

Author SHA1 Message Date
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
49cdae423f More fixes to Readme. 2017-01-06 08:05:06 -05:00
zorman2000
461749f8af More fixes to the Readme to reflect properly progress 2017-01-06 08:02:35 -05:00
zorman2000
73a12d76cc Further fix to the README.: 2017-01-06 08:01:16 -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
42619ad035 Removed debug.txt file 2016-12-17 12:02:51 -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
zorman2000
f717c3f1e5 Trade: Working buy/sell trade mechanism.
Various cleanups and modularizations for supporting dedicated traders.
Data: Added more favorite items for phase 1.
2016-12-15 20:51:06 -05:00
zorman2000
376c6e1df0 Trade: Casual trading dialogues are now shown for NPCs correctly.
Added infrastructure to hold results from dialogues.
Added casual buy/sell trade formspec.
WIP: Trade mechanism for casual buy/sell.
2016-12-15 14:42:45 -05:00
zorman2000
da30d96395 Dialogues: Made multi-option dialogue less tall, negative option now normally spaced compared to the rest of the buttons.
Slight code cleanup.
2016-12-14 20:14:34 -05:00
zorman2000
0b0abc4706 NPCs: Now spawn with 1 or 2 items from the favorite items list.
Trade: Added dialogues for buys and sells for casual trading.
Dialogues: Added a 30% chance for NPC to make a trade offer.
Trade: Trade offers WIP.
2016-12-14 20:03:51 -05:00
zorman2000
83c9b2c681 Cleanup: moved relationships into own file.
Moved trading and pricing code to another folder, separate files.
NPC: Added further inventory functionality.
Trading: Added price data structure, which allows for setting prices for items. Also includes some default definitions.
2016-12-11 20:52:57 -05:00
zorman2000
2720be8d48 Trading: WIP
Added functions to determine trade state.
NPC: Added inventory and inventory functions.
Added variables to definition related with trading
2016-12-05 20:22:33 -05:00
zorman2000
a77dfacac7 Removed old chat code 2016-12-04 15:37:12 -05:00
zorman2000
01699d1d4a Relationships: Improved marriage dialogue.
When relationships change phase, dialogues are now updated as well.
Data: Added placeholder dialogues for both sexes and all phases.
2016-12-04 15:25:22 -05:00
zorman2000
a3b463ff26 Relationships: Added married NPC dialogue 2016-12-04 15:00:55 -05:00
zorman2000
f956101f61 Relationships: Added favorite and disliked items hints to dialogues. 2016-12-04 13:14:03 -05:00
zorman2000
216c77ca81 Dialogues: fixed bug with options dialogue 2016-12-04 10:01:37 -05:00
zorman2000
de33f45db1 Merge branch 'master' of https://github.com/zorman2000/advanced_npc 2016-12-04 09:30:50 -05:00
zorman2000
f462e6af75 Dialogues: added support for custom functions on multi-option dialogues.
Data: dialogues are now Lua tables indexed by numbers
2016-12-04 09:30:25 -05:00
Héctor Franqui
d96f78d21b Updated readme formatting 2016-12-03 07:48:35 -05:00
Héctor Franqui
293500e5e1 Update readme with copyright notice. 2016-12-03 07:46:56 -05:00
Héctor Franqui
14a121498e License change to GPL3 2016-12-03 07:41:38 -05:00
zorman2000
e89cd1e18d Relationships: completed support to increase relationship on talk. Implemented timer on this too.
Dialogues: Improved way responses are being stored into table for each player.
Added support for multi option dialogue and the dialogue action as well. WIP in function action type.
Cleaned up code.
2016-12-02 18:39:06 -05:00
zorman2000
eeabe601dd WIP: Gain relationship points by talking 2016-12-02 08:09:14 -05:00
zorman2000
762337cc6d Dialogues: Added function to select random dialogues for NPCs from random data.
Modified NPCs so random dialogues are chosen on initialization.
Added function to start a dialogue, choosing randomly NPCs dialogues.
Changed NPC code to use new dialogue code
2016-12-01 14:37:00 -05:00
zorman2000
46e3d2543b Added random data store: helps on generating random NPCs 2016-12-01 14:01:47 -05:00
zorman2000
9f82ae5b7b Dialogues: Changed prompt for yes/no dialogue to show on formspec instad of sent as message.
Added item name now when giving a gift to NPC.
Positive answer for yes/no dialogue is now a constant.
2016-12-01 09:26:57 -05:00
zorman2000
954752c9e3 Updated README 2016-11-29 23:55:49 -05:00
zorman2000
d6fd49b1ae Finished yes/no dialogue for dialogues.
Implemented using function callbacks for each option (positive or negative answer)
Implemented dialogue for confirming that player wants to give a gift to NPC rather than just losing the item
2016-11-29 23:53:46 -05:00
zorman2000
a877fe64cb Added yes/no dialogue box using normal formspecs. Added handler for formspecs 2016-11-29 14:44:27 -05:00
zorman2000
f89dfe780e Removed SmartFS as not supporting the wanted features 2016-11-29 14:10:32 -05:00
zorman2000
47847d2951 Fix bug in marriage check for receiving gifts 2016-11-29 14:05:09 -05:00
zorman2000
f53abf7072 Chat: started working on dialogue formspec.
Added smartfs for formspec functionality as library:
2016-11-29 04:27:07 -05:00
zorman2000
00e6531f91 Change to chat.lua 2016-11-26 14:30:24 -05:00
zorman2000
0c018729db Create copy of chat.lua 2016-11-26 14:27:35 -05:00