• The forum has been updated. For an explanation of some of the changes, head over here.

Modding Q&A [For Quick Questions and Answers]

Currently viewing this thread:

Status
Not open for further replies.

kalarhan

Python Saint
Count
WBNWVCWF&S
Ibn Husayn said:
They are ignoring each other. They act as they both belong to same outlaw faction.

check your AI flags (header_parties, in special the flag "banditness"). On your game do bandits of different factions attack each other or not? And are you using the script that controls when a party sees another (you can even use it for debug). Also check the "script_game_event_simulate_battle"
 
I have created a new skill using reserved_1 in the skills.py in the same way I have with previous new skills and things seem to be fine.

When I am in scripts and using the store skill level operation it accepts the new skill and compiles.

However in troops if I try and say a troop knows this skill at a certain level it brings an error saying undefined.

Any idea why it would be?

In further investigation usually in "store_skill_level" a skill will be accepted whether you use "skl_ironflesh" or skl_ironflesh but similarly if I remove the speech marks it again says undefined.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Nameless Warrior said:
In further investigation usually in "store_skill_level" a skill will be accepted whether you use "skl_ironflesh" or skl_ironflesh but similarly if I remove the speech marks it again says undefined.

shows us code

and check your header_skills.py if the knows_XXXX is defined there properly.

btw you can rename it to something that makes sense, you do not need to use "reserved_XXX" as the skill reference.
 
kalarhan said:
Nameless Warrior said:
In further investigation usually in "store_skill_level" a skill will be accepted whether you use "skl_ironflesh" or skl_ironflesh but similarly if I remove the speech marks it again says undefined.

shows us code

and check your header_skills.py if the knows_XXXX is defined there properly.

btw you can rename it to something that makes sense, you do not need to use "reserved_XXX" as the skill reference.

Yep, thanks for pointing me in the right direction. I had a brainfart and forgot to change the rest of headers after changing the skill.
 

Cozur

Grandmaster Knight
WB
Hi guys, having a bit of an odd problem. This code:

Code:
      ("wait_24_hours",[],"Wait until tomorrow.", [
           (assign,"$auto_besiege_town","$g_encountered_party"),
           (assign, "$g_siege_force_wait", 1),
           (store_time_of_day,":cur_time_of_day"),
           (val_add, ":cur_time_of_day", 1),
           (assign, ":time_to_wait", 31),
           (val_sub,":time_to_wait",":cur_time_of_day"),
           (val_mod,":time_to_wait",24),
           (val_add, ":time_to_wait", 1),
           (rest_for_hours_interactive, ":time_to_wait", 5, 1), #rest while attackable
           (assign, "$cant_talk_to_enemy", 0),
           (change_screen_return),
           ]),

From native, despite not having any changes in it, doesn't work in ACOK. You click "Wait until tomorrow" but rather than waiting on the world map, the screen just flashes, and then you're back at the siege menu.
 
Cozur said:
Hi guys, having a bit of an odd problem. This code:

Code:
      ("wait_24_hours",[],"Wait until tomorrow.", [
           (assign,"$auto_besiege_town","$g_encountered_party"),
           (assign, "$g_siege_force_wait", 1),
           (store_time_of_day,":cur_time_of_day"),
           (val_add, ":cur_time_of_day", 1),
           (assign, ":time_to_wait", 31),
           (val_sub,":time_to_wait",":cur_time_of_day"),
           (val_mod,":time_to_wait",24),
           (val_add, ":time_to_wait", 1),
           (rest_for_hours_interactive, ":time_to_wait", 5, 1), #rest while attackable
           (assign, "$cant_talk_to_enemy", 0),
           (change_screen_return),
           ]),

From native, despite not having any changes in it, doesn't work in ACOK. You click "Wait until tomorrow" but rather than waiting on the world map, the screen just flashes, and then you're back at the siege menu.

That sub-menu works within the vanilla menu castle_besiege. Try looking at the only simple trigger that checks $g_siege_force_wait. It also checks other global variables set by the operations block of castle_besiege - one of which may be causing your problem.
 

daniel99

Squire
I created a code to limit infantry (similar to how you do for mounted units) in Napoleonic Wars. While it works fine, when you do try to select an infantry unit it will say in red writing above "Unexisting String". I was wondering where I would have to go to edit this...eg. to something like "Choose mounted Unit". Tried looking in Strings, and ui.csv but couldn't find anything.
 

Gess1t

Recruit
WB
Hello, i would like to know If that's possible to add new players models, i've found a body_mesh.brf file, so i'm wondering if that's possible.
If that possible, what part of code did i need to edit to get the new body mesh into the game?
 

DtheHun

Sergeant Knight
M&BWB
Gess1t said:
Hello, i would like to know If that's possible to add new players models, i've found a body_mesh.brf file, so i'm wondering if that's possible.
If that possible, what part of code did i need to edit to get the new body mesh into the game?

Copy that BRF file into the "Resource" folder of your module.
Open "module.ini" file with a text editor and find "load_resource = body_meshes", rewrite it to "load_mod_resource = body_meshes".
If it has custom textures, copy them to the "Textures" folder of that module.

Try it.

A.: If it works: You are lucky!
B.: If the textures are missing: You will need to load other brfs files with the appropriate material and texture setup what the custom body needs. Hopefully they are in the same directory where the body_meshes.brf was.
C.: The models are missing: You will need OpenBrf to open body_meshes.brf. In "skins.txt" you should rename the body parts according to the model names in body_meshes.brf.

If nothing works compare that body_meshes.brf in OpenBrf with the vanilla file - you can find in Warband/CommonRes directory - to find out if it has the required models at all.
 

Gess1t

Recruit
WB
DtheHun said:
Copy that BRF file into the "Resource" folder of your module.
Open "module.ini" file with a text editor and find "load_resource = body_meshes", rewrite it to "load_mod_resource = body_meshes".
If it has custom textures, copy them to the "Textures" folder of that module.

Try it.

A.: If it works: You are lucky!
B.: If the textures are missing: You will need to load other brfs files with the appropriate material and texture setup what the custom body needs. Hopefully they are in the same directory where the body_meshes.brf was.
C.: The models are missing: You will need OpenBrf to open body_meshes.brf. In "skins.txt" you should rename the body parts according to the model names in body_meshes.brf.

If nothing works compare that body_meshes.brf in OpenBrf with the vanilla file - you can find in Warband/CommonRes directory - to find out if it has the required models at all.

Well that not sufficient when you're working with module system as i don't know where i can add body_mesh as there is 2 skin : Man / Woman, so i think i will need to add an other choice to get my mesh into the game, i don't know any other way, i've put my mesh on body_mesh.brf, hair on hair.brf, but that it, was trying to add a third one in module_skins, but i get multiple syntaxes errors so i'm gonna just delete it i think and put this part in an other txt file, just in case.

the syntax i'm facing :

]
Code:
Traceback (most recent call last):
  File "process_skins.py", line 105, in <module>
    export_skins(skins)
  File "process_skins.py", line 81, in export_skins
    ofile.write("skinkey_%s %d %d %f %f %s "%(convert_to_identifier(face_key[4])
, face_key[0],face_key[1],face_key[2],face_key[3],replace_spaces(face_key[4])))
TypeError: %d format: a number is required, not str

with the code :

Code:
(
    "ModelC1", 0,
	"Custom_model", "custom_calf_l", "c_handL",
	"custom_head",
	["custom_hair"],
	[],
	[],
	[],
	[
	],
	[(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_stun,"snd_man_stun"),(voice_victory,"snd_man_victory")],
	"skel_human", 1.0,
	psys_game_blood,psys_game_blood_2,
  ),

my body parts have the same name as those of the code
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Gess1t said:
my body parts have the same name as those of the code

parser expects more components on the face[6] component, which is the

Code:
7) Face keys (list)

Code:
["custom_hair"],

a quick and unchecked look at the parser indicates at least 5
 

Gess1t

Recruit
WB
kalarhan said:
parser expects more components on the face[6] component, which is the

Code:
7) Face keys (list)

well my model wouldn't normally require face key, well :
- how can i generate those 9 characters hex face key?
- Is it possible way to cheat and bypass these requirement using the same face key?

EDIT: Done it with other value on top, still the same error, so just gonna delete it and put my model as a big armor and see if that work (with collision of course)

EDIT2: Done it, now my model is invisible ingame, even if i've referenced it in module.ini, i don't know how to fix it, it's worked fine for my weapon the last time.
 

kalarhan

Python Saint
Count
WBNWVCWF&S
Gess1t said:
EDIT: Done it with other value on top, still the same error

syntax error just needs you to fix the syntax, nothing more than that. Now if you want to experiment with changing the compiler to generate a new type of skin, then you will need to work with process_XXX.py too.

for the syntax issue see reply above.
 

Gess1t

Recruit
WB
kalarhan said:
Gess1t said:
EDIT: Done it with other value on top, still the same error

syntax error just needs you to fix the syntax, nothing more than that. Now if you want to experiment with changing the compiler to generate a new type of skin, then you will need to work with process_XXX.py too.

for the syntax issue see reply above.

adding "man_face_key," after "custom_head", but with all those body part, that mean that i can't put my player model into the game if i can't make it work as an bigger armor (and also because player character are made from different part, as mine is only 1 part), cause the mesh is just invisible ingame for some reason, and as there are no tutorial on adding armor with module system / adding skin to warband, can't do anythings for now, i'll continue to search on my side.

EDIT1: well i've added a companion with the model on him but the game just crash when i go to the tavern of uxhal so i think he's actually this town.
i don't know if there is Logs file to see why it's crashing. i'll need help on this one.
i'm asking myself if i have to make a topic for this one, so just in case, here is the companion code :

Code:
["npc18","Custom","Custom",tf_custom|tf_hero|tf_unmoveable_in_party_window, 0, reserved,  fac_commoners,[itm_nobleman_outfit,itm_nomad_boots, itm_sword_medieval_b_small, itm_new_weapon],
   str_30|agi_30|int_30|cha_30|level(25),wp(320),knows_Beast_npc|
   knows_power_throw_10|knows_athletics_10|knows_power_strike_10|knows_ironflesh_10,
   0x00000000fd04310641339248dc71461f00000000001f32a00000000000000000],

EDIT2: i've fixed the problem, i had wrote "load_mod_ressource = custom" in module.ini, removed one "s" but i can't get into the tavern where the companion is (instant crash when trying) so i picked up an other model, and put it as an armor into the game, and that work ! (after few scaling problem) strangely, yeah:

1533218139-20180802145922-1.jpg

This time it's working properly
1533218171-20180802150040-1.jpg

Also That not working as wanted this time
1533218217-20180802150129-1.jpg

Also That not working as wanted this time

It's seems that the model render differently when i enter different Area like in battle, town, and few other
 
pete99 said:
Is there some way to set a variation1/variation2 number on a prop through coding rather than via the scene editor?

You might find this thread of interest https://forums.taleworlds.com/index.php/topic,317313.0.html
 

Mike12096

Sergeant
M&BWBWF&SNW
Hello,
I started to get back to modding my warband mod via using Rubik's Custom Commander's source codes as my base mod when after I implemented JRider's Nobility Titles I stumbled upon a problem. Every lord have incorrect titles that aren't even their own factions titles but also are female ones...

57al3ehy85fytyozg.jpg
ranr61pfjexrlr1zg.jpg

All I did was simply use both Floris Expanded source code and lazeras KAOS Political source code as a way to guide me on how to better install and understand how JRider's titles work and what-not.
 
Status
Not open for further replies.
Top Bottom