PYTHON SCRIPT/SCHEME EXCHANGE

Users who are viewing this thread

(store_current_hours, "$next_recruit_time"),
(val_add, "$next_recruit_time", 240),


(store_current_hours, ":time"),
(eq, ":time", "$next_recruit_time"),
 
Ikaguia said:
(store_current_hours, "$next_recruit_time"),
(val_add, "$next_recruit_time", 240),


(store_current_hours, ":time"),
(ge, ":time", "$next_recruit_time"),
Unless you are feeling really strict, of course. :smile:
 
Ikaguia said:
(store_current_hours, "$next_recruit_time"),
(val_add, "$next_recruit_time", 240),


(store_current_hours, ":time"),
(eq, ":time", "$next_recruit_time"),

Should I add this in the bottom of the dialog?

Like this?
# Maverick Companion Script Start #EPIC#
  #Gain 20000 gold randomly if cheat mode is on
  [anyone|plyr,"member_question_2", [(eq,"$cheat_mode",1)], "Cheat: Could you give me some cash from that large pot of gold?", "member_moneys",[]],
  #recruit troops for a price
  [anyone|plyr,"member_question_2", [], "Could you draft in some troops for me?", "member_draft_question",[]],



  [anyone, "member_moneys", [
    (call_script, "script_troop_add_gold", "trp_player", 20000),
], "Sure why not, there is plenty in here", "do_member_view_char",[]],

  [anyone, "member_draft_question", [], "So what kind of troops do you want?", "member_draft_troop",[]],
 
  [anyone|plyr,"member_draft_troop", [], "I would like some Caravan guards.", "member_draft_troop_question2",[ (assign, "$cost_draft", 400),(assign, "$draft_id", "trp_caravan_guard"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Watchmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_watchman")]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Huntresses.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_hunter_woman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Slave Drivers.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_slave_driver"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Swadian recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 150), (assign, "$draft_id", "trp_swadian_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Veagir recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_vaegir_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Khergit tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_khergit_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Nord recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_nord_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Rhodok tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_rhodok_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Looters.", "member_draft_troop_question2",[(assign, "$cost_draft", 50), (assign, "$draft_id", "trp_looter"),]],
  [anyone|plyr,"member_draft_troop", [], "Never mind.", "close_window",[]],
   
  [anyone, "member_draft_troop_question2", [], "How many troops do you want?", "member_draft_troop_2",[]],
 
  [anyone|plyr,"member_draft_troop_2", [], "I would like 10.", "member_draft_troop_3",[ (assign, "$draft_num", 10)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 9.", "member_draft_troop_3",[(assign, "$draft_num", 9)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 8.", "member_draft_troop_3",[(assign, "$draft_num", :cool:]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 7.", "member_draft_troop_3",[(assign, "$draft_num", 7)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 6.", "member_draft_troop_3",[(assign, "$draft_num", 6)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 5.", "member_draft_troop_3",[(assign, "$draft_num", 5)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 4.", "member_draft_troop_3",[(assign, "$draft_num", 4)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 3.", "member_draft_troop_3",[(assign, "$draft_num", 3)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 2.", "member_draft_troop_3",[(assign, "$draft_num", 2)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 1.", "member_draft_troop_3",[(assign, "$draft_num", 1)]],
  [anyone|plyr,"member_draft_troop_2", [], "Never mind.", "close_window",[]],
 
  [anyone, "member_draft_troop_3", [
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"),
], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],

    (store_current_hours, "$next_recruit_time"),
    (val_add, "$next_recruit_time", 240),


    (store_current_hours, ":time"),
    (ge, ":time", "$next_recruit_time"),
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 :grin:

# Maverick Companion Script End #EPIC#
 
i don't think so, you may need to add a check for this variable value in the conditional block of the recruitment thingie. i didn't read it deeply and i'm a **** with dialogs though :p so better don't mind me
 
no, you add the first part on the "It didn't take much to convince them to join you, Hope they serve you well" dialog and the second on the "Could you draft in some troops for me"
 
Ikaguia said:
no, you add the first part on the "It didn't take much to convince them to join you, Hope they serve you well" dialog and the second on the "Could you draft in some troops for me"

Could you show how? The console gives me error when I try?!
 
I tried to do it like this:
# Maverick Companion Script Start #EPIC#
  #Gain 20000 gold randomly if cheat mode is on
  [anyone|plyr,"member_question_2", [(eq,"$cheat_mode",1)], "Cheat: Could you give me some cash from that large pot of gold?", "member_moneys",[]],
  #recruit troops for a price
  [anyone|plyr,"member_question_2", [
    (store_current_hours, ":time"),
    (eq, ":time", "$next_recruit_time"),
], "Could you draft in some troops for me?", "member_draft_question",[]],


  [anyone, "member_moneys", [
    (call_script, "script_troop_add_gold", "trp_player", 20000),
], "Sure why not, there is plenty in here", "do_member_view_char",[]],

  [anyone, "member_draft_question", [], "So what kind of troops do you want?", "member_draft_troop",[]],
 
  [anyone|plyr,"member_draft_troop", [], "I would like some Caravan guards.", "member_draft_troop_question2",[ (assign, "$cost_draft", 400),(assign, "$draft_id", "trp_caravan_guard"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Watchmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_watchman")]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Huntresses.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_hunter_woman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Slave Drivers.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_slave_driver"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Swadian recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 150), (assign, "$draft_id", "trp_swadian_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Veagir recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_vaegir_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Khergit tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_khergit_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Nord recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_nord_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Rhodok tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_rhodok_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Looters.", "member_draft_troop_question2",[(assign, "$cost_draft", 50), (assign, "$draft_id", "trp_looter"),]],
  [anyone|plyr,"member_draft_troop", [], "Never mind.", "close_window",[]],
   
  [anyone, "member_draft_troop_question2", [], "How many troops do you want?", "member_draft_troop_2",[]],
 
  [anyone|plyr,"member_draft_troop_2", [], "I would like 10.", "member_draft_troop_3",[ (assign, "$draft_num", 10)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 9.", "member_draft_troop_3",[(assign, "$draft_num", 9)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 8.", "member_draft_troop_3",[(assign, "$draft_num", :cool:]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 7.", "member_draft_troop_3",[(assign, "$draft_num", 7)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 6.", "member_draft_troop_3",[(assign, "$draft_num", 6)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 5.", "member_draft_troop_3",[(assign, "$draft_num", 5)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 4.", "member_draft_troop_3",[(assign, "$draft_num", 4)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 3.", "member_draft_troop_3",[(assign, "$draft_num", 3)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 2.", "member_draft_troop_3",[(assign, "$draft_num", 2)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 1.", "member_draft_troop_3",[(assign, "$draft_num", 1)]],
  [anyone|plyr,"member_draft_troop_2", [], "Never mind.", "close_window",[]],
 
  [anyone, "member_draft_troop_3", [
    (store_current_hours, "$next_recruit_time"),
    (val_add, "$next_recruit_time", 240),
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"),
], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 :grin:

# Maverick Companion Script End #EPIC#

This time the console didn't give any error but I can't find the dialog in game?! Even if I wait 240 hours I can't find it?!

Please help!


And how do I make so when I don't have the money that is needed for the troops the companion does not answer "It didn't take much to convince them to join you, Hope they serve you well"? Even when I received no troops?

 
you need to assign "$next_recruit_time" at script_game_start to 0 or something like that.

you can add an (gt, "$draft_num", 0), after that (val_min, "$draft_num", ":gold_capacity"), and then add an second dialog named member_draft_troop_3 with the text you want.
 
Ikaguia said:
you need to assign "$next_recruit_time" at script_game_start to 0 or something like that.

you can add an (gt, "$draft_num", 0), after that (val_min, "$draft_num", ":gold_capacity"), and then add an second dialog named member_draft_troop_3 with the text you want.

Like this
  [anyone, "member_draft_troop_3", [
      (store_current_hours, "$next_recruit_time"),
      (val_add, "$next_recruit_time", 240),
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
(gt, "$draft_num", 0)
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"),
], "It was difficult to convince them to join you, Hope they serve you well {sire/my lady}.", "do_member_view_char",[]],

  [anyone, "member_draft_troop_3", [], "You need more money for that {sire/my lady}.", "do_member_view_char",[]],

And can you please show me where I should put "$next_recruit_time" at script_game_start to 0" (or something like that)
 
Ikaguia said:
exactly.

anywhere at script_game_start, put a (assign, "$next_recruit_time", 0),

The console give me error when I tried it...

Scripts
  #script_game_start:
  # This script is called when a new game is started
  # INPUT: none
  ("game_start",
  [
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),
      (assign, "$g_player_luck", 200),
      (assign, "$g_player_luck", 200),
      (troop_set_slot, "trp_player", slot_troop_occupation, slto_kingdom_hero),
      (store_random_in_range, ":starting_training_ground", training_grounds_begin, training_grounds_end),
      (party_relocate_near_party, "p_main_party", ":starting_training_ground", 3),
      (str_store_troop_name, s5, "trp_player"),
      (party_set_name, "p_main_party", s5),
      (call_script, "script_update_party_creation_random_limits"),
      (assign, "$g_player_party_icon", -1),
      (assign, "$next_recruit_time", 0),

Dialogs
  [anyone, "member_draft_troop_3", [
      (store_current_hours, "$next_recruit_time"),
      (val_add, "$next_recruit_time", 240),
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
(gt, "$draft_num", 0)
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"),
], "It was difficult to convince them to join you, Hope they serve you well {sire/my lady}.", "do_member_view_char",[]],

  [anyone, "member_draft_troop_3", [], "You need more money for that {sire/my lady}.", "do_member_view_char",[]],

I have Warband if it makes any difference...
 
I maybe need to add the script in module_simple_triggers...

But how should it look and where should I add it exactly?

EDIT: I fixed it :smile:
 
I tried to dig through the CommonRes folder for meshes that could be used as extra map icons.

Unfortunately, map icons will not accept a combined mesh. This means that most buildings from the brf files are out of the question, and those which can be used (fake_houses) have horrible looks. Most item meshes can be used (probably horses too, didn't test). Many scenery and furniture items can be used as well (some may need tweaks to positioning and scale). Also, a few buildings are acceptable (they do lack features, but this is hardly noticeable)

     

   

The following code was used:

Code:
  ("test_icon_01",mcn_no_shadow,"player_chest",0.5,0),
  ("test_icon_02",mcn_no_shadow,"box_a",0.65,0),
  ("test_icon_03",mcn_no_shadow,"cart_b",0.5,0),
  ("test_icon_04",mcn_no_shadow,"leatherwork_frame",0.5,0),
  ("test_icon_05",mcn_no_shadow,"raw_flax",0.8,0),
  ("test_icon_06",mcn_no_shadow,"stone_minaret_a.19",0.08,0),
  ("test_icon_07",mcn_no_shadow,"castle_h_corner_c",0.05,0),
  ("test_icon_08",mcn_no_shadow,"arabian_tent",0.15,0),
This is just proof of concept, there are plenty of other meshes that can be used like this. :smile:
 
Sayd Ûthman said:
but the polycount won't be good :neutral:
Most village/castle/town icons have about 1000-2000 poly, which is higher than most other meshes in the game.

Actually, map_town_desert_a has freaking 5388 polys. :shock:
 
Sayd Ûthman said:
Probably the reason why it's almost not used :razz:
By "almost not used" you mean "used for all desert towns" I suppose? :smile:

Code:
  ("town_desert",mcn_no_shadow,"map_town_desert_a", 0.35,0),
Code:
  ("town_19","Shariz", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(15, -107),[], 45),
  ("town_20","Durquba", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(90, -95.1),[], 270),
  ("town_21","Ahmerrad", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(130.5, -78.5),[], 330),
  ("town_22","Bariyye", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(165, -106.7),[], 225),
 
Back
Top Bottom