Modify the scripts about lord decision ai. It's very possible, as I did it to make the lords not leaving the tournament town if they're still compete in the tournament.Cozur said:Is it possible to force a lord from one of the kingdoms to always stay in his castle? To simulate stuff like disabilities or sloth?
It's as hard as telling the guys to use search button or google. As The questions about always war and always peace between certain factions are here so many times.djogloc02 said:How do you tell to a guy to use the modify button?
If you read carefully module system files, you will find that certain lords are made having absolute loyal to their faction. Just do the same thing with some degrees of tolerance to another lords.Commando said:I need help in Mount & Blade Warband Version 1.153 the lords always leave there kingdoms so fast & join another Kingdom & that make game bad so is there any way to edit some thing to make them more loyalty for the lords ?!
grailknighthero said:How does the game calculate the actual price of an item? Let's say I have an item with a value of 2000. The Buying price says it is 2988, the buy price factor from script_game_get_item_buy_price_factor is 180. So how does the game put 2000 and the buy price factor of 180 together to get 2988?
Commando said:I mean I don't want them to defects or treason & I want every faction vassals to be with them kingdom always
#Auto-indictment or defection
(try_begin),
(this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
(eq, ":troop_no", trp_player),
(try_begin),
(eq, ":troop_no", trp_player),
(assign, ":faction", "$players_kingdom"),
(else_try),
(store_faction_of_troop, ":faction", ":troop_no"),
(try_end),
(faction_get_slot, ":faction_leader", ":faction", slot_faction_leader),
(neq, ":troop_no", ":faction_leader"),
#I don't know why these are necessary, but they appear to be
(neg|is_between, ":troop_no", "trp_kingdom_1_lord", "trp_knight_1_1"), # Make new range or use series of (neq, ":troop_no", <<a 100% loyal lord id1>>), (neq, ":troop_no", <<a 100% loyal lord id2>>), here
(neg|is_between, ":troop_no", pretenders_begin, pretenders_end),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
(le, reg0, -50), #was -75
(call_script, "script_cf_troop_can_intrigue", ":troop_no", 0), #Should include battle, prisoner, in a castle with others
(store_random_in_range, ":who_moves_first", 0, 2),
(try_begin),
(neq, ":who_moves_first", 0),
(neq, ":troop_no", trp_player),
#do a defection
grailknighthero said:Dunde, have any idea about this?
grailknighthero said:How does the game calculate the actual price of an item? Let's say I have an item with a value of 2000. The Buying price says it is 2988, the buy price factor from script_game_get_item_buy_price_factor is 180. So how does the game put 2000 and the buy price factor of 180 together to get 2988?
#Lore begin
[trp_sandor, "start", [(eq, "$g_talk_troop_met", 1)],
"Hail and well met. I am Master Grazmak mo Senko, of the great city of Astapor, most favoured of the great Harpy, the jewel of the east and heir to the Ghiscari Empire!",
"sandor_introduce_1", []],
[trp_sandor|plyr, "sandor_introduce_1", [],
"Greetings. Where is Astapor?", "sandor_introduce_2", []],
[trp_sandor, "sandor_introduce_2", [],
"Astapor lies in Slaver's Bay, close to the Isle of Cedars. The Good Masters, of whom I am amongst, deal with the most magnificent soldiers in the world, the Unsullied! Trained from childhood, they're the fiercest, most stalwart, most loyal soldiers in the world! None might stand before them! Being the barbarian that you are, I imagine that you are not familiar with the story of the Three Thousand of Qohor? Khal Temmo and his khalasar was defeated by three thousand Unsullied. Only four hundred remained at the end of the battle, but Khal Temmo was dead and so was all his sons and twelve thousand of his warriors!",
"sandor_introduce_3", []],
[trp_sandor|plyr, "sandor_introduce_3", [],
"I see. You're selling slave soldiers. If they're really that good, why are they not part of every army in the world?",
"sandor_introduce_4", []],
[trp_sandor, "sandor_introduce_4", [],
"Bah! Petty lords and knights, would-be kings and princes, filthy khals and greedy magisters, they do not understand warfare. They think any soldier is the same. The Unsullied training starts a age five and is from dawn to dusk. It is brutal, designed not only to teach them how to fight, but to strip away all individuality, empathy, and self-worth. Only one in three survive, and those that fail at any stage are killed. They are fully castrated - penis and testicles cut - and their manhoods burned at the altar of the Lady of Spears. They regularly consume an elixir called the Wine of Courage to deaden their sensitivity to pain. They will obey every command, even fall on their sword should you wish it.",
"sandor_introduce_5", []],
[trp_sandor|plyr, "sandor_introduce_5", [],
"You have roused my interest Master Grazmak, what can you offer me?.",
"sandor_introduce_6", []],
[trp_sandor, "sandor_introduce_6", [],
"Usually, we sell Unsullied by the century, so as to not split them up. They have a tendency to become fat and bloated. Keeping them together ensures that their discipline and fighting prowess keeps. However, I have heard worrying news from the east, talk of dragons and brimstones. So I am looking to settle down in this area and as such will only be able to sell Unsullied in small groups.",
"sandor_master_talk", []],
[trp_sandor|plyr, "sandor_master_talk", [],
"Can you tell me the history of Slaver's Bay?", "sandor_master_customize", []],
[trp_sandor, "sandor_master_customize", [],
"When the Doom came to Valyria, the ancient and proud cities of Astapor, Meereen and Yunkai rose once again to prominence. We deal in slaves, and it has made us rich and powerful. The Meereenese train slaves of all sorts, while the Yunkai specialize in bedslaves. In Astapor, we train the Unsullied, the heirs of the lockstep legions of Old Ghis. Further to the south, New Ghis claims to be the true heir to the Ghiscari Empire, but I say it is we, the masters of Astapor, who are the true descendants of Grazdan the Great!", "sandor_master_talk", []],
[trp_sandor|plyr, "sandor_master_talk", [],
"Tell me your story again.", "sandor_introduce_2", []],
[trp_sandor|plyr, "sandor_master_talk", [],
"Goodbye.", "close_window", []],
#Crooks
#Sandor
["sandor", "Sandor Clegane", "Sandor Clegane", tf_hero|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield, scn_town_18_castle|entry(11), reserved, fac_kingdom_9, [itm_bo_vae_t3_leather,itm_crossbearer], def_attrib|level(5), wp(20), knows_common, 0x0000000ff70c700526736ccb2c30b71300000000001ed4ca0000000000000000 ],
##Companions
#Tavern Talk (with troops)
[anyone, "start", [
(eq, "$talk_context", tc_tavern_talk),
(neg|troop_is_hero, "$g_talk_troop"),
(neg|is_between, "$g_talk_troop", "trp_swadian_merchant", "trp_startup_merchants_end"),
(assign, ":mercenary_amount", -1),
#(party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type),
#(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount),
(try_begin), #Extra mercenaries in tavern
(party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type),
(eq, "$g_talk_troop", ":mercenary_troop"),
(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount),
(else_try),
(party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type_2),
(eq, "$g_talk_troop", ":mercenary_troop"),
(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount_2),
(try_end), #Tavern end
(gt, ":mercenary_amount", 0),
(store_sub, reg3, ":mercenary_amount", 1),
(store_sub, reg4, reg3, 1),
(call_script, "script_game_get_join_cost", ":mercenary_troop"),
(assign, ":join_cost", reg0),
(store_mul, reg5, ":mercenary_amount", reg0),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, ":mercenary_amount", ":free_capacity"),
(store_troop_gold, ":cur_gold", "trp_player"),
(try_begin),
(gt, ":join_cost", 0),
(val_div, ":cur_gold", ":join_cost"),
(val_min, ":mercenary_amount", ":cur_gold"),
(try_end),
(assign, "$temp", ":mercenary_amount"),
],
"Do you have a need for sellswords, {sir/madam}?\
{reg3?Me and {reg4?{reg3} of my mates:one of my mates} are:I am} looking for a master.\
We'll join you for {reg5} denars.", "mercenary_tavern_talk", []],
[anyone, "start", [
(eq, "$talk_context", tc_tavern_talk),
],
"Any orders?", "mercenary_after_recruited", []],
[anyone|plyr, "mercenary_after_recruited", [],
"Make your preparations. We'll be moving at dawn.", "mercenary_after_recruited_2", []],
[anyone|plyr, "mercenary_after_recruited", [],
"Take your time. We'll be staying in this town for a while.", "mercenary_after_recruited_2", []],
[anyone, "mercenary_after_recruited_2", [], "Yes {sir/madam}. We'll be ready when you tell us to leave.", "close_window", []],
anyone, "start", [
(troop_is_hero, "$g_talk_troop"),
(eq, "$talk_context", tc_tavern_talk),
],
"u wot m8?", "close_window", [(agent_play_sound, "$g_talk_agent", "snd_encounter_nobleman")]],
As far as I know, that is what the engine uses. Back when I was working on Hiridia, I was able to override the party strength calculations and the aggressiveness of parties. Maybe there is some engine-side code but those scripts still effect the AI.MadVader said:If there's one mystery I can't figure out with Mount and Blade, it's got to be this one.
How does the engine evaluate party strength and decides who chases whom on the map?
There are modsys-side scripts and (troop level based) calculations for party strength, but they are not hardcoded/callbacks and therefore usable by the engine (or are they?), so the engine has to have its own hidden formula. Aggressiveness and courage are applied as modifiers, but what determines base strength?