Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Error:

    ("port", mnf_enable_hot_keys, "You arrive at the port of {s4}", "none"),
  ^
IndentationError: unexpected indent

Code:
  ("port", mnf_enable_hot_keys, "You arrive at the port of {s4}", "none"),
  [(party_get_slot, ":center_no", "$g_encountered_party", slot_ports_center_is),
  (str_store_party_name, s4, ":center_no"),
        (try_begin),
          (party_get_slot, ":center_lord", ":center_no", slot_town_lord),
          (ge, ":center_lord", 0),
          (set_fixed_point_multiplier, 100),
          (position_set_x, pos0, 70),
          (position_set_y, pos0, 5),
          (position_set_z, pos0, 75),
          (set_game_menu_tableau_mesh, "tableau_troop_note_mesh", ":center_lord", pos0),
        (try_end),
  ],

I'm trying to get Way of the sea by F&B working, anyone know what may cause this problem?

Edit: I Fixed the problem myself, Thanks NPC99 For The Help
 
hi. how can i increase all party's movement speed on the sea? i guess there's no specific code that would increase movement speed in native module system.
 
vadindar said:
Error:

    ("port", mnf_enable_hot_keys, "You arrive at the port of {s4}", "none"),
  ^
IndentationError: unexpected indent

Code:
  ("port", mnf_enable_hot_keys, "You arrive at the port of {s4}", "none"),
  [(party_get_slot, ":center_no", "$g_encountered_party", slot_ports_center_is),
  (str_store_party_name, s4, ":center_no"),
        (try_begin),
          (party_get_slot, ":center_lord", ":center_no", slot_town_lord),
          (ge, ":center_lord", 0),
          (set_fixed_point_multiplier, 100),
          (position_set_x, pos0, 70),
          (position_set_y, pos0, 5),
          (position_set_z, pos0, 75),
          (set_game_menu_tableau_mesh, "tableau_troop_note_mesh", ":center_lord", pos0),
        (try_end),
  ],

I'm trying to get Way of the sea by F&B working, anyone know what may cause this problem?

Wrong syntax. Delete the closing bracked in your first line of code after “none”. Presumably you have a closing bracket in the correct position - before the final comma of the whole menu block - you’ve only shown us the start and operations block.
https://forums.taleworlds.com/index.php/topic,16211.0.html
 
If I used this:

(try_for_prop_instances, ":item", "itm_russian_peasant_fork", somt_spawned_item),

How would I go about selecting all of those item types? So far when I try to do something with it e.g. move that item type, or clean it up it only does it to 1 of them. What I ultimately want to be able to do it select all of that item type to do something with.
Thanks.
 
dlwnsdn4 said:
hi. how can i increase all party's movement speed on the sea? i guess there's no specific code that would increase movement speed in native module system.

use script_game_get_party_speed_multiplier


see VC modsys for a example on how to use it if needed it



pete99 said:
How would I go about selecting all of those item types? So far when I try to do something with it e.g. move that item type, or clean it up it only does it to 1 of them. What I ultimately want to be able to do it select all of that item type to do something with.
Thanks.

do the same action to each individual entry, that is why you have a loop.



NPC99 said:
Wrong syntax. Delete the closing bracked in your first line of code after “none”. Presumably you have a closing bracket in the correct position - before the final comma of the whole menu block - you’ve only shown us the start and operations block.
https://forums.taleworlds.com/index.php/topic,16211.0.html
as mentioned by @NPC99 your issue is on syntax. Syntax are mandatory rules about how you build your code, similar to grammar. You need to follow them or the parser cant read your code.

if it says you should have

Code:
(
"string",
number,
"string",
 [
  operations
 ]
),

you need to do exactly that.
 
do you mean this code?

##  #script_game_get_party_speed_multiplier
##  # This script is called from the game engine when a skill's modifiers are needed
##  # INPUT: arg1 = party_no
##  # OUTPUT: trigger_result = multiplier (scaled by 100, meaning that giving 100 as the trigger result does not change the party speed)
##  ("game_get_party_speed_multiplier",
##  [
##    (store_script_param, ":party_no", 1),
##    (set_trigger_result, 100),
##    ]),
 
dlwnsdn4 said:
do you mean this code?

##  #script_game_get_party_speed_multiplier
##  # This script is called from the game engine when a skill's modifiers are needed
##  # INPUT: arg1 = party_no
##  # OUTPUT: trigger_result = multiplier (scaled by 100, meaning that giving 100 as the trigger result does not change the party speed)
##  ("game_get_party_speed_multiplier",
##  [
##    (store_script_param, ":party_no", 1),
##    (set_trigger_result, 100),
##    ]),

that is the name of the script I posted, right?  :razz:

Native doesnt use it, so all parties speed are scaled to 100% of whatever the engine rule for each party is (based on the leader stats as a example for the player).

you can add new rules (like type of terrain) to apply a bonus/penalty, like making sea travel 50% of what normally would be.
 
pete99 said:
but what do you mean by do the same action for each individual entry, or how would you go about doing this?

you want to change a slot in a type of item. There are 10 instances. Start a loop and change the slot on instance 1, then instance 2, ... until instance 10. All changed.

loop, reg1, item, item_type
  change_slot, reg1, slot_55, new_value
next

you have operations like (try_for_range), etc, for loops.

 
mb12.jpg


i added some new towns and castles. and some of them are applied well but few towns and castles are created under the earth (even all added new towns and castles are using same code.) is there a specific code that could regulate elevation of land ?
 
viaeH.jpg

i made this one
("town_23","a", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(140, 165),[], 225),

copied this code. ("town_22","Bariyye", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(112, 194.:cool:,[], 225),

and copied all codes in module_scene, sceneOBJ files related with "town_22"..

("town_23_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x00000a0650001e9a00a505418000581f000028c800000143",
    [],[],"outer_terrain_desert"),
("town_23_castle",sf_indoors, "arabian_interior_keep_a", "bo_arabian_interior_keep_a", (-100,-100),(100,100),-100,"0x00000007300005000002308c00004a840000624700004fda",
    ["exit"],["town_23_seneschal"]),
("town_23_tavern",sf_indoors, "interior_town_house_steppe_c", "bo_interior_town_house_steppe_c", (-100,-100),(100,100),-100,"0",
    ["exit"],[]),
("town_23_store",sf_indoors, "interior_town_house_steppe_d", "bo_interior_town_house_steppe_d", (-100,-100),(100,100),-100,"0",
    ["exit"],[]),
("town_23_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c",
    [],[],"outer_terrain_desert"),
("town_23_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0",
    ["exit"],[]),
("town_23_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000025a00723200046d1b00003e020000147600004387",
    [],[],"outer_terrain_desert"),
("town_23_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000025a00723200046d1b00003e0200001476000052ae",
    [],[],"outer_terrain_desert"),



 
dlwnsdn4 said:
viaeH.jpg

so its not a world map issue, its a scene issue. Review your terrain code and which scenes you are using on them (likely using slots and a script). Just copying the scene code (module_scenes.py) doesnt mean you copied the scene itself (the objects inside like the houses).
 
Does anyone have exeprience working with the following INI settings? Will it generate a pop-up or message when the version does not match with the save game or server?

module_version = 0 #can be used for multiplayer and single player (saved game) module versioning
compatible_module_version = 0 #can be used for multiplayer module versioning
compatible_savegame_module_version = 0 #can be used for single player (saved game) module versioning

I will experiment anyway and if anyone has prior experience, any info would be appreciated :smile:.
 
Hello everyone, its been a while since I asked something here, so time to start asking  :twisted: :twisted:



  • My first question is (just because I'm curious :razz:) does the game version 1.172 have missing items? I found about this when I was adding some new items using wreck it showed a bunch of errors of missing items for multiplayer in module_mission_templates. So, I was like sure I can fix it, then I kept getting these errors and it's affecting my work since I don't know if I have missed something or made a mistake while I keep getting the same error of missing items, an example is after I fixed some items

Code:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.0 ***
Please report errors, problems and suggestions at http://lav.lomskih.net/wreck/

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... FAILED.
MODULE mission_templates AGGREGATOR ERROR:
failed to compile trigger for mission template multiplayer_ccoop (#44)
  command [31, 2, <l.body_armour[@1224979098644774913]>, 'itm_restore_health_arm
our'] compilation fails in mt.multiplayer_ccoop(#44).repeat_trigger(2.0).body on
 line 8
    failed to parse operand 'itm_restore_health_armour' for operation eq in mt.m
ultiplayer_ccoop(#44).repeat_trigger(2.0).body on line 8
      illegal reference `itm.restore_health_armour`


COMPILATION FAILED.

  •                         Why do I keep on getting these? while I know for sure I didn't mess anything related to multiplayer?
  • My second question is(it will help me a lot since I can find my stuff faster without the need to scroll all over them) can I remove everything related to multiplayer from my mod? since my mod is a single player mod?
    I think  I read somewhere around here in the forum about a module system that you can download only for multiplayer without any single player content. So if it is possible, how can I do it? and did someone tried doing it before?
  • My Third question is, what will happen if let say castle number 10 I gave it to clan number 1 and clan number 2 in module_script by mistake? will the castle go for the clan first in order?
  • My fourth question is similar to the first one, animation errors, why? I thought that I might got something messed up by mistake so I did a check on a new install but the same results, why? and any way to fix it? its annoying as hell.
  • My last question is just for my brain to have an idea on where it should stop thinking when adding stuff :lol: is there a limit when adding lords and NPCs? troops? castles, towns, villages? scenes?...etc





 
imado552 said:
My second question is(it will help me a lot since I can find my stuff faster without the need to scroll all over them) can I remove everything related to multiplayer from my mod? since my mod is a single player mod?

keep any mandatory stuff and you can remove all the rest for sure. If a script is required, as a example, you can remove the contents (all the operations) and keep just the name on module_scripts.py. Remember to also remove the MP option from main menu (New game, Load Game, Credits, ...) by editing game_variables.txt

shouldnt take more than a couple hours (including testing).

in all a clean modsys (no SP or MP coding) is pretty much empty files all around.

]My Third question is, what will happen if let say castle number 10 I gave it to clan number 1 and clan number 2 in module_script by mistake? will the castle go for the clan first in order?
ownership is defined by slots. Last one rules. So whatever is called last in the processing will rule it. I am not talking about line of code. I am talk about runtime execution.

modsys issues
if you are doing a SP mod using Native as base, you dont even need to upgrade to 1.172, as those changes are related to MP. The modsys should work fine tho, you likely just made a mistake merging and converting to WRECK format.

you could also just use WRECK older version after updating the header_XXXX.py, which is already WRECK-ready with the syntax.

My last question is just for my brain to have an idea on where it should stop thinking when adding stuff :lol: is there a limit when adding lords and NPCs? troops? castles, towns, villages? scenes?...etc
limits, when they exist, are usually quite high, so unless you want to simulate the world with thousands of something (for whatever reason), which is likely crazy for any mod (unless you have a team or plan to invest years on it), you should be fine. But as always, work on baby steps and experiment and test often, and you will be fine.
 
Hi, how do you rig an armor flawlessly? I want to add a custom armor, i aligned it correctly on Blender in order to adapt to skeleton, but when i merge the boots they animate wrongly, jutting out. How do i fix them to the legs?
 
hi i added new improvement buildings that would be built in town.
after i added new improvements buildings, going outside the castle and lord's hall through door is disabled.
CQsmZ.jpg

and here is my code that i created to make new improvement buildings (templar chapter, hospitaller chapter etc.. i only post templar chapter)
first. i added new slot (slot_center_has_templar_chapter    = 136) in constants. below (slot_center_has_prisoner_tower  = 135 #town, castle) this one.

second. i reseted new slot in module_trigger


(0, 0, ti_once,[],
[
(try_for_range, ":cur_castle", castles_begin, castles_end),
(party_set_slot, ":cur_castle", slot_center_has_templar_chapter, 0),
(try_end),

third. i added this one

(else_try),
      (eq, ":improvement_no", slot_center_has_templar_chapter),
      (str_store_string, s0, "@chapter of templar order"),
      (str_store_string, s1, "@Chapter of templar order"),
      (assign, reg0, 10000),

below this one

(else_try),
      (eq, ":improvement_no", slot_center_has_prisoner_tower),
      (str_store_string, s0, "@Prison Tower"),
      (str_store_string, s1, "@A prison tower reduces the chance of captives held here running away successfully."),
      (assign, reg0, 7000),


forth. and i added building in module_game_menu

("center_build_chapter_of_templar_order",[(eq, reg6, 0),
                                (party_slot_eq,"$current_town", slot_center_culture, "fac_culture_7"),
                                (party_slot_eq,"$current_town", slot_town_lord, "trp_player"),
                                (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle),
                                (party_slot_eq, "$g_encountered_party", slot_center_has_templar_chapter, 0),
                                  ],
      "Build a chapter of templar order.",[(assign, "$g_improvement_type", slot_center_has_templar_chapter),
                          (jump_to_menu, "mnu_center_improve"),]),

below this one

("center_build_prisoner_tower",[(eq, reg6, 0),
                                      (this_or_next|party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
                                      (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle),
                                      (party_slot_eq, "$g_encountered_party", slot_center_has_prisoner_tower, 0),
                                      ],
      "Build a prisoner tower.",[(assign, "$g_improvement_type", slot_center_has_prisoner_tower),
                                  (jump_to_menu, "mnu_center_improve"),]),


and finally i created new button in town

("templar_recruit",##mungmi castle recruit
[(party_slot_eq,"$current_town",slot_party_type,spt_castle),
(party_slot_eq,"$current_town", slot_center_culture, "fac_culture_7"),
  (party_slot_eq,"$current_town",slot_center_has_templar_chapter,1),
  (party_slot_eq,"$current_town",slot_town_lord,"trp_player"),
  ],
"Enter the chapter of templar order",###mungmi special unit recruit in castle###
[
      (jump_to_menu,"mnu_templar_order"),
  ]),

is there something wrong?..(slot are working good... but why the game menu makes terrible..)
 
Status
Not open for further replies.
Back
Top Bottom