Results 1 to 12 of 12

Thread: need help from a scripting guru

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default need help from a scripting guru

    Hi There,

    I'd like to introduce a change into MTW in order to make the economics more dependent on the personal qualities of faction leaders. The idea is that a 'good' king will generate income for his faction and a 'bad' king will be a financial disaster.

    I want to do this because, in my experience, the economies of all factions just grow exponentially as the campaign goes on. It seems to me that, after 100 years or so, everyone is swimming in cash. That's OK, I guess, but I'd like to introduce a 'random' element, where a faction can go through financial ups and downs. I thought that using the faction leader's traits might be the way to go. Also, I want this to affect all factions, not just the human player's faction.

    And so, my question is:

    Is it possible to link the King's Purse to a faction leader's piety or authority rating? The idea being that a low rating means little or no extra cash, and a high rating means lots of extra cash?

    I have no skill or experience regarding scripting, so I'd need basic help with this.

    If someone could write a sample script for one faction, then I could copy it for all factions and paste it into the campaign script - would that work?

    I'm keen to get this idea moving, so any help would be greatly apreciated.

    I've heard of a script by GrnEyedDevl, which links Authority to trade income via scripting and the EDB, and perhaps this is the way to go? But I'd also be interested to know if my King's Purse idea is viable.

    Thanks in advance for replies.

  2. #2
    The Count(er)'s Avatar Protector Domesticus
    Join Date
    May 2008
    Location
    Canada
    Posts
    4,134

    Default Re: need help from a scripting guru

    there is a thread about authority related benefits talking about some scripts increasing trade bonuses as the Faction Leader has higher authority so that could get you a few ideas on how to make it work

    Edit: I found the link
    Last edited by The Count(er); July 08, 2008 at 08:36 AM.
    Quote Originally Posted by Chaigidel View Post
    everyone but me is wrong.
    Ego's are fun

  3. #3

    Default Re: need help from a scripting guru

    Hi There,

    Many thanks indeed for this - I'll check it out! But I'd still like to know if the King's Purse could be linked to faction leader traits . . .

  4. #4
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: need help from a scripting guru

    Quote Originally Posted by Javolenus View Post
    Hi There,

    Many thanks indeed for this - I'll check it out! But I'd still like to know if the King's Purse could be linked to faction leader traits . . .
    Just take that authority script and change the commands from set_event_counter to inc_kings_purse.

  5. #5

    Default Re: need help from a scripting guru

    Hi GrenEyedDvl,

    Many thanks - that's great, I'll do as you say. Just one more question: what's the correct format for increasing the King's Purse? For example, would "inc_kings_purse 2000" work? I'm just not sure of the correct format.

    And also - sorry - is the authority script in your txt file attachment good for both human and AI? Or would I have to add another set of monitors/commands for the AI? Sorry to ask what must be absurdly basic questions!

    Thanks again for your time and patience - I really appreciate your help.
    Last edited by Javolenus; July 09, 2008 at 08:53 AM.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: need help from a scripting guru

    They linked it somehow in the british isle campaign (to something else). So it should be possible.










  7. #7
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: need help from a scripting guru

    The command is:

    increment_kings_purse England 600

    you can use negative numbers if you wish.

    The authority script currently only works for the player, thats what FactionIsLocal means. You can make an identical counter that says "not FactionIsLocal" to make it work for the AI.

  8. #8

    Default Re: need help from a scripting guru

    Many thanks GrnEyedDvl - but the script in txt file attachment that I downloaded doesn't say FactionIsLocal, it says Factiontype england. Have I downloaded the right script? Really sorry to ask another question - just need to get this bit clear. Otherwise, thanks again for your help and + rep.
    Last edited by Javolenus; July 09, 2008 at 03:47 PM.

  9. #9
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: need help from a scripting guru

    lol may bad, reading too many scripts at once. You can change any of these scripts as long as you use the right syntax.

    FactionType england obviously applies the condition to england only
    FactionIsLocal applies only to the player
    not FactionIsLocal applies only to the AI

  10. #10

    Default Re: need help from a scripting guru

    Hi and many thanks for this. OK, I'll use the script that has FactionIsLocal and which specifies Authority level using = 0, = 1 and so on. Thanks again - very much appreciated.

  11. #11
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: need help from a scripting guru

    Hope it works out for you. You might want to read through both Alpacas thread and mine about scripting for beginners.

  12. #12

    Default Re: need help from a scripting guru

    Hi There,

    I tried the script but it didn't work. The game played OK, with no crashes, but the King's Purse didn't change.

    I guess I'll follow your suggestion and read your tutorial on scripting, then maybe try again. Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •