Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Thank you im getting somewhere now, this is the new log.

Missing in txt: cannot find Animation man_reload, referred in 'actions.txt'
Missing in txt: cannot find Animation musket_thrust_forward_parry, referred in 'actions.txt'
Missing in txt: cannot find Animation equip_musket, referred in 'actions.txt'
Missing in txt: cannot find Animation musket_upper_swing, referred in 'actions.txt'
Missing in txt: cannot find Animation equip_pistol, referred in 'actions.txt'
Missing in txt: cannot find Animation spear_thrust_overhead, referred in 'actions.txt'
Missing in txt: cannot find Animation crouch_staff_cstance, referred in 'actions.txt'
Missing in txt: cannot find Animation crouch_fire_pistol, referred in 'actions.txt'
Missing in txt: cannot find Animation crouch_greatsword_cstance, referred in 'actions.txt'
Missing in txt: cannot find Animation crouch_stand_man, referred in 'actions.txt'
Missing in txt: cannot find Animation reload_pistol_new, referred in 'actions.txt'
Missing in txt: cannot find Animation crouch_staff_cstance_attack, referred in 'actions.txt'
Missing in txt: cannot find Animation musket_thrust_forward, referred in 'actions.txt'
Missing in txt: cannot find Mesh map_flag_m02, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m16, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m20, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m09, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m04, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m19, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m15, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m11, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m14, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m03, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m17, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m07, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m12, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m13, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m21, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m01, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m18, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m08, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m05, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m10, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh map_flag_m06, referred in 'map_icons.txt'
Missing in txt: cannot find Mesh ter_border_a, referred in 'meshes.txt'
Missing in txt: cannot find Mesh mp_ui_host_maps_cold_cost, referred in 'meshes.txt'
Missing in txt: cannot find Mesh outer_terrain_plain_1, referred in 'scenes.txt'

My problem is I have never touched module_animations or installed any in the module so im at a standstill with that.
I think i know what the map flags are but also the bottom three errors have me stumped aswell.

well a bit more investigating it seems quite a few modules have the same action errors checked 5 and only one of them didn't have any, I don't know if that means anything.
The bottom error is referenced in
["the_happy_boar","","zendar_merchant"],[], "outer_terrain_plain_1"),
Which might have something to do with me adding more castles and villages but I think there is a solution to that on this board so that should be solved which makes me think the two above it are the same errors.
 
markfamily said:
My problem is I have never touched module_animations or installed any in the module so im at a standstill with that.

check from where you are importing the BRF for those files (like those animations). From Native or your own module folder. Note that module.ini has two commands to control the reference. Open both files if they exist on OpenBRF and check for the animations (are they there), which one you are using, etc.
 
I was hoping someone could explain the following to me, the error is obvious but is there a better way to do what im trying to do or have i got it all wrong.

module party template
  ("mountain_bandits","Mountain Bandits",icon_axeman|carries_goods(2),0,fac_mountain_bandits,bandit_personality,[(trp_mountain_bandit_leader,1,4),(trp_mountain_bandit_veteran,1,4),(trp_mounted_hunter,1,4),(trp_mountain_bandit_champion,1,4),(trp_mountain_bandit_veteran,1,4),(trp_mountain_heavy_bandit,2,12),(trp_mountain_bandit,5,84)]),

throws up an error that it exceeds six
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Error! NUMBER OF TEMPLATE MEMBERS EXCEEDS 6 mountain_bandits
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
So i have put 7 entries but the module only like 6, so if i put 6 entries instead will the 7 still have a chance of spawning.
 
markfamily said:
I was hoping someone could explain the following to me, the error is obvious but is there a better way to do what im trying to do or have i got it all wrong.

when you spawn the template you can use a operation to add more soldiers...

Code:
party_add_members                     = 1610  # (party_add_members, <party_id>, <troop_id>, <number>),
                                              # Returns total number of added troops in reg0.
party_add_prisoners                   = 1611  # (party_add_prisoners, <party_id>, <troop_id>, <number>),
                                              # Returns total number of added prisoners in reg0.
party_add_leader                      = 1612  # (party_add_leader, <party_id>, <troop_id>, [number]),
                                              # Adds troop(s) to the party and makes it party leader.
party_force_add_members               = 1613  # (party_force_add_members, <party_id>, <troop_id>, <number>),
                                              # Adds troops to party ignoring party size limits. Mostly used to add hero troops.
party_force_add_prisoners             = 1614  # (party_force_add_prisoners, <party_id>, <troop_id>, <number>),
                                              # Adds prisoners to party ignoring party size limits. Mostly used to add hero prisoners.
 
markfamily said:
module party template
("mountain_bandits","Mountain Bandits",icon_axeman|carries_goods(2),0,fac_mountain_bandits,bandit_personality,[(trp_mountain_bandit_leader,1,4),(trp_mountain_bandit_veteran,1,4),(trp_mounted_hunter,1,4),(trp_mountain_bandit_champion,1,4),(trp_mountain_bandit_veteran,1,4),(trp_mountain_heavy_bandit,2,12),(trp_mountain_bandit,5,84)]),
Why repeat troop id?
 
Thank you for spotting i just pasted over forgot to change the name of that one, my usual silly errors should have been mountain hunter.
Thank you for taking the time to give me the answer, is there something i can read to get a better understanding of that as im baffled.
All i want to do is just have say the mountain bandit example have a chance to spawn the 7 troops instead of the normal one or really just have different chances of each troop spawning in one party, example there are 16 mountain bandit parties on the map and they all have a chance of using the 7 troops i created.
 
My custom female race isn't female, does anyone know what the problem is?
I made a new main character using the custom female race and I edited the script of troop_write_family_relations_to_s1
Code:
  ("troop_write_family_relations_to_s1",
    [
      (store_script_param_1, ":troop_no"),
      (assign, ":num_family", 0),
      (try_for_range, ":slot_no", slot_troop_family_begin, slot_troop_family_end),
        (troop_slot_ge, ":troop_no", ":slot_no", 1),
        (val_add, ":num_family", 1),
      (try_end),
      
      (troop_get_type, ":gender", ":troop_no"),
      (try_begin),
        (eq, ":gender", 0),
        (str_store_string, s5, "str_he"),
      (else_try),
	    (eq, ":gender", 1),
        (str_store_string, s5, "str_she"),
	  (else_try),
	    (eq, ":gender", 2),
        (str_store_string, s5, "str_she"),
      (else_try),
	    (eq, ":gender", 3),
        (str_store_string, s5, "str_she"),			
      (try_end),

The custom race's number/type in header_troops is set to 2, according to this it should say "She has no fiefs" when I check my character in quests but it still says "He has no fiefs" what's the problem?

my header_troops
Code:
#Troop flags
tf_male           = 0
tf_female         = 1
#tf_undead         = 2
tf_female_asian   = 2

in module_game_menus
Code:
  (
    "start_game_1",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "Welcome to my mod, a mod focused on the RPG experience which MB kinda lacks. Choose your sex",
    "none",
    [],
    [
      ("start_male",[],"Male",
       [
           (troop_set_type,"trp_player",0),
           (assign,"$character_gender",tf_male),
           (jump_to_menu,"mnu_start_character_1"),
        ]
       ),
      ("start_female",[],"Female",
       [
           (troop_set_type,"trp_player",1),
           (assign,"$character_gender",tf_female),
		   (troop_add_item, "trp_player","itm_flips",0),
           (jump_to_menu,"mnu_start_character_1"),
        ]
       ),
	  ("start_female",[],"Oriental Female",
       [
           (troop_set_type,"trp_player",2),
           (assign,"$character_gender",tf_female_asian),
           (jump_to_menu,"mnu_start_character_1"),
        ]
       ), 
      ("go_back",[],"Go back",
       [(change_screen_quit),
        ]
       ),

 
CutContent said:
Nothing, even Native is like this

I guess you are still working with M&B instead of Warband, right?

Not sure about the original, but Warband uses the simple rule for dialogs/etc of 0=male, 1=female and this "{male/female}" like in
Code:
" My {lord/lady}, we're only poor farmers f....

Mods that want more skin options need to adapt all entries and use a register to check for it, like in VC that uses reg59 for the player gender by using MOD 2 of the gender constant.
Code:
(str_store_string, s2, "@Welcome, {reg59?madame:sir}."),

as mentioned above cant say how that will apply to your case in general. However you showed just a piece of the code (not enough to see what is going on) and it has no testing (like a display_message), so you may want to add some debugging in there.
 
Well the rest of the game knows the new skin is female because when I talk to other NPCs they refer to the new skin by maam/madam and other female identifiers. I did a test where I changed a male lord into the new female skin and the game recognized it as a "she" in the game menus, but doesn't do that for my character. I think it's because it's getting the type of the TROOP and in module_troops.py and trp_player is male therefore it's registering it as male I think, I need an agent get type.

EDIT: Found the script responsible and it's script_update_troop_notes, original MB doesn't have an agent get type so far now I just disabled the player from appearing on the list of characters menu until I can find some kind of work around.
 
Why make this change? There are 2 genders, male and female. Your new race is female, isn't it? keep tf_female. And in any case, if you want to keep the tf_female_asian flag, for some unknown reason, assign it the value 1, so you won't have any gender problem with the code instructions.

A tip, work on the Warband or VC code, unless you don't have these expansions, unforgivable thing...  :facepalm: :fruity:
 
I found on the internet an osp or some such that triggers the famous 'HEADSHOT!' sound whenever you headshoot someone. Problem is, the pack is said to only work for multiplayer. Is there a way to make the sound play in singleplayer? If yes, may I have some help?

Edit: Also, does anyone know of any female face improvers that aren't just a single model retextured several times?
 
Corbul said:
I found on the internet an osp or some such that triggers the famous 'HEADSHOT!' sound whenever you headshoot someone.

use a hit trigger to detect the area of impact (bone). Then use the operation to play a sound you want when the conditions are OK.
 
Corbul said:
Is there a way to make the sound play in singleplayer? If yes, may I have some help?
Didn't study that pack myself, but I made my own version and it works in singleplayer. Put it in any needed mission template:
Code:
(ti_on_agent_hit, 0, 0, [],
  [
  (store_trigger_param_1, ":target"),
  (store_trigger_param_2, ":shooter"),
  (store_trigger_param, ":bone", 4),
  
  (get_player_agent_no, ":player"),
  (eq, ":shooter", ":player"),
  (neq, reg0, -1),
  (item_get_type, ":type", reg0),
  (this_or_next|eq, ":type", itp_type_bow),
  (this_or_next|eq, ":type", itp_type_crossbow),
  (this_or_next|eq, ":type", itp_type_thrown),
  (this_or_next|eq, ":type", itp_type_pistol),
  (eq, ":type", itp_type_musket),
  (try_begin),
   (agent_is_human, ":target"),
   (eq, ":bone", 9),
   (play_sound, "snd_custom_headshot_sound"), #the name is placeholder, put here your own 
  (else_try),
   (neg|agent_is_human, ":target"),
   (eq, ":bone", 7),
   (play_sound, "snd_custom_headshot_sound"), #the name is placeholder, put here your own 
  (try_end), 
  ]),
 
Corbul said:
UndeadDuke said:
Put it in any needed mission template:
Thanks for the reply! :grin:
But what does this mean? Can't I just put the code you attached into module_scripts and compile? :neutral:

No. It’s a mission trigger not a script. Such triggers are listed at the front of mission_templates.py before any missions are defined. Each mission is then defined to call only those triggers, which are appropriate to it. So, the trigger goes in the upfront list/library of triggers and then you need to insert its name into any mission template where you want it operational.
 
NPC99 said:
No. It’s a mission trigger not a script. Such triggers are listed at the front of mission_templates.py before any missions are defined. Each mission is then defined to call only those triggers, which are appropriate to it. So, the trigger goes in the upfront list/library of triggers and then you need to insert its name into any mission template where you want it operational.
Ok, so let me see if I understood correctly: I open module_mission_templates.py, and right in the first lines, where it says 'from header_common import *', I write my own 'from header_(something) import *'. Then I go down to the actual mission templates and insert the code provided by UndeadDuke. Then I save it, add the appropriate sound file into my module's Sounds folder, hit compile, and it should work?

Edit: Ah, you meant header_mission_templates.py?
Edit 2: Ah, I think I understood. Now, to find the proper template to use this in.
 
Corbul said:
Ok, so let me see if I understood correctly
No you didn't  :lol: Moreover, it seems like it's your first messing with mission templates and sounds. Well, we've all been on your place once. What you need is:
1) Add custom sound in Sounds folder (it should be in .ogg or .wav format)
2) Open module_sounds.py and add new entry with it
3) Open mission_templates.py and put my code in second bracket of lead_charge mission. It is common field battle so its the most easy to test. If it work, you can later add it to siege and village battle missions.
 
UndeadDuke said:
No you didn't  :lol: Moreover, it seems like it's your first messing with mission templates and sounds. Well, we've all been on your place once. What you need is:
1) Add custom sound in Sounds folder (it should be in .ogg or .wav format)
2) Open module_sounds.py and add new entry with it
3) Open mission_templates.py and put my code in second bracket of lead_charge mission. It is common field battle so its the most easy to test. If it work, you can later add it to siege and village battle missions.
Ugh, I still can't get it right. No matter where I put the code, it gives me some kind of error! :cry:
'second bracket' is the square one, right? Well I'm putting the code there, and here's what the compiler gives me:
Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... FAILED.
COMPILER INTERNAL ERROR:
Traceback (most recent call last):
  File "compile.py", line 310, in <module>
    entities[index] = entity_def['processor'](entities[index], index)
  File "C:\Users\home\Desktop\═ютр  яряър\Diplomacy\compiler.py", line 1202, in
process_mission_templates
    try: output.append('%f %f %f  %s  %s ' % (t0, t1, t2, parse_module_code(scri
pt1, 'mt.%s(#%d).%s.condition' % (e[0], index, trigger_to_string(t0))), parse_mo
dule_code(script2, 'mt.%s(#%d).%s.body' % (e[0], index, trigger_to_string(t0))))
)
  File "C:\Users\home\Desktop\═ютр  яряър\Diplomacy\compiler.py", line 1510, in
parse_module_code
    can_fail |= (current_depth < 1) and (((command[0] & 0x3FFFFFFF) in can_fail_
operations) or ((command[0] == call_script) and isinstance(command[1], VARIABLE)
and (command[1].module == WRECK.script) and (command[1].name[0:3] == 'cf_')))
TypeError: unsupported operand type(s) for &: 'float' and 'int'


COMPILATION FAILED.

Edit: Ah, never mind, I was putting it in the wrong place after all. :facepalm: It compiled. :mrgreen:
Edit 2: IT WORKED!!! :eek: THANK YOU!! :grin:
 
Status
Not open for further replies.
Back
Top Bottom