Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
kalarhan 说:
Then look on how you are using it.
Sorry I'm confused now... Tried to change it this way:
插入代码块:
(ti_on_scene_prop_use,
    [
          (store_trigger_param_1, ":agent_id"),
	  (store_trigger_param_2, ":instance_id"),
	  
          (scene_prop_enable_after_time, ":instance_id", 200),
          (agent_get_troop_id, ":troop_id", ":agent_id"),	  
	  (agent_get_position, pos11, ":agent_id"),
	  (set_spawn_position, pos11),
	  (str_store_troop_face_keys, s0, ":troop_id", 0),
	  (face_keys_get_hair, ":hair", s0),
	  (face_keys_get_beard, ":beard", s0),
	  (face_keys_get_hair_color, ":color", s0),
	  (agent_fade_out, ":agent_id"),
	  (face_keys_set_hair, s0, ":hair"),
	  (face_keys_set_beard, s0, ":beard"),
	  (face_keys_set_hair_color, s0, ":color"),
	  (troop_set_face_keys, "trp_player", s0, 0),
	  (spawn_agent, "trp_player"),	       	  
    ]),

Result: I got a face which is set in module_troops for player, not my current one. And beard, hair and its color keep changing randomly after each use of scene prop. I never used these operations before and I cant make them to work :sad:  But the main question is, why troop_set_face_keys operation isn't enough? why should I mess with each modifier separately?
 
UndeadDuke 说:
And beard, hair and its color keep changing randomly after each use of scene prop

插入代码块:
str_store_troop_face_keys                = 2750  # (str_store_troop_face_keys, <string_no>, <troop_no>, [<alt>]),

what does a parameter with a [] means? That it is optional. Why is alt optional? Because you can work with 2 face keys (one at time) for random faces.

depending on what you are copying you need to work with other modifiers like beard, hair and - most importantly - morph keys. So review all the operations, get your strings, print them out, check against your current model, and find out what you need to do to recreate each case you are working with.

for the player it should be enough to simple use "str_store_troop_face_keys" without alt, but as always you need to test it out and make sure that is how it works.
 
I have downloaded an item mod called Spak items, in the mod he has bows that don't function right. The accuracy on them is a lot lower then native bows. Native bows The reticle closes down to near perfect aim at about 300 with his bows perfect aim doesn't happen till 600+ mastery with bows. How do i fix this so the bow works more like Native bows? I have Morgh's tool but adjusting the accuracy on them in that doesn't seem to do anything.
 
Silverc 说:
How do i fix this so the bow works more like Native bows?
Take only the bow mesh from Spak mod, nothing else. Then duplicate one of native bows using Morgh's Editor and replace its mesh with one from mod.

kalarhan 说:
for the player it should be enough to simple use "str_store_troop_face_keys" without alt, but as always you need to test it out and make sure that is how it works.
I think I got it now, thanks I'll try to test it out
 
UndeadDuke 说:
Silverc 说:
How do i fix this so the bow works more like Native bows?
Take only the bow mesh from Spak mod, nothing else. Then duplicate one of native bows using Morgh's Editor and replace its mesh with one from mod.

How do I do that... I know how to Duplicate items and edit the stats how do I change mesh?
 
Silverc 说:
how do I change mesh?
using the same editor. Bows have 2 meshes usually. You have to udate both of them with respective names from spak archive. Open .brf with openBRF tool, press tools - sort entries, find the bow you like, and assign its mesh to your duplicate. Also make sure that spak brf is listed in module.ini of your mod.
o7h208p.png
 
UndeadDuke 说:
Silverc 说:
how do I change mesh?
using the same editor. Bows have 2 meshes usually. You have to udate both of them with respective names from spak archive. Open .brf with openBRF tool, press tools - sort entries, find the bow you like, and assign its mesh to your duplicate. Also make sure that spak brf is listed in module.ini of your mod.
o7h208p.png
OH TY so that is how you use that. Will let you know if it fixes it TY dude. edit so I did just as you said and the bow is still has a reticle twice the size of bow I copied and simply replaced mesh with.
 
Hey so the stage I'm at currently in making my mod is I'm breaking up Calradia into many mini-factions, and I've made several additional factions successfully and without any issue until I got to the 12th total faction.

I followed all the steps here in this guide: https://forums.taleworlds.com/index.php/topic,128647.0.html

When I ran build_module I got this error (I cant post the whole error due to post size constraints but this is the common jist of what it says):
Error with upgrade def: Unable to find troop1-id: farmer
Error with upgrade def: Unable to find troop1-id: townsman
Error with upgrade2 def: Unable to find troop1-id: watchman
Error with upgrade2 def: Unable to find troop1-id: caravan_guard
Error with upgrade def: Unable to find troop1-id: mercenary_swordsman
Error with upgrade def: Unable to find troop1-id: mercenary_horseman
Error with upgrade def: Unable to find troop1-id: swadian_recruit
Error with upgrade2 def: Unable to find troop1-id: swadian_militia
Error with upgrade2 def: Unable to find troop1-id: swadian_footman
Error with upgrade def: Unable to find troop1-id: swadian_infantry
Error with upgrade def: Unable to find troop1-id: swadian_skirmisher
Error with upgrade def: Unable to find troop1-id: swadian_crossbowman
Error with upgrade def: Unable to find troop1-id: swadian_man_at_arms
Error with upgrade def: Unable to find troop1-id: vaegir_recruit
Error with upgrade2 def: Unable to find troop1-id: vaegir_footman
Error with upgrade def: Unable to find troop1-id: vaegir_skirmisher
Error with upgrade def: Unable to find troop1-id: vaegir_archer
Error with upgrade2 def: Unable to find troop1-id: vaegir_veteran
Error with upgrade def: Unable to find troop1-id: vaegir_infantry
Error with upgrade def: Unable to find troop1-id: vaegir_horseman
Error with upgrade def: Unable to find troop1-id: khergit_tribesman
Error with upgrade def: Unable to find troop1-id: khergit_skirmisher
Error with upgrade2 def: Unable to find troop1-id: khergit_horseman
Error with upgrade def: Unable to find troop1-id: khergit_horse_archer
Error with upgrade2 def: Unable to find troop1-id: nord_recruit
Error with upgrade def: Unable to find troop1-id: nord_footman
Error with upgrade def: Unable to find troop1-id: nord_trained_footman
Error with upgrade def: Unable to find troop1-id: nord_warrior
Error with upgrade def: Unable to find troop1-id: nord_veteran
Error with upgrade def: Unable to find troop1-id: nord_huntsman
Error with upgrade def: Unable to find troop1-id: nord_archer
Error with upgrade2 def: Unable to find troop1-id: rhodok_tribesman
Error with upgrade def: Unable to find troop1-id: rhodok_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_trained_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_veteran_spearman
Error with upgrade def: Unable to find troop1-id: rhodok_crossbowman
Error with upgrade def: Unable to find troop1-id: rhodok_trained_crossbowman
Error with upgrade def: Unable to find troop1-id: rhodok_veteran_crossbowman
Error with upgrade def: Unable to find troop1-id: sarranid_recruit
Error with upgrade2 def: Unable to find troop1-id: sarranid_footman
Error with upgrade2 def: Unable to find troop1-id: sarranid_veteran_footman
Error with upgrade def: Unable to find troop1-id: sarranid_infantry
Error with upgrade def: Unable to find troop1-id: sarranid_skirmisher
Error with upgrade def: Unable to find troop1-id: sarranid_archer
Error with upgrade def: Unable to find troop1-id: sarranid_horseman
Error with upgrade2 def: Unable to find troop1-id: looter
Error with upgrade def: Unable to find troop1-id: mountain_bandit
Error with upgrade def: Unable to find troop1-id: forest_bandit
Error with upgrade def: Unable to find troop1-id: steppe_bandit
Error with upgrade def: Unable to find troop1-id: taiga_bandit
Error with upgrade def: Unable to find troop1-id: sea_raider
Error with upgrade def: Unable to find troop1-id: desert_bandit
Error with upgrade2 def: Unable to find troop1-id: bandit
Error with upgrade def: Unable to find troop1-id: manhunter
Error with upgrade def: Unable to find troop1-id: slave_driver
Error with upgrade def: Unable to find troop1-id: slave_hunter
Error with upgrade def: Unable to find troop1-id: slave_crusher
Error with upgrade def: Unable to find troop1-id: follower_woman
Error with upgrade def: Unable to find troop1-id: hunter_woman
Error with upgrade def: Unable to find troop1-id: fighter_woman
Error with upgrade def: Unable to find troop1-id: refugee
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 6, in <module>
    from module_dialogs import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_dialogs.py", line 811, in <module>
    [trp_tutorial_archer_1|auto_proceed, "start",
NameError: name 'trp_tutorial_archer_1' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Exporting faction data...
Exporting item data...
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Exporting scene data...
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Exporting troops data
Traceback (most recent call last):
  File "process_troops.py", line 106, in <module>
    save_python_header()
  File "process_troops.py", line 101, in save_python_header
    file.write("trp_%s = %d\n"%(convert_to_identifier(troops[i_troop][0]),i_troop))
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_common.py", line 5, in convert_to_identifier
    s1 = string.replace(s0," ","_")
  File "C:\Python27\lib\string.py", line 519, in replace
    return s.replace(old, new, maxsplit)
AttributeError: 'list' object has no attribute 'replace'
Exporting particle data...
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Traceback (most recent call last):
  File "process_parties.py", line 5, in <module>
    from module_parties import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_parties.py", line 44, in <module>
    ("main_party","Main Party",icon_player|pf_limit_members, no_menu, pt_none,fac_player_faction,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player,1,0)]),
NameError: name 'trp_player' is not defined
Exporting quest data...
Exporting info_page data...
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 6, in <module>
    from module_dialogs import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_dialogs.py", line 811, in <module>
    [trp_tutorial_archer_1|auto_proceed, "start",
NameError: name 'trp_tutorial_archer_1' is not defined
Error with upgrade def: Unable to find troop1-id: farmer
...
Error with upgrade def: Unable to find troop1-id: peasant_woman
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "C:\Users\ascle\Desktop\Mount and Blade Modding\ModSys\Module_system 1.166\module_party_templates.py", line 36, in <module>
    ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]),
NameError: name 'trp_farmer' is not defined
Exporting postfx_params...

I am very confused about why it says "trp_farmer" is not defined. First I never touched farmer at all and second, when I went to go look at it, it was totally fine and where it should be. I compared it to an untouched modules_troops and it looked the same in there as it does in mine. It also confuses me as to why it says the error is coming from modules_party_templates of all places.

I also didn't really mess with upgrade paths at all, except to take out cavalry from the Swadia tree, but that's never been an issue until now.

I don't really know what I screwed up so any and all help will be useful. I can provide whatever other information you need on request, this is all I thought to post at first. Thank you for your help
 
Hello,

Is there a way to make kicking (and punching) at allies available without enabling all other ways of friendly melee hit?
 
sonny99 说:
When I ran build_module I got this error (I cant post the whole error due to post size constraints but this is the common jist of what it says):

likely a syntax issue with your troops. Review your changes on module_troops.py and run the compiler just for them until it works. Type on your prompt (command line)

">python process_troops.py"

isolate the error, fix it, compile, rinse and repeat.
 
kalarhan 说:
sonny99 说:
When I ran build_module I got this error (I cant post the whole error due to post size constraints but this is the common jist of what it says):

likely a syntax issue with your troops. Review your changes on module_troops.py and run the compiler just for them until it works. Type on your prompt (command line)

">python process_troops.py"

isolate the error, fix it, compile, rinse and repeat.

I'm sorry I hate to sound like a noob but I'm pretty new to this. What do you mean run the compiler?

EDIT: So a follow-up to my question: I guess the build_module is the compiler. I go to the lines it tells me about and I don't see anything wrong or different about them from previous versions of the files. Obviously I'm assuming there is something there that I don't see because I am new to coding. I don't understand  why it's telling me that trp_farmer doesn't exist when it is clear in my modules_troops.py file that it is. Do you want me to upload any of my .py files, would that help?

I don't know if this will help you in any way but when I load up the game I notice that every faction is shifted up a number. What was Swadia is now Player's Supporters. What was Vaegir is now Swadia, what was Khergit is now Vaegir, and so on and so forth, it's like the fac_kingdom_x numbers for all the factions all got bumped up one. But in my modules_factions.py everything looks normal and I don't get any error about it when I run build_module
 
sonny99 说:
I'm sorry I hate to sound like a noob but I'm pretty new to this. What do you mean run the compiler?

EDIT: So a follow-up to my question: I guess the build_module is the compiler. I go to the lines it tells me about and I don't see anything wrong or different about them from previous versions of the files. Obviously I'm assuming there is something there that I don't see because I am new to coding. I don't understand  why it's telling me that trp_farmer doesn't exist when it is clear in my modules_troops.py file that it is. Do you want me to upload any of my .py files, would that help?

I don't know if this will help you in any way but when I load up the game I notice that every faction is shifted up a number. What was Swadia is now Player's Supporters. What was Vaegir is now Swadia, what was Khergit is now Vaegir, and so on and so forth, it's like the fac_kingdom_x numbers for all the factions all got bumped up one. But in my modules_factions.py everything looks normal and I don't get any error about it when I run build_module

compiler is the process that turns the human code (from the .py files) into computer code (the stuff inside the .txt files).

build_module.bat is not the compiler. It is shortcut that calls each part of the compiler, one at time, in a specific order, to build all those .txt files.

You can call them yourself when testing stuff. Issues with troops? Then run just the compiler for troops. It is just to save time. Open your console (windows prompt), navigate to the folder and run that command. A alternative is to create a new .bat file. Call it "run_troops.bat" and delete everything from it besides the line with "python process_troops.py".

If you have a syntax issue you can break the entire parser, so forget about the error message in that case. You make a critical error, and the compiler is not prepared to help you fix that. It was made with the assumption that the coder would be perfect when using the syntax. Of course we are not perfect tho, and that is why you have backups, you know what you changed last, and you can compare your changes to find your errors.

For future reference: always work with small changes, save, compile (make sure they didnt break the syntax), do more small changes, rinse and repeat. A common mistake is to work for hours doing all sorts of stuff and hoping it will all be ok.

Also: use pastebin to link to long walls of texts. You have a button for that on the editor menu above as well.
 
Silverc 说:
so I did just as you said and the bow is still has a reticle twice the size of bow I copied and simply replaced mesh with.
what bow mesh have you tried? where did you get Spak mod from? I'll try to make a properly working version and will post its code.
 
I have a question regarding my mod Lords of Calradia. I added Diplomacy 4.3 and some simple triggers. The mod works fine especially on my rig, but Im getting complaints by some players that their fps while travelling on the overland map is very low. Lower than other mods like Floris which have more features than my mod.

Question: what is the best way to optimize diplmacy 4.3? What are some optimization techniques in general for overland map travel?

Im not sure what is killing their fps my simple triggers are not called very often and shouldnt be using a ton of cpu power so Im guessing diplm 4.3 has something to do with it.
Any help is appreciated.
Thanks guys
 
elcapo29 说:
Lower than other mods like Floris which have more features than my mod.

that doesnt mean anything really. It is not the quantity of features, but the quality of the code that matters plus the mod numbers.

a example is taking a world trigger from a module with few factions and applying it to a mod with dozens/hundreds of factions without testing the performance impact.

stuff like the number of factions, lords, random parties (villagers and bandits), etc, need to be tested for the current module (not the original source).

you also need to make sure your map is not having issues with pathfinding.

and remember that Warband is a ancient game. It doesnt do well with modern tech. So just because it works well on one machine it doesnt mean it will not have lag on another. CPU is the core element to test here for map lag.

ask your players to help with testing performance. Give them builds where you remove triggers and see which ones are causing issues.
 
Hello, while I was adding items into my mod, I came across 2 issues.
1. In OpenBrf, it shows this
isR7Y.png
However, in game, it shows this
uFS8Q.jpg
I checked the textures folder, and the required textures were there. I'm not sure of what I did wrong.

2. In OpenBrf, it shows this
i-xcd.png
But in game, it shows this
asCWM.jpg
1DLe4.jpg
I'm not entirely sure what happened here...

Any help on these issues would be great. Thanks in advance!
 
maater66241 说:
Hello, while I was adding items into my mod, I came across 2 issues.
1. In OpenBrf, it shows this
isR7Y.png
However, in game, it shows this
uFS8Q.jpg
I checked the textures folder, and the required textures were there. I'm not sure of what I did wrong.

2. In OpenBrf, it shows this
i-xcd.png
But in game, it shows this
asCWM.jpg
1DLe4.jpg
I'm not entirely sure what happened here...

Any help on these issues would be great. Thanks in advance!

1. Check the textures tab of your BRF file to ensure you imported all of the textures required by your materials. Even if a texture is in the modules texture folder and it is displayed in OpenBRF, it will not be loaded in game unless it has been imported into a BRF file. Where textures are being shared by more than one BRF file (not the case where everything is in one BRF file), module.ini load order must be textures, materials and then meshes.

2. Your pistol mesh is incorrectly scaled for Warband. Move it into the same BRF file as Warband’s native flintlock pistol - scale it down and position it to match.
 
Hello. :razz:
This may seem like an odd question, but how exactly would you go about adding a new slot_troop constant and using it similar to renown? I have some parts of it set up (I think...), but the game doesn't seem to be acknowledging its existence outside of just compiling. Code I have so far is below.

module_constants.py
插入代码块:
slot_troop_renown              = 7
slot_troop_notoriety           = 79
...
slot_troop_return_renown        = 84
slot_troop_return_notoriety     = 83

module_game_menus.py
插入代码块:
  ("reports",0,
   "Character Renown: {reg5}^Notoriety: {reg8}^Honor Rating: {reg6}^Party Morale: {reg8}^Party Size Limit: {reg7}^",
   "none",
   [(call_script, "script_game_get_party_companion_limit"),
    (assign, ":party_size_limit", reg0),
    (troop_get_slot, ":renown", "trp_player", slot_troop_renown),
    (troop_get_slot, ":notoriety", "trp_player", slot_troop_notoriety),
    (assign, reg5, ":renown"),
    (assign, reg6, "$player_honor"),
    (assign, reg7, ":party_size_limit"),
    (assign, reg8, ":notoriety"),
    (party_get_morale, reg8, "p_main_party"),
   ],
...
I assume I'm missing something in module_scripts, but I'm not entirely sure.
 
INH-1107 说:
Hello. :razz:
This may seem like an odd question, but how exactly would you go about adding a new slot_troop constant and using it similar to renown? I have some parts of it set up (I think...), but the game doesn't seem to be acknowledging its existence outside of just compiling. Code I have so far is below.
module_constants.py
插入代码块:
slot_troop_renown              = 7
slot_troop_notoriety           = 79
...
slot_troop_return_renown        = 84
slot_troop_return_notoriety     = 83

module_game_menus.py
插入代码块:
  ("reports",0,
   "Character Renown: {reg5}^Notoriety: {reg8}^Honor Rating: {reg6}^Party Morale: {reg8}^Party Size Limit: {reg7}^",
   "none",
   [(call_script, "script_game_get_party_companion_limit"),
    (assign, ":party_size_limit", reg0),
    (troop_get_slot, ":renown", "trp_player", slot_troop_renown),
    (troop_get_slot, ":notoriety", "trp_player", slot_troop_notoriety),
    (assign, reg5, ":renown"),
    (assign, reg6, "$player_honor"),
    (assign, reg7, ":party_size_limit"),
    (assign, reg8, ":notoriety"),
    (party_get_morale, reg8, "p_main_party"),
   ],
...
I assume I'm missing something in module_scripts, but I'm not entirely sure.

1) you need to use a empty slot. It seens #79 is fine, but we dont know what modsys you are using, so double check it.
2) why do you have 2 (two) {reg8} in there? The last one for morale is removing the effect of notoriety. That is, from what you show us, your bug.
3) you can simplify your code with

插入代码块:
(troop_get_slot, reg5, "trp_player", slot_troop_renown),
if you want to. No need to use the local variable as it doesnt add readability or has any effect. Not a big deal tho, and it will work regardless.
same with
插入代码块:
(assign, reg7, reg0),
 
状态
不接受进一步回复。
后退
顶部 底部