-
Notifications
You must be signed in to change notification settings - Fork 13
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
Design and implement a mock "sample_npc.h" module #563
Comments
The NPC struct and functions to consider is called sample_npc.h and is currently available in openworlds sample branch. During the implementation I chose to treat the NPC's as items. The main difference between my NPC struct from the NPC team is that I do not include the dialogue tree hash table because it's still to be implemented by the NPC team. Instead I created a char *npc_ldesc, char *npc_sdesc, and char *npc_qdesc. The char npc_qdesc is a description essentially asking the player if they wish to engage with the NPC. Additionally, I created another struct item_prices which holds the price value for the different kinds of potions. I chose include the sample_room.h and sample_item.h files my team has already created. Currently, I need help with the implementation of the npc_t introduce_npc (); and some suggestions about the NPC struct and functions to consider. |
Decided for the purpose of these mock NPC module, that *npc_ldesc, char *npc_sdesc, and char *npc_qdesc are not necessary for the Openworld team. NPC descriptions do not impact the type of room that an NPC can be in. NPC level and NPC items matter because they are connected with the level type of room they can be in. For instance, a level 5 NPC wizard will not be found within a level 1 room. Additionally, there is no purpose for this mock to create a price item struct. Instead, this should be brought up the next time OpenWorld meets with the NPC and WDL team. |
To conclude, a mock npc struct and and hard coded functions were implemented in a file called sample_npc.h. This will then lead to the next step, which is writing the hard coded mock NPC functions and the utilization of them within the default room module. |
Issue Score: ✔️+ Comments: When an issue is done, you should include a final comment summarizing what was done, and why the issue is being closed. |
Purpose is to illustrate a sample of the NPC struct and the type of functions needed to be considered for NPC functionality within multiple rooms. This mock implementation is hard coded and will be removed once the NPC team has finished creating their NPC struct. The three hard coded functions consist of the three kinds of NPC types: Generic, Friendly, and Hostile. Determined that level and NPC items are the only necessary components OpenWorld needs to consider and therefore, the only (besides the prev and next for linked list) necessary within the npc_t struct.
The text was updated successfully, but these errors were encountered: