Results 1 to 30 of 33

Thread: Scripting problems

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Scripting problems

    Not quite, most programing/scripting language make a choice about they want their language to "shortcut" and/or connectors by default, which only evaluate extra conditions if required.

    Take VB for example it doesn't use shortcut connectors if you use a simple OR between condition, you need to use ORELSE in order for it to shortcut the condition after it. Meanwhile c/c++ users are typically taught to use the shortcut && and || by default. So really it may or may not be impelemented as a shortcut connector and unless you check you really don't know.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  2. #2
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Scripting problems

    thanks for responses

    though Squid, you lost me after first paragraph!

    Re Red Spot's earlier question
    also GarrisonSettlementRatio < 0.8, does that work??
    not so sure it does now, it seemed to be when I first tested it but have gone back to test on a simple end of settlement turn trigger and it now doesn't seem to be doing anything.

    EDIT: think we might be using the wrong bit for that docudemon entry is
    Identifier: GarrisonToPopulationRatio
    Trigger requirements: settlement
    Parameters:
    Sample use: GarrisonSettlementRatio > 0.35
    Description: Calculate the ratio of soldiers to civilians
    Battle or Strat: Strat
    Class: GARRISON_TO_POPULATION_RATIO
    Implemented: Yes
    Author: Guy
    writing it as
    and GarrisonToPopulationRatio < 0.1
    definitely works and goes on straightforward ratio, eg: if population is 5000 that will only trigger if less than 500 men are in the garrison troops.

    .....goes away to re-design script again......

    EDIT 2: just realised; that makes most sorts of calculation useless unless you also set it according to which unit size user is using.
    Last edited by Makanyane; 12-20-2007 at 17:22.
    Not used mods before? Looking for something small and fun?!
    Download the:

  3. #3
    EB Traitor Member BozosLiveHere's Avatar
    Join Date
    Jan 2006
    Location
    Uqbar, Tlön
    Posts
    3,662

    Default Re: Scripting problems

    That's why we have the UnitSize trait and scripts in EB. Check our campaign_script to see how we handle it.

  4. #4
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Scripting problems

    Might as well post this here - does anyone know how to create a new advisor message that will appear without having to click the advisor portrait first? I've never really looked into this area much. Everything works fine, but that advisor will not open automatically. If I change the verbosity to anything other than 0 it does not appear at all when triggered...I just cannot see any difference between my version and those that do open automatically...

    I will post the code if necessary.
    "One of the most sophisticated Total War mods ever developed..."

  5. #5
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Scripting problems

    Quote Originally Posted by Dol Guldur
    Might as well post this here - does anyone know how to create a new advisor message that will appear without having to click the advisor portrait first? I've never really looked into this area much. Everything works fine, but that advisor will not open automatically. If I change the verbosity to anything other than 0 it does not appear at all when triggered...I just cannot see any difference between my version and those that do open automatically...

    I will post the code if necessary.
    I have the same problem, but sometimes the message is open and sometime (the most) not. From my experience it seems to me that it is not possible to do it when the advisor appears at the faction turn start, and I feel that it is due to some interference of the incoming faction messages (the images falling from the top). When the advisor appears directly after some event or circumstances (city captured, for example) then the message appears with the typical simulate click orders.

  6. #6
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: Scripting problems

    Quote Originally Posted by Monkwarrior
    From my experience it seems to me that it is not possible to do it when the advisor appears at the faction turn start...
    That's been my experience also.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  7. #7
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Scripting problems

    I've seen mods load background scripts on reloads at turn-start where the text automatically appears with the advisor (and disappears again). How is this done?
    "One of the most sophisticated Total War mods ever developed..."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO