Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Roemerboy said:
@Yeferz
I don't know as NW run on the WF&S engine, but I have a solution for your copyright problem. You could script an installer which automatically copy all needed NW-files from the NW directory.

Ok thanks for that solution :smile: I'm a little way off that level of skill yet but I'll be sure to bear that in mind later on. Does that therefore mean the WF&S mod system can be used to mod a copy of NW then?
 
As far as I know NW is based on Warband. So I would use the Warband module system. However, you will loose all scripted functionality of NW. The only thing you can use from NW for a NW mod are the models and textures in case you want to edit module system stuff.

So unless you really need the NW models you're probably better of making a mod for Warband ^^
 
You should copy past and edit prior to

  ["mercenaries_end","mercenaries_end","mercenaries_end",0,no_scene,reserved,fac_commoners,
  [],
  def_attrib|level(4),wp(60),knows_common,mercenary_face_1, mercenary_face_2],
 
Roemerboy said:
I mean, that I want that by every siege attack/defence spawn additional troops for the defender. Like 20 "angry Townsman". :grin:

You can add troops to town garrison just before the battle :
Code:
      ("join_siege_with_allies",[(neg|troop_is_wounded, "trp_player")], "Join the next assault.",
       [
           (assign, "$g_joined_battle_to_help", 1), 
           (party_set_next_battle_simulation_time, "$g_encountered_party", -1),
           (try_begin),
             (check_quest_active, "qst_join_siege_with_army"),
             (quest_slot_eq, "qst_join_siege_with_army", slot_quest_target_center, "$g_encountered_party"),
             (add_xp_as_reward, 250),
             (call_script, "script_end_quest", "qst_join_siege_with_army"),
             #Reactivating follow army quest
             (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall),
             (str_store_troop_name_link, s9, ":faction_marshall"),
             (setup_quest_text, "qst_follow_army"),
             (str_store_string, s2, "@{s9} wants you to follow his army until further notice."),
             (call_script, "script_start_quest", "qst_follow_army", ":faction_marshall"),
             (assign, "$g_player_follow_army_warnings", 0),
           (try_end),
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
           (else_try),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
           (try_end),
           #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with high relation with you never spawn angry town men
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end
           (call_script, "script_calculate_battle_advantage"),
           (val_mul, reg0, 2),
           (val_div, reg0, 3), #scale down the advantage a bit in sieges.
           (set_battle_advantage, reg0),
           (set_party_battle_mode),
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_center_siege_with_belfry, 1),
             (set_jump_mission,"mt_castle_attack_walls_belfry"),
           (else_try),
             (set_jump_mission,"mt_castle_attack_walls_ladder"),
           (try_end),
           (jump_to_scene,":battle_scene"),
           (assign, "$g_siege_final_menu", "mnu_besiegers_camp_with_allies"),
           (assign, "$g_siege_battle_state", 1),
           (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"),
           (jump_to_menu, "mnu_battle_debrief"),
           (change_screen_mission),
          ]),
Code:
      ("castle_lead_attack",
       [
         (neg|troop_is_wounded, "trp_player"),
         (ge, "$g_siege_method", 1),
         (gt, "$g_friend_fit_for_battle", 3),
         (store_current_hours, ":cur_hours"),
         (ge, ":cur_hours", "$g_siege_method_finish_hours"),
       ],
       "Lead your soldiers in an assault.", 
       [
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
           (else_try),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
           (try_end),
           #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with high relation with you never spawn angry town men
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end 
           (call_script, "script_calculate_renown_value"),            
           (call_script, "script_calculate_battle_advantage"),
Code:
      ("siege_defender_join_battle",
       [
         (neg|troop_is_wounded, "trp_player"),
         ],
          "Join the battle.",[              
              (party_set_next_battle_simulation_time, "$g_encountered_party", -1),
              (assign, "$g_battle_result", 0),
              (try_begin),
                (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
                (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
              (else_try),
                (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
              (try_end),
              #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with low relation with you never spawn angry town men to help you defend the town
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end
              (call_script, "script_calculate_battle_advantage"),

and then, after siege's over. Clear the rest of angry town men from garrison :
Code:
  (0,
   [#angry_town_man_begin // Clearing the angry men from town garrison
      (map_free),
      (try_begin),
        (gt, "$g_angry_town_man_party", 0),
        (party_count_members_of_type,":num","$g_angry_town_man_party","trp_angry_town_man"),
        (try_begin),
          (gt, ":num", 0),
          (party_remove_members,"$g_angry_town_man_party","trp_angry_town_man",":num"), 
        (try_end),
        (assign, "$g_angry_town_man_party", -1),
      (try_end),
      #angry_town_man_end
    ]),

PS. I haven't tested the code yet. You can try it, and tell me if you have some problem when running it.

EDIT : add missing " on "trp_angry_town_man"
 
Barabas said:
As far as I know NW is based on Warband. So I would use the Warband module system. However, you will loose all scripted functionality of NW. The only thing you can use from NW for a NW mod are the models and textures in case you want to edit module system stuff.

So unless you really need the NW models you're probably better of making a mod for Warband ^^
Ok thanks Barabas, so there's no way to play around with stats etc then?
 
theelder said:
i tried to insert a new model yesterday, i've put the brf file in the resource folder and the textures in the texture folder,i've done with the module_items.py and put load_mod_resource = mongol_stuff
in the module.ini and i got this error when the game was loading the ini file
unrecognized resource type refvr
are there something i forget to do?
Make sure you are saving the .brf in the Warband format in OpenBRF
 
CTCCoco said:
Somebody can tell me if there´s a way to increase strength, for example, to 1000?

Thanks :smile:
Export character, change value, import, done. :grin:

I don't think 1,000 strength can be done in the MS, but I could very easily be wrong
 
Specialist said:
CTCCoco said:
Somebody can tell me if there´s a way to increase strength, for example, to 1000?

Thanks :smile:
Export character, change value, import, done. :grin:

I don't think 1,000 strength can be done in the MS, but I could very easily be wrong

I know how to do in txt files (only change the number) but I don´t know how to do in Module System. And I don´t understand why is so easy in txt files and so hard in MS, lol.

Thank you.
 
CTCCoco said:
Specialist said:
CTCCoco said:
Somebody can tell me if there´s a way to increase strength, for example, to 1000?

Thanks :smile:
Export character, change value, import, done. :grin:

I don't think 1,000 strength can be done in the MS, but I could very easily be wrong

I know how to do in txt files (only change the number) but I don´t know how to do in Module System. And I don´t understand why is so easy in txt files and so hard in MS, lol.

Thank you.
My only other guess is to change header_troops. Under str_30 (or whatever the last one is), make a copy of str_30 and change the hex code to be different from any other in the file (if the hex code is 0x000000f then change it to 0x0000000g if it is unused, etc) as well as change the name to str_1000

Then use the script that defines the player upon choice and change it to str_1000
For a generic troop, just simply find their attribute slots and change str_** to str_1000

Not sure if that will work though
 
I think that the max. Str. is 64.  :mrgreen:
You could use Morgh's Editor to change the statics. The MS is more difficult, but you have more options with it!

@dunde

THANKS!!!!!!!!!!!!! OMG I could eat you!  :lol:
I'll just try your code! :grin:
 
From what i know, attiributes are maxed at 64 or 63 by the engine. Might be wrong, though.

How can i detect that "character window" or "inventory window" if they are launched or not?
 
Belendor said:
From what i know, attiributes are maxed at 64 or 63 by the engine. Might be wrong, though.

How can i detect that "character window" or "inventory window" if they are launched or not?

What about

Code:
str_90           = bignum | 0x0000005A
str_200          = bignum | 0x0000008C

on Invasion source code?
 
Can anyone help? I can't find where to edit how much relation you gain/lose with a lord by assigning fiefs to them. TweakMB can do it to the txt files but I want to edit it in the module system, because everytime I recompile the module system obviously TweakMB's changes get overwritten, and frankly I don't want to rely on TweakMB for stuff that I can edit in the module system anyway.

Specifically, I want to increase the relation you get for assigning a fief to a lord who has no fiefs, and I want to increase the amount of relation lost with a fiefless lord for giving a fief to a lord who already has a fief. I just can't find those values.
 
dunde said:
Roemerboy said:
I mean, that I want that by every siege attack/defence spawn additional troops for the defender. Like 20 "angry Townsman". :grin:

You can add troops to town garrison just before the battle :
Code:
      ("join_siege_with_allies",[(neg|troop_is_wounded, "trp_player")], "Join the next assault.",
       [
           (assign, "$g_joined_battle_to_help", 1), 
           (party_set_next_battle_simulation_time, "$g_encountered_party", -1),
           (try_begin),
             (check_quest_active, "qst_join_siege_with_army"),
             (quest_slot_eq, "qst_join_siege_with_army", slot_quest_target_center, "$g_encountered_party"),
             (add_xp_as_reward, 250),
             (call_script, "script_end_quest", "qst_join_siege_with_army"),
             #Reactivating follow army quest
             (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall),
             (str_store_troop_name_link, s9, ":faction_marshall"),
             (setup_quest_text, "qst_follow_army"),
             (str_store_string, s2, "@{s9} wants you to follow his army until further notice."),
             (call_script, "script_start_quest", "qst_follow_army", ":faction_marshall"),
             (assign, "$g_player_follow_army_warnings", 0),
           (try_end),
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
           (else_try),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
           (try_end),
           #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with high relation with you never spawn angry town men
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end
           (call_script, "script_calculate_battle_advantage"),
           (val_mul, reg0, 2),
           (val_div, reg0, 3), #scale down the advantage a bit in sieges.
           (set_battle_advantage, reg0),
           (set_party_battle_mode),
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_center_siege_with_belfry, 1),
             (set_jump_mission,"mt_castle_attack_walls_belfry"),
           (else_try),
             (set_jump_mission,"mt_castle_attack_walls_ladder"),
           (try_end),
           (jump_to_scene,":battle_scene"),
           (assign, "$g_siege_final_menu", "mnu_besiegers_camp_with_allies"),
           (assign, "$g_siege_battle_state", 1),
           (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"),
           (jump_to_menu, "mnu_battle_debrief"),
           (change_screen_mission),
          ]),
Code:
      ("castle_lead_attack",
       [
         (neg|troop_is_wounded, "trp_player"),
         (ge, "$g_siege_method", 1),
         (gt, "$g_friend_fit_for_battle", 3),
         (store_current_hours, ":cur_hours"),
         (ge, ":cur_hours", "$g_siege_method_finish_hours"),
       ],
       "Lead your soldiers in an assault.", 
       [
           (try_begin),
             (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
           (else_try),
             (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
           (try_end),
           #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with high relation with you never spawn angry town men
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end 
           (call_script, "script_calculate_renown_value"),            
           (call_script, "script_calculate_battle_advantage"),
Code:
      ("siege_defender_join_battle",
       [
         (neg|troop_is_wounded, "trp_player"),
         ],
          "Join the battle.",[              
              (party_set_next_battle_simulation_time, "$g_encountered_party", -1),
              (assign, "$g_battle_result", 0),
              (try_begin),
                (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
                (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls),
              (else_try),
                (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior),
              (try_end),
              #angry_town_man_begin
           (try_begin),
              #
              # Give extra condition, like your relation to town. Make towns with low relation with you never spawn angry town men to help you defend the town
              #
              (party_force_add_members,"$g_encountered_party","trp_angry_town_man",10),
              (assign, "$g_angry_town_man_party", "$g_encountered_party"),
           (try_end),
           #angry_town_man_end
              (call_script, "script_calculate_battle_advantage"),

and then, after siege's over. Clear the rest of angry town men from garrison :
Code:
  (0,
   [#angry_town_man_begin // Clearing the angry men from town garrison
      (map_free),
      (try_begin),
        (gt, "$g_angry_town_man_party", 0),
        (party_count_members_of_type,":num","$g_angry_town_man_party","trp_angry_town_man"),
        (try_begin),
          (gt, ":num", 0),
          (party_remove_members,"$g_angry_town_man_party","trp_angry_town_man",":num"), 
        (try_end),
        (assign, "$g_angry_town_man_party", -1),
      (try_end),
      #angry_town_man_end
    ]),

PS. I haven't tested the code yet. You can try it, and tell me if you have some problem when running it.

EDIT : add missing " on "trp_angry_town_man"

Is it possible, that every faction get their own additional troops? For example: If Faction 1 is the defender:  20"angry townsman" + 2"Militias": But if faction 2 is the defender: 17"angry townswoman" + 7"Local Merchants".

You see I'm bad in scripting. ;( I hope you can tell if yes or no.
And, if you have enough time, a line which define this? :razz:

And again,
Code:
THANKS VERY MUCH!!!!
 
Status
Not open for further replies.
Back
Top Bottom