Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I've got a reasonably easy question i think,  I'd like to implement a sort of extra survivability trait in my mod, i'd like it to function in a similar way that honor does in that it certain actions give or lower the players survivability trait.

There are two ways I think I could do this but im not 100% sure on which is the best (or if it even matters).

The first method I had was to create a new troop slot and titled it survivability - this seems to work fine at the moment but I've not tested it over an extended period of time and Im worried that it will eventually get lost or deleted for some reason - i want this value to be something which follows the player around there entire game. and only changes by the players actions/decisions

The second method i think i could do would be to simply use a global variable, I see that honor is implemented by simply using a global variable - would it be better if I were to use this instead? It'd be simpler I think.

Is one method better than the other or does it not make any difference?
 
Hey. I'm using Lumos's The Ultimate Introduction to Modding to try to add this into my game

Code:
Code: (module_game_menus) [Select]
"cheat_find_item",0,
   "{!}Current item range: {reg5} to {reg6}",
   "none",
   [
     (assign, reg5, "$cheat_find_item_range_begin"),
     (store_add, reg6, "$cheat_find_item_range_begin", max_inventory_items),
     (val_min, reg6, "itm_items_end"),
     (val_sub, reg6, 1),
     ],
    [

      ("cheat_find_item_prev_range",[], "{!}Move to previous range.",
       [
        (val_sub, "$cheat_find_item_range_begin", max_inventory_items),
        (try_begin),
          (lt, "$cheat_find_item_range_begin", 0),
          (assign, "$cheat_find_item_range_begin", itm_items_end-max_inventory_items),
        (try_end),
        (jump_to_menu, "mnu_cheat_find_item"),
       ]
       ),
      ("cheat_find_item_next_range",[], "{!}Move to next item range.",
       [
        (val_add, "$cheat_find_item_range_begin", max_inventory_items),
        (try_begin), #no uniques for you!
          (ge, "$cheat_find_item_range_begin", artifacts_begin),
          (assign, "$cheat_find_item_range_begin", 0),
        (try_end),
        (jump_to_menu, "mnu_cheat_find_item"),
       ]
       ),

      ("cheat_find_item_modifier",[
      (store_add, ":string", reg42, "str_imod_plain"),
      (str_store_string, s42, ":string"),
      ], "{!}Change {reg42?{s42}:arbitrarily best }item modifier.",
       [
        (val_add, reg42, 1),
        (try_begin),
          (neg|is_between, reg42, imod_plain, imod_large_bag + 1),
          (assign, reg42, 0),
        (try_end),
       ]
       ),

       ("cheat_find_item_choose_this",[], "{!}Choose from this range.",
       [
        (troop_clear_inventory, "trp_find_item_cheat"),
        (store_add, ":max_item", "$cheat_find_item_range_begin", max_inventory_items),
        # (store_sub, ":num_items_to_add", ":max_item", "$cheat_find_item_range_begin"),
        (try_for_range, ":item_id", "$cheat_find_item_range_begin", ":max_item"),
        # (try_for_range, ":i_slot", 0, ":num_items_to_add"),
          # (store_add, ":item_id", "$cheat_find_item_range_begin", ":i_slot"),
          (try_begin), #chosen imod
            (is_between, reg42, imod_cracked, imod_large_bag + 1),
            (troop_add_item, "trp_find_item_cheat", ":item_id", reg42),
          (else_try),
            (item_get_type, ":i_type", ":item_id"),
            (try_begin),
              (eq, ":i_type", itp_type_horse),
              (troop_add_item, "trp_find_item_cheat", ":item_id", imod_champion),
            (else_try),
              (this_or_next|eq, ":i_type", itp_type_shield),
              (is_between, ":i_type", itp_type_head_armor, itp_type_pistol),
              (troop_add_item, "trp_find_item_cheat", ":item_id", imod_lordly),
            (else_try),
              (this_or_next|is_between, ":i_type", itp_type_one_handed_wpn, itp_type_goods),
              (is_between, ":i_type", itp_type_pistol, itp_type_animal),
              (troop_add_item, "trp_find_item_cheat", ":item_id", imod_masterwork),
            (else_try),
              (troop_add_item, "trp_find_item_cheat", ":item_id", imod_plain),
            (try_end),
          (try_end),
        (try_end),
        (change_screen_loot, "trp_find_item_cheat"),
       ]
       ),

      ("camp_action_4",[],"{!}Back to menu.",
       [(jump_to_menu, "$return_menu"),
        ]
       ),
      ]
  ),

I think I've done everything so far correctly but somethings not working and I dont know why...

I have the latest Diplomacy mod installed and I copied it and called it diplomacy personalized

I opened the module_info.py and edit the line to
export_dir = "C:/Program Files (x86)/Mount&Blade Warband/Modules/Diplomacy Personalized"
hopefully like i was supposed to

and i tried to run the build_module.bat file but when i do i get alot of errors instead of what im supposed to see...

it says
python: can't open file 'blah blah blah' [Errno 2] No such file or directory
like 20 times and finally
Could Not Find C:\windows\system32\*.pyc

Anybody know what I did wrong? i ran it as administrator, i think i made the folders readable/editable and i have no clue what to do next.

I think the path is set up correctly because he said it would say
'python' is not recognized as internal or external command, operable program or batch file.
if i didnt so please help
 
La Grandmaster said:
I've got a reasonably easy question i think,  I'd like to implement a sort of extra survivability trait in my mod, i'd like it to function in a similar way that honor does in that it certain actions give or lower the players survivability trait.
Slots if you also want this for other characters, global if it's only really for the player.
BLQQD said:
Hey. I'm using Lumos's The Ultimate Introduction to Modding to try to add this into my game
Your module_info export directory should end with a slash (export_dir = "C:/Program Files (x86)/Mount&Blade Warband/Modules/Diplomacy Personalized/"). Also keep in mind that Diplomacy has its own module system and the link I gave you was for Native.
 
Somebody said:
Your module_info export directory should end with a slash (export_dir = "C:/Program Files (x86)/Mount&Blade Warband/Modules/Diplomacy Personalized/"). Also keep in mind that Diplomacy has its own module system and the link I gave you was for Native.

ow so what do I have to do to make it work with diplomacy? find and download their module? grrr cant beleive i let a slash cause me that much trouble

thanks again
 
I tried to attach the party_add_particle_system with a candle_light_small to the camp map icon and nothing changed. Are particle systems supposed to work on the world map?
 
Question: Is anyone able to point me in the direction of a setting or method of changing the green highlight for menu options & presentation buttons in game?

My searching found this question asked a couple of times without much result though that was a few years ago for each and it looks like we have settings in the module.ini for changing the font highlight color of numerous in-game presentations, but they seem to be limited to a specific presentation (main menu, profile, etc...).  Has anyone narrowed down which one in the list effects generic game_button & button highlights?

Thanks for any help someone might be able to lend.
 
Hey, does anyone know what kind of material settings I would need to use to fix the bushy tail on this guy?

ddfx-.jpg

P05VH.jpg

The invisible planes cancel each other out or something.
 
Dawiduh said:
I tried to attach the party_add_particle_system with a candle_light_small to the camp map icon and nothing changed. Are particle systems supposed to work on the world map?
I'd start experimenting with the map_village_x particle systems (which are used in Native) until you get the results you want.
 
Does anyone know if negative faction relations numbers affect map behavior?
In other words, what is the difference between -1 and -100 faction relation for map parties? Do they chase each other more aggressively for lower relations, or it doesn't mean anything?
Not talking about kingdoms and their scripted behavior, just map parties and the faction relations matrix.
 
In searching these forums I do not find an indication of how this is done.  Maybe I need to use different search terms, but at any rate, I will just ask it here.

Is the actual "character creation" page where you type your name and select all your beginning numbers hard coded to the game?  or is it possible to skip it altogether.  I do not see in scripts or in presentations any indication that it is being called from the mod system.  this leads me to think it is not possible to skip it altogether.  am I wrong here?  is it possible to somehow skip it entirely and just use scripts to setup a basic character with all values predefined?

I see a lot of people talking about this but it looks like all of the solutions only skip the beginning menus that ask about background etc.  then you are still taken to the actual "creation page" just as in native.  I really would like to skip this step 100% and have the player select "start new game" from the opening menu, and appear with a premade character on the world map.


if this is possible a bit of help is needed in finding out how to do it.
 
IIRC, if you put some initialization code in the first menu and just do (change_screen_map), you can skip all of it, with one problem: the moment you get into the character screen, you'll still need to distribute points, choose a face and go through some start menus. We used that in TLD as a dev quick start - at least that's how it worked in 1.011 and probably still does in Warband.
In other words, it's not pretty.
 
MadVader said:
We used that in TLD as a dev quick start - at least that's how it worked in 1.011 and probably still does in Warband.
In other words, it's not pretty.
You are correct that it still works that way in warband from when I last tested it.
 
Sure, I've tried doing it myself, but it still pops up, sooner or later. You can't simply remove the name-and-face selection screen, that was what I was trying to say.
Have I said it properly, though, is a different question...
 
replace_scene_props                        = 1890  # (replace_scene_props, <old_scene_prop_id>, <new_scene_prop_id>),
                                                    # Replaces all instances of specified scene prop type with another scene prop type. Commonly used to replace damaged walls with their intact versions during normal visits to castle scenes. Can only be called in ti_before_mission_start trigger in module_mission_templates.py.
 
Status
Not open for further replies.
Back
Top Bottom