Author Topic: PYTHON SCRIPT/SCHEME EXCHANGE  (Read 286750 times)

0 Members and 1 Guest are viewing this topic.

dzorro

  • Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #465 on: January 11, 2010, 04:24:04 PM »
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.

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #466 on: January 11, 2010, 10:58:03 PM »
Cool! I'll start checking once I get home.

Tyrany

  • Veteran
  • *
  • Number 6 This Xenomorph Has A Special Destiny
    • View Profile
  • Faction: Vaegir
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #467 on: January 22, 2010, 10:21:57 AM »
Updated and better version of my troop recruiting companions script :P
You can now choose how many troops you want to recruit

Code: [Select]
# 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.

iggorbb

  • Master Knight
  • *
  • ...meh...
    • View Profile
  • Faction: Vaegir
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #468 on: January 22, 2010, 04:36:50 PM »

(click to show/hide)

...module_dialogs.py
« Last Edit: February 11, 2010, 11:18:34 PM by iggorbb »
Бој не бије свијетло оружје, већ бој бије срце у јунака.

bb_osp

Kuba

  • Knight
  • *
  • The ultimate cheater
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #469 on: January 25, 2010, 04:00:22 PM »
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: [Select]
#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: [Select]
#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
« Last Edit: January 25, 2010, 04:11:35 PM by Kuba »

Comander

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #470 on: February 04, 2010, 02:49:15 PM »
how to make my comanion become lord when im a king

---------------------------------------------------------------------------

iggorbb

  • Master Knight
  • *
  • ...meh...
    • View Profile
  • Faction: Vaegir
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #471 on: February 04, 2010, 04:10:32 PM »
Бој не бије свијетло оружје, већ бој бије срце у јунака.

bb_osp

Meneldur

  • Sergeant Knight
  • *
  • need mapper, need mapper, need mapper, need ma
    • View Profile
  • Faction: Neutral
  • VCWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #472 on: February 06, 2010, 02:43:26 PM »
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: [Select]
  ("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???
need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,  need mapper,

NaglFaar

  • Baron
  • *
    • View Profile
  • Faction: Nord
  • MP nick: NaglFaar
  • WBM&BNW
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #473 on: February 06, 2010, 05:13:35 PM »
I think Mirathei made that piece for the sea battles, if I'm not mistaken and Jubal made a tutorial for it HERE.
James made the model(s) for it.
Mæli þarft eða þegi


the thread is in Alpha stages and when all the ideas have been put together and implemented the taleworlds post shall be completed.

Lord Serius

  • Knight at Arms
  • *
  • A leader is a dealer in hope.
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #474 on: February 12, 2010, 03:32:11 AM »
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:

Comander

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Time & Seasons
« Reply #475 on: March 03, 2010, 02:07:36 AM »
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...


Lord Serius

  • Knight at Arms
  • *
  • A leader is a dealer in hope.
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: Time & Seasons
« Reply #476 on: March 03, 2010, 03:04:37 PM »
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?

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: Time & Seasons
« Reply #477 on: March 03, 2010, 03:07:50 PM »
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.

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: Time & Seasons
« Reply #478 on: March 05, 2010, 04:20:48 PM »
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.

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #479 on: March 10, 2010, 04:23:00 AM »
Little Pos Helper
I created LPH to make designing presentations easier. It shows cursor's position in upper-left corner. Enjoy.
Installation:
(click to show/hide)

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: [Select]
(set_fixed_point_multiplier, 1000),
 
PC Gamer - "Uninstall KOTOR. Forget TIE Fighter and Star Wars Battlefront. There is only one Star Wars video game, and it's an unfinished mod for a six-year-old medieval RPG built by an indie studio from Turkey."