Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
markfamily said:
still cannot change the names of the added

check your compilation log
do a full text search on your mod for the item name to see if it is being overridden by a script or the translation files

markfamily said:
Another quick question whilst looking at the item module there are a lot of items disabled like broad sword
types of items are related to your mod design, like the era (century) and location, which can add or remove things like sabres from it. So check the models and see if they fit your game, then double check the module_items.py flags for each one to see if they are properly setup (which attacks for the animations, the damage value, etc).
You can add anything you want to your own game as long you pay attention to those things.
 
[Bcw]Btm_Earendil said:
Iron Sight said:
Looking for a lil direction on adding a troop to a scene, specifically the conversation scene.
I used (add_troop_to_site, <troop_id>, <scene_id>, <entry_no>), but the troop didn't show.
Is a trigger the best way to add a troop to a scene?
Or can I use a script or even the condition or consequence blocks in dialog?
Have a look here: https://forums.taleworlds.com/index.php/topic,317313.0.html
Thank ya kindly!
 
Is there a way to convert itemkinds.txt file to module_items.py as i have found a osp resource with shields I like but it comes with an itemkinds1 text file and its difficult for me to translate.
many thanks for reading
Just found  kt0's item scripts v0.51 through its from 2009 so doubt that would work
 
markfamily said:
Is there a way to convert itemkinds.txt file to module_items.py as i have found a osp resource with shields I like but it comes with an itemkinds1 text file and its difficult for me to translate.
many thanks for reading

check process_items.py for the algorithm and with a bit of math you can find the flags used for a item, and thus use it on module_items.py

or just create the entries yourself by using other similar items for reference. The basic stuff for name and meshes is easy to get from the items_kinds as it is simple text.
 
Thank you for the reply and you are right most of it is simple text I was just baffled with a few of the bigger number, I will compare them to some of the other numbers and see what I come up with.
 
markfamily said:
Thank you for the reply and you are right most of it is simple text I was just baffled with a few of the bigger number, I will compare them to some of the other numbers and see what I come up with.

start a Python console and try the combinations to see how they turn into those big numbers

Code:
itp_merchandise|itp_type_goods

itp_merchandise = 0x0000000000010000
itp_type_goods = 0x000000000000000b

0x0000000000010000 | 0x000000000000000b = 65547

not that you will need to worry about reverting them if you just add the final value on your module_items.py ... it will not show you the flags, but it works the same.
 
Thank you again.
This is my first try ever at modding a game and I have left it a bit late in life I think as quite a bit is baffling even after reading countless guides and forums but I think trial and error is the answer and great support from a fantastic group like yourselves.
I entered all the itemkind1 into the module_item.sys comparing to the items in native and everything seems to work in game done a few trial battles and no explosions.
The itemkind.txt from my mod is a bit different to the one provided by the osp mainly the second and third larger sets of numbers which I think refers to if they are kite shields, normal shields, board and non horseback which I did with all the shields if I thought they should have those restrictions etc.
 
KratosMKII said:
Yes. I want to reduce the effect of the skill.

you can do many things, like editing the values from module.ini, or just do the simpliest change that is to reduce the skill limit (from 10 to 7 or 5) on module_skills.py, etc.
[/quote]
Thank you.
 
How do you put a right-facing curly bracket "{" to be displayed in a string? For example. ("number_count", "{1,2,3}"),
I know how to put a left-facing curly bracket in... "} {}" or "{} }" but it doesn't seem to work the same for the right-facing type. I've also tried double curlies, triple curlies, enclosing both sides with {} and many other combinations but I can't get it to display correctly.
 
Iron Sight said:
How do you put a right-facing curly bracket "{" to be displayed in a string? For example. ("number_count", "{1,2,3}"),
I know how to put a left-facing curly bracket in... "} {}" or "{} }" but it doesn't seem to work the same for the right-facing type. I've also tried double curlies, triple curlies, enclosing both sides with {} and many other combinations but I can't get it to display correctly.
I'm pretty sure it would be  ("number_count", "@{1,2,3}")
 
SupaNinjaMan said:
Iron Sight said:
How do you put a right-facing curly bracket "{" to be displayed in a string? For example. ("number_count", "{1,2,3}"),
I know how to put a left-facing curly bracket in... "} {}" or "{} }" but it doesn't seem to work the same for the right-facing type. I've also tried double curlies, triple curlies, enclosing both sides with {} and many other combinations but I can't get it to display correctly.
I'm pretty sure it would be  ("number_count", "@{1,2,3}")
I wished it was, but that displays the "@" and still says "{" is an "unrecognized token" but come to find out, "}" is acceptable even by itself. I dunno?!
* and if I do double "{{" the first one is unrecognized but the second displays. I need to escape the { but I can't figure out what works here.
 
Could someone look at the following error for me please I have been staring at it for an hour trying to solve it.
I am trying to put items from a osp pack in my module, I know I have done something wrong but its beyond me what it is.

module line
  ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],

Previous lines
["mameluk_spears_a","mameluk spears a", [("mameluk_spears_a", 0)], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itc_staff,140, weight(3.5)|abundance(100)|spd_rtng(90)|weapon_length(185)|thrust_damage(27, pierce)|swing_damage(20, blunt),imodbits_polearm ],
  ["mameluk_spears_b","mameluk_spears_b", [("mameluk_spears_b", 0)], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itc_staff,140, weight(2.5)|abundance(100)|spd_rtng(90)|weapon_length(185)|thrust_damage(27, pierce)|swing_damage(20, blunt),imodbits_polearm ],
  ["mameluk_spears_c_v_1","mameluk_spears_c_v_1", [("mameluk_spears_c_v_1", 0)], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itc_cutting_spear,140, weight(4)|abundance(100)|spd_rtng(80)|weapon_length(200)|thrust_damage(32, pierce),imodbits_polearm ],
  ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],

The error im getting
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting faction data...
Traceback (most recent call last):
  File "process_items.py", line 4, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting troops data
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "H:\test\process_operations.py", line 13, in <module>
    from module_items import *
  File "H:\test\module_items.py", line 1758
    ["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],
                                                                  ^
SyntaxError: invalid syntax
Exporting postfx_params...

______________________________

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

I have checked this line for ages and cannot work out what i have done wrong, any help would be gratefully received.
 
markfamily said:
Could someone look at the following error for me please I have been staring at it for an hour trying to solve it.
I am trying to put items from a osp pack in my module, I know I have done something wrong but its beyond me what it is.

module line
["mameluk_spears_c","mameluk_spears_c", [("mameluk_spears_c", 0}], itp_type_polearm|itp_merchandise|itp_wooden_parry|itp_primary|itp_offset_lance|itcf_cutting_spear,140, weight(3.5)|abundance(100)|spd_rtng(80)|weapon_length(185)|thrust_damage(32, pierce),imodbits_polearm ],

I have checked this line for ages and cannot work out what i have done wrong, any help would be gratefully received.

Does anyone know a
Code:
mission_set_time_speed
and
Code:
agent_set_speed_modifier
to emulate a sort of bullet time the player can trigger, but the agent's animations are still running according to the mission's timescale so it doesn't exactly feel as I would like.

Does anyone know a solution more elegant than checking for certain animations and setting their progress further along manually?
 
Iron Sight said:
How do you put a right-facing curly bracket "{" to be displayed in a string? For example. ("number_count", "{1,2,3}"),
I know how to put a left-facing curly bracket in... "} {}" or "{} }" but it doesn't seem to work the same for the right-facing type. I've also tried double curlies, triple curlies, enclosing both sides with {} and many other combinations but I can't get it to display correctly.

shows us the code you are using to build your string and the game result from the log. Use a display_message to print it.
 
Thank you for that I looked again and still could not tell it was an error, seems modding on a tv screen has drawbacks.
Sorry to bother you all again with another problem im having but here goes.

I am getting a rgl too many variations on mesh item akwarhorse bu which has got me stumped as it is not duplicated anywhere
heres my edits
module_item_py
["akwarhorse_bu","Rhodok Horse", [("akwarhorse_bu",0)], itp_merchandise|itp_type_horse, 0, 1800,abundance(50)|hit_points(180)|body_armor(50)|difficulty(4)|horse_speed(42)|horse_maneuver(42)|horse_charge(30)|horse_scale(110),imodbit_champion],

id_item_py
itm_akwarhorse_bu = 899

itemkind1.txt
itm_akwarhorse_bu Rhodok_Horse Rhodok_Horse 1  akwarhorse_bu 0  65537 0 1800 68719476736 0.000000 50 0 50 0 4 180 42 42 110 0 30 0
0
0

I have checked the files and there is no duplicates anywhere so i cannot understand it
Again many thanks for any help you all can give.

Problem solved another stupid error missed a _ out in the meshes name, thank you all through this will not be my last silly error I am sure
 
[Bcw]Btm_Earendil said:
Cozur said:
I've added this:

Code:
        # OUTPUT: none
        ("update_companion_candidates_in_taverns",
		[
		  (try_begin),
			(eq, "$cheat_mode", 1),
			(display_message, "str_shuffling_companion_locations"),
		  (try_end),

		  (try_for_range, ":troop_no", companions_begin, companions_end),
			##diplomacy start+ Move this *after* the checks!
			#  (troop_set_slot, ":troop_no", slot_troop_cur_center, -1),
			##diplomacy end+
			(troop_slot_eq, ":troop_no", slot_troop_days_on_mission, 0),
			(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_inactive),

			(neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0),
			##diplomacy start+
                  
                  ##
			(troop_get_slot, ":town_no", ":troop_no", slot_troop_cur_center),
			(try_begin),
				(is_between, ":town_no", towns_begin, towns_end),
				(party_get_slot, ":town_lord", ":town_no", slot_town_lord),
				##zerilius changes begin
				##bug fix for red text
				(ge, ":town_lord", 0),
				##zerilius changes end				
				(this_or_next|eq, ":town_lord", "trp_player"),
				(this_or_next|troop_slot_eq, "trp_player", slot_troop_spouse, ":town_lord"),
					(troop_slot_eq, ":town_lord", slot_troop_spouse, "trp_player"),
			(else_try),
				#Moved from above:
				(troop_set_slot, ":troop_no", slot_troop_cur_center, -1),
			(try_end),
			(neg|troop_slot_ge, ":troop_no", slot_troop_cur_center, 1),
			##diplomacy end+
			(store_random_in_range, ":town_no", towns_begin, towns_end),
			(try_begin),
			  ##diplomacy start+ Remove the "you can't go home again" condition if the player owns the town
			  (assign, ":veto", 0),
			  (try_begin),
				(store_faction_of_party, ":town_faction", ":town_no"),
				(eq, ":town_faction", "fac_player_supporters_faction"),
			  (else_try),
				(party_get_slot, ":town_lord", ":town_no", slot_town_lord),
				(ge, ":town_lord", 0),
				(this_or_next|eq, ":town_lord", "trp_player"),
				(this_or_next|troop_slot_eq, "trp_player", slot_troop_spouse, ":town_lord"),
					(troop_slot_eq, ":town_lord", slot_troop_spouse, "trp_player"),
			  (else_try),
				#Native veto:
				(this_or_next|troop_slot_eq, ":troop_no", slot_troop_home, ":town_no"),
					(troop_slot_eq, ":troop_no", slot_troop_first_encountered, ":town_no"),
				(assign, ":veto", 1),
			  (try_end),
                          (try_begin),
			  (eq, ":veto", 0),
[color=red]					  ##diplomacy end+
                  (troop_set_slot, "trp_npc1", slot_troop_cur_center, "p_town_18"),
                  (troop_set_slot, "trp_npc2", slot_troop_cur_center, "p_town_55"),
                  (troop_set_slot, "trp_npc3", slot_troop_cur_center, "p_town_25"),
                  (troop_set_slot, "trp_npc4", slot_troop_cur_center, "p_town_47"),
                  (troop_set_slot, "trp_npc5", slot_troop_cur_center, "p_town_32"),
                  (troop_set_slot, "trp_npc6", slot_troop_cur_center, "p_town_31"),
                  (troop_set_slot, "trp_npc7", slot_troop_cur_center, "p_town_3"),
                  (troop_set_slot, "trp_npc8", slot_troop_cur_center, "p_town_31"),
                  (troop_set_slot, "trp_npc9", slot_troop_cur_center, "p_town_36"),
                  (troop_set_slot, "trp_npc10", slot_troop_cur_center, "p_town_19"),
                  (troop_set_slot, "trp_npc11", slot_troop_cur_center, "p_town_16"),
                  (troop_set_slot, "trp_npc12", slot_troop_cur_center, "p_town_6"),
                  (troop_set_slot, "trp_npc13", slot_troop_cur_center, "p_town_32"),
                  (troop_set_slot, "trp_npc14", slot_troop_cur_center, "p_town_12"),
                  (troop_set_slot, "trp_npc15", slot_troop_cur_center, "p_town_17"),
                  (troop_set_slot, "trp_npc16", slot_troop_cur_center, "p_town_8"),
                  (troop_set_slot, "trp_npc17", slot_troop_cur_center, "p_town_12"),
                  (troop_set_slot, "trp_npc18", slot_troop_cur_center, "p_town_34"),
                  (troop_set_slot, "trp_npc19", slot_troop_cur_center, "p_town_47"),
                  (troop_set_slot, "trp_npc20", slot_troop_cur_center, "p_town_48"),
                  (troop_set_slot, "trp_npc21", slot_troop_cur_center, "p_town_9"),
                  (troop_set_slot, "trp_npc22", slot_troop_cur_center, "p_town_35"),
                  (troop_set_slot, "trp_npc23", slot_troop_cur_center, "p_town_41"),
                  (troop_set_slot, "trp_npc24", slot_troop_cur_center, "p_town_24"),
                  (troop_set_slot, "trp_npc25", slot_troop_cur_center, "p_town_41"),
                  (troop_set_slot, "trp_npc26", slot_troop_cur_center, "p_town_40"),
                  (troop_set_slot, "trp_npc27", slot_troop_cur_center, "p_town_1"),
                  (troop_set_slot, "trp_npc28", slot_troop_cur_center, "p_town_46"),
                  (troop_set_slot, "trp_npc29", slot_troop_cur_center, "p_town_17"),
                  (else_try),
			  (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"),
                  (try_end),[/color]
			  (try_begin),
				(eq, "$cheat_mode", 1),
				(str_store_troop_name, 4, ":troop_no"),
				(str_store_party_name, 5, ":town_no"),
				(display_message, "@{!}{s4} is in {s5}.", 0xFFFF66),
			  (try_end),
			(try_end),
		  (try_end),
		 ]),

To the update_companion_candidates_in_taverns script. What I wanted to do now was add a condition where the companion will not appear until certain conditions have been fulfilled. Like this:

Code:
                  (troop_set_slot, "trp_npc1", slot_troop_cur_center, "p_town_18"),
                  (troop_set_slot, "trp_npc2", slot_troop_cur_center, "p_town_55"),
                  (troop_set_slot, "trp_npc3", slot_troop_cur_center, "p_town_25"),
                  (troop_set_slot, "trp_npc4", slot_troop_cur_center, "p_town_47"),
                  (troop_set_slot, "trp_npc5", slot_troop_cur_center, "p_town_32"),
                  (troop_set_slot, "trp_npc6", slot_troop_cur_center, "p_town_31"),
                  (troop_set_slot, "trp_npc7", slot_troop_cur_center, "p_town_3"),
                  (troop_set_slot, "trp_npc8", slot_troop_cur_center, "p_town_31"),
                  (troop_set_slot, "trp_npc9", slot_troop_cur_center, "p_town_36"),
                  (troop_set_slot, "trp_npc10", slot_troop_cur_center, "p_town_19"),
                  (troop_set_slot, "trp_npc11", slot_troop_cur_center, "p_town_16"),
                  (troop_set_slot, "trp_npc12", slot_troop_cur_center, "p_town_6"),
                  (troop_set_slot, "trp_npc13", slot_troop_cur_center, "p_town_32"),
                  (troop_set_slot, "trp_npc14", slot_troop_cur_center, "p_town_12"),
                  (troop_set_slot, "trp_npc15", slot_troop_cur_center, "p_town_17"),
                  (troop_set_slot, "trp_npc16", slot_troop_cur_center, "p_town_8"),
                  (troop_set_slot, "trp_npc17", slot_troop_cur_center, "p_town_12"),
                  (troop_set_slot, "trp_npc18", slot_troop_cur_center, "p_town_34"),
                  (troop_set_slot, "trp_npc19", slot_troop_cur_center, "p_town_47"),
                  (troop_set_slot, "trp_npc20", slot_troop_cur_center, "p_town_48"),
                  (troop_set_slot, "trp_npc21", slot_troop_cur_center, "p_town_9"),
                  (troop_set_slot, "trp_npc22", slot_troop_cur_center, "p_town_35"),
                  (troop_set_slot, "trp_npc23", slot_troop_cur_center, "p_town_41"),
                  (troop_set_slot, "trp_npc24", slot_troop_cur_center, "p_town_24"),
                  (troop_set_slot, "trp_npc25", slot_troop_cur_center, "p_town_41"),
                  (troop_set_slot, "trp_npc26", slot_troop_cur_center, "p_town_40"),
                  (troop_set_slot, "trp_npc27", slot_troop_cur_center, "p_town_1"),
                  (troop_set_slot, "trp_npc28", slot_troop_cur_center, "p_town_46"),
                  (else_try),
                  (eq, "$g_war_of_five_kings", 1),
                  (troop_set_slot, "trp_npc29", slot_troop_cur_center, "p_town_17"),
                  (else_try),
			  (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"),

However, even when the condition is triggered, there's no npc29 in town_17.

What have I done wrongly?
You forgot to put an end_try at the end of your trigger. So it should be
Code:
(else_try),
         (eq, "$g_war_of_five_kings", 1),
         (troop_set_slot, "trp_npc29", slot_troop_cur_center, "p_town_17"),
(end_try),

Even when adding that, so it looks like this:

Code:
                  (troop_set_slot, "trp_npc28", slot_troop_cur_center, "p_town_46"),
                  (else_try),
                  (eq, "$g_war_of_five_kings", 1),
                  (troop_set_slot, "trp_npc29", slot_troop_cur_center, "p_town_17"),
                  (else_try),
			  (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"),

The companion does not show up after the conditions have been met.
 
Assuming each troop is assigned individually, we're gonna have to restructure the script a little bit:
Something quick to give you an idea...
Code:
	# script_update_companion_candidates_in_taverns
	# INPUT: none
	# OUTPUT: none
	("update_companion_candidates_in_taverns",
		[
			(try_begin),
				(eq, "$cheat_mode", 1),
				(display_message, "@{!}Assignment companions to centers"),
			(try_end),
			
			(try_for_range, ":troop_no", companions_begin, companions_end),
				(troop_slot_eq, ":troop_no", slot_troop_days_on_mission, 0),
				(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_inactive),
				
				(neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0),
				(troop_set_slot, ":troop_no", slot_troop_cur_center, -1),
				
				(neg|troop_slot_ge, ":troop_no", slot_troop_cur_center, 1),
					
				##############
				##assign center to a troop begin
				(try_begin),
					(eq, ":troop_no", "trp_npc1"),
					(assign, ":town_no", "p_town_18"),
				(else_try),
					[---]
				(else_try), #assign more than one troop to a center
					(this_or_next|eq, ":troop_no", "trp_npc4"),
					(eq, ":troop_no", "trp_npc19"),
					(assign, ":town_no", "p_town_47"),
				(else_try),
					[---]
				(else_try),
					(eq, ":troop_no", "trp_npc28"),
					(assign, ":town_no", "p_town_46"),
				(else_try),
					(eq, ":troop_no", "trp_npc29"),
					(assign, ":town_no", "p_town_17"),
				(try_end),
				##assign center to a troop end
				#############
					
				#############
				##set slot begin
				(try_begin),
					(neq, ":troop_no", "trp_npc29"), #this_or_next|neq for more troop's to exclude
					
					(troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"),
				(else_try),
					(eq, "$g_war_of_five_kings", 1),
					
					(troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"),
				(try_end),
				##set slot end
				#############
					
				(try_begin),
					(eq, "$cheat_mode", 1),
					(str_store_troop_name, s4, ":troop_no"),
					(str_store_party_name, s5, ":town_no"),
					(display_message, "@{!}{s4} is in {s5}.", 0xFFFF66),
				(try_end),
			(try_end),
		]
	),
Run your tests...
 
I have asked this in a couple of places but thought I would try here too.

I just wondered if anybody knows an up to date way of modifying the days needed to repeat a guildmaster quest?

I can only really find outdated tweaks such as here http://forums.taleworlds.com/index.php/topic,46290.msg1212981.html#msg1212981 and am unable to find the right code/values (currently trying to lower the days needed from 100 in AWOIAF mod)

If anyone can tell me how to do this specifically for the "persuade lords to make peace" quest I would be grateful.

 
Youngragnar said:
If anyone can tell me how to do this specifically for the "persuade lords to make peace" quest I would be grateful.

it seems you are looking for a .txt tweak, not talking about modsys. If that is the case your best bet is to ask on the mod thread, as the creator or players there may help you with that.

as it is not Native there is no specific rule. It could be similar to Native or completely different - as in, the code has nothing to do with how Native did it, and thus any reference to anything besides that mod would be useless. You already tried to follow Native tweak and failed, right?

you can also learn how to read the .txt files to interpret the code and create tweaks, but that is a lot of work and quite technical.
 
How do I reactivate the Four Ways Inn?

Obviously, I need to remove the 'hidden' flag in the game files, but beyond that? I want it to function as an actual tavern, so you could enter, recruit mercs and companions, fight belligerent-drunks, talk to the tavern-keeper, slavers, travellers, and bards, spend a night.

Or, if that's not an option, how do I make a brand new, standalone tavern location?

Thank you!
 
Status
Not open for further replies.
Back
Top Bottom