Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
["select_npc","Select An Npc","Select An Npcs",tf_guarantee_boots|tf_hero|tf_guarantee_armor,0,0,fac_neutral,[itm_nobleman_outfit,itm_woolen_hose],def_attrib|str_6|agi_6|level(1),wp(10),knows_siyaset_3,knows_engineer_2|knows_power_strike_2|knows_ironflesh_2,man_face_middle_1,man_face_old_2],

En example. Half of codes:
import random

from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
from ID_factions import *
from ID_items import *
from ID_scenes import *

####################################################################################################################
#  Each troop contains the following fields:
#  1) Troop id (string): used for referencing troops in other files. The prefix trp_ is automatically added before each troop-id .
#  2) Toop name (string).
#  3) Plural troop name (string).
#  4) Troop flags (int). See header_troops.py for a list of available flags
#  5) Scene (int) (only applicable to heroes) For example: scn_reyvadin_castle|entry(1) puts troop in reyvadin castle's first entry point
#  6) Reserved (int). Put constant "reserved" or 0.
#  7) Faction (int)
:cool: Inventory (list): Must be a list of items
#  9) Attributes (int): Example usage:
#          str_6|agi_6|int_4|cha_5|level(5)
# 10) Weapon proficiencies (int): Example usage:
#          wp_one_handed(55)|wp_two_handed(90)|wp_polearm(36)|wp_archery(80)|wp_crossbow(24)|wp_throwing(45)
#    The function wp(x) will create random weapon proficiencies close to value x.
#    To make an expert archer with other weapon proficiencies close to 60 you can use something like:
#          wp_archery(160) | wp(60)
# 11) Skills (int): See header_skills.py to see a list of skills. Example:
#          knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2
# 12) Face code (int): You can obtain the face code by pressing ctrl+E in face generator screen
# 13) Face code (int)(2) (only applicable to regular troops, can be omitted for heroes):
#    The game will create random faces between Face code 1 and face code 2 for generated troops
# 14) Troop image (string): If this variable is set, the troop will use an image rather than its 3D visual during the conversations
#  town_1  Sargoth
#  town_2  Tihr
#  town_3  Veluca
#  town_4  Suno
#  town_5  Jelkala
#  town_6  Praven
#  town_7  Uxkhal
#  town_8  Reyvadin
#  town_9  Khudan
#  town_10  Tulga
#  town_11  Curaw
#  town_12  Wercheg
#  town_13  Rivacheg
#  town_14  Halmar
####################################################################################################################

# Some constant and function declarations to be used below...
# wp_one_handed () | wp_two_handed () | wp_polearm () | wp_archery () | wp_crossbow () | wp_throwing ()
def wp(x):
  n = 0
  r = 10 + int(x / 10)
#  n |= wp_one_handed(x + random.randrange(r))
#  n |= wp_two_handed(x + random.randrange(r))
#  n |= wp_polearm(x + random.randrange(r))
#  n |= wp_archery(x + random.randrange(r))
#  n |= wp_crossbow(x + random.randrange(r))
#  n |= wp_throwing(x + random.randrange(r))
  n |= wp_one_handed(x)
  n |= wp_two_handed(x)
  n |= wp_polearm(x)
  n |= wp_archery(x)
  n |= wp_crossbow(x)
  n |= wp_throwing(x)
  return n

def wpe(m,a,c,t):
  n = 0
  n |= wp_one_handed(m)
  n |= wp_two_handed(m)
  n |= wp_polearm(m)
  n |= wp_archery(a)
  n |= wp_crossbow(c)
  n |= wp_throwing(t)
  return n

def wpex(o,w,p,a,c,t):
  n = 0
  n |= wp_one_handed(o)
  n |= wp_two_handed(w)
  n |= wp_polearm(p)
  n |= wp_archery(a)
  n |= wp_crossbow(c)
  n |= wp_throwing(t)
  return n
 
def wp_melee(x):
  n = 0
  r = 10 + int(x / 10)
#  n |= wp_one_handed(x + random.randrange(r))
#  n |= wp_two_handed(x + random.randrange(r))
#  n |= wp_polearm(x + random.randrange(r))
  n |= wp_one_handed(x + 20)
  n |= wp_two_handed(x)
  n |= wp_polearm(x + 10)
  return n

#Skills
knows_common = knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1
knows_common_multiplayer = knows_trade_10|knows_inventory_management_10|knows_prisoner_management_10|knows_leadership_10|knows_spotting_10|knows_pathfinding_10|knows_tracking_10|knows_engineer_10|knows_first_aid_10|knows_surgery_10|knows_wound_treatment_10|knows_tactics_10|knows_trainer_10|knows_looting_10
def_attrib = str_7 | agi_5 | int_4 | cha_4
def_attrib_multiplayer = int_30 | cha_30



knows_lord_1 = knows_riding_3|knows_trade_2|knows_inventory_management_2|knows_tactics_4|knows_prisoner_management_4|knows_leadership_7

knows_warrior_npc = knows_weapon_master_2|knows_ironflesh_1|knows_athletics_1|knows_power_strike_2|knows_riding_2|knows_shield_1|knows_inventory_management_2
knows_merchant_npc = knows_riding_2|knows_trade_3|knows_inventory_management_3 #knows persuasion
knows_tracker_npc = knows_weapon_master_1|knows_athletics_2|knows_spotting_2|knows_pathfinding_2|knows_tracking_2|knows_ironflesh_1|knows_inventory_management_2

lord_attrib = str_20|agi_20|int_20|cha_20|level(3:cool:

knight_attrib_1 = str_17|agi_14|int_8|cha_16|level(22)
knight_attrib_2 = str_17|agi_16|int_10|cha_18|level(26)
knight_attrib_3 = str_18|agi_17|int_12|cha_20|level(30)
knight_attrib_4 = str_19|agi_19|int_13|cha_22|level(35)
knight_attrib_5 = str_20|agi_20|int_15|cha_25|level(41)
knight_skills_1 = knows_riding_5|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_tactics_1|knows_prisoner_management_1|knows_leadership_1
knight_skills_2 = knows_riding_5|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_tactics_1|knows_prisoner_management_1|knows_leadership_1
knight_skills_3 = knows_riding_5|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_tactics_1|knows_prisoner_management_1|knows_leadership_1
knight_skills_4 = knows_riding_5|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_tactics_1|knows_prisoner_management_1|knows_leadership_1
knight_skills_5 = knows_riding_5|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_tactics_1|knows_prisoner_management_1|knows_leadership_1

knows_engineer = knows_leadership_4|knows_engineer_4|knows_tactics_3
#These face codes are generated by the in-game face generator.
#Enable edit mode and press ctrl+E in face generator screen to obtain face codes.

swadia_soldier_young = 0x0000000000000003135c71332488350400000000001d46eb0000000000000000
swadia_soldier_young_2 = 0x000000003a00014512dc71b32fb4135500000000001e26e90000000000000000

swadia_soldier_middle = 0x000000047a0004c6369c74a2dd8e070900000000001dd6ea0000000000000000
swadia_soldier_middle_2 = 0x00000004410000c7075c6ed126ac092400000000001d36eb0000000000000000

swadia_soldier_old = 0x0000000c3e000552069b6d7377b6270300000000001da6db0000000000000000
swadia_soldier_old_2 = 0x0000000c1b0025c0165b6ef5ff691d0500000000001d55300000000000000000

reserved = 0

no_scene = 0

praven_manface_young_1 = 0x000000002b00004121fd97f732b8533c00000000001ef6780000000000000000
suno_manface_young_1 = 0x000000003f001145120450aa4fb008f800000000001d476b0000000000000000
dhirim_manface_young_1 = 0x00000000230003c7059c931d6f9d48bd00000000001ea7780000000000000000

swadian_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
swadian_face_young_1  = 0x0000000400000001124000000020000000000000001c00800000000000000000
swadian_face_middle_1  = 0x0000000800000001124000000020000000000000001c00800000000000000000
swadian_face_old_1    = 0x0000000d00000001124000000020000000000000001c00800000000000000000
swadian_face_older_1  = 0x0000000fc0000001124000000020000000000000001c00800000000000000000

swadian_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_young_2  = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_middle_2  = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_old_2    = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_older_2  = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000

vaegir_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
vaegir_face_young_1  = 0x0000000400000001124000000020000000000000001c00800000000000000000
vaegir_face_middle_1  = 0x0000000800000001124000000020000000000000001c00800000000000000000
vaegir_face_old_1    = 0x0000000d00000001124000000020000000000000001c00800000000000000000
vaegir_face_older_1  = 0x0000000fc0000001124000000020000000000000001c00800000000000000000

vaegir_face_younger_2 = 0x000000003f00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_young_2  = 0x00000003bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_middle_2  = 0x00000007bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_old_2    = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_older_2  = 0x0000000ff100230c4deeffffffffffff00000000001efff90000000000000000

khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
khergit_face_young_1  = 0x00000003c9003109207000000000000000000000001c80470000000000000000
khergit_face_middle_1  = 0x00000007c9003109207000000000000000000000001c80470000000000000000
khergit_face_old_1    = 0x0000000b89003109207000000000000000000000001c80470000000000000000
khergit_face_older_1  = 0x0000000fc9003109207000000000000000000000001c80470000000000000000

khergit_face_younger_2 = 0x000000003f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_young_2  = 0x00000003bf0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_middle_2  = 0x000000077f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_old_2    = 0x0000000b3f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_older_2  = 0x0000000fff0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000

nord_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
nord_face_young_1  = 0x0000000400000001124000000020000000000000001c00800000000000000000
nord_face_middle_1  = 0x0000000800000001124000000020000000000000001c00800000000000000000
nord_face_old_1    = 0x0000000d00000001124000000020000000000000001c00800000000000000000
nord_face_older_1  = 0x0000000fc0000001124000000020000000000000001c00800000000000000000

nord_face_younger_2 = 0x00000000310023084deeffffffffffff00000000001efff90000000000000000
nord_face_young_2  = 0x00000003b10023084deeffffffffffff00000000001efff90000000000000000
nord_face_middle_2  = 0x00000008310023084deeffffffffffff00000000001efff90000000000000000
nord_face_old_2    = 0x0000000c710023084deeffffffffffff00000000001efff90000000000000000
nord_face_older_2  = 0x0000000ff10023084deeffffffffffff00000000001efff90000000000000000

rhodok_face_younger_1 = 0x0000000009002003140000000000000000000000001c80400000000000000000
rhodok_face_young_1  = 0x0000000449002003140000000000000000000000001c80400000000000000000
rhodok_face_middle_1  = 0x0000000849002003140000000000000000000000001c80400000000000000000
rhodok_face_old_1    = 0x0000000cc9002003140000000000000000000000001c80400000000000000000
rhodok_face_older_1  = 0x0000000fc9002003140000000000000000000000001c80400000000000000000

rhodok_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_young_2  = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_middle_2  = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_old_2    = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_older_2  = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000

man_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
man_face_young_1  = 0x0000000400000001124000000020000000000000001c00800000000000000000
man_face_middle_1  = 0x0000000800000001124000000020000000000000001c00800000000000000000
man_face_old_1    = 0x0000000d00000001124000000020000000000000001c00800000000000000000
man_face_older_1  = 0x0000000fc0000001124000000020000000000000001c00800000000000000000

man_face_younger_2 = 0x000000003f0052064deeffffffffffff00000000001efff90000000000000000
man_face_young_2  = 0x00000003bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_middle_2  = 0x00000007bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_old_2    = 0x0000000bff0052064deeffffffffffff00000000001efff90000000000000000
man_face_older_2  = 0x0000000fff0052064deeffffffffffff00000000001efff90000000000000000

merchant_face_1    = man_face_young_1
merchant_face_2    = man_face_older_2

woman_face_1    = 0x0000000000000001000000000000000000000000001c00000000000000000000
woman_face_2    = 0x00000003bf0030067ff7fbffefff6dff00000000001f6dbf0000000000000000

swadian_woman_face_1 = 0x0000000180102006124925124928924900000000001c92890000000000000000
swadian_woman_face_2 = 0x00000001bf1000061db6d75db6b6dbad00000000001c92890000000000000000

khergit_woman_face_1 = 0x0000000180103006124925124928924900000000001c92890000000000000000
khergit_woman_face_2 = 0x00000001af1030025b6eb6dd6db6dd6d00000000001eedae0000000000000000

refugee_face1 = woman_face_1
refugee_face2 = woman_face_2
girl_face1    = woman_face_1
girl_face2    = woman_face_2

mercenary_face_1 = 0x0000000000000000000000000000000000000000001c00000000000000000000
mercenary_face_2 = 0x0000000cff00730b6db6db6db7fbffff00000000001efffe0000000000000000

vaegir_face1  = vaegir_face_young_1
vaegir_face2  = vaegir_face_older_2

bandit_face1  = man_face_young_1
bandit_face2  = man_face_older_2

undead_face1  = 0x00000000002000000000000000000000
undead_face2  = 0x000000000020010000001fffffffffff

#NAMES:
#

tf_guarantee_all = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield|tf_guarantee_ranged
tf_guarantee_all_wo_ranged = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield


troops = [
["player","Player","Player",tf_hero|tf_unmoveable_in_party_window,no_scene,reserved,fac_player_faction,[],str_4|agi_4|int_4|cha_4,wp(15),0,0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["multiplayer_profile_troop_male","multiplayer_profile_troop_male","multiplayer_profile_troop_male", tf_hero|tf_guarantee_all, 0, 0,fac_commoners,[itm_leather_jerkin,itm_leather_boots],0,0,0,0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["multiplayer_profile_troop_female","multiplayer_profile_troop_female","multiplayer_profile_troop_female", tf_hero|tf_female|tf_guarantee_all, 0, 0,fac_commoners,[itm_tribal_warrior_outfit,itm_leather_boots],0,0,0,0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["temp_troop","Temp Troop","Temp Troop",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0],
##  ["game","Game","Game",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common,0],
##  ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_power_draw_2,0],

####################################################################################################################
# Troops before this point are hardwired into the game and their order should not be changed!
####################################################################################################################
["find_item_cheat","find_item_cheat","find_item_cheat",tf_hero|tf_is_merchant,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0],
["random_town_sequence","Random Town Sequence","Random Town Sequence",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0],
["tournament_participants","Tournament Participants","Tournament Participants",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0],
["tutorial_maceman","Maceman","Maceman",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_tutorial_club,itm_leather_jerkin,itm_hide_boots],str_6|agi_6|level(1),wp(50),knows_common,mercenary_face_1,mercenary_face_2],
["tutorial_archer","Archer","Archer",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged,no_scene,reserved,fac_commoners,[itm_tutorial_short_bow,itm_tutorial_arrows,itm_linen_tunic,itm_hide_boots],str_6|agi_6|level(5),wp(100),knows_common|knows_power_draw_4,mercenary_face_1,mercenary_face_2],
["tutorial_swordsman","Swordsman","Swordsman",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_tutorial_sword,itm_leather_vest,itm_hide_boots],str_6|agi_6|level(5),wp(80),knows_common,mercenary_face_1,mercenary_face_2],

["novice_fighter","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_6|agi_6|level(5),wp(60),knows_common,mercenary_face_1,mercenary_face_2],
["regular_fighter", "Regular Fighter", "Regular Fighters", tf_guarantee_boots|tf_guarantee_armor, no_scene, reserved, fac_commoners, [itm_hide_boots], str_8|agi_8|level(11), wp(90), knows_common|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_riding_1, mercenary_face_1, mercenary_face_2 ],
["veteran_fighter", "Veteran Fighter", "Veteran Fighters", tf_guarantee_boots|tf_guarantee_armor, no_scene, reserved, fac_commoners, [itm_hide_boots], str_10|agi_10|level(17), wp(110), knows_common|knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2, mercenary_face_1, mercenary_face_2 ],
["champion_fighter", "Champion Fighter", "Champion Fighters", tf_guarantee_boots|tf_guarantee_armor, no_scene, reserved, fac_commoners, [itm_hide_boots], str_12|agi_11|level(22), wp(140), knows_common|knows_ironflesh_4|knows_power_strike_3|knows_athletics_3|knows_riding_3|knows_shield_1, mercenary_face_1, mercenary_face_2 ],

["arena_training_fighter_1","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_6|agi_6|level(5),wp(60),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_2","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_7|agi_6|level(7),wp(70),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_3","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_8|agi_7|level(9),wp(80),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_4","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_8|agi_8|level(11),wp(90),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_5","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_9|agi_8|level(13),wp(100),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_6","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_10|agi_9|level(15),wp(110),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_7","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_10|agi_10|level(17),wp(120),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_8","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_11|agi_10|level(19),wp(130),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_9","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_12|agi_11|level(21),wp(140),knows_common,mercenary_face_1,mercenary_face_2],
["arena_training_fighter_10","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_hide_boots],str_12|agi_12|level(23),wp(150),knows_common,mercenary_face_1,mercenary_face_2],

["cattle","Cattle","Cattle",0,no_scene,reserved,fac_neutral, [], def_attrib|level(1),wp(60),0,mercenary_face_1, mercenary_face_2],


#soldiers:
#This troop is the troop marked as soldiers_begin
["farmer", "Farmer", "Farmers", tf_guarantee_armor, no_scene, reserved, fac_commoners, [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4), wp(60), knows_common, man_face_middle_1, man_face_old_2 ],
["townsman","Townsman","Townsmen",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,[itm_cleaver,itm_knife,itm_club,itm_quarter_staff,itm_dagger,itm_stones,itm_leather_cap,itm_linen_tunic,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],def_attrib|level(4),wp(60),knows_common,mercenary_face_1,mercenary_face_2],
["watchman", "Watchman", "Watchmen", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_sword_medieval_a,itm_boar_spear,itm_hunting_crossbow,itm_light_crossbow,itm_tab_shield_round_a,itm_tab_shield_round_b,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(9), wp(75), knows_common, mercenary_face_1, mercenary_face_2 ],
["caravan_guard", "Caravan Guard", "Caravan Guards", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_spear,itm_fighting_pick,itm_sword_medieval_a,itm_voulge,itm_tab_shield_round_b,itm_tab_shield_round_c,itm_leather_jerkin,itm_leather_vest,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet,itm_saddle_horse,itm_sumpter_horse,itm_steppe_horse,itm_hand_axe,itm_sword_medieval_a,itm_sword_medieval_b_small,itm_shirt,itm_linen_tunic,itm_robe,itm_tabard,itm_steppe_armor,itm_gambeson,itm_blue_gambeson,itm_red_gambeson,itm_padded_cloth,itm_aketon_green,itm_leather_jerkin,itm_nomad_vest,itm_ragged_outfit,itm_padded_leather,itm_tribal_warrior_outfit,itm_nomad_robe,itm_shortened_spear,itm_war_spear,itm_light_lance,itm_lance,itm_heavy_lance], def_attrib|level(14), wp(85), knows_riding_3|knows_ironflesh_1|knows_shield_1|knows_power_strike_1, mercenary_face_1, mercenary_face_2 ],
["mercenary_swordsman", "Mercenary Swordsman", "Mercenary Swordsmen", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_bastard_sword_a,itm_sword_medieval_b,itm_sword_medieval_b_small,itm_tab_shield_heater_c,itm_mail_hauberk,itm_leather_boots,itm_mail_chausses,itm_mail_coif,itm_helmet_with_neckguard], def_attrib|level(20), wp(130), knows_ironflesh_3|knows_shield_1|knows_power_strike_2, mercenary_face_1, mercenary_face_2 ],
["mercenary_farmer", "Mercenary Farmer", "Mercenary Farmers", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_leather_boots,itm_fur_hat,itm_felt_hat_b,itm_felt_hat,itm_straw_hat,itm_fur_coat,itm_pelt_coat,itm_linen_tunic,itm_coarse_tunic,itm_wrapping_boots,itm_sickle,itm_wooden_shield,itm_falchion,itm_knife,itm_butchering_knife,itm_leather_cap,itm_woolen_cap,itm_hood_c,itm_hood_b,itm_hood_d], def_attrib|level(10), wp(130), knows_ironflesh_3|knows_shield_1|knows_power_strike_1, mercenary_face_1, mercenary_face_2 ],
["hired_blade", "Hired Blade", "Hired Blades", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_gloves|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_bastard_sword_b,itm_sword_medieval_c,itm_tab_shield_heater_cav_a,itm_haubergeon,itm_plate_boots,itm_bascinet,itm_leather_gloves], def_attrib|level(25), wp(130), knows_athletics_5|knows_power_strike_2|knows_ironflesh_5, mercenary_face_1, mercenary_face_2 ],
["mercenary_crossbowman", "Mercenary Crossbowman", "Mercenary Crossbowmen", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged, no_scene, reserved, fac_commoners, [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_sword_medieval_a,itm_boar_spear,itm_crossbow,itm_tab_shield_pavise_a,itm_tab_shield_round_b,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(19), wpex(90,90,90,50,140,10), knows_common|knows_athletics_7|knows_shield_1, mercenary_face_1, mercenary_face_2 ],
#["mercenary_crossman", "Mercenary Crossbowman", "Mercenary Crossbowmen", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged, scn_four_ways_inn|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1)|(1), reserved, fac_commoners, [itm_bolts,itm_fighting_pick,itm_crossbow,itm_padded_cloth,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots], def_attrib|level(23), wpex(90,90,90,50,140,10), knows_common|knows_athletics_9, mercenary_face_1, mercenary_face_2 ],
["mercenary_horseman", "Mercenary Horseman", "Mercenary Horsemen", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_sword_medieval_b,itm_tab_shield_heater_c,itm_mail_shirt,itm_leather_boots,itm_helmet_with_neckguard,itm_saddle_horse], def_attrib|level(20), wp(130), knows_common|knows_riding_4|knows_power_strike_2, mercenary_face_1, mercenary_face_2 ],
["mercenary_cavalry", "Mercenary Cavalry", "Mercenary Cavalry", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_commoners, [itm_bastard_sword_a,itm_tab_shield_heater_c,itm_banded_armor,itm_hide_boots,itm_kettle_hat,itm_warhorse], def_attrib|level(25), wp(130), knows_common|knows_riding_5|knows_ironflesh_4|knows_power_strike_2, mercenary_face_1, mercenary_face_2 ],
["mercenaries_end","mercenaries_end","mercenaries_end",0,no_scene,reserved,fac_commoners,[],def_attrib|level(4),wp(60),knows_common,mercenary_face_1,mercenary_face_2],

#peasant - retainer - footman - man-at-arms -  knight
["swadian_recruit", "Swadian Recruit", "Swadian Recruits", tf_guarantee_armor, no_scene, reserved, fac_kingdom_1, [itm_scythe,itm_hatchet,itm_pickaxe,itm_club,itm_stones,itm_tab_shield_heater_a,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_shirt,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4), wp(60), knows_common, praven_manface_young_1, dhirim_manface_young_1 ],
["swadia_skirmisher", "Swadian Crossbow Militia", "New troops", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged, no_scene, reserved, fac_kingdom_1, [itm_pickaxe,itm_felt_hat,itm_felt_hat_b,itm_leather_apron,itm_ankle_boots,itm_hunting_crossbow,itm_bolts], def_attrib|level(10)|str_5|agi_8|int_10|cha_11, wpex(50,10,10,10,90,10), knows_common, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_militia", "Swadian Militia", "Swadian Militia", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_fighting_pick,itm_tab_shield_heater_a,itm_padded_cloth,itm_ankle_boots,itm_wrapping_boots], def_attrib|level(9), wp(75), knows_common, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_footman", "Swadian Footman", "Swadian Footmen", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_tab_shield_heater_b,itm_mail_with_tunic_red,itm_ankle_boots,itm_norman_helmet,itm_helm_swad_b_a,itm_helm_swad_b_b,itm_helm_swad_b_c,itm_helm_swad_b_d,itm_helm_swad_b_e,itm_helm_swad_b_f,itm_helm_swad_b_g,itm_bastard_sword_a], def_attrib|level(14), wp_melee(85), knows_common|knows_ironflesh_2|knows_power_strike_2, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_infantry", "Swadian Infantry", "Swadian Infantries", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_sword_medieval_b_small,itm_tab_shield_heater_c,itm_mail_with_surcoat,itm_mail_chausses,itm_flat_topped_helmet,itm_helm_swad_a_b,itm_helm_swad_a_a], level(20)|str_11|agi_12|int_12|cha_14, wpex(105,100,100,100,100,100), knows_ironflesh_2|knows_power_strike_2|knows_shield_1, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_sergeant", "Swadian Sergeant", "Swadian Sergeants", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_gloves|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_bastard_sword_b,itm_helm_swad_a_b,itm_helm_swad_a_e,itm_helm_swad_a_a,itm_morningstar,itm_tab_shield_heater_d,itm_coat_of_plates,itm_iron_greaves,itm_guard_helmet,itm_mail_mittens], def_attrib|level(32), wp_melee(135), knows_common|knows_shield_1|knows_ironflesh_4|knows_power_strike_4|knows_athletics_4, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_skirmisher", "Swadian Skirmisher", "Swadian Skirmishers", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged, no_scene, reserved, fac_kingdom_1, [itm_club,itm_tab_shield_heater_a,itm_padded_cloth,itm_ankle_boots,itm_hood_b,itm_javelin], def_attrib|level(14), wpex(80,80,80,80,120,170), knows_ironflesh_1|knows_power_strike_2, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_crossbowman", "Swadian Crossbowman", "Swadian Crossbowmen", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged, no_scene, reserved, fac_kingdom_1, [itm_bolts,itm_crossbow,itm_light_crossbow,itm_fighting_pick,itm_sword_medieval_a,itm_leather_boots,itm_ankle_boots,itm_helm_vigs_a_a,itm_haubergeon], def_attrib|level(19), wpex(50,100,100,120,180,100), knows_ironflesh_1, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_sharpshooter", "Swadian Sharpshooter", "Swadian Sharpshooters", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged, no_scene, reserved, fac_kingdom_1, [itm_bolts,itm_arrows,itm_sword_medieval_b_small,itm_tab_shield_heater_c,itm_haubergeon,itm_helm_swad_a_b,itm_helm_swad_a_a,itm_mail_chausses,itm_kettle_hat,itm_helmet_with_neckguard,itm_leather_gloves,itm_sniper_crossbow], str_14|agi_10|int_4|cha_4|level(24), wpex(70,100,120,150,230,100), knows_power_draw_3|knows_ironflesh_1, praven_manface_young_1, dhirim_manface_young_1 ],
["swadian_man_at_arms", "Swadian Man at Arms", "Swadian Men at Arms", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_tab_shield_heater_cav_a,itm_haubergeon,itm_mail_coif,itm_warhorse,itm_mail_boots,itm_cavstard], def_attrib|level(24), wp_melee(100), knows_riding_4|knows_ironflesh_2|knows_power_strike_2, swadia_soldier_middle , swadia_soldier_middle_2  ],
["swadian_cavalry", "Swadian Cavalry", "Swadian Cavalries", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_bastard_sword_b,itm_tab_shield_heater_cav_a,itm_haubergeon,itm_mail_chausses,itm_mail_coif,itm_warhorse], def_attrib|level(19), wp_melee(80), knows_riding_4|knows_power_strike_1, swadia_soldier_young , swadia_soldier_middle  ],
["swadian_procktash", "Swadian Procktash", "Swadian Procktashes", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_tab_shield_heater_cav_a,itm_haubergeon,itm_warhorse,itm_mail_boots,itm_heavy_lance], def_attrib|level(23), wp_melee(100), knows_riding_4, swadia_soldier_young , swadia_soldier_young_2  ],
["swadian_knight", "Swadian Knight", "Swadian Knights", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_heavy_lance,itm_sword_two_handed_b,itm_morningstar,itm_morningstar,itm_sword_medieval_d_long,itm_tab_shield_heater_cav_b,itm_coat_of_plates_red,itm_plate_boots,itm_great_helmet,itm_gauntlets,itm_warhorse,itm_great_lance,itm_lance,itm_light_lance], def_attrib|level(2:cool:, wp_one_handed(150), knows_riding_4|knows_ironflesh_5|knows_power_strike_2, swadia_soldier_middle , swadia_soldier_old_2  ],
["swadian_messenger","Swadian Messenger","Swadian Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_kingdom_1,[itm_sword_medieval_a,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_light_crossbow,itm_bolts],str_7|agi_21|int_4|cha_4|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5,swadian_face_young_1,swadian_face_old_2],
["swadian_deserter","Swadian Deserter","Swadian Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters,[itm_bolts,itm_light_crossbow,itm_hunting_crossbow,itm_dagger,itm_club,itm_voulge,itm_wooden_shield,itm_leather_jerkin,itm_padded_cloth,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet],def_attrib|level(14),wp(80),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face_young_1,swadian_face_old_2],
["swadian_prison_guard", "Prison Guard", "Prison Guards", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_morningstar,itm_tab_shield_heater_c,itm_plate_armor,itm_plate_boots,itm_guard_helmet,itm_leather_gloves], def_attrib|level(25), wp(130), knows_common|knows_shield_3|knows_ironflesh_3, swadian_face_young_1, swadian_face_old_2 ],
["swadian_castle_guard", "Castle Guard", "Castle Guards", tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield, no_scene, reserved, fac_kingdom_1, [itm_sword_medieval_b,itm_tab_shield_heater_d,itm_coat_of_plates,itm_plate_boots,itm_guard_helmet,itm_leather_gloves], def_attrib|level(25), wp(130), knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3, swadian_face_young_1, swadian_face_old_2 ],
And module items, module_quests, module_icons are not compiling too.
 
hello everyone i need help

the new game option takes more then 25 mins to start the game sometimes 30 and i think i know the reason i have 53 factions and more then 700+ lords (and had their family relations manually) as well as having many parties assigned to these factions so any help where i can improve it here cuz i really don't know

the world map feature by Rubik takes a lot of time as well to show me the map and it gets lagy when it shows up don't know how to improve it
the same with kingdom relations presentations by jiedar

so any help here to improve it and make them take less time thanks!
 
imado552 said:
the new game option takes more then 25 mins to start the game sometimes

identify the blocks of code that take longer
break them down
execute them on later dates

you don't need the entire world setup at 0 hours. You can safely spread out most your calculations and setup along a entire week or even longer periods of time. By spreading them around you won't have a 25minutes waiting at game start, or any lag in the first few hours/days.

imado552 said:
the world map feature by Rubik takes a lot of time as well to show me the map and it gets lagy when it shows up don't know how to improve it
check the OSP thread and comments for ideas on how to improve performance. Short version: more pixels on the map, more time to calculate, it can cause crashes. Optimize to the point it is fast enough, not terrible ugly (borders) and doesn't explode the game.
 
So, I did some more tests on the scene borders. For scenes with 2 or 3 meter polygons, the scenes have to be under a certain size for the borders to function. Changing the border size as defined in module_scenes changes nothing.  :sad: I never realized this before but the x/y sliders in the terrain editor can go past the actual possible map size, so basically the problem I was having is that my scenes had terrain codes about 1.5x larger than the actual generated terrain. You can easily see this yourself in the terrain editor by making a 2m polygon scene, it will stop getting bigger past the halfway(ish) mark. Maybe this has been obvious for everybody forever but I always thought the sliders were "calibrated" for 2m.  :razz: Luckily this means the scenes can be fixed without ****ing up scene prop placement, since the scenes themselves don't actually get any smaller.
 
kalarhan said:
identify the blocks of code that take longer
break them down
execute them on later dates
Code:
script_initialize_aristocracy
i think the problem is in here but i don't know how i can break the content in there down to two or three parts and have them all lunched(triggered) in the first few days in game
if there is a tuto that can help me or if there is a way you can tell me about it that would be great!

kalarhan said:
you don't need the entire world setup at 0 hours. You can safely spread out most your calculations and setup along a entire week or even longer periods of time. By spreading them around you won't have a 25minutes waiting at game start, or any lag in the first few hours/days.
the problem is i don't know how i can spread them out break them down to maybe
Code:
script_initialize_aristocracy
script_initialize_aristocracy_2
script_initialize_aristocracy_3
....
and have them called in their respective places if so how can i make them triggered in the game after the first few hours/days any example that can help me will be great to learn from

kalarhan said:
check the OSP thread and comments for ideas on how to improve performance. Short version: more pixels on the map, more time to calculate, it can cause crashes. Optimize to the point it is fast enough, not terrible ugly (borders) and doesn't explode the game.
i will try to work on it more maybe  because i have a lot of parties this is happening (500+ villages 200+ castles and 70+towns) would removing the villages would be a great idea to help ?
thanks again for the help so far
 
imado552 said:
1) i think the problem is in here but i don't know how i can break the content

2) would removing the villages would be a great idea to help ?

(1): test it. Execute that block of code (inside a script or trigger) on a clear module system, or execute it with a shortcut, etc, and see if and for how long it freezes the game

you can, as a example, create a trigger that is executed when you press CTRL+T. That trigger then calls the script. Add a few debug messages to help see what is going on (you can then follow the execution on your rgl_log.txt if it takes too long), by using a editor that reloads the file (SublimeText, Notepad++ with plugin, etc).

another example: replace your "game_start" script with a empty one. You can do that just by renaming it to "game_start_backup", then create a new "game_start" and put smaller bits of code there. Compile, reload module and click new game button to see what happens.

as you learn more about debugging and testing performance you will get better at it, so don't worry about taking baby steps while you are learning

(2): do you understand how the map generation works? That would be step 1. Then you can try to optimize it and see if it works on your case. If not, you may need to work with a different solution. Couple suggestions (in case of failure)

a-> store the location data of each pixel x closest center; that way you only need to ask which faction a center belongs to, you won't need to calculate distances
b-> replace the pixel system with images (think of a jigsaw puzzle). That would involve a lot of art work hehe, but it would be easy for the game itself to generate the cooler looking map.
 
What would cause module_party_templates to throw a name error for a troops that is (as far as I'm aware) correctly defined in module_troops?

I'm getting NameError: name 'trp_trpname' is not defined for all my new troops. The code compiles cleanly when the new troops are defined but not referenced in party_templates.

My code (adding Silverstag bandits and a few other things to my Native mod to make getting the steam achievements more interesting):

Code:
## STEPPE BANDITS
["steppe_bandit","Steppe Runner","Steppe Runners",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_mounted,0,0,fac_outlaws,
[itm_sword_khergit_1,itm_sword_khergit_3,itm_mace_2,itm_mace_4,itm_winged_mace,itm_jarid,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_nomad_cap,itm_nomad_cap_b,itm_steppe_armor,itm_hide_boots,itm_nomad_boots,itm_leather_covered_round_shield,itm_leather_covered_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse]
,def_attrib|level(12),wp(100),knows_riding_4|knows_power_strike_1|knows_horse_archery_3|knows_power_throw_2,khergit_face_young_1,khergit_face_old_2],
["steppe_runner","Wind Rider","Wind Riders",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_ranged|tf_mounted,0,0,fac_outlaws,
[itm_nomad_bow,itm_mace_2,itm_mace_3,itm_short_bow,itm_khergit_bow,itm_arrows,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_nomad_cap,itm_nomad_cap_b,itm_leather_vest,itm_hide_boots,itm_nomad_boots,itm_leather_covered_round_shield,itm_leather_covered_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse]
,def_attrib|level(12),wp(100),knows_riding_4|knows_horse_archery_2|knows_power_draw_2,khergit_face_young_1,khergit_face_old_2],
["steppe_guard","Spear Rider","Spear Riders",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_mounted,0,0,fac_outlaws,
[itm_spear,itm_light_lance,itm_double_sided_lance,itm_war_spear,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_nomad_cap,itm_nomad_cap_b,itm_leather_vest,itm_hide_boots,itm_nomad_boots,itm_leather_covered_round_shield,itm_leather_covered_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse]
,def_attrib|level(13),wp(100),knows_riding_4|knows_power_strike_2,khergit_face_young_1,khergit_face_old_2],
["steppe_raider_chief","Overseer","Overseers",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_ranged|tf_mounted,0,0,fac_outlaws,
[itm_scimitar_b,itm_sword_khergit_4,itm_jarid,itm_khergit_war_helmet,itm_lamellar_vest_khergit,itm_hide_boots,itm_nomad_boots,itm_leather_covered_round_shield,itm_leather_covered_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse]
,def_attrib|level(17),wp(110),knows_riding_5|knows_power_throw_2|knows_horse_archery_3|knows_power_strike_2,khergit_face_young_1,khergit_face_old_2],

Code:
("steppe_bandits","Steppe Bandits",icon_khergit|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_steppe_raider_chief,1,1),(trp_steppe_runner,4,15),(trp_steppe_guard,4,15),(trp_steppe_bandit,4,15)]),

EDIT: It appears to be a problem with IDs. Even though the troops are being put into the troops.txt file correctly, they don't exist in the ID_troops file. Probably a compilation problem.
 
I seem to remember there being a guide to create maps that would only spawn in battles if the army sizes where plus 200 men or something like that. Anyone got it?
 
Cozur said:
I seem to remember there being a guide to create maps that would only spawn in battles if the army sizes where plus 200 men or something like that. Anyone got it?
Just change setup_random_scene or whatever you use to determine battle scenes to check party sizes. You might even be able to simply assign a variable when calculating battle advantage and check it in the script or game menu. It will get trickier if you want to actually look at the player's battle size settings, but iirc there are operations for that now from VC.

As for a specific guide, I am not aware of one existing, although my ship codes for original mb from like 2009 determined scenes based on party size. But I wouldn't recommend those as a reference, I don't even think I remembered to subtract prisoners from the party size :razz:
 
Yarrum said:
What would cause module_party_templates to throw a name error for a troops that is (as far as I'm aware) correctly defined in module_troops?

your code compiles fine, it seems you just forgot to do this:

1) add new troops on module_troops.py
2) compile (execute build_module.bat) to update the IDs
3) add new party template on module_party_templates.py and use the new troops
4) compile again
5) play



Cozur said:
I seem to remember there being a guide to create maps that would only spawn in battles if the army sizes where plus 200 men or something like that. Anyone got it?
not at hand, but a way to do this

1) get battle size option (operation "options_get_battle_size")
2) convert it to your mod range (if it doesn't start at 0)
3) call script to count how many unwounded troops each side has and apply battle advantage
4) apply (3) to (2) to get agents
5) choose scene based on (4)
 
kalarhan said:
Yarrum said:
What would cause module_party_templates to throw a name error for a troops that is (as far as I'm aware) correctly defined in module_troops?

your code compiles fine, it seems you just forgot to do this:

1) add new troops on module_troops.py
2) compile (execute build_module.bat) to update the IDs
3) add new party template on module_party_templates.py and use the new troops
4) compile again
5) play

I was doing the intermediary compile but the issue was that my newly generated ID files weren't being saved. I'm using the WRECK compiler and I have individual subfolders for my various components. When I run the compiler, it copies the .py files from their directory into the main data folder, compiles them to generate the text files, and then deletes the copied files to keep the root folder clean. Because of this, I was compiling with the original ID files instead of the newer ones (which were getting deleted rather than replacing the old ones). I added a line to my compiler to copy everything that matches ID_*.py back into the module system folder and now it works perfectly.
 
Yarrum said:
I'm using the WRECK compiler

WRECK doesn't use IDs files, you can generate them (optional) if you want to (they are helpful to check things out), but they are not in any way part of the compiler process (if you did the full conversion that is)

explained on module_info.py

Code:
###################################
#   W.R.E.C.K. Compiler Options   #
###################################


# Change this line to select where compiler will generate ID_* files. Use None instead of the string to completely suppress generation of ID_* files.
# ONLY DO THIS WHEN YOU HAVE COMPLETELY REMOVED ID_* FILE DEPENDENCIES IN MODULE SYSTEM!
# Default value: "ID_%s.py"

#write_id_files = "ID_%s.py"    # default vanilla-compatible option
#write_id_files = "ID/ID_%s.py" # will put ID_* files in ID/ subfolder of module system's folder
write_id_files = None          # will suppress generation of ID_*.py files
 
I'm not on a full integration (sample full integration is for 1.165, I haven't gotten around to doing it for my 1.172 build). Would have been good to look at that comment in the file though, probably would have saved me a bit of time.

Other issue I'm having: I'm trying to use the tournament play enhancements kit through modmerger. Everything is working perfectly except that the new arena scenes don't appear and tournaments are held on a randomly generated field instead. Moving the scene definitions from the modmerger files to module_scenes.py didn't change anything. I have verified that the new scenes exist in the ID file and there are no compiler or RGL errors when attempting to load a tournament scene.
 
Yarrum said:
modmerger

WRECK and modmerge won't work unless you modify the compiler. What you can do is apply the merge yourself by creating a plugin and copying the code there as if you were writing it.

as modmerge is usually quite easy to read (what goes where), it is not a hard task to move the code to your modsys.

if you have trouble with any specific translation (how do I put this thingy in my modsys) you can always show the code here
 
pengbuster said:
Does anyone know how to add factions to NW? Ive tried looking but I havent successfully found any tutorials for NW
So I continued trying to get this to work, the only real issue I have is that it chooses the nation above what you select, for example, if you chose prussia, it would choose france, if you chose austria, it would choose russia, etc. Any ideas to why this might be happening?
 
I need a Module System with mergedi this mods and no one other:

Diplomacy
Custom Commander
PBOD
Freelancer
Formations AI by motomataru

Plz help me to find MS like this.

So, prefer Diplo+CC also.

Thx very much
 
Help  i have error TypeError object of "int" has no len()
Owrite"%d" (triggers)
Error connecring with module items py

2 how add in multiplayer dismember


3 Music dont play ,i had wrote as "m"," m.ogg",mtf_bla_bla,mtf_bla ,mtf_module_track, 0), and next




Helllllpppp
 
KnightV said:
Help  i have error TypeError object of "int" has no len()
Owrite"%d" (triggers)
Error connecring with module items py

2 how add in multiplayer dismember

you have a syntax error. See your last changes and fix whatever your mistake is (a missing comma, etc).

about 2: see OSP section
 
Status
Not open for further replies.
Back
Top Bottom