Results 1 to 20 of 20

Thread: Script Activation

  1. #1

    Default Script Activation

    Can you play without activating the script? and what would be the difference?

  2. #2
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Default Re: Script Activation

    .
    EB without the script is vanilla on a new map with new units.
    .
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  3. #3

    Default Re: Script Activation

    Even worse than that. The AI on its own cannot handle the high upkeep costs and managing the economy too well.

  4. #4
    WotD 2D graphic Dude Member Gebeleisis's Avatar
    Join Date
    Apr 2007
    Location
    Cluj-Napoca , Transylvania , Romania
    Posts
    427

    Default Re: Script Activation

    well i was wondering the same thing

    what does the script actually do?

  5. #5
    Ming the Merciless is my idol Senior Member Watchman's Avatar
    Join Date
    Aug 2004
    Location
    Helsinki, Finland
    Posts
    7,967

    Default Re: Script Activation

    Lots. For the most part, it's what makes EB, EB.
    "Let us remember that there are multiple theories of Intelligent Design. I and many others around the world are of the strong belief that the universe was created by a Flying Spaghetti Monster. --- Proof of the existence of the FSM, if needed, can be found in the recent uptick of global warming, earthquakes, hurricanes, and other natural disasters. Apparently His Pastaness is to be worshipped in full pirate regalia. The decline in worldwide pirate population over the past 200 years directly corresponds with the increase in global temperature. Here is a graph to illustrate the point."

    -Church of the Flying Spaghetti Monster

  6. #6

    Default Re: Script Activation

    Just look at the TOC of that file... A massive lot of stuff.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  7. #7
    WotD 2D graphic Dude Member Gebeleisis's Avatar
    Join Date
    Apr 2007
    Location
    Cluj-Napoca , Transylvania , Romania
    Posts
    427

    Default Re: Script Activation

    aha ok thx

    was wondering :D

  8. #8

    Default Re: Script Activation

    I've noticed that not activating the script the game runs much faster. I just can't play it, because it takes ages roughly 3-4 minutes for all the other factions to do their thing after you hit end turn. Just annoys me :(

  9. #9

    Default Re: Script Activation

    Quote Originally Posted by Starance Quintus
    I've noticed that not activating the script the game runs much faster. I just can't play it, because it takes ages roughly 3-4 minutes for all the other factions to do their thing after you hit end turn. Just annoys me :(
    That's because the script is a beast. There's so many things that it does in-game that slow-down is an inevitable price for the features you get in return.

  10. #10
    Ambassador of Bartix Member Tiberius Nero's Avatar
    Join Date
    Dec 2006
    Location
    Isca Dumnoniorum
    Posts
    328

    Default Re: Script Activation

    Quote Originally Posted by Starance Quintus
    I've noticed that not activating the script the game runs much faster. I just can't play it, because it takes ages roughly 3-4 minutes for all the other factions to do their thing after you hit end turn. Just annoys me :(
    True, but you are not playing EB, if you don't activate it.

    Your pick.
    Last edited by Tiberius Nero; 02-16-2008 at 06:07.
    Wow, got 3 ballons in one fell swoop

  11. #11

    Default Re: Script Activation

    Or you can go back to a smaller EBBS script size by going here.

    https://forums.totalwar.org/vb/showthread.php?t=96967

    You're really waiting 2 or 1 minute extra so that the AI and yourself can use client rulers. That's not something I was willing to do just so I could hire generals that couldn't move out of a city, in addition to the fact that I don't think the AI even uses gov4 that often.

    The script handles the four season script that extends the lifetime of your generals. A major issue if you don't run the script, since it shortens your family members' lifespan by 1/2. The script also handles reforms of the various factions including population replenishment and money scripts. There's a table of contents in the script file if you wish to know more.
    Last edited by Ymarsakar; 02-22-2008 at 02:10.

  12. #12
    EBII Mod Leader Member Foot's Avatar
    Join Date
    Apr 2005
    Location
    Brighton, East Sussex, England (GMT)
    Posts
    10,736

    Default Re: Script Activation

    The puppet ruler script only runs if a gov4 is built on the map somewhere, seeing as Ai never does the only time the monitor is fired is if the player does so. So really it doesn't add very much to load times at all.

    Foot
    EBII Mod Leader
    Hayasdan Faction Co-ordinator


  13. #13

    Default Re: Script Activation

    <B>The puppet ruler script only runs if a gov4 is built on the map somewhere</b>

    And how do you think the game knows when a gov4 is present in a city? And how does the script know to not just endlessly spawn generals for a city?

    The answer to the first is that the background script is constantly checking every city on the map for a gov4.

    The answer to the second is that each city has its own uniquely named client ruler general, that the game "also" checks for in the script. For every city on every turn.

    The size of the client ruler portion of the background script in relation to the rest, is 5 megs of client ruler to 6 megs of the rest of the script.

    In the end, you get around a 50% increase in AI turn speeds by reducing the script size down, and the most convenient way to do it is to remove the client ruler portions that are checking every city on the map.

  14. #14
    EB annoying hornet Member bovi's Avatar
    Join Date
    Jan 2007
    Location
    Norway
    Posts
    11,796

    Default Re: Script Activation

    Code:
    monitor_event BuildingCompleted SettlementBuildingFinished = gov4
    and SettlementName G&#225;wj&#225;m~Sk&#225;ndz&#225;w&#225;rjoz
    Foot is right here, the code only checks when a building is made, not every turn. However, the sheer size of the puppet ruler script (roughly 175000 lines, 40% of the EB script, or 5MB, depending on how you want the figure) seems to cause some slowdown in itself.
    Last edited by bovi; 02-25-2008 at 02:06.

    Having problems getting EB2 to run? Try these solutions.
    ================
    I do NOT answer PM requests for help with EB. Ask in a new help thread in the tech help forum.
    ================
    I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. - Stephen Hawking

  15. #15

    Default Re: Script Activation

    There's no way the script can know when to activate unless something in the game is checking for monitor conditions. The script is running all the time, but I don't know how fast it loops on itself.

    So, it doesn't trigger every turn unless the conditions are met, but game resources are still used up, for every city according to every monitor condition set, for every AI faction turn and human turn.

    As I've noticed with the background script that detects foreign governments in cities I have conquered for it to destroy, it doesn't take effect until some seconds have passed. It's not too much to extend that logic to a script almost twice as long, that the script must take game resources and time for it to run, even if the conditions in the script are not activated.

    Logically speaking, a script has to check every turn otherwise it won't know when the conditions have been met. And this applies to every AI faction, even if the script does not apply to them, but only apply to the human player's actions.

    Usually the code for the game engine takes care of the many variables and conditions, but that's hard coded for RTW in its source code, I believe.

  16. #16

    Default Re: Script Activation

    I take it you don't have any programming experience yourself? Specifically in object-oriented languages such as Java, JavaScript ?

    If, you have ...
    Spoiler Alert, click show to read: 
    Suppose you were to create your own custom 'events' which are very generic: such as BuildingCompleted. Now, each building could fire such an event and does so by notifying a 'Listener' - sending the listener an object containing : source (sender), type of event, additional data (settlement location etc. etc.). Then suppose you were to write a parser of a script. If that parser were to wrap monitor objects around specific conditions, and a monitor object were to have a listener attached and some method to catch events and subsequently evaluate it 'trigger' condition...

    You would have 199 objects rather than 199 times 21 evaluations. So at the cost of some serious RAM you gain a lot of speed. Depending how abusive your script is, this cost of RAM is not so serious at all -- but the run time execution of the code is far superior to that of a lineair evaluation of each scripted statement.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  17. #17

    Default Re: Script Activation

    I never took the time to learn anything about any of the object oriented languages. While your point is valid, that parallel processing has advantages over serial processing, are you then forwarding the proposal that the slow down in AI turn speeds is due to increased usage of ram by the script being parsed?

  18. #18

    Default Re: Script Activation

    Well, not as much parsing (that's what's being done upon loading a campaign from a save...) but rather the simple fact that once created the objects just sit iddle for most of the time in the RAM. RAM that otherwise is not being used, hence the effective 'calculating' power of your PC is lowered because the schedule for the CPU is limitted to what the RAM can cope with.

    If say 200KB of RAM is being used for simply storing all the objects then your effective RAM drops by roughly 20% if you have only 1024MB to spare... Don't think 200KB is particularly heavy for an object oriented language - in fact the concept of object oriented languages dates to roughly the early 80's but the resources required to implement it, meant that only in the later 90's (512 MB of RAM being available) such languages really took off. And Object oriented databases (webdatabases revolving around XML records for instance) are still a thing of the future: for now all major vendors simply assume you use the Relational model, though support for XML is available... Reason? The comparatively heavy memory demand of anything object oriented, doubly so with databases.

    In return you get better code: that is, easier to maintain especially when bugfixing comes into play. (You get the ability to program nearly everything only once in an entire program, and throughout the rest of your code you can simply refer back to the code you need...)
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  19. #19
    Ming the Merciless is my idol Senior Member Watchman's Avatar
    Join Date
    Aug 2004
    Location
    Helsinki, Finland
    Posts
    7,967

    Default Re: Script Activation


    ...I dun get it. I'll just assume you have succesfully reversed the polarity on it and be glad I don't need to understand that stuff.
    "Let us remember that there are multiple theories of Intelligent Design. I and many others around the world are of the strong belief that the universe was created by a Flying Spaghetti Monster. --- Proof of the existence of the FSM, if needed, can be found in the recent uptick of global warming, earthquakes, hurricanes, and other natural disasters. Apparently His Pastaness is to be worshipped in full pirate regalia. The decline in worldwide pirate population over the past 200 years directly corresponds with the increase in global temperature. Here is a graph to illustrate the point."

    -Church of the Flying Spaghetti Monster

  20. #20
    Not Just A Name; A Way Of Life Member Sarcasm's Avatar
    Join Date
    Jan 2005
    Location
    Olissipo, Lusitania
    Posts
    3,744

    Default Re: Script Activation

    I'd hit it with a tachyon beam.



    We are all in the gutter, but some of us are looking at the stars

    -- Oscar Wilde

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