• 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
Nameless Warrior said:
Is it hardcoded that characters remove their helmets in conversations?

nope, it is a override option that you can use on the setup script/trigger or on the spawn record (entry point) of the mission template itself.

example on

Code:
# This template is used in party encounters and such.
# 
  (
    "conversation_encounter",0,-1,
    "Conversation_encounter",
    [( 0,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 1,mtef_visitor_source,af_override_fullhelm,0,1,[]),

or

Code:
  ("visit_town_castle",0,-1,
    "You enter the halls of the lord.",
    [(0,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons|af_override_head,0,1,[]),
(this is a example of removing horse, weapons and helmet when visiting the lord hall)
 

Janycz

Knight at Arms
WB
Hello! I have a siege scene. This scene has destroyable door. The attackers must destroy this door. But they do not destroy it. Why? How to make them do it?
 

_Sebastian_

Punkbuster 2.0
Baron
NWWBVC
Janycz said:
Hello! I have a siege scene. This scene has destroyable door. The attackers must destroy this door. But they do not destroy it. Why? How to make them do it?
The AI was never designed to attack destructible scene props, that's why those props only appear in multiplayer scenes.

You would have to manually code in that AI behavior.
 

-R0B0-

Regular
WB
Okay so i tried this boat script out and i have put all the scripts into the right places BUT now, i have a ton of error messages and I'm not the best and coding for warband, anyone that could help me?

link to script: http://forums.taleworlds.com/index.php/topic,316581.0.html

This is my the entire MS build.
Traceback (most recent call last):
  File "process_init.py", line 5, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_global_variables.py", line 8, in <module>
    from module_triggers import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_triggers.py", line 1538, in <module>
    (party_set_slot, ":target", slot_center_has_port, 1),
NameError: name 'slot_center_has_port' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 9, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 69, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 21, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 10, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_tableau_materials.py", line 11, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_presentations.py", line 11, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 7, in <module>
    from module_game_menus import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_game_menus.py", line 7680, in <module>
    (party_slot_eq, "$current_town", slot_center_has_port, 1),
NameError: name 'slot_center_has_port' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_mission_tmps.py", line 11, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from module_game_menus import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_game_menus.py", line 7680, in <module>
    (party_slot_eq, "$current_town", slot_center_has_port, 1),
NameError: name 'slot_center_has_port' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from module_simple_triggers import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_simple_triggers.py", line 1599, in <module>
    (party_set_slot, ":party_no", slot_party_save_icon, ":cur_icon"),
NameError: name 'slot_party_save_icon' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 8, in <module>
    from module_triggers import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_triggers.py", line 1538, in <module>
    (party_set_slot, ":target", slot_center_has_port, 1),
NameError: name 'slot_center_has_port' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\User\Desktop\Module_system 1.166\process_operations.py", line 24, in <module>
    from module_scripts import *
  File "C:\Users\User\Desktop\Module_system 1.166\module_scripts.py", line 2947, in <module>
    (else_try),
TypeError: 'tuple' object is not callable
Exporting postfx_params...
 

Ivkolya

Sergeant
WF&SWBNWM&BVC
Ivkolya said:
NPC99 said:
Cozur said:
Is it possible to rig the head so that the neck doesn't extrude when moved?

https://imgur.com/a/GbXEit4

Warband’s engine hardcodes the head and neck to the head bone, twisting the neck away from the body in some animations. You could convert a head into a rigged helmet (that hides the head) with its neck skinned to the thorax bone, but this would invalidate the face codes that give troops different faces, so is probably only appropriate for a unique character.

In that case I think it can be done with deleting neck part of the head mesh and attaching rigged neck mesh to each body armour, so lower neck vertices will be rigged to head bone or spine bone, and upper vertices will be attached to head bone, so animations will be smooth both for armour+neck and neck+head. But in this case I don't know how to change skin colour depending on face's skin colour, neck will be either white either black (or whatever colour you choose for it). It is not important for bots, but could be a problem for player, I guess.

Is it possible to make texture of a part of armour to correlate itself with current facial texture? I made neck mesh as part of armour (to avoid extruding of neck through armour in animations, it is WIP, I'll make smoother border between the neck and the head), it works perfectly, but it't texture must be set manually. It is no problem for bots (because I decide which faces they have), but it can be an issue for player, who can choose face, which will be darker or lighter than neck in different uniforms.
And also a question - how can I make these meshes of the head and the neck to blend, so their edges won't be so distinctive?

Example of mismatch of textures of the head and the neck

45ca852bf72aa13bbb08659461e5f817.jpg


On the left is native head and on the right is my new separate head and neck in release_pistol animation

3ba30c6de9410c326f55d19e49b3064a.jpg
 

Somebody

Code Pope
Baron
WBWF&S
You make it a submesh mapped to the face textures (one for each variant) and then add it to the armor via
Code:
cur_item_add_mesh
in the ti_on_init_item block. There's a bunch of face_key operations at the bottom of header_operations to determine which one you should apply.
 

Ivkolya

Sergeant
WF&SWBNWM&BVC
Somebody said:
You make it a submesh mapped to the face textures (one for each variant) and then add it to the armor via
Code:
cur_item_add_mesh
in the ti_on_init_item block. There's a bunch of face_key operations at the bottom of header_operations to determine which one you should apply.

Thank you very much, it's great that it's possible. But can you please be more specific? Neck submesh will be rigged, right? And game just adds it to head mesh and applies current facial texture, or this submesh should be added to armour? If I understand correctly, this code should be added in module_items.py? And maybe there is some code I can use as example? I found in Native module system lines with
Code:
ti_on_init_item
only for applying texture to surcoat and shields, and in code of torch item, but there are no lines with
Code:
cur_item_add_mesh
, so I don't quite understand how to write this code. Sorry for so many questions, I'm only learning about scripting.
 

DtheHun

Sergeant Knight
M&BWB
Ivkolya said:
And also a question - how can I make these meshes of the head and the neck to blend, so their edges won't be so distinctive?

I haven't found a way to make the engine connect the edges of different meshes for shading. As you see, if you just cut them at the connection those will remain hard edges with no blending. Better results can be achieved with a new row of faces slightly under the surface of the connecting model.

You should also make the connecting border less jagged. A straight line is more wrinkle like than a visible zig-zag connection.
 

Ivkolya

Sergeant
WF&SWBNWM&BVC
DtheHun said:
Ivkolya said:
And also a question - how can I make these meshes of the head and the neck to blend, so their edges won't be so distinctive?

I haven't found a way to make the engine connect the edges of different meshes for shading. As you see, if you just cut them at the connection those will remain hard edges with no blending. Better results can be achieved with a new row of faces slightly under the surface of the connecting model.

You should also make the connecting border less jagged. A straight line is more wrinkle like than a visible zig-zag connection.

Thank you. Like I said - it is WIP, made in testing purposes, I will improve neck mesh later.

Somebody said:
https://forums.taleworlds.com/index.php/topic,362488.0.html

I've read this tutorial, but I don't understand, how to make such submesh texture to be the same as current facial texture. In Warband module system there is
Code:
face_keys_get_face_texture
operation in header_operations (but it's missing in NW module system), I assume it gets current facial texture, and depending on this value game chooses which submesh to add.
But I guess there is simplier way. As example, to add this neck mesh as a part of body mesh, and to make all uniforms to be in legs slot (but it can be fine for NW multiplayer, and in Warband there will be issues when player will wear no uniform) or something like that.
 

Somebody

Code Pope
Baron
WBWF&S
Have you tried adding those values to header_operations and see if the engine recognizes the commands? Without it you can't accurately determine what skin to use unless you force troops to always have one skin colour.
 
Long time no see, friends.

I have a question because I'm working on an alignment system ala DnD using troop slots and while it's going well, but I had a question because my usage is in contrary to TW's usage for similar systems and I wanted to make sure I'm not doing anything wrong.

I have a script that runs at start up that assigns a string with the alignment to one slot on a per-troop basis.
For example I have a line like this
(troop_set_slot, "$g_player_troop",  slot_fate_alignment, "str_alignment_neutral"),

While Taleworlds seems to assign either other constants to the slot, or has separate slots per option assigned to global variables (lord personalities and character backgrounds respectively.)

Does my system have anything wrong with it, or am I just overthinking?
 

Janycz

Knight at Arms
WB
Hello! I have a parties. They have one same template. They are hostile to bandits and one selected kingdom. They behave like bandits: attack parties of farmers, fight with the lords' parties. It is good, but I want that they plunder and burn villages like lords. How can I implement this? Maybe it is implemented somewhere?
 
Status
Not open for further replies.
Top Bottom