Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Yes. It can be done easily. But I suggest not to use any conventional recruit-able troops if you want they will be removed from garrison after the siege withe less effort.

Let me give example :
make some troops on your module_troops.py :
Code:
["angry_town_man1", BLA BLA BLA],
["angry_town_man2", BLA BLA BLA],
["angry_town_man3", BLA BLA BLA],
["angry_town_man4", BLA BLA BLA],
["angry_town_man5", BLA BLA BLA],
["angry_town_man6", BLA BLA BLA],
["militia1", BLA BLA BLA],
["militia2", BLA BLA BLA],
["militia3", BLA BLA BLA],
["militia4", BLA BLA BLA],
["militia5", BLA BLA BLA],
["militia6", BLA BLA BLA],
["angry_man_end", BLA BLA BLA -DUMMY TROOPS ONLY],

Define constants at your module_constants :
Code:
angry_man_begin = "trp_angry_town_man1"
angry_man_end  =  "trp_angry_man_end"

Now, the spawning part become :
Code:
           #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
              #
             (store_faction_of_party, ":faction", "$g_encountered_party"),
             (try_begin), # just use party_force_add_members for any troops above, customize the number as you wish
                 (eq, ":faction", "fac_kingdom_1"),
                 (party_force_add_members,"$g_encountered_party","trp_angry_town_man1",10),
                 (party_force_add_members,"$g_encountered_party","trp_militia1",5),

             (else_try),
                 (eq, ":faction", "fac_kingdom_2"),
                 (party_force_add_members,"$g_encountered_party","trp_angry_town_man2",5),

            (else_try),
                 (eq, ":faction", "fac_kingdom_3"),
                <CONTINUE FOR ALL FACTIONS>

             (try_end),
           (try_end),
           #angry_town_man_end

And the cleansing become :
Code:
  (0,
   [#angry_town_man_begin // Clearing the angry men from town garrison
      (map_free),
      (try_begin),
        (gt, "$g_angry_town_man_party", 0),
        (try_for_range, ":troop_id", angry_man_begin, angry_man_end),
           (party_count_members_of_type,":num","$g_angry_town_man_party",":troop_id"),
           (try_begin),
             (gt, ":num", 0),
             (party_remove_members,"$g_angry_town_man_party",":troop_id",":num"), 
          (try_end),
        (try_end),
        (assign, "$g_angry_town_man_party", -1),
      (try_end),
      #angry_town_man_end
    ]),

 
Barabas said:
_Sebastian_ said:
Good evening.

Is there a way to check if an agent has a free weapon slot :?:

loop through the slots and check the items in them?

Thanks.
So here is what I did and it works.
Code:
      (assign, ":free_item_slot", 0),
      (try_for_range, ":item_slots", ek_item_0, ek_head),
        (agent_get_item_slot, ":item", ":user_id", ":item_slots"),
        (lt, ":item", 0),
        (assign, ":free_item_slot", 1),
      (try_end),
 
Code:
      (assign, ":free_item_slot", ek_head),
      (try_for_range, ":item_slots", ek_item_0, ":free_item_slot"),
        (agent_get_item_slot, ":item", ":user_id", ":item_slots"),
        (eq, ":item", -1),
        (assign, ":free_item_slot", -1),
      (try_end),
You can use free_item_slot as the variable to check and the loop breaker at the same time.
 
Belendor said:
How can i detect that "character window" or "inventory window" if they are launched or not?
WSE has trigger when a special screen 's opened, even it can override the screen with our own presentation.
And as Somebody pointed before, we can add some lines of our code into tableau code for the windows.
 
Caba`drin said:
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
i use mount&blade
well,that's a good idea,maybe my .brf file in in the warband forman,thank you  :mrgreen:
 
Hanakoganei said:
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.
Code:
[color=navy]script_give_center_to_lord[/color]
, near the end.
And actually, everything that TwekMB can do, you can do in the ModuleSystem. :smile:
 
Hey. :grin:
I've got this ERROR as I tried to build my moudle. So I have a question for you.
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
WARNING: Local variable never used: lair_y, at: spawn_bandits
Exporting mission_template data...
Error: Unable to find object:trp_swadian_prison_guard
ERROR: Illegal Identifier:trp_swadian_prison_guard
Error: Unable to find object:trp_vaegir_prison_guard
ERROR: Illegal Identifier:trp_vaegir_prison_guard
Error: Unable to find object:trp_khergit_prison_guard
ERROR: Illegal Identifier:trp_khergit_prison_guard
Error: Unable to find object:trp_nord_prison_guard
ERROR: Illegal Identifier:trp_nord_prison_guard
Error: Unable to find object:trp_rhodok_prison_guard
ERROR: Illegal Identifier:trp_rhodok_prison_guard
Error: Unable to find object:trp_sarranid_prison_guard
ERROR: Illegal Identifier:trp_sarranid_prison_guard
Error: Unable to find object:trp_swadian_prison_guard
ERROR: Illegal Identifier:trp_swadian_prison_guard
Error: Unable to find object:trp_vaegir_prison_guard
ERROR: Illegal Identifier:trp_vaegir_prison_guard
Error: Unable to find object:trp_khergit_prison_guard
ERROR: Illegal Identifier:trp_khergit_prison_guard
Error: Unable to find object:trp_nord_prison_guard
ERROR: Illegal Identifier:trp_nord_prison_guard
Error: Unable to find object:trp_rhodok_prison_guard
ERROR: Illegal Identifier:trp_rhodok_prison_guard
Error: Unable to find object:trp_sarranid_prison_guard
ERROR: Illegal Identifier:trp_sarranid_prison_guard
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

I renamed this reported troops. And I renamed them in ALL Scripts etc. . I checked the module_scripts.py around 10 times, but I can't find a "nord_prison_guard" or a "vaegir_archer".
Is anybody able to help me?  :mrgreen: And whas my grammar in the last sentence ok?

wishes
Roemerboy
 
Code:
Exporting mission_template data...
Error: Unable to find object:trp_swadian_prison_guard
ERROR: Illegal Identifier:trp_swadian_prison_guard
Error: Unable to find object:trp_vaegir_prison_guard
ERROR: Illegal Identifier:trp_vaegir_prison_guard
Error: Unable to find object:trp_khergit_prison_guard
ERROR: Illegal Identifier:trp_khergit_prison_guard
Error: Unable to find object:trp_nord_prison_guard
ERROR: Illegal Identifier:trp_nord_prison_guard
Error: Unable to find object:trp_rhodok_prison_guard
ERROR: Illegal Identifier:trp_rhodok_prison_guard
Error: Unable to find object:trp_sarranid_prison_guard
ERROR: Illegal Identifier:trp_sarranid_prison_guard
Error: Unable to find object:trp_swadian_prison_guard
ERROR: Illegal Identifier:trp_swadian_prison_guard
Error: Unable to find object:trp_vaegir_prison_guard
ERROR: Illegal Identifier:trp_vaegir_prison_guard
Error: Unable to find object:trp_khergit_prison_guard
ERROR: Illegal Identifier:trp_khergit_prison_guard
Error: Unable to find object:trp_nord_prison_guard
ERROR: Illegal Identifier:trp_nord_prison_guard
Error: Unable to find object:trp_rhodok_prison_guard
ERROR: Illegal Identifier:trp_rhodok_prison_guard
Error: Unable to find object:trp_sarranid_prison_guard
ERROR: Illegal Identifier:trp_sarranid_prison_guard
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer
Error: Unable to find object:trp_vaegir_archer
ERROR: Illegal Identifier:trp_vaegir_archer

Exporting mission_template data... <- Not scripts.py, its mission_templates.py
 
Roemerboy said:
I searched in ALL files... But there is no sarranid etc. over....
How did you search? Use a real editor with a proper search if you don't already use one, like Notepad++.
The errors say they are there in mission_templates.py or in some file that's imported by it. Search all *.py files for the missing troops. NOT JUST SCRIPTS.
 
I think he just calls the other files scripts as well. But regardless of that roemerboy, search mission_templates again, as i have told you before - the compiler doesnt lie.
 
I found the mistake.  :smile:
My Notepad++ was buggy. I pressed "save" but it doesn't save.........
My computer crashed so I had to restart all and found this.  :eek:

Thanks guys!
 
Hm. Quick thought.

Is it possible to supress infamous autoblock cheat
it patches client memory address to enable warband auto block feature
by creating trigger that will update client's block mode to manual each 0.1 second?

It would be handy for me in my war with noskill cheaters ruining game experience.
 
I only know this OSPs:

Greek shield:
http://forums.taleworlds.com/index.php/topic,153038.msg3675709.html#msg3675709

http://forums.taleworlds.com/index.php/topic,163181.0.html

Some helmets:
http://forums.taleworlds.com/index.php/topic,123550.msg2983420.html#msg2983420

And perhaps is this helpful too. But I', not sure:
http://forums.taleworlds.com/index.php/topic,165973.0.html

Thats all I founded. But I know that there is a big armor pack OSP. But I can't find it again! :sad:
 
Lumos said:
Excuse me for not carefully looking before posting, but does anyone have a nice, handy OSP pack of greek and persian weapons and armour which can be dated around... 480 BC? :razz:
Not to pat myself on the back, but mine too. The spears in here are from that general era

http://forums.taleworlds.com/index.php/topic,195577.0.html

Also, you can ask Lynores (Peloponessian War) or look at the old 300 Mod that was OSP'ed (one out of the 3 or 4 was....I think)
 
How are sounds set out in mount and blade, I mean like the distant chicken sound or the arena ambiance. I checked in the module sounds and scene props and didn't notice any of them linking so how do you set out sounds without attaching them to scene props.
 
xPearse said:
How are sounds set out in mount and blade, I mean like the distant chicken sound or the arena ambiance. I checked in the module sounds and scene props and didn't notice any of them linking so how do you set out sounds without attaching them to scene props.
You "attach" them to code. Search for the sound name (e.g. "snd_fart" if its name in the sounds file is "fart") you are interested in the code and find where it's used. As always, use a real editor that can search over all the module system files.
It also helps if you have a particular question. Some sounds are used arbitrarily with play_sound, others are used in skins or are hardcoded in the engine.
 
Status
Not open for further replies.
Back
Top Bottom