Author Topic: Mount & Blade Mod Makers Q&A Thread  (Read 721104 times)

Michadr and 1 Guest are viewing this topic.

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10245 on: March 26, 2012, 12:58:28 AM »
key_clicked will work reliably only on mission template triggers that happen on every frame (i.e. check interval 0).
Warband Script Enhancer v3.1.5 - additional operations, game scripts and triggers for Warband modders

Caba`drin

  • Administrator
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10246 on: March 26, 2012, 01:38:08 AM »
key_clicked will work reliably only on mission template triggers that happen on every frame (i.e. check interval 0).
Or simple_triggers/old form triggers that are check interval 0 as well.



Shredzorz

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Shredzorz
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10247 on: March 26, 2012, 05:24:10 AM »
I'm getting a strange error whenever I try to generate an AI mesh for my scene.

(click to show/hide)

What does it mean?

Swagger7

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Any idea why my new companions are not showing up in taverns? Please help!
« Reply #10248 on: March 26, 2012, 12:01:06 PM »
I followed an old tutorial on how to add new companions and built the modules with no errors, but my new companions won't show up in taverns.  Any idea why this is?  I've had a lot of experience modding Morrowind and Oblivion, but Python is new to me.  If taverns are out of the question, is there a way to spawn the companions in edit mode or force them to appear at a set location or in your party from the beginning?  Any help would be greatly appreciated!

cmpxchg8b

  • Modder++
  • Grandmaster Knight
  • *
  • Master of rglPool
    • View Profile
  • Faction: Vaegir
  • MP nick: cmp
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10249 on: March 26, 2012, 01:07:20 PM »
It means your AI mesh is so huge that when the game tries to display (by generating a mesh on the fly) it goes over the limit of 65535 vertices per mesh.
It's an unfortunate error, because the AI mesh is not really limited to that amount of vertices, just the visual representation is.

I'm afraid you'll have to create it by hand, from scratch.
Warband Script Enhancer v3.1.5 - additional operations, game scripts and triggers for Warband modders

Caba`drin

  • Administrator
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • M&BWBWF&SNW
Re: Any idea why my new companions are not showing up in taverns? Please help!
« Reply #10250 on: March 26, 2012, 01:19:58 PM »
I followed an old tutorial on how to add new companions and built the modules with no errors, but my new companions won't show up in taverns.  Any idea why this is?  I've had a lot of experience modding Morrowind and Oblivion, but Python is new to me.  If taverns are out of the question, is there a way to spawn the companions in edit mode or force them to appear at a set location or in your party from the beginning?  Any help would be greatly appreciated!
You add the troops in the correct place in the module_troops file? By the other companions?



MaHuD

  • Napoleonic Wars Moderator
  • *
  • Terror Terroris
    • View Profile
  • Faction: Nord
  • MP nick: K-KA_Nr7_FWOb_MaHuD
  • WBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10251 on: March 26, 2012, 03:29:40 PM »
Hm, somehow I can't get something to rotate. Instead of rotating it teleports to left but doesnt change rotation at all.
(Without the "rotate_z", it would just go forwards at rate that depends on $Speed so it can't be that.)


Code: [Select]
   
              (agent_get_position,pos1, ":agent"),
              (init_position, pos2),
              (position_set_y, pos2, "$Speed"), # Moving Forwards
              (position_rotate_z, pos2, 2),
              (position_transform_position_to_parent, pos3, pos2, pos1),
              (agent_set_position, ":agent", pos3),

xPearse

  • Knight at Arms
  • *
  • H.O.T.D. Check It Out
    • View Profile
  • Faction: Neutral
  • MP nick: xPearse
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10252 on: March 26, 2012, 03:29:59 PM »
Hey guys what shader do I use for clothing using bump maps. I really dont know the shaders properly because I used bump_static for a clothing and the lighting on it turned out all weird.


Caba`drin

  • Administrator
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10253 on: March 26, 2012, 03:40:20 PM »
Hm, somehow I can't get something to rotate. Instead of rotating it teleports to left but doesnt change rotation at all.
(Without the "rotate_z", it would just go forwards at rate that depends on $Speed so it can't be that.)


Code: [Select]
   
              (agent_get_position,pos1, ":agent"),
              (init_position, pos2),
              (position_set_y, pos2, "$Speed"), # Moving Forwards
              (position_rotate_z, pos2, 2),
              (position_transform_position_to_parent, pos3, pos2, pos1),
              (agent_set_position, ":agent", pos3),

When rotating around Z, the X rotation also tends to move, which might be what you're seeing. A typical workaround:
Code: [Select]
          (position_get_rotation_around_x, ":rotx", pos2),
          (store_mul, ":minusrotx", ":rotx", -1),
          (position_rotate_x, pos2, ":minusrotx"), #needed so camera yaw won't change
          (position_rotate_z, pos2, 2),
          (position_rotate_x, pos2, ":rotx"), #needed so camera yaw won't change

Might be easier/better to do the rotation on pos1 and then use position_move_y with your "$speed". Not sure though.



Specialist

  • Master Knight
  • *
  • World War 3 Team Leader
    • View Profile
  • Faction: Neutral
  • MP nick: TheSpecialist
  • WB
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10254 on: March 26, 2012, 04:05:36 PM »
Hey guys what shader do I use for clothing using bump maps. I really dont know the shaders properly because I used bump_static for a clothing and the lighting on it turned out all weird.

Use a standart_shader
probably standart_shader_noskin_bump_high for weapons and standart_shader_skin_bump_high for rigged stuff

MaHuD

  • Napoleonic Wars Moderator
  • *
  • Terror Terroris
    • View Profile
  • Faction: Nord
  • MP nick: K-KA_Nr7_FWOb_MaHuD
  • WBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10255 on: March 26, 2012, 04:06:14 PM »
I am afraid that he is still teleporting the exact same way to the left.
I don't remember exactly why I am not using pos1, think it had something to do with that I needed to change everything localy and also need to check for collision later or something.

Caba`drin

  • Administrator
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10256 on: March 26, 2012, 04:31:21 PM »
I am afraid that he is still teleporting the exact same way to the left.
I don't remember exactly why I am not using pos1, think it had something to do with that I needed to change everything localy and also need to check for collision later or something.
On second look, the arguments
(position_transform_position_to_parent, pos3, pos2, pos1),
seem to be in the wrong order

(position_transform_position_to_parent, pos3, pos1, pos2),
since pos2 is the relative position, pos1 is the absolute position and you want the absolute version of pos2 around pos1 as pos3.



MaHuD

  • Napoleonic Wars Moderator
  • *
  • Terror Terroris
    • View Profile
  • Faction: Nord
  • MP nick: K-KA_Nr7_FWOb_MaHuD
  • WBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10257 on: March 26, 2012, 04:48:27 PM »
Thanks, that worked! :)

Swagger7

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: Any idea why my new companions are not showing up in taverns? Please help!
« Reply #10258 on: March 26, 2012, 09:40:28 PM »
I followed an old tutorial on how to add new companions and built the modules with no errors, but my new companions won't show up in taverns.  Any idea why this is?  I've had a lot of experience modding Morrowind and Oblivion, but Python is new to me.  If taverns are out of the question, is there a way to spawn the companions in edit mode or force them to appear at a set location or in your party from the beginning?  Any help would be greatly appreciated!
You add the troops in the correct place in the module_troops file? By the other companions?

Yep, right underneath them.

Caba`drin

  • Administrator
  • *
  • It's time to toss the dice.
    • View Profile
  • Faction: Nord
  • MP nick: Caba_drin
  • M&BWBWF&SNW
Re: Mount & Blade Mod Makers Q&A Thread
« Reply #10259 on: March 26, 2012, 09:43:26 PM »
So long as they are between companions_begin and companions_end ("trp_npc1" and "trp_kingdom_1_lord") then "update_companion_candidates_in_taverns" should operate just fine.