Skip to content
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

Closed
navila-luna opened this issue May 12, 2020 · 4 comments · May be fixed by #639
Closed

Design and implement a mock "sample_npc.h" module #563

navila-luna opened this issue May 12, 2020 · 4 comments · May be fixed by #639
Assignees
Labels
x/rpg-openworld RPG feature random world/room generation
Milestone

Comments

@navila-luna
Copy link
Contributor

navila-luna commented May 12, 2020

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.

@navila-luna navila-luna self-assigned this May 12, 2020
@navila-luna navila-luna added the x/rpg-openworld RPG feature random world/room generation label May 12, 2020
@navila-luna navila-luna added this to the 2020/Sprint 3 milestone May 14, 2020
@navila-luna navila-luna added the help wanted Extra attention is needed label May 21, 2020
@navila-luna
Copy link
Contributor Author

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.

Link to sample_npc.h

@navila-luna navila-luna changed the title Creating a mock NPC struct and mock NPC in a room. Design and implement a "sample_npc.h" module May 21, 2020
@navila-luna navila-luna changed the title Design and implement a "sample_npc.h" module Design and implement a mock "sample_npc.h" module May 23, 2020
@navila-luna navila-luna removed the help wanted Extra attention is needed label May 25, 2020
@navila-luna
Copy link
Contributor Author

navila-luna commented May 25, 2020

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.

@navila-luna
Copy link
Contributor Author

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.

@dwahme
Copy link
Contributor

dwahme commented Jun 10, 2020

Issue Score: ✔️+

Comments:
Great job! Here are a few things you may want to improve in future issues:

When an issue is done, you should include a final comment summarizing what was done, and why the issue is being closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x/rpg-openworld RPG feature random world/room generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants