Hello. I am writing two scripts for my Interact Pack, Game_NPC, and Game_OBJ. Both should work similarly to Game_Actor. But I need to know a few things:
First of all, what do you think is easier for the developer of a game;
1. Creating a file for each NPC and OBJ in thier own folders in GameFolder/Data, and loading these files like Game_Actors loads the in-editor Database Actors Data.
or
2. Creating the information for the objects and npcs in a seperate script (like Game_NPCs and Game_OBJs #note the added s's). Each NPC and OBJ would be created in an array like this:
npc1 = [name, age, gender]
npc2 = [name, age, gender]
npc3 = [name, age, gender]
npc = [npc1, npc2, npc3]
Same for the OBJects. These 2 arrays (npc and obj) would be loaded into Game_NPC and Game_OBJ.
These are the only two methods of doing this that I can think of. Which one do you prefer, so I know which is more popular.
If 1. is chosen, I will need to know how to load and read text files (one line at a time).
And I need to know how to assign variables to each individual obj and npc so that I can do this:
$game_npc[npc_id].name = "NewNameString"
name = $game_npc[npc_id].getName #returns NPC[npc_id]'s name
I am kind of confused (learning too many languages at once). At least help with the last bit about assigning variables. Thanks for any help, and Peace Out!
~Broken
First of all, what do you think is easier for the developer of a game;
1. Creating a file for each NPC and OBJ in thier own folders in GameFolder/Data, and loading these files like Game_Actors loads the in-editor Database Actors Data.
or
2. Creating the information for the objects and npcs in a seperate script (like Game_NPCs and Game_OBJs #note the added s's). Each NPC and OBJ would be created in an array like this:
npc1 = [name, age, gender]
npc2 = [name, age, gender]
npc3 = [name, age, gender]
npc = [npc1, npc2, npc3]
Same for the OBJects. These 2 arrays (npc and obj) would be loaded into Game_NPC and Game_OBJ.
These are the only two methods of doing this that I can think of. Which one do you prefer, so I know which is more popular.
If 1. is chosen, I will need to know how to load and read text files (one line at a time).
And I need to know how to assign variables to each individual obj and npc so that I can do this:
$game_npc[npc_id].name = "NewNameString"
name = $game_npc[npc_id].getName #returns NPC[npc_id]'s name
I am kind of confused (learning too many languages at once). At least help with the last bit about assigning variables. Thanks for any help, and Peace Out!
~Broken