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

0 Members and 1 Guest are viewing this topic.

Amman de Stazia

  • Master Knight
  • *
  • schizophrenic? There's three of us now!
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #450 on: December 02, 2009, 02:04:07 PM »
I've been playing around with trying to ensure certain troops have both a lance and a sword. I originally started with just adding a lance to the troop, which of course doesn't work as it adds it to the template of a troop, so the template is called and gets either a sword, lance or both randomly like normal. There appears to be no operation to give it to an agent. So I was trying an alternate strategy of reassigning the troops to an alternate entry point and deleting or removing the originals. I have very limited experience with mission_templates and scene editing so I haven't got it to work yet. I am just wondering if anyone has followed this line of logic before and can give any advice.

well.....   take the tournaments mission_template as your guide.   In tournaments (arena fights) every agent is assigned a set weaponry.
So if you are happy for all of one team to be given sword+lance, you can do it.   But I am not sure that you can limit it to certain troops.

you might want to try something like this though:

Create a new sword item and equip only that on your troop.
Create a script which is called by activation of that new-sword.   This script is basically to equip the agent with a lance.

In theory then, every time your troop draws their sword, they will be equipped with a lance.
http://forums.taleworlds.net/index.php/topic,12250.msg208344.html#msg208344

Family IS more important than Mount and Blade. 

Family D'Stazia.  (A, K and S )

PS - this line plugs TPW - The Peninsular War mod.http://forums.taleworlds.net/index.php/topic,42454.0.html

Pisces

  • Veteran
  • *
    • View Profile
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #451 on: December 04, 2009, 12:19:39 AM »
I started with that line of thought, but can you add a weapon to an agent? I'm not too experience but I can't find any operation or example of such. Adding it to the troop only works for heros. It would be quite easy to make a script to give the knights only lances in open battles and only hand weapons for sieges, which would be good, but not quite what I'm looking for.

My plan was to create new entry points with the override weapons flag & assign the knights to it. I'm not sure what will happen when I create new entry points as the entry points are automatically generated, but so far I haven't been successful in assigning the knights to the new entry points.

Rongar

  • Master Knight
  • *
  • Cave canem
    • View Profile
  • Faction: Sarranid
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #452 on: December 04, 2009, 01:53:14 PM »
Pisces, using special entries to modify troop equipment is a way, but it is also possible to changes  weapon for troop inventories (heroes or regulars).
Here
PYTHON SCRIPT/SCHEME EXCHANGE | Remove lances in assaults
is example, how changing troop inventory allow making different equipment for open field battles and assaults.



« Last Edit: December 04, 2009, 01:55:20 PM 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.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #453 on: December 26, 2009, 04:40:03 AM »
I found death cam from MartinF in this thread, I use it and I like it very much.
Then,I download rubik'scustom commander kits. The custom camera feature in the mod is very great.
So I think, It will be nice if both combined to be single feature.
Here it is, combined Custom Camera features :
- In every scenes, battle or visiting, press END to toggle camera mode, Default Camera and Custom Camera.
  Hold Page Down/Page Up to adjust camera height.
  Hold Up/Down to adjust camera distance.
- When player's knocked down, as long as there are ally that still alive, battle continue.
  Press LEFT and RIGHT to switch between allies viewpoints. END will make camera back to player troop.
  Press TAB to retreat as normal.

(click to show/hide)

(click to show/hide)

EDIT 1:
adding triggers :
common_battle_check_victory_condition,
common_battle_victory_display,
common_battle_check_defeat_condition,
common_battle_defeat_display,
Thanks for Red River for noting this.

EDIT 2 :
Totally new code.
« Last Edit: February 22, 2010, 10:10:50 AM by dunde »

Kuba

  • Knight
  • *
  • The ultimate cheater
    • View Profile
  • Faction: Neutral
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #454 on: December 31, 2009, 08:24:51 PM »
I just made a small script and I thought it would be nice to share it with modding community  :)

This script can change template of any (I think so) party.

(click to show/hide)

Lumos

  • Probably Not a Help Desk
  • Moderator
  • *
  • Mens INsana in corpore sano
    • Steam - lumosx
    • YouTube - LumosX
    • View Profile
  • Faction: Nord
  • WBWF&SNWM&BVC
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #455 on: January 01, 2010, 02:23:43 PM »
What do you mean by "change template"?

MaverickJones

  • Sergeant
  • *
  • It's better to reign in hell, than serve in heaven
    • View Profile
    • My Redbubble
  • Faction: Vaegir
  • MP nick: Maverick
  • WBNWWF&S
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #456 on: January 01, 2010, 04:09:48 PM »
Updated and better version of my troop recruiting companions script :P
You can now choose how many troops you want to recruit

:September 2012:
Companion recruit script updated for warband (includes sarranids).

Old (working) version
(click to show/hide)

New Version (beta, not fully tested) larger sizes, and written specifically for warband, includes a little more dialogue than before.
(click to show/hide)
« Last Edit: September 04, 2012, 11:46:51 AM by MaverickJones »

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #457 on: January 10, 2010, 11:22:38 PM »
This is a script I found from Cruger, props to dzorro for fixing it:

Faction Patrols

Go into module_triggers.py, and uncomment this:
Code: [Select]
##      (try_begin),
##        (store_random_in_range, ":random_no", 0, 100),
##        (lt, ":random_no", 10),
##        (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_patrol),
##      (try_end),

then go to module_scripts.py and uncomment this:
Code: [Select]
##        (eq, ":party_type", spt_patrol),
##        (assign, ":party_count_limit", 1),
##      (else_try),

and this
Code: [Select]
##        (eq, ":party_type", spt_patrol),
##        (assign, ":party_template", "pt_patrol_party"),
#        (assign, ":party_name_str", "str_s7_patrol"), <---- keep this outcommented
##      (else_try),

Also, uncomment this in module_constants.py:
Code: [Select]
spt_patrol             = 7
And you have faction patrols. :)

FrisianDude

  • Coitus non Awesome
  • Archduke
  • *
  • Zis is Tshörman tärritorie!
    • View Profile
  • Faction: Neutral
  • MP nick: Liudulf Ward/Léodwulf
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #458 on: January 11, 2010, 12:24:08 AM »
That all that's necessary to get patrols? Huh.
Nords ruled by King Ragnar, Khergits ruled by Sanjar Khan, Rhodoks ruled by King Graveth, Swadians ruled by King Harlaus, Vaegirs ruled by King Yaroglek. All those peoples live, fight, and die in the continent of Calradia. The Nords and Rhodoks field solely infantry and archers, the Swadians and Vaegirs have infantry, archers and cavalry and the Khergit field almost exclusively cavalry. No such things as "infarty" or "calvary" exist. Play Vikingr!

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #459 on: January 11, 2010, 12:41:49 AM »
I know, simple right?

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #460 on: January 11, 2010, 05:36:06 AM »
How about others commented parties, like messenger parties, etc?

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #461 on: January 11, 2010, 06:14:00 AM »
I don't know, I haven't tried it. Let's see what happens. ;)

dzorro

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

Archevious

  • Master Knight
  • *
  • Become one with Mother Russia, da?
    • View Profile
  • Faction: Neutral
  • MP nick: Archevious
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #463 on: January 11, 2010, 04:06:51 PM »
I don't think many have tried that. We should, we might find something cool disabled by default.

dunde

  • Count
  • *
  • Curious Coder of The Vision
    • View Profile
  • Faction: Swadian
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #464 on: January 11, 2010, 04:20:39 PM »
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.