Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Less Talking More Raiding said:
I've also worked on making Outlaw lords, got it working and all.
But I would like to take it further by adding a new faction of outlaw lords (maybe adding them like a kingdom, I don't know).

I would like them to hold banners just like normal lords, but they should not hold any fiefs.
How can I make this happen without having the faction go in exile at the start of the game?
No fiefs = No kingdom

add a faction outside the kingdoms range, and review the scripts used to control a kingdom activation to make sure yours is not affected by it

the first troop on a party is the leader (first stack), it doesnt matter if it is a hero type or not

a kingdom is just a type of faction with some custom rules. You can create your own types like a bandit kingdom with your own set of rules.
 
kalarhan said:
Code:
conversation_screen_is_active         =   42  # Checks that the player is currently in dialogue with some agent. Can only be used in triggers of module_mission_templates.py file.
Thank you kalarhan. I create a new trigger using the operation. But although everything seems correct to me it doesn't work correctly. Agents stand randomly even if i am not speaking with them and also some times they do not stand while i am talking with them.
What am i missing in that trigger?
#feast begin
      (0.1, 0, 0, [
(store_faction_of_party, ":center_faction", "$current_town"),
(faction_slot_eq, ":center_faction", slot_faction_ai_state, sfai_feast),
(faction_slot_eq, ":center_faction", slot_faction_ai_object, "$current_town"),
],
        [
(eq, "$talk_context", tc_court_talk),
(try_for_agents, ":agent"),
(agent_get_troop_id, ":troop", ":agent"),
(try_begin),
(is_between, ":troop", tavern_minstrels_begin, tavern_minstrels_end),
(agent_slot_eq, ":agent", slot_agent_is_set_drinking_animation, 0), #set the animation only for the first time(ti_on_agent_spawn flag has been replaced),
(try_begin),
(agent_has_item_equipped, ":agent", "itm_dedal_lutnia"),
(agent_set_stand_animation, ":agent", "anim_lute_standing"),
(agent_set_animation, ":agent", "anim_lute_standing"),
(agent_play_sound, ":agent", "snd_dedal_tavern_lute"),
(else_try),
(agent_has_item_equipped, ":agent", "itm_dedal_lira"),
(agent_set_stand_animation, ":agent", "anim_lyre_standing"),
(agent_set_animation, ":agent", "anim_lyre_standing"),
(agent_play_sound,":agent", "snd_dedal_tavern_lyre"),
(try_end),
(store_random_in_range, ":random", 0, 300),
(agent_set_animation_progress, ":agent", ":random"),
(agent_set_slot, ":agent", slot_agent_is_set_drinking_animation, 1),
(else_try),
(this_or_next|eq, ":troop", "trp_temporary_minister"),
(is_between, ":troop", heroes_begin, heroes_end),
(agent_has_item_equipped, ":agent", "itm_dedal_kufel"),
(assign, ":replace_anim", 0),
        (try_begin),
(conversation_screen_is_active),
(store_conversation_agent, ":conversation_agent"),
(eq, ":agent", ":conversation_agent"),
(assign, ":replace_anim", 1),
(try_end),
        (try_begin),
(eq, ":replace_anim", 1),
(try_begin),
(agent_slot_eq, ":agent", slot_agent_is_set_drinking_animation, 1),
(agent_set_animation, ":agent", "anim_stand"),
# (agent_set_stand_animation, ":agent", "anim_stand"),
(agent_set_slot, ":agent", slot_agent_is_set_drinking_animation, 0),
(try_end),
(else_try),
(neq, ":replace_anim", 1),
(try_begin),
(agent_slot_eq, ":agent", slot_agent_is_set_drinking_animation, 0),
(agent_set_animation, ":agent", "anim_sitting_drinking_low"),
# (agent_set_stand_animation, ":agent", "anim_sitting_drinking_low"),
(store_random_in_range, ":random", 0, 300),
(agent_set_animation_progress, ":agent", ":random"),
(agent_set_slot, ":agent", slot_agent_is_set_drinking_animation, 1),
(try_end),
(try_end),
(try_end),

(try_end),
            ]),
#feast end
 
Hi,

I have a question about the file: conversation.txt

I want to hire the farmer moving from village to village on the world map...

I added this code...

dlga_start:village_farmer_talk 131108 0  2 31 2 144115188075855893 2 1750 2 144115188075856000 1152921504606847111 _My_{lord/lady},_we're_only_poor_farmers_from_the_village_of_{s11}._{reg1?We_are_taking_our_products_to_the_market_at_{s12}.:We_are_returning_from_the_market_at_{s12}_back_to_our_village.}  211  10 521 3 1224979098644774912 144115188075855894 67 521 3 1224979098644774913 144115188075855894 40 521 3 1224979098644774914 1224979098644774913 38 2330 2 11 1224979098644774913 2330 2 12 1224979098644774914 2133 2 72057594037927937 1 4 0 541 3 1224979098644774912 0 -18 2133 2 72057594037927937 0 3 0 NO_VOICEOVER
dlga_village_farmer_talk:village_farmer_recruit 69631 211  4 2154 2 1224979098644774912 648518346341351424 1652 3 1224979098644774913 144115188075856273 0 1073741856 2 1224979098644774912 0 110 1 1224979098644774913 I_will_give_you_money_and_good_protection_if_you_join_my_party.  98  0 NO_VOICEOVER
dlga_village_farmer_recruit:village_farmer_recruit_2 4095 98  0 Sounds_like_a_good_deal._To_show_us_your_good_will,_pay_us_{reg5}_denars_and_we_will_join_you.  99  17 1650 2 1224979098644774912 144115188075856273 2133 2 1224979098644774913 0 6 3 1224979098644774914 0 1224979098644774912 1652 3 1224979098644774915 144115188075856273 1224979098644774914 1653 3 1224979098644774916 144115188075856273 1224979098644774914 1 2 936748722493063191 1224979098644774915 2133 2 1224979098644774917 72057594037927936 2107 2 1224979098644774917 1224979098644774916 2105 2 1224979098644774913 1224979098644774917 3 0 2133 2 144115188075856007 1224979098644774913 2170 3 1224979098644774918 1369094286720630791 360287970189639680 2122 3 1224979098644774919 3 1224979098644774918 2121 3 1224979098644774920 100 1224979098644774919 2107 2 144115188075856007 1224979098644774920 2108 2 144115188075856007 100 2133 2 72057594037927941 144115188075856007 NO_VOICEOVER
dlga_village_farmer_recruit_2:village_farmer_recruit_3a 69631 99  3 2149 2 72057594037927938 360287970189639680 30 2 72057594037927938 144115188075856007 2133 2 72057594037927941 144115188075856007 All_right_here's_your_{reg5}_denars.  100  1 1529 2 360287970189639680 144115188075856007 NO_VOICEOVER

dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on.  6 1 2133 2 144115188075856032 1 NO_VOICEOVER



... in the end I lose xx denars... but the farmer does not integrate my group and stay on the map of the world.


In fact in the last line of code in bold, I miss the code that allows me to integrate the farmers in my group.



Please, can anybody help me?

Thank you.

 
lolitablue said:
Please, can anybody help me?
Code:
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on.  6  8 1650 2 1224979098644774912 144115188075856273 6 3 1224979098644774913 0 1224979098644774912 1652 3 1224979098644774914 144115188075856273 1224979098644774913 1653 3 1224979098644774915 144115188075856273 1224979098644774913 1610 3 648518346341351424 1224979098644774914 1224979098644774915 3 0 31 2 144115188075856110 2 2133 2 144115188075856011 1 NO_VOICEOVER
Perhaps this may work. Btw, It is the first time i am trying to help such as crazy coding in .txt files. I wonder if it will really work :grin:
 
litdum said:
lolitablue said:
Please, can anybody help me?
Code:
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on.  6  8 1650 2 1224979098644774912 144115188075856273 6 3 1224979098644774913 0 1224979098644774912 1652 3 1224979098644774914 144115188075856273 1224979098644774913 1653 3 1224979098644774915 144115188075856273 1224979098644774913 1610 3 648518346341351424 1224979098644774914 1224979098644774915 3 0 31 2 144115188075856110 2 2133 2 144115188075856011 1 NO_VOICEOVER
Perhaps this may work. Btw, It is the first time i am trying to help such as crazy coding in .txt files. I wonder if it will really work :grin:

First of all, thank you for helping me...
But sorry that doesn't work.

I have this window that opens once the farmers have paid me xx denars then I click on leave



and I find myself on the map of the world all alone.



Otherwise all other recruitment (farmers) dialog windows will follow one another normally.

Thanks again.

Edit:

I found the solution:
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on. 6  3 1201 0 506 3 504403158265495605 9 3 2133 2 144115188075856032 1 NO_VOICEOVER


... and now the farmers are part of my group. Yes!!
This can be useful in case my army has been partially destroyed!



In fact i copie the code from "kidnapped_wife_join" and it work!

Not so good... sorry

It's the first time I work on this type of .txt file.
 
Hey, guys, I wanted to ask how to enable Dark Knight and Black Khergit Invasions in the game. I can swear there was an old tutorial around, but I cannot find it. Thanks!
 
I'm trying to merge PBOD with 1257 but i keep getting this error:

*** 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... FAILED.
MODULE `mission_templates` ERROR:
Traceback (most recent call last):
  File "compile.py", line 95, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\module_
mission_templates.py", line 19569, in <module>
    modmerge(var_set, component_name)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 151, in modmerge
    modmerge_formAI_mission_templates(orig_mission_templates)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 165, in modmerge_formAI_mission_templates
    codeblock = trigger.GetConditionBlock()
AttributeError: 'NoneType' object has no attribute 'GetConditionBlock'


COMPILATION FAILED.

Press any key to continue . . .

Here's the code that it refers to:
def modmerge(var_set):
try:
from modmerger_options import module_sys_info
version = module_sys_info["version"]
except:
version = 1127 # version not specified.  assume latest warband at this time

try:
var_name_1 = "mission_templates"
orig_mission_templates = var_set[var_name_1]

# START do your own stuff to do merging

modmerge_formAI_mission_templates(orig_mission_templates)

# END do your own stuff
           
except KeyError:
errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
raise ValueError(errstring)

from util_wrappers import *
def modmerge_formAI_mission_templates(orig_mission_templates):
find_i = find_object( orig_mission_templates, "lead_charge" )
orig_mission_templates[find_i][5].extend(AI_triggers)
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(0, 0, ti_once, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",2)],
        [(call_script, "script_select_battle_tactic"),(call_script, "script_battle_tactic_init")])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active
#'snap into place' - spawn with formations in place
codeblock = trigger.GetConsequenceBlock()
codeblock.Append([
  (party_slot_eq, "p_main_party", slot_party_pref_formations, 2),
  (call_script, "script_prebattle_agents_set_start_positions", grc_everyone),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_1"),
  # (neq, "$ai_team_2", -1),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_2"),
])
#
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(5, 0, 0, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",3),(call_script, "script_battle_tactic_apply")], [])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active

find_i = find_object( orig_mission_templates, "quick_battle_battle" )
orig_mission_templates[find_i][5].extend(AI_triggers)
I don't understand this. I picked the source from a non WSE version (0.92). Then i tried doing this with the code from Floris (its modmerger + util + header + formation + formAI + pbod files). I know for sure that Floris doesn't use WSE.
 
KratosMKII said:
I'm trying to merge PBOD with 1257 but i keep getting this error:

*** 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... FAILED.
MODULE `mission_templates` ERROR:
Traceback (most recent call last):
  File "compile.py", line 95, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\module_
mission_templates.py", line 19569, in <module>
    modmerge(var_set, component_name)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 151, in modmerge
    modmerge_formAI_mission_templates(orig_mission_templates)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 165, in modmerge_formAI_mission_templates
    codeblock = trigger.GetConditionBlock()
AttributeError: 'NoneType' object has no attribute 'GetConditionBlock'


COMPILATION FAILED.

Press any key to continue . . .

Here's the code that it refers to:
def modmerge(var_set):
try:
from modmerger_options import module_sys_info
version = module_sys_info["version"]
except:
version = 1127 # version not specified.  assume latest warband at this time

try:
var_name_1 = "mission_templates"
orig_mission_templates = var_set[var_name_1]

# START do your own stuff to do merging

modmerge_formAI_mission_templates(orig_mission_templates)

# END do your own stuff
           
except KeyError:
errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
raise ValueError(errstring)

from util_wrappers import *
def modmerge_formAI_mission_templates(orig_mission_templates):
find_i = find_object( orig_mission_templates, "lead_charge" )
orig_mission_templates[find_i][5].extend(AI_triggers)
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(0, 0, ti_once, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",2)],
        [(call_script, "script_select_battle_tactic"),(call_script, "script_battle_tactic_init")])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active
#'snap into place' - spawn with formations in place
codeblock = trigger.GetConsequenceBlock()
codeblock.Append([
  (party_slot_eq, "p_main_party", slot_party_pref_formations, 2),
  (call_script, "script_prebattle_agents_set_start_positions", grc_everyone),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_1"),
  # (neq, "$ai_team_2", -1),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_2"),
])
#
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(5, 0, 0, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",3),(call_script, "script_battle_tactic_apply")], [])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active

find_i = find_object( orig_mission_templates, "quick_battle_battle" )
orig_mission_templates[find_i][5].extend(AI_triggers)
I don't understand this. I picked the source from a non WSE version (0.92). Then i tried doing this with the code from Floris (its modmerger + util + header + formation + formAI + pbod files). I know for sure that Floris doesn't use WSE.
Not sure but you may not setup modmerger correctly. There should be a "readme" file explaining how to setup.
And, as far as i know AD1257 has already got "Formations".
 
litdum said:
KratosMKII said:
I'm trying to merge PBOD with 1257 but i keep getting this error:

*** 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... FAILED.
MODULE `mission_templates` ERROR:
Traceback (most recent call last):
  File "compile.py", line 95, in <module>
    from module_mission_templates import *
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\module_
mission_templates.py", line 19569, in <module>
    modmerge(var_set, component_name)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 297, in modmerge
    modmerge__(modcomp_name,var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\modmerg
er.py", line 239, in modmerge__
    _temp.__dict__[mergefn_name](var_dict)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 151, in modmerge
    modmerge_formAI_mission_templates(orig_mission_templates)
  File "C:\Program Files (x86)\Mount&Blade Warband\Modules\1257AD-master\formAI_
mission_templates.py", line 165, in modmerge_formAI_mission_templates
    codeblock = trigger.GetConditionBlock()
AttributeError: 'NoneType' object has no attribute 'GetConditionBlock'


COMPILATION FAILED.

Press any key to continue . . .

Here's the code that it refers to:
def modmerge(var_set):
try:
from modmerger_options import module_sys_info
version = module_sys_info["version"]
except:
version = 1127 # version not specified.  assume latest warband at this time

try:
var_name_1 = "mission_templates"
orig_mission_templates = var_set[var_name_1]

# START do your own stuff to do merging

modmerge_formAI_mission_templates(orig_mission_templates)

# END do your own stuff
           
except KeyError:
errstring = "Variable set does not contain expected variable: \"%s\"." % var_name_1
raise ValueError(errstring)

from util_wrappers import *
def modmerge_formAI_mission_templates(orig_mission_templates):
find_i = find_object( orig_mission_templates, "lead_charge" )
orig_mission_templates[find_i][5].extend(AI_triggers)
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(0, 0, ti_once, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",2)],
        [(call_script, "script_select_battle_tactic"),(call_script, "script_battle_tactic_init")])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active
#'snap into place' - spawn with formations in place
codeblock = trigger.GetConsequenceBlock()
codeblock.Append([
  (party_slot_eq, "p_main_party", slot_party_pref_formations, 2),
  (call_script, "script_prebattle_agents_set_start_positions", grc_everyone),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_1"),
  # (neq, "$ai_team_2", -1),
  # (call_script, "script_prebattle_agents_set_start_positions", "$ai_team_2"),
])
#
trigger = MissionTemplateWrapper(orig_mission_templates[find_i]).FindTrigger(5, 0, 0, [(store_mission_timer_a,":mission_time"),(ge,":mission_time",3),(call_script, "script_battle_tactic_apply")], [])
codeblock = trigger.GetConditionBlock()
codeblock.InsertBefore(0, [(neg|party_slot_eq, "p_main_party", slot_party_pref_formations, 1)]) ## PBOD - Formations AI NOT active

find_i = find_object( orig_mission_templates, "quick_battle_battle" )
orig_mission_templates[find_i][5].extend(AI_triggers)
I don't understand this. I picked the source from a non WSE version (0.92). Then i tried doing this with the code from Floris (its modmerger + util + header + formation + formAI + pbod files). I know for sure that Floris doesn't use WSE.
Not sure but you may not setup modmerger correctly. There should be a "readme" file explaining how to setup.
And, as far as i know AD1257 has already got "Formations".
It's set up correctly. I added freelancer and CTT with it. And i know that it has formations, but in the version that i was testing i removed all contents of it from the main files (it was easy since they all got comments where the code started and where it ended) and opted for the modmerger to make the files more organized and less bloated.

I tried adding only PBOD with the formations from vanilla 1257 and it compiles fine, but the game crashes every time i enter a battle.
 
Hi,

It's still me with my txt file... about recruiting farmers traveling on the world map.


     
lolitablue said:
litdum said:
lolitablue said:
Please, can anybody help me?
Code:
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on.  6  8 1650 2 1224979098644774912 144115188075856273 6 3 1224979098644774913 0 1224979098644774912 1652 3 1224979098644774914 144115188075856273 1224979098644774913 1653 3 1224979098644774915 144115188075856273 1224979098644774913 1610 3 648518346341351424 1224979098644774914 1224979098644774915 3 0 31 2 144115188075856110 2 2133 2 144115188075856011 1 NO_VOICEOVER
Perhaps this may work. Btw, It is the first time i am trying to help such as crazy coding in .txt files. I wonder if it will really work :grin:

First of all, thank you for helping me...
But sorry that doesn't work.

I have this window that opens once the farmers have paid me xx denars then I click on leave



and I find myself on the map of the world all alone.



Otherwise all other recruitment (farmers) dialog windows will follow one another normally.

Thanks again.

Edit:

I found the solution:
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on. 6  3 1201 0 506 3 504403158265495605 9 3 2133 2 144115188075856032 1 NO_VOICEOVER


... and now the farmers are part of my group. Yes!!
This can be useful in case my army has been partially destroyed!



In fact i copie the code from "kidnapped_wife_join" and it work!

Not so good... sorry

It's the first time I work on this type of .txt file.
     

Code:
 dlga_start:village_farmer_talk 131108 0  2 31 2 144115188075855893 2 1750 2 144115188075856000 1152921504606847111 _My_{lord/lady},_we're_only_poor_farmers_from_the_village_of_{s11}._{reg1?We_are_taking_our_products_to_the_market_at_{s12}.:We_are_returning_from_the_market_at_{s12}_back_to_our_village.}  211  10 521 3 1224979098644774912 144115188075855894 67 521 3 1224979098644774913 144115188075855894 40 521 3 1224979098644774914 1224979098644774913 38 2330 2 11 1224979098644774913 2330 2 12 1224979098644774914 2133 2 72057594037927937 1 4 0 541 3 1224979098644774912 0 -18 2133 2 72057594037927937 0 3 0 NO_VOICEOVER 
dlga_village_farmer_talk:village_farmer_recruit 69631 211  4 2154 2 1224979098644774912 648518346341351424 1652 3 1224979098644774913 144115188075856273 0 1073741856 2 1224979098644774912 0 110 1 1224979098644774913 I_will_give_you_money_and_good_protection_if_you_join_my_party.  98  0 NO_VOICEOVER 
dlga_village_farmer_recruit:village_farmer_recruit_2 4095 98  0 Sounds_like_a_good_deal._To_show_us_your_good_will,_pay_us_{reg5}_denars_and_we_will_join_you.  99  17 1650 2 1224979098644774912 144115188075856273 2133 2 1224979098644774913 0 6 3 1224979098644774914 0 1224979098644774912 1652 3 1224979098644774915 144115188075856273 1224979098644774914 1653 3 1224979098644774916 144115188075856273 1224979098644774914 1 2 936748722493063191 1224979098644774915 2133 2 1224979098644774917 72057594037927936 2107 2 1224979098644774917 1224979098644774916 2105 2 1224979098644774913 1224979098644774917 3 0 2133 2 144115188075856007 1224979098644774913 2170 3 1224979098644774918 1369094286720630791 360287970189639680 2122 3 1224979098644774919 3 1224979098644774918 2121 3 1224979098644774920 100 1224979098644774919 2107 2 144115188075856007 1224979098644774920 2108 2 144115188075856007 100 2133 2 72057594037927941 144115188075856007 NO_VOICEOVER 
dlga_village_farmer_recruit_2:village_farmer_recruit_3a 69631 99  3 2149 2 72057594037927938 360287970189639680 30 2 72057594037927938 144115188075856007 2133 2 72057594037927941 144115188075856007 All_right_here's_your_{reg5}_denars.  100  1 1529 2 360287970189639680 144115188075856007 NO_VOICEOVER 
dlga_village_farmer_recruit_3a:close_window 4095 100 0 Ok,_we_are_at_your_service_from_now_on. 6  3 1201 0 506 3 504403158265495605 9 3 2133 2 144115188075856032 1 NO_VOICEOVER 
 


It works for the first time as I recruit farmers... but if I recruit again som farmer their price is multiplied by ~100!

Please, do you have a solution to fix that?


Thank you.
 
lolitablue said:
Please, do you have a solution to fix that?

translate your .txt to normal MBScript so you can find your bugs and fix them. If you want to work with compiled code that doesnt mean you cant use code as well, the only difference (big one) is that you are the compiler.
 
kalarhan said:
lolitablue said:
Please, do you have a solution to fix that?

translate your .txt to normal MBScript so you can find your bugs and fix them. If you want to work with compiled code that doesnt mean you cant use code as well, the only difference (big one) is that you are the compiler.

Thank you kalarhan to answer me.

Is there a tool to translate .txt to MBScript?

 
lolitablue said:
Is there a tool to translate .txt to MBScript?

your brain (no tool allowed in the forum for reverse engineering code). So pick up the header_operations.py, learn how the .txt is generated, and do the reverse by hand. Fun times, but it works  :wink:
 
kalarhan said:
lolitablue said:
Is there a tool to translate .txt to MBScript?

your brain (no tool allowed in the forum for reverse engineering code). So pick up the header_operations.py, learn how the .txt is generated, and do the reverse by hand. Fun times, but it works  :wink:

:razz:

Well, I take a look at header_operation.py... I understood one thing the numbers correspond to an operation, it advances ... lol
 
lolitablue said:
Well, I take a look at header_operation.py... I understood one thing the numbers correspond to an operation, it advances ... lol

I will give you a few hints

1) header_operations.py has the operation ID (number)
2) each operation is translated on this format
  operation_ID number_of_parameters parameter1 parameter2 ....
3) a block of code (like the condition or consequence in a trigger) has the counter of how many operations were used on it
4) find the masks used for special stuff like local variable, global variable, etc, so you can translate them

rest you can figure out by trial and error, or by studying the compiler code

Cheers
 
kalarhan said:
lolitablue said:
Well, I take a look at header_operation.py... I understood one thing the numbers correspond to an operation, it advances ... lol

I will give you a few hints

1) header_operations.py has the operation ID (number)
2) each operation is translated on this format
  operation_ID number_of_parameters parameter1 parameter2 ....
3) a block of code (like the condition or consequence in a trigger) has the counter of how many operations were used on it
4) find the masks used for special stuff like local variable, global variable, etc, so you can translate them

rest you can figure out by trial and error, or by studying the compiler code

Cheers

I'm going to study all this, thank you.
 
Help needed,
(call_script, "script_change_troop_renown", "trp_player", 40), I want to add this code in here
[[eq,"$num_opponents_to_beat_in_a_row",0],[eq,"$novice_training_difficulty",3]],
"It does my heart good to see such a promising talent. You have passed all tiers of training. You can now tell everyone that you have been trained by the master of the training field.",
  "novicemaster_finish_training",
  [[assign,"$num_opponents_to_beat_in_a_row",3],
    [val_add,"$novice_training_difficulty",1],
    [add_xp_to_troop,3000,]]],
  [anyone|plyr,"novicemaster_finish_training", [], "Thank you master.", "novicemaster_finish_training_2",[]],
  [anyone,"novicemaster_finish_training_2", [], "I wish you good luck in the tournaments. And, don't forget,\
  if you want to practice your swordwork anytime, just come and say the word.", "close_window",[]],
I have tried an error and tried again and error, I tried it in many diffferent ways but I couldn't add it right,
How to add that code here, can someone show me?
 
Totenkopf900 said:
try this
Code:
[add_xp_to_troop,300],(call_script, "script_change_troop_renown", "trp_player", 40)]],
Wow That really worked, Thanks a lot :smile: , I still can't believe I have tried it like 2 hours, I have even tried try begins and other stuff  :lol:
Turkish forum is dead, I am with you now and then,

Edit: I also understand why I get errors all the time it was actually so simple [add_xp_to_troop,300] I didn't put this parenthes here, I always left it to the end, It was funny when I realize that it is this much simple,
I am just wroting things but I am not sure that You are understanding me, If you can't, sorry for that,
 
Status
Not open for further replies.
Back
Top Bottom