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

0 Members and 1 Guest are viewing this topic.

maw

  • Hardcore
  • Sergeant Knight at Arms
  • *
  • "The Original Permadeath-Guy"
    • View Profile
  • Faction: Neutral
  • WB
PYTHON SCRIPT/SCHEME EXCHANGE
« on: February 25, 2006, 01:53:00 AM »
Thread Rules:
Exchange Topic Only.
Submit Python code for doing stuff in M&B. Describe your code, what it does.
NO complaints or request for code or help here - just offer an exchange of functional python coded m&b stuff.


AND MY SUBMISSIONS ARE for v731:

1. python for recruiting on map, any pt_ (you'll have to create your own restrictions/limits for recruiting if you want)

2. python for investing in a caravan that, on its own after funding, heads to an random town. if it arrives (assuming its not attacked or destroyed) you receievd your investment + risk bonus based on distance.

3. python for main_party prisoner recruiting, adding to party or releasing to the map

4. promoting a common soldier to Hero-Companion status.

5. camping on the map, to recover injuries

6. python for prisoner interrogation/torture

7. python for a differnt tavern unit recruiting (less code)


remember, please, submissions only - direct all questions or comments to the author by pm. thanx. maw
« Last Edit: September 01, 2014, 09:40:18 AM by Duh »

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #1 on: February 25, 2006, 02:25:40 AM »
Reserving this spot to post my item combination script I made for the Age of Ash mod. Need to update it though now that a few workarounds in it are no longer needed in .731 since those scripting bugs are fixed.
Hmm, might be a while before i have time to go ahead and post this.

Where is Fujiwara's calendar script? It would go well here.

Oh, I also request that each person post in prominent bold letters the module system version their code was made for at the top of their post. Won't be important right now, but will be when new versions come out.
I further submit that people should not hesitate to edit their post as many times as they want to update or correct their listing.

EDIT:
Quote from: fisheye
Oh oh I got one...
Python for making dialogs crash inexplicably in an undebuggable manner.

Sorry, already got that one. Thanks. :P
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

Letum

  • Regular
  • *
    • View Profile
  • Faction: Bandit
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #2 on: February 25, 2006, 02:29:35 AM »
Edit

dagorkan

  • Knight at Arms
  • *
  • Fishmonger
    • View Profile
    • http://mbwiki.info
  • WB
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #3 on: February 25, 2006, 02:39:10 AM »
Don't know how useful this stuff is... (all for 0.731)

1/ Python for horse healing/upgrade system (over time). Could easily be modified for other items
2/ Python for constructing a mill/bridge over time - can be adapted for any economic type building
3/ Python for population growth/decrease in reaction to things you've done.
4/ Python for coding additional 'skills' than the Vanilla ones - shown in the Quest window
5/ Python for character development (during character creation) - 'career path' influences starting stats.

Angarato

  • Regular
  • *
    • View Profile
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #4 on: February 25, 2006, 02:54:21 AM »
Nothing fancy(new features ect.), as I just got the module system. I'll throw up what I have though. Module System version 0.731.0

1. Dark knight parties recruitable from worldmap.

2. New recruitable hero: Calradia's Lord and Saviour Himself, Jesus Christ. Has fair knowlege of various party skills. Decked out with archery gear, greataxe, and charger. Enjoys long walks along Zendar river, slaying infidels, and throwing up the horns. (This one's a bit silly)

"I don't like half of you half as well as I should like, and I like less than half of you half as well as you deserve." --Bilbo Baggins

fisheye

  • Guest
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #5 on: February 25, 2006, 04:24:56 AM »
Oh oh I got one...

Python for making dialogs crash inexplicably in an undebuggable manner.

Fujiwara

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #6 on: February 26, 2006, 12:56:57 AM »
By Popular request: The Calendar script!
This was written for .711, but the format hasn't changed any, so it should be .730/.731 friendly

The solar year version:

Code: [Select]
(0.0, 0, ti_once, [], [(assign,"$day",1), (assign,"$month",7), (assign,"$year",1)]),

(0.0, 24, 0, [(lt, "$day", 31)], [(val_add,"$day",1)]),
(0.0, 0, 0.0, [(eq,"$day",31),(lt,"$month",13)], [(val_add,"$month",1), (assign,"$day",1)]),
(0.0, 0, 0.0, [(eq,"$month",13)], [(val_add,"$year",1), (assign,"$month",1)]),


and the lunar year version:

Code: [Select]
(0.0, 0, ti_once, [], [(assign,"$day",1), (assign,"$month",7), (assign,"$year",1)]),

(0.0, 24, 0, [(lt, "$day", 29)], [(val_add,"$day",1)]),
(0.0, 0, 0.0, [(eq,"$day",29),(lt,"$month",14)], [(val_add,"$month",1), (assign,"$day",1)]),
(0.0, 0, 0.0, [(eq,"$month",14)], [(val_add,"$year",1), (assign,"$month",1)]),


The initial values of $day, $month, and $year can be whatever you want them to be. Enjoy!

EDIT: I also have a script that allows merchant-type characters to sell goods on the open market (so to speak) and not to city merchants, if any one is interested.
M&B: Onin no Ran - THE Japan Mod

Pythonic Module Editor

Johnny is a hacker's son
But Johnny is not 133t
What Johnny thought was ADD_AND_SHIFT
Instead was REG_DELETE

dagorkan

  • Knight at Arms
  • *
  • Fishmonger
    • View Profile
    • http://mbwiki.info
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #7 on: March 18, 2006, 04:22:18 PM »
Again, why isn't this stickied.  :?

Deus Ex

  • Elder Statesman
  • Forum Legend
  • *
  • Poor Impulse Control
    • View Profile
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #8 on: March 18, 2006, 06:03:14 PM »
Again, why isn't this stickied. :?
I don't always have the time to read EACH and EVERY thread :D

DE
What are you looking here for??  What are you looking for here??

Yoshiboy

  • Master baiter
  • Count
  • *
  • - Everything is a metaphor -
    • View Profile
    • My Website
  • Faction: Neutral
  • MP nick: irc://yoshiboy
  • M&BWB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #9 on: March 18, 2006, 09:07:26 PM »
Ok, i could try to explain how i got land and sea working, basically i will give you a short run down on how its possible, if you want something more specific look at my source:
http://www.warpmod.com/dev/YoshiBoy/pirates_v1.3_source.rar

Ok, reserved for later when i will take a shot at explaining

Raz

  • Holy Warrior
  • Language Moderator
  • *
    • YouTube - kinstrife
    • View Profile
    • Kinstrife
  • Faction: Swadian
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #10 on: March 18, 2006, 10:32:17 PM »
Wow! May I use the teleport command for holy war? (ships)

dagorkan

  • Knight at Arms
  • *
  • Fishmonger
    • View Profile
    • http://mbwiki.info
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #11 on: March 19, 2006, 12:25:04 AM »
Guys, don't spam this thread. You can use private messages.

Raybur Ravenloc

  • Regular
  • *
    • View Profile
  • Faction: Sarranid
  • MP nick: Greenwolf
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #12 on: March 24, 2006, 12:22:20 AM »
well, i was thinking it would be nice to have a page full of code snippets with small descriptions of what they do for coders to just slap in their mod
i have something like 10Mb of space for a website, i could use that, and post up whatever code modders send to me via a post here, a PM, or an email
not an HTML master, so it won't be pretty unless someone wants to show me a better example and how to update it

heres what I slapped up in about five minutes (after brushing up on HTML tags)
just used the sample fujiwara put up.. guess i should put credits to him too.. guess i will if anyone actually wants to use this, otherwise i'll just take it down
http://myweb.bloomu.edu/bpdowd/M&Bcode.htm

so what do you think? it can be changed however, this is just something i spent about ten minutes thinking about and putting up
probably would add various pages and organization if it picked up, put up the snippets in whatever format they are given to me or i am asked to put them in..

PS: i'll be away this weekend, youngest brother's first birthday in another state.. be back sunday, might have internet access once or twice between now and then
rawr

dagorkan

  • Knight at Arms
  • *
  • Fishmonger
    • View Profile
    • http://mbwiki.info
  • WB
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #13 on: March 27, 2006, 10:25:37 PM »
well, i was thinking it would be nice to have a page full of code snippets with small descriptions of what they do for coders to just slap in their mod
i have something like 10Mb of space for a website, i could use that, and post up whatever code modders send to me via a post here, a PM, or an email
not an HTML master, so it won't be pretty unless someone wants to show me a better example and how to update it

heres what I slapped up in about five minutes (after brushing up on HTML tags)
just used the sample fujiwara put up.. guess i should put credits to him too.. guess i will if anyone actually wants to use this, otherwise i'll just take it down
http://myweb.bloomu.edu/bpdowd/M&Bcode.htm

so what do you think? it can be changed however, this is just something i spent about ten minutes thinking about and putting up
probably would add various pages and organization if it picked up, put up the snippets in whatever format they are given to me or i am asked to put them in..

PS: i'll be away this weekend, youngest brother's first birthday in another state.. be back sunday, might have internet access once or twice between now and then

You should make it a wiki. Would be much better and a lot less work.

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Re: PYTHON SCRIPT/SCHEME EXCHANGE
« Reply #14 on: March 28, 2006, 12:39:22 AM »
well, i was thinking it would be nice to have a page full of code snippets with small descriptions of what they do for coders to just slap in their mod
i have something like 10Mb of space for a website, i could use that, and post up whatever code modders send to me via a post here, a PM, or an email
not an HTML master, so it won't be pretty unless someone wants to show me a better example and how to update it

heres what I slapped up in about five minutes (after brushing up on HTML tags)
just used the sample fujiwara put up.. guess i should put credits to him too.. guess i will if anyone actually wants to use this, otherwise i'll just take it down
http://myweb.bloomu.edu/bpdowd/M&Bcode.htm

so what do you think? it can be changed however, this is just something i spent about ten minutes thinking about and putting up
probably would add various pages and organization if it picked up, put up the snippets in whatever format they are given to me or i am asked to put them in..

You should make it a wiki. Would be much better and a lot less work.

Agreed, a Wiki would work best for a place to post code snippets. Why not take advantage of the Calradia.com free hosting for it?
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)