Results 1 to 26 of 26

Thread: Scripting

Hybrid View

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

    Default Re: Scripting

    Thanks for the response guys, cleared it up. Given the advantages I have read about, scripting definately seems the way to go.

  2. #2

    Default Re: Scripting

    For us idiots, what is a script and how does it impact gameplay?
    "Great spirits have always encountered violent opposition from mediocre minds." -Einstein

    Quote Originally Posted by Pannonian View Post
    The Backroom is the Crackroom.

  3. #3

    Default Re: Scripting

    Basically, a script is a bunch of code which is designed to impact gameplay. It makes things appear, change, disappear and act/react in certain ways. Depending on the game, scripting can either be very limited or very comprehensive.

    Age of Empires 2, for example, had a series of Single Player objectives in each level of its campaign. Upon completion of these objectives, events would take place, like text messages, scrolling to view a different area, gifts of resources or units, or even beating the level entirely. These would be written into a script, which is read by the program and interpreted (if written properly) into the desired effect.

  4. #4
    Probably Drunk Member Reverend Joe's Avatar
    Join Date
    Mar 2005
    Location
    Up on Cripple Creek
    Posts
    4,647

    Default Re: Scripting

    I think it's a program that helps the campaign AI do stuff.

  5. #5

    Default Re: Scripting

    I see. So it is a set of conditions in the campaign.

    Once conditions are met, the game recognized a signal that goes from "off" to "on", which triggers an event. Is that correct?
    "Great spirits have always encountered violent opposition from mediocre minds." -Einstein

    Quote Originally Posted by Pannonian View Post
    The Backroom is the Crackroom.

  6. #6
    EB Jr. Traiter Member kayapó's Avatar
    Join Date
    Aug 2005
    Location
    EB Traiting Factory.
    Posts
    565

    Default Re: Scripting

    Quote Originally Posted by Divinus Arma
    I see. So it is a set of conditions in the campaign.

    Once conditions are met, the game recognized a signal that goes from "off" to "on", which triggers an event. Is that correct?
    Yes.

    But keep in mind the "conditions" are limited by the game engine. It's not like we are free to create any kind of condition. And the effects are also limited.
    Worshiper of therother.

  7. #7

    Default Re: Scripting

    It was brought up a little while ago that scripting is even more limited in RTW than other programs because there is no "or" function. I can't even begin to imagine how much more coding must be done to cover all the options that a few "or" lines would easily accomplish.

    Kayapó, are you really a pagan?

  8. #8
    EB Jr. Traiter Member kayapó's Avatar
    Join Date
    Aug 2005
    Location
    EB Traiting Factory.
    Posts
    565

    Default Re: Scripting

    Quote Originally Posted by NeonGod
    Kayapó, are you really a pagan?
    Well, yes...
    Worshiper of therother.

  9. #9
    Spends his time on TWC Member Simetrical's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    1,358

    Default Re: Scripting

    Quote Originally Posted by NeonGod
    It was brought up a little while ago that scripting is even more limited in RTW than other programs because there is no "or" function. I can't even begin to imagine how much more coding must be done to cover all the options that a few "or" lines would easily accomplish.
    Well, not precisely. "or"s do exist, they just can't be nested. So you can say "X or Y", "X or Y or Z", or "X and Y and Z" and probably have it work right, but "X or Y and Z" and "X or not Y and Z" are chancy. There are other absences that are really more important; chiefly, there are sharp limitations on what triggers, conditions, and commands are available to us, but there are other omissions glaring from the point of view of a proper scripting language.

    First, probably most importantly, there are no proper variables―not ones that can take their input from a trigger event or have their contents used for a command, so basically only settable and checkable in conditionals, and even those only in the script file (no checking them in the building files, say). There are no nested conditionals, as mentioned. A lack of "for"s goes without saying. Plus, of course, there's the business of being unable to restart the script automatically upon game load.

    All this means that the season-change script (for instance) is thousands upon thousands of lines, although that's more due to a lack of reasonable variables than anything. One trigger per turn in the game, I believe, from the first up to some arbitrary point or another. The building files, too, are staggeringly large to account for comparable limitations in those files' conditionals. Fortunately we haven't noticed any slowdown from any of this.

    Anyway, the basic point is that the RTW scripting language was not intended to be used for anything beyond the prologue and "show me how" scripts. These purposes were by nature not particularly demanding, they didn't have to account for unpredictable conditions, and we have to live with that. A shame, really.
    Quote Originally Posted by kayapó
    I don't agree with everything that is said there . . .
    Then edit it.
    TWC Administrator

    MediaWiki Developer

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