Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
SheriffTheRevenger said:
Does try_for_parties work on party templates too?
I managed to get the player and lords to sail if they are on ford , ocean or river terrain,
but i cannot get ordinary people to sail.
No. You should state the problem you have more clearly, as there are certainly better solutions for that.
 
MadVader said:
SheriffTheRevenger said:
Does try_for_parties work on party templates too?
I managed to get the player and lords to sail if they are on ford , ocean or river terrain,
but i cannot get ordinary people to sail.
No. You should state the problem you have more clearly, as there are certainly better solutions for that.
all right.
here's the code I tried(this is not the script that handles player and lords,they are working properly)

(0, [
(try_for_range, ":party", "pt_none", "pt_leaded_looters"),
(try_begin),
(party_get_current_terrain, ":terrain", ":party"),
(this_or_next|eq, ":terrain", rt_bridge),
(this_or_next|eq, ":terrain", rt_water),
(eq, ":terrain", rt_river),
(party_set_icon, ":party", "icon_ship"),
(party_set_flags, ":party", pf_is_ship, 1),
    (else_try),
(party_get_icon, ":icon", ":party"),
(eq, ":icon", "icon_ship"),
(party_set_icon, ":party", "icon_flagbearer_a"), # Generic lord icon?
(party_set_flags, ":party", pf_is_ship, 0),
(try_end),
(try_end),
  ]),

I tried to make all parties (villagers,deserters,etc..)can sail from anywhere where is the ford terrain type (near the shore)
and then continue sailing on rivers and oceans.
I added the code to module_simple_triggers.py and on the top I added

from header_terrain_types import * and from module_party_templates import *
pls help.
 
Hey guys, there are a few things I'll ask about. First of all, here's something I've been thinking about quite a lot. World map lag. I've heard that some mods feature large world maps without any lag, and since I've got a large world map that unfortunately has lag, I'm curious whether I'm missing something or not. If anyone knows anything or has any ideas, please: I'm all ears. :smile:

Next up. I've found a review of my mod on YouTube, a review in Russian, by a Russian person that uses the Russian-localised game. And oh, woe is me. Everything that has been localised for Native but changed in the mod (read: the first few factions, troops, menus, every-single-****ing-thing-that-has-not-been-added-by-me-but-modified) has been overwritten by the texts destined for Native.
Now the question. If I put the damn {!} thing at the beginning of everything, will that stop the incorrect translations from interfering, or will it not?
 
Hi folks,
I have a quick, very newbish question but one that's baffled me for quite a while.
(Sorry Lumos for interrupting you - my question is just a little one!)
I've been trying to get Helm's Deep sorted as I power towards the finish line with my mod!
However, I'm having trouble here:
57WcD09.jpg
How do I make it so that the mountain has shading, or specular, or whatever it's lacking to make it glow like that?
I'm so confused and irritated.
Could somebody just tell me what I need to do to fix this? Here's some info about the mesh.
1. Has diffuse and normal map. No specular.
I'm lost and baffled, because it's configured exactly the same in the BRF as the walls and main buildings! I don't understand what I'm doing wrong.
Thanks again.

And don't forget about Lumos. I feel a little guilty for posting my question immediately after his. It's just I hope mine will be quick.
 
Lumos said:
Hey guys, there are a few things I'll ask about. First of all, here's something I've been thinking about quite a lot. World map lag. I've heard that some mods feature large world maps without any lag, and since I've got a large world map that unfortunately has lag, I'm curious whether I'm missing something or not. If anyone knows anything or has any ideas, please: I'm all ears. :smile:
There seems to be some useful general info in this thread. It's really old, but still.
Next up. I've found a review of my mod on YouTube, a review in Russian, by a Russian person that uses the Russian-localised game. And oh, woe is me. Everything that has been localised for Native but changed in the mod (read: the first few factions, troops, menus, every-single-****ing-thing-that-has-not-been-added-by-me-but-modified) has been overwritten by the texts destined for Native.
Now the question. If I put the damn {!} thing at the beginning of everything, will that stop the incorrect translations from interfering, or will it not?
Don't know much about the {!} stuff, but AFAIU he/she could/should have switched to English until a proper TBS translation comes up. Alternatively, you can make English csv files just in case (which is more time-consuming).
 
Jarvisimo said:
Hi folks,
I have a quick, very newbish question but one that's baffled me for quite a while.
(Sorry Lumos for interrupting you - my question is just a little one!)
I've been trying to get Helm's Deep sorted as I power towards the finish line with my mod!
However, I'm having trouble here:
57WcD09.jpg
How do I make it so that the mountain has shading, or specular, or whatever it's lacking to make it glow like that?
I'm so confused and irritated.
Could somebody just tell me what I need to do to fix this? Here's some info about the mesh.
1. Has diffuse and normal map. No specular.
I'm lost and baffled, because it's configured exactly the same in the BRF as the walls and main buildings! I don't understand what I'm doing wrong.
Thanks again.

And don't forget about Lumos. I feel a little guilty for posting my question immediately after his. It's just I hope mine will be quick.

Probably you left the shader as "simple_shader"? See what shader the other materials have and copy that one. I know simple_shader tends to glow on the world map...
 
Dusk Voyager said:
There seems to be some useful general info in this thread. It's really old, but still.
Aha! The trees!!!! I shall obliterate each and every one of them immediately!!!
Thanks, I'll try to fiddle around with different things, including less polies on trees and finally reading into mtarini's TLD tree concept that I read about some time ago. Guess I'll see what happens.

Jarvisimo said:
(Sorry Lumos for interrupting you - my question is just a little one!)
[...]
And don't forget about Lumos. I feel a little guilty for posting my question immediately after his. It's just I hope mine will be quick.
You shouldn't have even cared about me, but thanks. :smile:
Hmmm... could it be the shader? Although you did say the mountain's brf is exacly the same as the others'... I'm sure it's something small that can be resolved quickly though.
 
Dawiduh said:
I am trying to implement the Depolyable Pavise to my mod and i changed the deploy key from g to k so it won't conflict with the drop item key and it simply doesn't work. The code compiles beautifully btw.

Also I am using my own models which appear ingame with no problem whatsoever.

You use the same mesh for the shield and the deployed shield props. Your deployed shield may be spawned underground.
 
dunde said:
Dawiduh said:
I am trying to implement the Depolyable Pavise to my mod and i changed the deploy key from g to k so it won't conflict with the drop item key and it simply doesn't work. The code compiles beautifully btw.

Also I am using my own models which appear ingame with no problem whatsoever.

You use the same mesh for the shield and the deployed shield props. Your deployed shield may be spawned underground.

I just tried that and it's the same: shield stays on the arm and no scene props are deployed. If that were the case my shield would've disappeared from my hand as it was spawned somewhere out of view.
 
I had to modify the model of course, and I took out a few item properties I didn't need.

I mean itp_cant_use_on_horseback, itp_wooden_parry and itcf_carry_board_shield have nothing to do with how the wole thing works. Even with them in plece it still didn't work.

Dawiduh said:
Ok, so this is my code instead of the original one:

module_items

["pavise", "Pavise Shield",  [("pavise_wep" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield,  488 , height(6.6)|hit_points(660)|body_armor(16)|spd_rtng(60)|shield_width(57)|shield_height(132),imodbits_shield ],

["force_shield", "Force Shield", [("force_shield",0)],itp_merchandise|itp_type_shield,0,1,weight(3)|hit_points(750)|body_armor(50)|spd_rtng(100)|shield_width(50),imodbits_shield],


module_mission_templates

      #pavise
      (0, 0, 0,
        [],
        [
            (get_player_agent_no, ":player_agent"),
            (agent_get_position, pos2, ":player_agent"),
            (try_begin),

                (agent_get_wielded_item, ":shield_item", ":player_agent", 1),
                (eq, ":shield_item", "itm_pavise"),
                (key_clicked, key_g),

                (position_move_y, pos2, 50),
                (set_spawn_position, pos2),
                (spawn_scene_prop, "spr_pavise"),#pavise spawn
                (agent_unequip_item, ":player_agent", "itm_pavise"),
            (try_end),
        ]),#0,0,0 pavise

#pavise
      (0, 0, 0,
        [],
        [
            (get_player_agent_no, ":player_agent"),
            (agent_get_position, pos2, ":player_agent"),
            (try_begin),

                (agent_get_wielded_item, ":shield_item", ":player_agent", 1),
                (eq, ":shield_item", "itm_force_shield"),
                (key_clicked, key_k),

                (position_move_y, pos2, 50),
                (set_spawn_position, pos2),
                (spawn_scene_prop, "spr_force_shield"),#pavise spawn
                (agent_unequip_item, ":player_agent", "itm_force_shield"),
            (try_end),
        ]),#0,0,0 pavise


module_scene_props

  ("pavise",sokf_moveable|sokf_destructible,"pavise_prop","bo_pavise", [
    #check_castle_door_use_trigger,

  (ti_on_init_scene_prop,
    [
      (store_trigger_param_1, ":instance_no"),
      (scene_prop_set_hit_points, ":instance_no", 100),
    ]),
   
  (ti_on_scene_prop_destroy,
    [
      (play_sound, "snd_dummy_destroyed"),
     
      (assign, ":rotate_side", 86),
     
      (try_begin),
        (this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),

        (store_trigger_param_1, ":instance_no"),     
        (store_trigger_param_2, ":attacker_agent_no"),

        (set_fixed_point_multiplier, 100),
        (prop_instance_get_position, pos1, ":instance_no"),

        (try_begin),
          (ge, ":attacker_agent_no", 0),
          (agent_get_position, pos2, ":attacker_agent_no"),
          (try_begin),
            (position_is_behind_position, pos2, pos1),
            (val_mul, ":rotate_side", -1),
          (try_end),
        (try_end),
     
        (init_position, pos3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (position_move_y, pos3, -100),
        (else_try),
          (position_move_y, pos3, 100),
        (try_end),
     
        (position_move_x, pos3, -50),
        (position_transform_position_to_parent, pos4, pos1, pos3),
        (position_move_z, pos4, 100),
        (position_get_distance_to_ground_level, ":height_to_terrain", pos4),
        (val_sub, ":height_to_terrain", 100),
        (assign, ":z_difference", ":height_to_terrain"),
        #(assign, reg0, ":z_difference"),
        #(display_message, "@{!}z dif : {reg0}"),
        (val_div, ":z_difference", 3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (val_add, ":rotate_side", ":z_difference"),
        (else_try),
          (val_sub, ":rotate_side", ":z_difference"),
        (try_end),

        (position_rotate_x, pos1, ":rotate_side"),
        (prop_instance_animate_to_position, ":instance_no", pos1, 70), #animate to position 1 in 0.7 second
      (try_end),
    ]),     
 
    (ti_on_scene_prop_hit,
    [
      (store_trigger_param_1, ":instance_no"),     
      (store_trigger_param_2, ":damage"),
     
      (try_begin),
        (scene_prop_get_hit_points, ":hit_points", ":instance_no"),
        (val_sub, ":hit_points", ":damage"),
        (gt, ":hit_points", 0),
        (play_sound, "snd_dummy_hit"),
      (else_try),
        (neg|multiplayer_is_server),
        (play_sound, "snd_dummy_destroyed"),
      (try_end),

      (try_begin),
        (this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),

        (particle_system_burst, "psys_dummy_smoke", pos1, 3),
        (particle_system_burst, "psys_dummy_straw", pos1, 10),
      (try_end),     
    ]),
  ]),

("force_shield",sokf_moveable|sokf_destructible,"force_shield","bo_force_shield", [
    #check_castle_door_use_trigger,

  (ti_on_init_scene_prop,
    [
      (store_trigger_param_1, ":instance_no"),
      (scene_prop_set_hit_points, ":instance_no", 100),
    ]),
   
  (ti_on_scene_prop_destroy,
    [
      (play_sound, "snd_dummy_destroyed"),
     
      (assign, ":rotate_side", 86),
     
      (try_begin),
        (this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),

        (store_trigger_param_1, ":instance_no"),     
        (store_trigger_param_2, ":attacker_agent_no"),

        (set_fixed_point_multiplier, 100),
        (prop_instance_get_position, pos1, ":instance_no"),

        (try_begin),
          (ge, ":attacker_agent_no", 0),
          (agent_get_position, pos2, ":attacker_agent_no"),
          (try_begin),
            (position_is_behind_position, pos2, pos1),
            (val_mul, ":rotate_side", -1),
          (try_end),
        (try_end),
     
        (init_position, pos3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (position_move_y, pos3, -100),
        (else_try),
          (position_move_y, pos3, 100),
        (try_end),
     
        (position_move_x, pos3, -50),
        (position_transform_position_to_parent, pos4, pos1, pos3),
        (position_move_z, pos4, 100),
        (position_get_distance_to_ground_level, ":height_to_terrain", pos4),
        (val_sub, ":height_to_terrain", 100),
        (assign, ":z_difference", ":height_to_terrain"),
        #(assign, reg0, ":z_difference"),
        #(display_message, "@{!}z dif : {reg0}"),
        (val_div, ":z_difference", 3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (val_add, ":rotate_side", ":z_difference"),
        (else_try),
          (val_sub, ":rotate_side", ":z_difference"),
        (try_end),

        (position_rotate_x, pos1, ":rotate_side"),
        (prop_instance_animate_to_position, ":instance_no", pos1, 70), #animate to position 1 in 0.7 second
      (try_end),
    ]),      #pavise end

I have to say that in module_mission_templates I placed the code after the Belligerent drunk one. Should I have placed it anywhere else? In module_scene_props it's the last one and in module_items it's at the end of the shields' list.
 
Belligerent drunk ... isn't that in the middle of the town-only triggers?

@Lumos:  I think that the main factor, in terms of lag, on the world map, is the overall geometrical complexity.  The geometry's used for pathfinding code (well, sort of, anyhow; I think it uses a similar method as the navigation meshes ++ a weighting algo).  The larger the map gets, the more crucial that polycount is kept under control. 

Trees probably contribute, but there are ways around that; instead of one tree, put several trees together in a forest object, to reduce the number of objects.

@SherrifTheRevenger:  You can get a Party's template base.  So basically you just need to do a try-for-parties loop and if the template is fitting or other conditions are met, make them a boat icon, etc. 

I don't really get why you're doing it that way, though; parties won't generally attempt to pathfind through water, and it doesn't make any sense for them to magically turn into boats whenever they're near water.


[EDIT]Oh, and Somebody, I got it working.  I did it as a series of boolean flags; it's a little inconvenient but it's working beautifully.  Male / female clothing sorting in auto-loot; auto-description code to tell players that they're looking at male / female gear, flags for special properties, the whole works.  Being able to arbitrarily add new values to the items sub-table and then populate it like that is golden. 

And it's fast; since it's all just a push from static, pre-built commands buried in the module system at compile-time, iterating through all of it takes hardly any time at all.  Really wish I'd thought of that one myself, it's the way to do it.
 
xenoargh said:
Belligerent drunk ... isn't that in the middle of the town-only triggers?

@Lumos:  I think that the main factor, in terms of lag, on the world map, is the overall geometrical complexity.  The geometry's used for pathfinding code (well, sort of, anyhow; I think it uses a similar method as the navigation meshes ++ a weighting algo).  The larger the map gets, the more crucial that polycount is kept under control. 

Trees probably contribute, but there are ways around that; instead of one tree, put several trees together in a forest object, to reduce the number of objects.

@SherrifTheRevenger:  You can get a Party's template base.  So basically you just need to do a try-for-parties loop and if the template is fitting or other conditions are met, make them a boat icon, etc. 

I don't really get why you're doing it that way, though; parties won't generally attempt to pathfind through water, and it doesn't make any sense for them to magically turn into boats whenever they're near water.


[EDIT]Oh, and Somebody, I got it working.  I did it as a series of boolean flags; it's a little inconvenient but it's working beautifully.  Male / female clothing sorting in auto-loot; auto-description code to tell players that they're looking at male / female gear, flags for special properties, the whole works.  Being able to arbitrarily add new values to the items sub-table and then populate it like that is golden. 

And it's fast; since it's all just a push from static, pre-built commands buried in the module system at compile-time, iterating through all of it takes hardly any time at all.  Really wish I'd thought of that one myself, it's the way to do it.
I need it becouse few my villages are laying on the islands (that's necessary becouse of the mod story).
 
Hello,

I have recently taken interest in modding M&B - Fire and Sword, and I was planning to edit my world map. I tried using Thorgrim's Map Editor, and it seems my computer is not compatible with the software. I have Windows 7; however, I could not activate the map editor.
I was wondering, if there is an alternate program I can use to edit World Maps on Windows 7.

It would be great, if anyone can tell me which software to use, so that I can maintain my interest in modding and can be of help in the future to avid M&B players.

Thank you once again.
 
I also have Win7 and Thorgrim's works. It goes a bit crazy witht he import and export paths but otherwise it's ok. So what happened that you couldn't activate it?
 
I think my last question was posted on a to buzy page, so I just ask it again.
where can I change the marying? I want to make it possible for female, to mary to naother female.
 
Status
Not open for further replies.
Back
Top Bottom