spiritwind said:
I know how to add new people into the game, I just don't know the system well to get them recruitable.
For instance I know all the blabla bla with troops.py, basic dialog system, and hardly no scripting. I'll send you what I got right now in a PM
I am going to post in public for other folks to reference what I sent you in the PM. I am sure that there are others who would like this question answered. ~S
-------------------------------------------------------------
So, it sounds like you want to use the existing dialogue and npc system that is in place to recruit a new character.. effectively increasing the amount of npc's from 16 to some higher number. Since we have not corresponded before, I do not have a sense of how well you know the module system or how to code, so I apologize if my explanation is basic.
This is what you need to do:
Step 1: Organization and overview of files we will be touching.
The files we will be modifying are:
module_troops.py
module_scripts.py
module_strings.py
module_dialogues.py (reference only)
and as with almost every coding venture you will reference:
header_operations.py
module_constants.py
Module_troops.py
You need to create a new character, and place him at a specific location in the module_troops.py file. As we reference the module_constants.py file we see these line that dictate where our companions should be located in our troops file.
companions_begin = "trp_npc1"
companions_end = "trp_kingdom_heroes_including_player_begin"
modlule_scripts.py
Search for the routine "initialize_npcs", which is towards the end of this file line 17150 or so depending on other custom scripts. This script is the heart of the system you are trying to modify. There are 16 groups of declarations that change key variables that are connected to specific troops. You will want to copy one block and paste it at the end of this routine.
Code:
(troop_set_slot, "trp_npc16", slot_troop_morality_type, tmt_aristocratic), #klethi
(troop_set_slot, "trp_npc16", slot_troop_morality_value, 4),
(troop_set_slot, "trp_npc16", slot_troop_2ary_morality_type, tmt_humanitarian),
(troop_set_slot, "trp_npc16", slot_troop_2ary_morality_value, -1),
(troop_set_slot, "trp_npc16", slot_troop_personalityclash_object, "trp_npc15"), #klethi
(troop_set_slot, "trp_npc16", slot_troop_personalityclash2_object, "trp_npc1"), #klethi - borcha
(troop_set_slot, "trp_npc16", slot_troop_personalitymatch_object, "trp_npc7"), #deshavi - klethi
(troop_set_slot, "trp_npc16", slot_troop_home, "p_village_20"), #Uslum
(troop_set_slot, "trp_npc16", slot_troop_payment_request, 200),
You will need to modify this section in several areas to get the desired effect. The first location is where it says "trp_npc_16" should read "trp_<handle of your new character>. To keep things simple you may want to keep the handle of "Vic" to be npc_17 to continue with the naming conventions. (If you do not know what the handle is then ask).
The morality types (there are two) indicate what issues the character will respond to based upon game events...ie what makes him/her upset. Then there are two personality clashes and one personality match. These will have to be addressed in the next section as well as the "home speech" which will kick off when that location is sighted. The last part is how much gold the character desires for being hired.
module_strings.py
This is where you write in and create the conversation that you want to have with the npc, what he/she says etc. search for "#NPC strings"
This section starts with blocks of 16 conversation strings. You merely need to append each block with a new line so it can be read. From here it should be evident what to do, and make sure that you cover all the dialogue for every npc you have.
I hope that you find this useful...
Best regards and good luck,
Saxondragon