Results 1 to 4 of 4

Thread: Script bug or not?

  1. #1

    Arrow Script bug or not?

    So today I took a look at the giant script that comes with EB. I noticed in section 10 at the end a bunch of do while loops that would effectively stop the script at the "while" loop. This would and probably is the cause of most of the "lag" that players see. I'm wondering if there is any real reason to use a loop like this?

    Code:
         console_command date 10
         console_command season summer
         set_counter seasonCounter 3
         while I_TurnNumber = 1130
    	    suspend_unscripted_advice true
         end_while
    I guess my question really is, is there a reason to turn off unscripted advice 1000 times per second other than stopping the script?

    I think if you replaced each block with a simple if test you increase performance quite a bit

    Something like this.
    Code:
     If I_TurnNumber = 1130
      	console_command date 11
     	console_command season summer
    	set_counter seasonCounter 2
    	suspend_unscripted_advice true
     end_If
    Hope this helps.
    Last edited by Xurr; 03-21-2008 at 22:46.

  2. #2

    Default Re: Script bug or not?

    I'm wondering if there is any real reason to use a loop like this?
    There must be one while loop that lasts till the end of EB timeframe.
    Without it script will run to the end and exit.

    Of course you can try different implementations of 4tpy script but you will still end up with while loop that is running all the time.

    I dont remember if we used this script from the beginning but I remember that there was no significant ( relative to current EB slowness ) slowdowns.
    It just grew over the time as we where adding more and more scripts.

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

    Default Re: Script bug or not?

    Quote Originally Posted by Xurr
    I think if you replaced each block with a simple if test you increase performance quite a bit

    Something like this.
    Code:
     If I_TurnNumber = 1130
      	console_command date 11
     	console_command season summer
    	set_counter seasonCounter 2
    	suspend_unscripted_advice true
     end_If
    Yeah, you're right. It'll have a huge impact on performance because the script will terminate almost instantly.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  4. #4

    Default Re: Script bug or not?

    Quote Originally Posted by Atilius
    Yeah, you're right. It'll have a huge impact on performance because the script will terminate almost instantly.
    Will it? Or will one of the 20 odd other endless while loops keep it going?

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