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

0 Members and 1 Guest are viewing this topic.

Berserker Pride

  • Grandmaster Knight
  • *
  • Fearless Scripter of the Berserk Mod
    • View Profile
  • Faction: Vaegir
  • MP nick: CoR_Berserker
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #420 on: July 18, 2009, 09:57:15 PM »
For all of you making some kind of fantasy mod.  Most fantasy games have health regeneration of some kind.  So using the weapons on any paticular troop you can make him heal either quickly or slowly.
Code: [Select]
ogre_regeneration = (1, 0, 1,[],
    [
  (try_for_agents,":agent"),
    (agent_get_wielded_item,":wielded_item",":agent",0),
    (this_or_next|eq,":wielded_item","itm_ogre_plank"),
    (eq,":wielded_item","itm_thrown_plank"),
    (get_player_agent_no, ":player_agent"),
    (agent_is_alive,":agent"),
    (agent_is_human,":agent"),
    (neq,":agent",":player_agent"),
    (store_agent_hit_points,":life",":agent",1),
    (val_add,":life",40),
    (agent_set_hit_points,":agent",":life",1),
  (try_end),
   ])
This guy has a really fast health regeneration because he is a boss but the regeneration can be any speed you want.  I put a line in there to prevent the player from regenerating if he has the weapon but you could remove it if you wanted the player to heal too. I did some testing and you don't need a val_min operation in there.  The game seems to remember what a troop's max health is.

This is a trigger for mission templates.  It can go in any of the combat templates you want.

Rongar

  • Master Knight
  • *
  • Cave canem
    • View Profile
  • Faction: Sarranid
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #421 on: July 20, 2009, 01:00:29 PM »
Remove lances in assaults

Here the code that forbids AI to use large pike in assaults (if troop has other melee weapon).
This code can be easily extended on any situation then it is required to have different equipment for different mission.

1. In  module_constatns.py somewhere after
Code: (module_constatns.py) [Select]
#Rebellion changes begin
slot_troop_discussed_rebellion = 140
slot_troop_support_base = 141

add
Code: (module_constatns.py) [Select]
slot_troop_weapon_store = 142

2. In module_scripts.py add following scripts (tune weapon checks ad gustum)

Code: (module_scripts.py) [Select]
#script_troop_remove_pikes
#remove lances from troop inventory if troop has other type of weapon
#input: arg1=troop
#output : none
("troop_remove_pikes",
 [
(try_begin),
  (store_script_param_1,":troop"),
 
(troop_slot_eq,":troop",slot_troop_weapon_store,0),
(troop_get_inventory_capacity,":cap",":troop"),
(assign,":has_choice",0),
(try_for_range,":i",0,":cap"),    
  (troop_get_inventory_slot,":item",":troop",":i"),
#here should check if item is allowed in assaults i.e.
  (is_between,":item","itm_wooden_stick","itm_jousting_lance"),
  (assign,":has_choice",1),
      (assign,":cap",0),#break
(try_end),
  (try_begin),
(eq,":has_choice",1),# troop has melee non-lance
(troop_get_inventory_capacity,":cap",":troop"),
(assign,":removed",0),
(try_for_range,":i",0,":cap"),    
  (troop_get_inventory_slot,":item",":troop",":i"),
#here should check if item is not allowed in assaults i.e.
  (is_between,":item","itm_jousting_lance","itm_wooden_shield"),
              (val_add,":removed",1),
  (store_add,":shift",":removed",slot_troop_weapon_store),
  (troop_set_slot,":troop",":shift",":item"),
      (troop_set_inventory_slot,":troop",":i",-1),
(try_end),  
         (troop_set_slot,":troop",slot_troop_weapon_store,":removed"),
         (else_try),
(troop_set_slot,":troop",slot_troop_weapon_store,-1),
(try_end),
  (try_end),

  ]),           
 
#script_troop_restore_pikes
#restore troop equipment
#input: arg1=troop
#output : none
("troop_restore_pikes",
 [
  (store_script_param_1,":troop"),
        (troop_get_slot,":removed",":troop",slot_troop_weapon_store),
  (try_for_range,":i",0,":removed"),    
     (store_add,":shift",":i",slot_troop_weapon_store+1),
     (troop_get_slot,":item",":troop",":shift"),
     (troop_add_item,":troop",":item"),
        (try_end),
(troop_set_slot,":troop",slot_troop_weapon_store,0),
  ]),             
 
#script_all_restore_pikes
#
#input: none  
#output : none  
("all_restore_pikes",
 [
  (try_for_range,":troop","trp_farmer","trp_kidnapped_girl"),#instead all troops here can be for instance only knights
     (call_script,"script_troop_restore_pikes",":troop"),      
        (try_end),

  ]),     
 
#script_all_remove_pikes
#input: none  
#output : none    
("all_remove_pikes",
 [
  (try_for_range,":troop","trp_farmer","trp_kidnapped_girl"),#instead all troops here can be for instance only knights
     (call_script,"script_troop_remove_pikes",":troop"),      
        (try_end),

  ]),       


3. In module_game_menus.py

3.1 Search for "battle_debrief" (with quotes)
Add the call for script_all_restore_pikes, the result should look like
Code: (module_game_menus.py) [Select]
  (
    "battle_debrief",mnf_scale_picture|mnf_disable_all_keys,
    "{s11}^^Your Casualties:{s8}{s10}^^Enemy Casualties:{s9}",
    "none",
    [
     (call_script,"script_all_restore_pikes"), #restore lances
     (try_begin),


3.2 Search for  "join_siege_with_allies" (with quotes)
Add the call for script_all_remove_pikes at the end of menu item code before (change_screen_mission), the result should look like

Code: (module_game_menus.py) [Select]
   (call_script,"script_all_remove_pikes"), #remove lances
           (jump_to_menu, "mnu_battle_debrief"),
           (change_screen_mission),
          ]),
      ("join_siege_stay_back",


3.3 Search for  "castle_lead_attack" (with quotes)
Add the call for script_all_remove_pikes at the end of menu item code before (change_screen_mission), the result should look like

Code: (module_game_menus.py) [Select]
             (call_script,"script_all_remove_pikes"), #remove lances from troops in sieges
             (jump_to_menu, "mnu_battle_debrief"),
             (change_screen_mission),
           (try_end),
       ]),
      ("attack_stay_back",

3.4 Search for  "siege_attack_meets_sally" (with quotes)
Add the call for script_all_remove_pikes at the end of menu item code before (change_screen_mission), the result should look like

Code: (module_game_menus.py) [Select]
    [
      ("continue",[],
       "Continue...",
       [
             (call_script,"script_all_remove_pikes"), #remove lances
             (jump_to_menu, "mnu_battle_debrief"),
             (change_screen_mission),
       ]),

3.5 Search for  "castle_besiege_inner_battle" (with quotes)
Add the call for script_all_remove_pikes at the end of "continue"  menu item code before (change_screen_mission), the result should look like

Code: (module_game_menus.py) [Select]
       (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"),
           (call_script,"script_all_remove_pikes"), #remove lances
           (jump_to_menu, "mnu_battle_debrief"),
           (change_screen_mission),
       ]),
    ]
  ),

 
  (
    "construct_ladders",0,
« Last Edit: July 24, 2009, 08:59:42 AM by Rongar »


Factionize items tool
I hear and I forget.
I see and I remember.
I do and I understand...
 that would better if I heard.

ArRiad

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Vaegir
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #422 on: July 22, 2009, 08:43:30 AM »
Here the code that forbids AI to use large pike in assaults (if troop has other melee weapon).

Hello, Rongar.

Thank you very mach for the code. Now we may fix one of the most annoying AI bugs.
I add your code to my modfiles and all compiled well. But I found a strange bug in my game in the test with khergit lancers. In field battles all seemed to be OK, but in siege some of my lancers used to fight with shield and "no_item" - practice_sword (normally they have two sabres, one mace, two lances and a shield). I was able to use practice_swords from killed  khergit lancers during the battle.
Moreover, in the loot of the defeated vaegir town I found about 10 no_items (practice_swords). That is some vaegirs also used them.
What do you think about it? What may be the reason?

Thank you.

P.S. I tested vaegir knights and found that if before any siege their equipment in the battle was OK, then after one siege all of them in all battles had no lances at all! Instead of lances they have no_items, practice_swords and even heavy_practice_swords!
Moreover, after a siege some swadian knights, I fight with, have lances, but other have no_items.

(click to show/hide)
« Last Edit: July 23, 2009, 06:57:25 AM by ArRiad »

Rongar

  • Master Knight
  • *
  • Cave canem
    • View Profile
  • Faction: Sarranid
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #423 on: July 24, 2009, 08:58:53 AM »
Sorry, folks.
Instead of
Code: [Select]
  (troop_set_slot,":troop",":shift",":item"),
      (troop_set_inventory_slot,":troop",":i",0),
(try_end),
should be
Code: [Select]
  (troop_set_slot,":troop",":shift",":item"),
      (troop_set_inventory_slot,":troop",":i",-1),
(try_end),
and instead of
Code: [Select]
(try_for_range,":i",0,":removed"),    
     (store_add,":shift",":i",slot_troop_weapon_store),
     (troop_get_slot,":item",":troop",":shift"),
should be
Code: [Select]
(try_for_range,":i",0,":removed"),    
     (store_add,":shift",":i",slot_troop_weapon_store+1),
     (troop_get_slot,":item",":troop",":shift"),

I updated my previous post.

PS ArRiad, thanks for feedback.


Factionize items tool
I hear and I forget.
I see and I remember.
I do and I understand...
 that would better if I heard.

rorschach82

  • Veteran
  • *
  • yea.. i am bat **** crazy..
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #424 on: July 31, 2009, 06:54:58 AM »
In that case it should be more like this:

For player:
ti_on_whatever_pressed calls the following script:

Code: [Select]
(get_player_agent_no,":player"),
(agent_get_position,1,":player"),
(assign,":mindist",100),
(assign,":shield_equipped",0),
(try_for_range,":shield",shields_begin,shields_end), #fill in the appropriate item names
   (agent_has_item_equipped,":player",":shield"),
   (assign,":shield_equipped",1),
(end_try),
(neq,":shield",0),
(try_for_agents,":agent"),
    (agent_is_alive,":agent"),
    (agent_is_human,":agent"),
    (neg|agent_is_ally,":agent"),
    (agent_get_position,2,":agent"),
    (neg|position_is_behind_position,2,1),
    (get_distance_between_positions,":dist",1,2),
    (lt,":dist",":mindist"),
    (assign,":mindist",":dist"),
    (assign,":chosen",":agent"),
(end_try),
(agent_set_animation, ":player", anim_shield_bash),  # someone would have to make this animation.
(agent_set_animation, ":chosen", anim_strike_fall_back_rise),
(agent_store_health,":health",":chosen"),
(val_sub,":health",10),
(agent_set_health,":chosen",":health"),

For ai:
Every second during battle call the following script:
Code: [Select]
(get_player_agent_no,":player"),
(try_for_agents,":basher"),
    (agent_is_human,":basher"),
    (agent_is_alive,":basher"),
    (neq,":player",":basher"),
    (assign,":shield_equipped",0),
    (try_for_range,":shield",shields_begin,shields_end), #fill in the appropriate item names
        (agent_has_item_equipped,":basher",":shield"),
        (assign,":shield_equipped",1),
    (end_try),
    (neq,":shield_equipped",0),
    (try_begin),
          (agent_is_ally,":basher"),
          (agent_get_position,1,":basher"),
          (assign,":mindist",100),
          (try_for_agents,":agent"),
                (agent_is_alive,":agent"),
                (agent_is_human,":agent"),
                (neg|agent_is_ally,":agent"),
                (agent_get_position,2,":agent"),
                (neg|position_is_behind_position,2,1),
                (get_distance_between_positions,":dist",1,2),
                (lt,":dist",":mindist"),
                (assign,":mindist",":dist"),
                (assign,":chosen",":agent"),
           (end_try),
           (store_random_in_range,":random",1,10),
           (eq,":random",7),                                          #this line and the one before it would keep to agents from simultaneously shield bashing one another save in rare instances.
           (agent_set_animation, ":basher", anim_shield_bash),  # someone would have to make this animation.
           (agent_set_animation, ":chosen", anim_strike_fall_back_rise),
           (agent_store_health,":health",":chosen"),
           (val_sub,":health",10),
           (agent_set_health,":chosen",":health"),
    (else_try),
          (neg|agent_is_ally,":basher"),
          (agent_get_position,1,":basher"),
          (assign,":mindist",100),
          (try_for_agents,":agent"),
                (agent_is_alive,":agent"),
                (agent_is_human,":agent"),
                (agent_is_ally,":agent"),
                (agent_get_position,2,":agent"),
                (neg|position_is_behind_position,2,1),
                (get_distance_between_positions,":dist",1,2),
                (lt,":dist",":mindist"),
                (assign,":mindist",":dist"),
                (assign,":chosen",":agent"),
           (end_try),
           (store_random_in_range,":random",1,10),
           (eq,":random",7),                                          #this line and the one before it would keep to agents from simultaneously shield bashing one another save in rare instances.
           (agent_set_animation, ":basher", anim_shield_bash),  # someone would have to make this animation.
           (agent_set_animation, ":chosen", anim_strike_fall_back_rise),
           (agent_store_health,":health",":chosen"),
           (val_sub,":health",10),
           (agent_set_health,":chosen",":health"),
    (end_try),
(end_try),


That would fix it, unless you forgot to fill in the correct items for shields_begin and shields_end.

I'm pretty sure it has to be in hand.
I've never played around with the command. You're probably right.


EDIT: fixed an error in the player script.

EDIT2: DarkAnd, did it succsessfully take ten hit points from you when you were bashed?


may i ask what python script in the module should i add this script in?

ligerteeth

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #425 on: August 19, 2009, 07:05:40 AM »
I'm pretty much a newbie in M&B modding, and I've been wondering how can I make a crossbow shoot a unique projectile instead of the default bolt. Can somebody please enlighten me ?

This is very simple. Just create the new "unique projectile" item in module_items:
Code: [Select]
["unique_projectile","Unique Projectile", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts, itcf_carry_quiver_right_vertical, 0,weight(2.25)|weapon_length(55)|max_ammo(49),imodbits_missile],
Modify this however you like, change damage, speed, etc, even give it a mesh other than some kind of crossbow bolt, but as long as it has itp_type_bolts, it will fire out of a crossbow. Simply buy the new item and equip it. BTW, if you're new i suggest you read the module system documentation http://forums.taleworlds.com/index.php/board,12.0.html
I believe we digress gentlemen, unless the fair art of duelling can help in the great cause of sodomising young ladies.
~EoR

DuoGum

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #426 on: September 25, 2009, 07:50:14 PM »
Garnier's Bank of Calradia code -- written for 0.960!

I put together some code for a central bank of Calradia, where you can store money or take loans.  The specifics are;
You go to a town, and click "visit the bank".
To take a loan, you pay 100 denars immediately, and 1000 in debt to the bank.  You can repay the loan at any time.  Interest on the loan is 200% per year, so each week you pay 40 denars interest on each 1000 denar loan.
You have to have 100 real denars to take a loan, real meaning your total cash minus your total debt has to be 100 or more.  So you can't keep taking out loans forever.
If you cannot pay the interest on your loans in a given week, the unpaid sum is added to your debt, and next week you are expected to pay interest again, which in turn is added to the debt if you can't pay. 
You can deposit money at the bank, and gain 20% per year in interest, so 4 d/week on a 1000 deposit.  You can withdraw the deposit at any time.

Global Variables created;

$g_player_debt
$g_player_deposit


Add this to the game start script;  #Defines the global variables used.
Code: [Select]
      (store_add, "$g_player_debt",0,0),
      (store_add, "$g_player_deposit",0,0),

Add these menus to game_menus.py;  #The first menu is a weekly interest payment menu, and the second is the bank menu where you handle deposits/loans.
Code: [Select]
  (
    "debt_interest",mnf_scale_picture|mnf_disable_all_keys,
    "{s2}",
    "none",
    [

  (store_div, ":debt_interest","$g_player_debt",25),
          (assign, reg11, ":debt_interest"),
          (store_troop_gold, ":player_wealth", "trp_player"),
          (assign, reg8, ":player_wealth"),
(try_begin),
  (ge,"$g_player_debt",1),
  (try_begin),
            (ge, ":player_wealth", ":debt_interest"),
            (troop_remove_gold, "trp_player",":debt_interest"),
            (store_sub, reg9, reg8, reg11),
            (str_store_string, s2, "@You paid {reg11} of your {reg8} denars in interest on your debt. You have {reg9} denars left."),
          (else_try),
    (gt, ":debt_interest",":player_wealth"),
    (gt, ":player_wealth",0),
    (store_sub, ":unpaid_interest", ":debt_interest",":player_wealth"),
            (troop_remove_gold, "trp_player",":player_wealth"),
            (assign, reg10, ":unpaid_interest"),
            (val_add, "$g_player_debt",":unpaid_interest"),
            (str_store_string, s2, "@You paid all of your {reg8} denars in interest on your debt.  There were still {reg10} denars of the interest unpaid, which has been added to your debt.  You have 0 denars left."),
          (else_try),
    (gt, "$g_player_debt",0),
    (eq, ":player_wealth",0),
    (store_sub, ":unpaid_interest", ":debt_interest",":player_wealth"),
            (val_add, "$g_player_debt",":unpaid_interest"),
            (str_store_string, s2, "@You had 0 denars left to pay the interest on your debt.  The interest of {reg10} denars has been added to your debt."),
          (else_try),
            (str_store_string, s2, "@You have no debts to pay interest on."),
  (try_end),
(try_end),
    ],
    [
      ("continue",[],"Continue...",
       [
        (change_screen_return,0),
        ]
       ),
    ]
  ),
  (
    "bank",0,
    "You visit the bank.\
 Here you can deposit money and earn interest over time, or take a loan.\
 You currently have {reg6} denars deposited here.\
 You currently have {reg7} denars borrowed from the bank.",
    "none",
    [
    (assign, reg6, "$g_player_deposit"),
    (assign, reg7, "$g_player_debt"),
    ],
    [
      ("take_loan",[(store_troop_gold, ":player_wealth", "trp_player"),(store_sub, ":player_real_wealth", ":player_wealth", "$g_player_debt"),(gt,":player_real_wealth",100)],"Take a loan of 1000 denars.",
       [
   (troop_remove_gold, "trp_player", 100),
           (troop_add_gold, "trp_player", 1000),
           (val_add, "$g_player_debt", 1000),
        ]),
      ("give_loan",[(store_troop_gold, ":player_wealth", "trp_player"),(gt,":player_wealth",1000),(gt,"$g_player_debt",1000)],"Repay 1000 denars of your debt.",
       [
   (troop_remove_gold, "trp_player", 1000),
           (val_sub, "$g_player_debt", 1000),
        ]),
      ("give_loan_all",[(store_troop_gold, ":player_wealth", "trp_player"),(gt,":player_wealth","$g_player_debt"),(gt,"$g_player_debt",0)],"Repay all of your debt.",
       [
   (troop_remove_gold, "trp_player", "$g_player_debt"),
           (val_sub, "$g_player_debt", "$g_player_debt"),
        ]),
      ("give_deposit",[(store_troop_gold, ":player_wealth", "trp_player"),(gt,":player_wealth",1000)],"Deposit 1000 denars in the bank.",
       [
   (troop_remove_gold, "trp_player", 1000),
           (val_add, "$g_player_deposit", 1000),
        ]),
      ("take_deposit",[(ge,"$g_player_deposit",1000)],"Withdraw 1000 denars from your deposit.",
       [
   (troop_add_gold, "trp_player", 1000),
           (val_sub, "$g_player_deposit", 1000),
        ]),
      ("take_deposit_all",[(ge,"$g_player_deposit",1)],"Withdraw your entire deposit.",
       [
   (troop_add_gold, "trp_player", reg6),
           (val_sub, "$g_player_deposit", reg6),
        ]),
      ("back_to_town_menu",[],"Head back.",
       [
           (jump_to_menu,"mnu_town"),
        ]),
    ]
  ),

And this again to game_menus.py, just after the "visit the tavern" entry;  ##This is the text "Visit the bank" when you are in a town.
Code: [Select]
      ("town_bank",
       [],
       "Visit the bank.",
       [
           (jump_to_menu,"mnu_bank"),
        ]),

And this to simple_triggers.py,  ##These trigger the interest on debt payment menu, and the automatic interest on deposits
Code: [Select]
  #Interest on deposits.
  (24 * 7,
   [
    (try_begin),
       (gt, "$g_player_deposit", 0),
       (store_div,":interest_deposit","$g_player_deposit",250),
       (troop_add_gold, "trp_player",":interest_deposit"),
    (try_end),
    ]),
  #Interest on debts.
  (24 * 7,
   [
     (try_begin),
       (gt, "$g_player_debt", 0),
       (jump_to_menu,"mnu_debt_interest"),
     (try_end),
    ]),

This is just the basic code, I probably will add random events like the bank being robbed and your deposits being cut, and perhaps a debtors prison where you serve time if you can't pay interest after 8 weeks or something.  (In my mod you lost more renown, as well as weapon proficiencies over time, so spending time in prison would not be good).

Hi, i have a problem in the script :


Initializing...
Traceback (most recent call last):
  File "process_global_variables.py", line 7, in <module>
    from module_simple_triggers import *
  File "D:\Moutn & Blade - MODDING\ModuleSystem\module_simple_triggers.py", line
 2625, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 51, in save_parties
    add_tag_use(tag_uses,tag_troop,member[0])
TypeError: 'int' object is unsubscriptable
Exporting quest data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
Traceback (most recent call last):
  File "process_simple_triggers.py", line 2, in <module>
    from module_simple_triggers import *
  File "D:\Moutn & Blade - MODDING\ModuleSystem\module_simple_triggers.py", line
 2625, in <module>
    (try_end),
TypeError: 'tuple' object is not callable
exporting triggers...
exporting dialogs...
Checking global variable usages...

______________________________

Script processing has ended.
Press any key to exit. . .





??

Darwin

  • Watchin' your language...
  • Language Moderator
  • *
  • Life's a play.
    • Skype - darwin989
    • Steam - the_darwin
    • View Profile
    • The Automated Mod List
  • Faction: Neutral
  • WBM&BWF&SVC
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #427 on: September 25, 2009, 08:02:21 PM »
Quote
Garnier's Bank of Calradia code -- written for 0.960!
  :roll:

Fürwahr, ein guter Deutscher labt sich am Leid allein!

DuoGum

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #428 on: September 25, 2009, 08:12:45 PM »
Wrrr.... Sorry, for spam ;/.

André de Cuyne

  • Knight
  • *
  • Mahaa ! ! !
    • View Profile
  • Faction: Neutral
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #429 on: September 26, 2009, 11:07:09 AM »
The M&B version does not cause problems with the MS since the changes between 0.960 and 1.01x concerns gameplay. Not the MS structure.

Correct the first error spawned :

Quote
TypeError: 'tuple' object is not callable

It is a pure Python error, not a MS one.
You have certainly forgotten something somewhere in your typo...
D'or à lion de sable armé et lampassé de gueules, à bande de même chargée de trois étoiles d'argent. "J'astend fortune"

The PyME 0.9.5 is on the repository !

The simplest way to edit the Module System.

Jezze

  • Baron
  • *
    • Steam - oll_jezze
    • View Profile
  • Faction: Rhodok
  • MP nick: Saltbag
  • WBM&BNWVC
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #430 on: September 30, 2009, 06:13:47 PM »
I got it working on a V1.011 and I just copied everything acoording to the manual :) So it isn't that hard.

cdvader

  • Guest
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #431 on: September 30, 2009, 06:17:21 PM »
I was playing Warcraft III and suddenly it striked into my head: Why not try to do something like "Fog of War" on the map? My idea was that at first, everything on the map would be hidden, and as you do quests, talk to troops or just explore, you'll eventually uncover the whole map.

I believe this has been done before, by HardCore, in his Overlord mod, but I don't think he released the source for it. Anyway, here are the stuff.

(click to show/hide)
(click to show/hide)
(click to show/hide)

Jezze

  • Baron
  • *
    • Steam - oll_jezze
    • View Profile
  • Faction: Rhodok
  • MP nick: Saltbag
  • WBM&BNWVC
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #432 on: September 30, 2009, 06:47:23 PM »
Wooh! Awesome, so actually you wouldn't see any towns or villages until you reached for a certain distance?

I will think of it to put in my mod if you would allow me.

cdvader

  • Guest
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #433 on: September 30, 2009, 07:26:06 PM »
Yeah, anyone can do anything with it...

cdvader

  • Guest
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #434 on: September 30, 2009, 09:20:47 PM »
I was at my friends house and he was playing World of Warcraft. He had some kind of epic items or something, which had "slots". Basically, when you have, for example, Chaos Armor on and Chaos Helmet on, it will grant you some kind of a bonus.

Now, I know this has been done before, particulary by KON_Air. Props to him for doing it first, but I just couldn't resist to give it a shot, too. You can also set new values to the items in the middle of the game by simply re-setting new item slots (shown later), in a middle of a quest, finishing a quest, by a trigger or whatever, there are many possibilities.

The bad thing is, though, that these scripts might be a bit too complicated... And I haven't done any comments, really, so if you run into errors, I won't take responsibility. :P

(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)

Clean version (in .py files): http://www.2shared.com/file/8143193/7d672b0f/Item_Sets.html.
« Last Edit: October 01, 2009, 12:02:19 PM by cdvader »