Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Dusk Voyager said:
fladin said:
the question remains : how to make a castle that would never be "assiegeable" by anyone ?
  (0.01, 0, 0.01, [], [
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
(troop_get_slot, ":party_no", ":kingdom_hero", slot_troop_leaded_party),
(gt, ":party", 1),
(get_party_ai_behavior, ":behavior", ":party_no"),
(get_party_ai_object, ":eek:bject", ":party_no"),
(eq, ":behavior", ai_bhvr_attack_party),
(eq, ":eek:bject", [walled center]),
(party_set_slot, [walled center], slot_center_is_besieged_by, -1),
(party_set_ai_behavior, ":party_no", ai_bhvr_avoid_party),
(party_set_ai_object, ":party_no", [walled center]),
(party_set_slot, ":party_no", slot_party_ai_state, spai_undefined),
(try_begin),    
(party_slot_eq, [walled center], slot_village_state, svs_under_siege),      
(party_set_slot, [walled center], slot_village_state, svs_normal),
(party_set_extra_text, [walled center], "str_empty_string"),
(try_end),
(try_end),
  ]),

it still doesn't work, but it progresses :

Now, the npc starts the siege , abandons it after a few hours, 
changes his mind and returns to besiege the castle again ... in an endless cycle !

therefore, we must prevent the decision of attacking the castle

anyway, thank you again for your efforts  :smile:
 
Every beginner needs @Somebody :mrgreen:

Question:
LddzJV.png

What is the angle of the mission camera? Or how can I find it? Any ideas would be appreciated.
 
fladin said:
it still doesn't work, but it progresses :

Now, the npc starts the siege , abandons it after a few hours, 
changes his mind and returns to besiege the castle again ... in an endless cycle !

therefore, we must prevent the decision of attacking the castle

anyway, thank you again for your efforts  :smile:
So, working around the decision must be out of the question.
(assign, ":action", spai_besieging_center),
#############################################################
          (neq, ":faction_object", [walled center]),
#############################################################
 
yeah, i think found the responsible script :

#I have decided to attack a vulnerable fortress
(else_try),
  (eq, ":do_only_collecting_rents", 0),
  (eq, ":faction_is_at_war", 1),
  (eq, ":eek:peration_in_progress", 0),
 
  (assign, ":walled_center_to_attack", -1),
  (assign, ":walled_center_score", 50),
 
  (try_for_range, ":walled_center", walled_centers_begin, walled_centers_end),
            (neq, ":walled_center", "p_my_castle"),
    (store_faction_of_party, ":walled_center_faction", ":walled_center"),
    (store_relation, ":relation", ":faction_no", ":walled_center_faction"),
    (lt, ":relation", 0),
   
    (party_get_slot, ":center_cached_strength", ":walled_center", slot_party_cached_strength),
    (val_mul, ":center_cached_strength", 3),
    (val_mul, ":center_cached_strength", 2),
   
    (lt, ":center_cached_strength", ":party_cached_strength"),
    (lt, ":center_cached_strength", 750),
   
    (party_slot_eq, ":walled_center", slot_village_state, svs_normal),
    (store_distance_to_party_from_party, ":distance", ":walled_center", ":party_no"),
    (lt, ":distance", ":walled_center_score"),
   
    (assign, ":walled_center_to_attack", ":walled_center"),
    (assign, ":walled_center_score", ":distance"),
  (try_end),
 
  (is_between, ":walled_center_to_attack", centers_begin, centers_end),
 
  (assign, ":action", spai_besieging_center),
  (assign, ":eek:bject", ":walled_center_to_attack"),
  (try_begin),
    (eq, "$cheat_mode", 1),
    (str_store_faction_name, s20, ":faction_no"),
    (str_store_party_name, s21, ":eek:bject"),
    (display_message, "str_s20_decided_to_attack_s21"),
  (try_end),
 
  (try_begin),
    (eq, ":troop_no", "$g_talk_troop"),
    (str_store_string, s14, "str_a_fortress_is_vulnerable"),
    (str_store_string, s16, "str_i_believe_that_the_enemy_may_be_vulnerable"),
  (try_end),

I'll test all that tonight  :wink:
 
Hello,

Can anyone help me with 2 things:

- changing the rewards from melees (looked for arena_grand_prize or something like that, did not show up)
- allowing you to run away from villages while looting them (Saw this in floris mod, so I downloaded the source code. But the source code didn't install correctly I think)
 
Hi,
IIRC in warband the kidnapped girl has a woman map icon when alone. But in wfas she has the gray_knight icon. Anyhow, is there an easy way to put the woman icon into wfas script? I searched the module system but I didn't find a relevant part.
I could change the gray knight icon but maybe there is a method via scripting.
 
Csatádi said:
Hi,
IIRC in warband the kidnapped girl has a woman map icon when alone. But in wfas she has the gray_knight icon. Anyhow, is there an easy way to put the woman icon into wfas script? I searched the module system but I didn't find a relevant part.
I could change the gray knight icon but maybe there is a method via scripting.
Find her party template. It's got icon_woman defined:
Code:
  ("kidnapped_girl","Kidnapped Girl",icon_woman|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_kidnapped_girl,1,1)]),
You may need to add the icon into the relevant files, if it's not present in WFaS.
 
I added a nation chooser menu at character creation to wfas.
Could you help me to add items for the player before he sets the face of his character?
Choosing his nation happens in a monitor (?) called start_game_2. Wfas don't use start_character_ monitors.

The shortened code:
Code:
      (try_begin),
        (eq,"$background_type",cb_belorussian),
        (troop_add_item, "trp_player","itm_mosk_armyak",0),
        (troop_add_item, "trp_player","itm_ukrine_prosta_shapka",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_dried_meat",0),
        (troop_add_item, "trp_player","itm_cabbages",0),
        (troop_add_item, "trp_player","itm_cabbages",0),
      (else_try),
        (eq,"$background_type",cb_westerneu),
        (troop_add_item, "trp_player","itm_evropa_odejda_sela_b",0),
        (troop_add_item, "trp_player","itm_evropa_shlapa_b",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_bread",0),
        (troop_add_item, "trp_player","itm_smoked_fish",0),
        (troop_add_item, "trp_player","itm_dried_meat",0),
      (try_end),

The following wfas lines after start_game_2:
Code:
  (
    "choose_skill",mnf_disable_all_keys,"You spot a battle-ready men in the distance.", 
    "none",
    [(assign,"$current_string_reg",10)],
    [
      ("begin_adventuring",[],"See what trouble is afoot.",[
           (set_show_messages, 0),
        ]),
    ]
  ),

Please consider I don't know programming just copied and edited some lines.
 
Hello again! My friend, DarkRobin, gave me a script that gives vassals specific troops, but I can't for the life of me figure out where it goes, I've put it in several places in "script_cf_reinforce_party", but each attempt has yielded negative results.

I am hoping you guys could inform me.

The script is:

Code:
(try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
 (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_knight_1_19"),
  (store_random_in_range, ":random", 1, 1), 
  (eq, ":random", 1),
          (party_add_members, ":party_no", "trp_swadian_militia", 100), ##Infantry
          (party_add_members, ":party_no", "trp_swadian_staff_officer", 5),  ##Staff Officer
        (try_end),
      (try_end),
 
Status
Not open for further replies.
Back
Top Bottom