PYTHON SCRIPT/SCHEME EXCHANGE

Users who are viewing this thread

dunde said:
How about others commented parties, like messenger parties, etc?

yes this also apply for forager, messenger, dark knights etc.. it's all there but they are disabled by default. even rebel peasant.


anyone noticed the lot's of mission are also disabled by default ?? anyone tried any of it ??
 
Aaargh.. I have deleted almost all commented lines from module_scripts and module_simple_triggers on my current mod. It's annoying when my searching ended to commented parts.
 
Normally you won't need it, but they could be handy, since they where already there. Right now i am mostly looking to what the script does, and try them in game. problem with most of these scripts are they are not save compatible so everytime you need to start over too see result.
 
MaverickJones said:
Updated and better version of my troop recruiting companions script :razz:
You can now choose how many troops you want to recruit

Code:
# 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", 8)]],
  [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",[]],
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 :D
 
# Maverick Companion Script End #EPIC#
hey sorry I'm a bit newbish with scripting atm, could you tell me where i put this, in what folder and line etc.
 
[anyone|plyr, "companion_recruit_backstory_delayed_response", [
      ], "I might be able to use you in my company.", "companion_recruit_signup_b", [
          ]],

  [anyone|plyr, "companion_recruit_backstory_delayed_response", [
      ],  "I'll let you know if I hear of anything.", "close_window", [
          ]],

  [anyone, "companion_recruit_signup_confirm", [], "Good! Give me a few moments to prepare and I'll be ready to move.", "close_window",
  [(call_script, "script_recruit_troop_as_companion", "$g_talk_troop")]],

# 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"),]],

...module_dialogs.py
 
Little Pos Helper
I created LPH to make designing presentations easier. It shows cursor's position in upper-left corner. Enjoy.
Installation:
1. Paste this into "ti_on_presentation_load" section:
Code:
			#Little Pos Helper by Kuba begin
			(create_text_overlay, "$g_little_pos_helper", "@00,00"),
			(overlay_set_color, "$g_little_pos_helper", 0xFFFFFFFF),
			(position_set_x, pos1, 10),
			(position_set_y, pos1, 700),
			(overlay_set_position, "$g_little_pos_helper", pos1),
			#Little Pos Helper by Kuba end
2. And this into presentation's triggers section:
Code:
		#Little Pos Helper by Kuba begin
		(ti_on_presentation_run,
		[
		(mouse_get_position, pos1),
		(position_get_x, reg1, pos1),
		(position_get_y, reg2, pos1),
		(overlay_set_text, "$g_little_pos_helper", "@{reg1},{reg2}"),
		]),
		#Little Pos Helper by Kuba end
 
how to make my comanion become lord when im a king

---------------------------------------------------------------------------
 
Hi this is more a request about which scripts are open scource already or who´s the creator of one script to ask permission from:

Creator request
Keedo420 gave me that script for my scenes:
Code:
  ("kill_overboard",
      [(try_for_agents,":agent"),
           (agent_get_position,pos1,":agent"),
           (agent_get_position,pos2,":agent"),
           (position_set_z_to_ground_level, pos2),
           (get_distance_between_positions,":dist",pos1,pos2),
           (gt,":dist",500),
           (agent_set_hit_points,":agent",0,0),
           (agent_deliver_damage_to_agent,":agent",":agent"),   
       (end_try),]),

who invented that and is it for free use???
And Iwould like to know if Chels wound and death script is for free use or not???
 
Sorry about this post, I just wanted to see if any of you scripters are interested in joining a mod team. The Land of Conquest is in need of a scripter right now, and it would be great to get one soon. Please pm me if you're interested.


Nice work, everyone btw.  :wink:
 
The Problem
In M&B time passes too slowly IMHO.
You have several battles in one day (in r/l very rare), you get wounded and heal in 2 days (in r/l very rare), while seasons never change (in r/l extremely rare, except in some equatorial geographical locations, generally not covered in M&B)...

The Suggestions Of A Solution

1. My suggestion would be, to make time pass quicker. Riding from town to town usually took days, not hours, so instead of enlarging maps, which are fine, the passing of time should be made much quicker. A ride between two towns should take at least 2 days.
Weekly pay for your troops should also be made to monthly pay (playing Last Days MOD and having a bunch of knights, kinda hurts giving away 1000 gold every week).

2. If it would be possible to implement...map changing with season. Summer map switches to winter map when appropriate time comes. Because, as it is now, you have areas with permanent snow and ice, and just a step away you have green lush landscapes...ummm...even in the Arctic you get flowers in the warm season...

3. With time speeded up, what we now play as weeks, we'd play as months, with 1/4 of one yearly cycle being winter. Movement in summer would be as now, in winter it would be slow...No major campaigns usually took place in winter, and income & provisions were poor then too, so you'd have to plan ahead a bit.

The only real problem I forsee is battles in progress. Now they last for hours, you may come by and join. If time was speeded up they'd last for days...

 
Comander said:
The Problem
In M&B time passes too slowly IMHO.
You have several battles in one day (in r/l very rare), you get wounded and heal in 2 days (in r/l very rare), while seasons never change (in r/l extremely rare, except in some equatorial geographical locations, generally not covered in M&B)...

The Suggestions Of A Solution

1. My suggestion would be, to make time pass quicker. Riding from town to town usually took days, not hours, so instead of enlarging maps, which are fine, the passing of time should be made much quicker. A ride between two towns should take at least 2 days.
Weekly pay for your troops should also be made to monthly pay (playing Last Days MOD and having a bunch of knights, kinda hurts giving away 1000 gold every week).

2. If it would be possible to implement...map changing with season. Summer map switches to winter map when appropriate time comes. Because, as it is now, you have areas with permanent snow and ice, and just a step away you have green lush landscapes...ummm...even in the Arctic you get flowers in the warm season...

3. With time speeded up, what we now play as weeks, we'd play as months, with 1/4 of one yearly cycle being winter. Movement in summer would be as now, in winter it would be slow...No major campaigns usually took place in winter, and income & provisions were poor then too, so you'd have to plan ahead a bit.

The only real problem I forsee is battles in progress. Now they last for hours, you may come by and join. If time was speeded up they'd last for days...

Agreed, do you have any coding experience, might i add?
 
Comander said:
The only real problem I forsee is battles in progress. Now they last for hours, you may come by and join. If time was speeded up they'd last for days...

I don't think so. The "game_event_simulate_battle" is called every 1 hour game time.
 
dunde said:
Comander said:
The only real problem I forsee is battles in progress. Now they last for hours, you may come by and join. If time was speeded up they'd last for days...

I don't think so. The "game_event_simulate_battle" is called every 1 hour game time.

:lol: FOr some reason, I read "I don't think so" each with a pause, imaging that voice you hear in those typing practices that tell you to not look at the keyboard.
 
Kuba said:
Little Pos Helper
I created LPH to make designing presentations easier. It shows cursor's position in upper-left corner. Enjoy.
Installation:
1. Paste this into "ti_on_presentation_load" section:
Code:
			#Little Pos Helper by Kuba begin
			(create_text_overlay, "$g_little_pos_helper", "@00,00"),
			(overlay_set_color, "$g_little_pos_helper", 0xFFFFFFFF),
			(position_set_x, pos1, 10),
			(position_set_y, pos1, 700),
			(overlay_set_position, "$g_little_pos_helper", pos1),
			#Little Pos Helper by Kuba end
2. And this into presentation's triggers section:
Code:
		#Little Pos Helper by Kuba begin
		(ti_on_presentation_run,
		[
		(mouse_get_position, pos1),
		(position_get_x, reg1, pos1),
		(position_get_y, reg2, pos1),
		(overlay_set_text, "$g_little_pos_helper", "@{reg1},{reg2}"),
		]),
		#Little Pos Helper by Kuba end

this was a big help, great work!

FYI - for those new to working with presentations, make sure you add the following before Kuba's code
Code:
 (set_fixed_point_multiplier, 1000),
 
Back
Top Bottom