Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Lol, just discovered that the code works fine, it was just bad placement by my part  :lol: :facepalm:

Didn't know that placement was so important for dialogs, thanks for the info,and btw, any advice on where to start to make the party join battles?
 
Code:
("faction_troop_trees", 0, 0, [
    (ti_on_presentation_load,
      [
        (presentation_set_duration, 999999),
        (set_fixed_point_multiplier, 1000),
       
        (create_mesh_overlay, reg1, "mesh_load_window"),
        (position_set_x, pos1, 0),
        (position_set_y, pos1, 0),
        (overlay_set_position, reg1, pos1),
       
        ## combo_button
        (create_combo_button_overlay, "$g_presentation_obj_1"),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, 690),
        (overlay_set_position, "$g_presentation_obj_1", pos1),
        # factions
        (store_sub, ":num_factions", cultures_end, cultures_begin),
        (store_add, ":num_pages", ":num_factions", 3),
       
        ## page names, from bottom to top
        (overlay_add_item, "$g_presentation_obj_1", "@Others"),
        (overlay_add_item, "$g_presentation_obj_1", "@Outlaws"),
        (overlay_add_item, "$g_presentation_obj_1", "@Mercenary"),
        (try_for_range_backwards, ":page_no", 0, ":num_factions"),
          (store_add, ":faction_no", ":page_no", cultures_begin),
          (str_store_faction_name, s0, ":faction_no"),
          (overlay_add_item, "$g_presentation_obj_1", s0),
        (try_end),
        (store_sub, ":presentation_obj_val", ":num_pages", "$g_selected_page"),
        (val_sub, ":presentation_obj_val", 1),
        (overlay_set_val, "$g_presentation_obj_1", ":presentation_obj_val"),

mb41.jpg

How do i make the presentation above scrollable?
 
KratosMKII said:
How do i make the presentation above scrollable?

you can create containers and put objects inside them (the presentation itself is a container), which allows you to control the layoult. Then using the widgets (components) you can do stuff like scrollable areas

Code:
overlay_set_area_size                             =  929  # (overlay_set_area_size, <overlay_id>, <position>),
                                                          # Defines the actual area on the screen used to display the overlay. If it's size is greater than area size, it will create a scrollable area with appropriate scrollbars. Can be used to create scrollable areas for large text, or scrollable containers with many children elements (see Host Game screen for a typical example).
 
NPC99 said:
lordmuda said:
Hello there, i need quite a help in here.

This is the case
rYZ7mAx5lFWE-jDaD2DDYECOMDNnuC3Z8QhW-a1utd30p6t4A_qBKE9zXojUNdZ_p2rdMGcPAO-We5Cj8xVjnQc4EJrR6VFrgzUyaGla10FFcunHWVyiPnPIQePHj6Ur4i90K2oP5loYkqp8p06bLCcS5e-NNH1JPUW-kAjH35PKkhSoYs4N26Mxjm2Pfs6uHxIE4cnjyLznFdWeWXa7d8D9lrg38AfuU0dviwM08Eh21GjZ42pNOgT73C_aSWhQw6YsNdc1uYFS0d--iLMqeJYPkDU7pOcoSAw4YZrL4bHRDs0fzxTkZWCEj3I7_SHjJkV_sNFcYVjTtjxBv--GVZy1dRia3Ji_bhgMxH_UhVQ5JRyE-axp7zm3vOhzXXu-Pa0K8ZRYmshm3QQzcvWy2kZZ9foE4qIA-zVvl2LE8u6CGhQ0gCL2RSwYXNFuj_rjj8HRMS3pUVbobqOiRjTLyrqV4IzzLQKS02bvdP3W_pKHEJ9XBI83_r7eyNPJMA5i9c0pCjYghptQwQzchyePRjvvwcYZqcp8U2_Evdx_oyq5gDs7svjTs1NeB1WJPQ6S7LymlP3A_ldLF_hMyzybyVJsEzkzfW4CZCubd3aJdtubqlFcGS1ArZOnaFd6sfg=w1128-h634-no

How to make the hair in the right one to follow the texture of the left? can somebody please help me?

When you stretch a mesh’s polygons you distort the image applied by its material. To correct it, you need to re-UV map the final mesh to the original texture in Blender.
https://www.youtube.com/watch?v=scPSP_U858k

https://www.youtube.com/watch?v=EFqrWwPtGmU

I don't understand a bit about Blender, and when i try to do it in 3DS Max...well my Laptop is too low-specs for doing it smoothly. So i guess i'm gonna let it on that condition while i study Blender.
 
Screenshot

          # Equipments
          (create_text_overlay, reg1, "@Equipments", tf_left_align),
          (position_set_x, pos1, 840),
          (position_set_y, pos1, 235),
          (overlay_set_position, reg1, pos1),
          (overlay_set_size, reg1, pos3),
          (str_clear, s0),
          (create_text_overlay, "$g_presentation_obj_3", s0, tf_scrollable),
          (position_set_x, pos1, 840),
          (position_set_y, pos1, 30),
          (overlay_set_position, "$g_presentation_obj_3", pos1),
          (position_set_x, pos1, 13:cool:,
          (position_set_y, pos1, 202),
          (overlay_set_area_size, "$g_presentation_obj_3", pos1),
          (set_container_overlay, "$g_presentation_obj_3"),
       
          (troop_clear_inventory, "trp_temp_array_a"),
          (troop_get_inventory_capacity, ":inv_cap", "$g_selected_troop"),
          (try_for_range, ":i_slot", 0, ":inv_cap"),
            (troop_get_inventory_slot, ":item", "$g_selected_troop", ":i_slot"),
            (gt, ":item", -1),
            (troop_get_inventory_slot_modifier, ":imod", "$g_selected_troop", ":i_slot"),
            (troop_add_item,"trp_temp_array_a",":item", ":imod"),
          (try_end),
       
          (assign, ":pos_x", 0),
          (assign, ":pos_y", 280),
          (assign, ":slot_no", 10),
          # (try_for_range, ":unused_height", 0, :cool:,
        (try_for_range, ":unused_height", 0, 20),
            (try_for_range, ":unused_width", 0, 3),
              (create_mesh_overlay, reg1, "mesh_mp_inventory_choose"),
              (position_set_x, pos1, 320),
              (position_set_y, pos1, 320),
              (overlay_set_size, reg1, pos1),
              (position_set_x, pos1, ":pos_x"),
              (position_set_y, pos1, ":pos_y"),
              (overlay_set_position, reg1, pos1),
              (troop_set_slot, "trp_temp_array_a", ":slot_no", reg1),
              (create_mesh_overlay, reg1, "mesh_inv_slot"),
              (position_set_x, pos1, 400),
              (position_set_y, pos1, 400),
              (overlay_set_size, reg1, pos1),
              (position_set_x, pos1, ":pos_x"),
              (position_set_y, pos1, ":pos_y"),
              (overlay_set_position, reg1, pos1),
              (troop_get_inventory_slot, ":item_no", "trp_temp_array_a", ":slot_no"),
              (val_max, ":item_no", 0),
              (create_mesh_overlay_with_item_id, reg1, ":item_no"),
              (position_set_x, pos1, 400),
              (position_set_y, pos1, 400),
              (overlay_set_size, reg1, pos1),
              (store_add, ":item_x", ":pos_x", 20),
              (store_add, ":item_y", ":pos_y", 20),
              (position_set_x, pos1, ":item_x"),
              (position_set_y, pos1, ":item_y"),
              (overlay_set_position, reg1, pos1),
              (troop_set_slot, "trp_temp_array_b", ":slot_no", reg1),
              (val_add, ":pos_x", 40),
              (val_add, ":slot_no", 1),
            (try_end),
            (assign, ":pos_x", 0),
            (val_sub, ":pos_y", 40),
          (try_end),
          (set_container_overlay, -1),
        (try_end),
How do i make the presentation display more items slots? I modified the part in red but it didn't change anything.


kalarhan said:
KratosMKII said:
How do i make the presentation above scrollable?

you can create containers and put objects inside them (the presentation itself is a container), which allows you to control the layoult. Then using the widgets (components) you can do stuff like scrollable areas

Code:
overlay_set_area_size                             =  929  # (overlay_set_area_size, <overlay_id>, <position>),
                                                          # Defines the actual area on the screen used to display the overlay. If it's size is greater than area size, it will create a scrollable area with appropriate scrollbars. Can be used to create scrollable areas for large text, or scrollable containers with many children elements (see Host Game screen for a typical example).
Thank you.
 
Made those heroes work properly but now another problem appeared, when they get captured they don't have the option to be taken prisoner, it just shows they default hire dialog.The hire dialog is positioned right above the manhunters dialog.
 
Totenkopf900 said:
it just shows they default hire dialog.

review the condition code block for your dialogs

Code:
# 3) Conditions block (list): This must be a valid operation block. See header_operations.py for reference.
# 4) Dialog Text (string):
# 5) Ending dialog-state:
#    If a dialog line is picked, the active dialog-state will become the picked line's ending dialog-state.
# 6) Consequences block (list): This must be a valid operation block. See header_operations.py for reference.
 
Was wondering, NW has added a number of tools for server side modding, such as the custom chat, custom buttons, and custom menu options. Does native have anything similar or comparable added to it?
 
Hello everyone,
Will Something like this effect performance? rather than just having helmets some kind of NPCs and troops will have something like this:
WxW3VSb.png
SiWnMfb.png
A pre-made head with its own unique face in the mod.
Will this affect the game performance in scenes/battles?

PS: And for why I'm using this way, well... I don't want it to be randomized by the engine and This way will allow me to have a good-looking, customizable as I want faces in game
 
I've noticed bandits have stopped reinforcing each other in the mod I' making (as in five parties of bandits follow player but only one group's troops actually attack/engage at a time.), I'm working entirely with text edits so if anything Morgh's or the txt files? For all I know I've accidentally clicked some flag somewhere and it's as simple as turning it back off... or changing the composition of bandit parties means they break in this way?

any help appreciated.
 
twinsens said:
I've noticed bandits have stopped reinforcing each other in the mod I' making (as in five parties of bandits follow player but only one group's troops actually attack/engage at a time

see script_let_nearby_parties_join_current_battle for the rules around parties joining others (including bandits). One of the relevant ones is the type of leader troop (first stack) of a bandit group.
 
kalarhan said:
twinsens said:
I've noticed bandits have stopped reinforcing each other in the mod I' making (as in five parties of bandits follow player but only one group's troops actually attack/engage at a time

see script_let_nearby_parties_join_current_battle for the rules around parties joining others (including bandits). One of the relevant ones is the type of leader troop (first stack) of a bandit group.

need module system to fix? somehow managed to break it with just Morgh's editor but can't fix without module system... Is there any other way?
seaching for "script_let_nearby_parties_join_current_battle" within my module turns up no results in file contents.
 
imado552 said:
Hello everyone,
Will Something like this effect performance? rather than just having helmets some kind of NPCs and troops will have something like this:
WxW3VSb.png
SiWnMfb.png
A pre-made head with its own unique face in the mod.
Will this affect the game performance in scenes/battles?

PS: And for why I'm using this way, well... I don't want it to be randomized by the engine and This way will allow me to have a good-looking, customizable as I want faces in game

It should be fine. Lots of mods have heads treated as helmets.
 
twinsens said:
need module system to fix?

nope, but you do need to read it and see how it works. It doesnt matter how you are modding, but you still need the manual book to understand how stuff works (and how and why you broke something), right?

twinsens said:
seaching for "script_let_nearby_parties_join_current_battle" within my module turns up no results in file contents.

it is a script. So module_scripts.py or scripts.txt. Remove the prefix "script_" if needed it for the search.
 
kalarhan said:
it is a script. So module_scripts.py or scripts.txt. Remove the prefix "script_" if needed it for the search.

I think I'm just going to have to upload over next few days without a fix for this as at the moment I'm just staring at huge lists of numbers I don't understand,
let_nearby_parties_join_current_battle -1
116 23 2 1224979098644774912 1 23 2

1224979098644774913 2 2171 2 1224979098644774914

360287970189639680 11 1 1224979098644774915 132 1

1224979098644774915 1680 2 1224979098644774916

1224979098644774915 2147483678 2 1224979098644774916

0 1694 2 1224979098644774917 1224979098644774915

2147483678 2 1224979098644774917 0 2290 2

1224979098644774918 1224979098644774915 2147483679 2

1224979098644774918 8 1652 3 1224979098644774919

1224979098644774915 0 4 0 2147483681 3

1224979098644774919 360287970189639793

360287970189639802 2133 2 1224979098644774920 5 4 0

2273 0 2133 2 1224979098644774920 3 3 0 5 0 2133 2

1224979098644774920 3 4 0 2273 0 2133 2

1224979098644774920 2 3 0 3 0 3221225672 1

504403158265495605 2147484194 3 504403158265495605 8

1224979098644774915 3221225672 1 504403158265495583

2147484194 3 504403158265495583 8 1224979098644774915

2281 3 1224979098644774921 1224979098644774915

648518346341351424 2147483678 2 1224979098644774921

1224979098644774920 2204 2 1224979098644774922

1224979098644774915 2204 2 1224979098644774923

144115188075856188 4 0 31 2 1224979098644774922

432345564227567630 2133 2 1224979098644774924 100 5 0

2190 3 1224979098644774924 1224979098644774922

432345564227567630 3 0 4 0 31 2 1224979098644774922

1224979098644774923 2133 2 1224979098644774925 100 5 0

2190 3 1224979098644774925 1224979098644774922

1224979098644774923 3 0 2133 2 1224979098644774926 1 4

0 2147483679 2 144115188075856188 144115188075856273

2133 2 1224979098644774926 2 3 0 4 0 31 2

1224979098644774912 0 2147483678 2

1224979098644774924 0 32 2 1224979098644774925 0 521 2

1224979098644774927 1224979098644774915 2133 2

1224979098644774928 0 4 0 1652 3 1224979098644774919

1224979098644774915 0 33 3 1224979098644774919

360287970189639793 360287970189639802 32 2

1224979098644774914 6 2133 2 1224979098644774928 1 3 0

1073741855 2 1224979098644774927 13 31 2

1224979098644774928 1 2290 2 1224979098644774929

1224979098644774915 2147483679 2 1224979098644774929

5 1663 2 1224979098644774915 1224979098644774926 2330

2 1 1224979098644774915 1106 1 216172782113783949 5 0 4

0 541 3 1224979098644774915 4 11 541 3

1224979098644774915 5 360287970189639680 2133 2

1224979098644774930 1 5 0 2133 2 1224979098644774930 0

3 0 1073741855 2 1224979098644774913 0 31 2

1224979098644774930 1 32 2 1224979098644774924 0

2147483678 2 1224979098644774925 0 2133 2

1224979098644774931 0 4 0 541 3 1224979098644774915 4

11 541 3 1224979098644774915 5 648518346341351424 2133

2 1224979098644774931 1 3 0 2133 2 1224979098644774932

1 4 0 31 2 1224979098644774912 1 31 2

1224979098644774931 0 2133 2 1224979098644774932 0 31

2 1224979098644774922 144115188075856287 542 3

144115188075856287 8 360287970189639680 2133 2

1224979098644774932 1 3 0 31 2 1224979098644774932 1

521 2 1224979098644774927 1224979098644774915 31 2

1224979098644774927 13 1652 3 1224979098644774933

1224979098644774915 0 1 2 936748722493063437

1224979098644774933 2133 2 1224979098644774934

72057594037927936 2133 2 1224979098644774935 0 4 0 542

3 144115188075856287 8 360287970189639680 31 2

1224979098644774931 1 2133 2 1224979098644774935 1 3 0

1073741854 2 1224979098644774934 0 31 2

1224979098644774935 1 1663 2 1224979098644774915 0

2330 2 1 1224979098644774915 1106 1 216172782113783950

3 0 3 0

thanks for helping me refine my search results though, at least I know where the problem is even if I don't know how to fix it.
 
How do I remove a party from the world after it reaches a certain town (camp in this case), is this possible? I am trying to make so once you dismiss a mercenary party it will travel to its camp and then disappear.This party in question will not have any heroes and it is generated through dialogs.

Code:
 #(eq,"$encountered_party", "pt_geroian_mercs"),
 (party_set_slot, "$g_encountered_party", slot_party_type, spt_free_company),
 (display_message,"@SLOT CHANGED",0x6666FF),

 (party_set_faction, "$g_encountered_party" , "fac_commoners"),
 (display_message,"@FACTION CHANGED",0x6666FF),

 (party_get_position, pos0, "p_merc_camp_geroia"),
 (party_set_ai_behavior, "$g_encountered_party", ai_bhvr_travel_to_party),
 #(party_set_ai_patrol_radius, "$g_encountered_party", 1),
 (party_set_ai_target_position, "$g_encountered_party", pos0),
 

 (remove_party, "$g_encountered_party"),
 (display_message,"@PARTY REMOVED",0x6666FF),

This code just remove the party instantly.

 
Totenkopf900 said:
How do I remove a party from the world after it reaches a certain town (camp in this case), is this possible?

attach is what you are looking for

Code:
party_attach_to_party                 = 1660  # (party_attach_to_party, <party_id>, <party_id_to_attach_to>),
                                              # Attach a party to another one (like lord's army staying in a town/castle).
party_detach                          = 1661  # (party_detach, <party_id>),
                                              # Remove a party from attachments and place it on the world map.
party_collect_attachments_to_party    = 1662  # (party_collect_attachments_to_party, <source_party_id>, <collected_party_id>),
                                              # Mostly used in various battle and AI calculations. Will create an aggregate party from all parties attached to the source party.
party_get_cur_town                    = 1665  # (party_get_cur_town, <destination>, <party_id>),
                                              # When a party has reached it's destination (using ai_bhvr_travel_to_party), this operation will retrieve the party_id of the destination party.
party_get_attached_to                 = 1694  # (party_get_attached_to, <destination>, <party_id>),
                                              # Retrieves the party that the referenced party is attached to, if any.
party_get_num_attached_parties        = 1695  # (party_get_num_attached_parties, <destination>, <party_id>),
                                              # Retrieves total number of parties attached to referenced party.
party_get_attached_party_with_rank    = 1696  # (party_get_attached_party_with_rank, <destination>, <party_id>, <attached_party_index>),
                                              # Extract party_id of a specified party among attached.
 
Interesting, managed to make it work without using any  attach operation, just hijacked some of the recruiter code from diplomacy.It seems to work okay, once dismissed the party will go to the camp and disappear.

Code:
  ("hire_mercs",
    [
    (set_spawn_radius, 1),
    (spawn_around_party, "p_merc_camp_geroia", "pt_geroian_mercs"),
    (assign,":spawned_party",reg0),
    (party_set_ai_behavior, ":spawned_party", ai_bhvr_escort_party),
    (party_set_ai_object, ":spawned_party", "p_main_party"),
    (party_set_flags, ":spawned_party", pf_default_behavior, 0),
    (party_set_aggressiveness, ":spawned_party", 1),
    (party_set_courage, ":spawned_party", 15),
    (party_set_ai_initiative, ":spawned_party", 5),
    (party_set_slot, ":spawned_party", slot_party_type, spt_companion_raider),
    (party_set_slot, ":spawned_party", dplmc_slot_party_recruiter_origin, "p_merc_camp_geroia"),
    (party_set_faction, ":spawned_party", "fac_player_supporters_faction"),
    ]),

Code:
(0.5,
[
   (try_for_parties, ":party_no"),
   (party_slot_eq,":party_no", slot_party_type, spt_free_company),
   (party_get_slot, ":party_origin", ":party_no", dplmc_slot_party_recruiter_origin),
   (try_begin),
   #(neg|party_slot_eq, ":party_no", slot_party_ai_object, ":party_origin"),
   (party_set_slot, ":party_no", slot_party_ai_object, ":party_origin"),
   (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party),
   (party_set_ai_object, ":party_no", ":party_origin"),
   (try_end),
   (store_distance_to_party_from_party, ":distance_from_origin", ":party_no", ":party_origin"),
   (try_begin),
   (le, ":distance_from_origin", 0),
   (remove_party, ":party_no"),
   (try_end),
   (try_end),
]),

Now I just need to figure how to limit the number of merc companies the player can recruit, right now you can recruit them infinite times, any insight on this?

 
Status
Not open for further replies.
Back
Top Bottom