Results 1 to 6 of 6

Thread: Scripting Question

  1. #1
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

    Default Scripting Question

    Hello Scripting Gurus!

    A small question here about scripting, I went through some Scripting guides here, but I am affraid I am not catching the essence of the reason of scripting...

    So I thought to ask directly..

    Is it possible to make some behavior happen following a presice action?

    For instance, would it be possible to have some province rebel, trigered by the conquest by a certain faction of another province?

    Exemple:

    lets say that the germans have advanced in to Britain, and captured a couple of provinces, but not the Britons Capital, in subsequent turns the germans advance and lay siege and then capture the Capital of the Britons (the britons still have another province so this does not eliminate their faction)...yet the initially captured Provinces Rebel against their new masters in a last ditch effort to overthrow the germans from their territory and outraged by the capture of their Capital city...

    Is it possible to script triggers like that?
    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

  2. #2
    Member Member Dromikaites's Avatar
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    151

    Default Re: Scripting Question

    Quote Originally Posted by Suraknar
    Hello Scripting Gurus!

    A small question here about scripting, I went through some Scripting guides here, but I am affraid I am not catching the essence of the reason of scripting...

    So I thought to ask directly..

    Is it possible to make some behavior happen following a presice action?

    For instance, would it be possible to have some province rebel, trigered by the conquest by a certain faction of another province?

    Exemple:

    lets say that the germans have advanced in to Britain, and captured a couple of provinces, but not the Britons Capital, in subsequent turns the germans advance and lay siege and then capture the Capital of the Britons (the britons still have another province so this does not eliminate their faction)...yet the initially captured Provinces Rebel against their new masters in a last ditch effort to overthrow the germans from their territory and outraged by the capture of their Capital city...

    Is it possible to script triggers like that?
    It is possible to make most of the things you want but depending on how you want it the code can be very simple or very complicated.

    If you want that cities A and B revert to the Britons if city C is conquered and the Brits still have other cities left, then this is not so difficult to script.

    If you want that all the cities ever controlled by the Britons (that is, also the Briton conquests, not only their starting cities) to revert back to them in case city C is conquered, this is still possible but you need to create a permanent record of the cities controlled by Britons. You can do that by marking those cities with a special building ("owned_by_britons"). I am not sure if the AI razes buildings so I cannot tell if this method is 100% reliable.

    Now you should also keep in mind that the capital location can change. So if you want the revolt to happen when the current capital is conquered, then you need a way to record which is the current capital. If Britons are played by humans then you need a special building ("Capital") and a house rule that says:
    1. Build the special building "Capital" in your capital city
    2. When you change your capital raze the building from your former capital and build it in the new capital.

    Unfortunately this metod can't work if AI plays the Britons.

  3. #3

    Default Re: Scripting Question

    I think Dromikaites hit it right on the head: yeah, the idea is very possible (and not that hard to do), given that the assumption that the capital doesn't change.

  4. #4
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

    Default Re: Scripting Question

    Ahh Thank you!

    Alright lets simplify here. And I appreciate any help in the area of scripting - I am complete Ignorant when it comes to that hehe...

    Lets take 3 Cities

    A-B-C

    How would I go about scripting the condition and triger (what files?), so that when city A is conquered by a specific faction, the cities B and C revert to that Faction?

    Thank you much for any help!
    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

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

    Default Re: Scripting Question

    Quote Originally Posted by Suraknar
    Ahh Thank you!

    Alright lets simplify here. And I appreciate any help in the area of scripting - I am complete Ignorant when it comes to that hehe...

    Lets take 3 Cities

    A-B-C

    How would I go about scripting the condition and triger (what files?), so that when city A is conquered by a specific faction, the cities B and C revert to that Faction?

    Thank you much for any help!
    .
    Ahh, reminds me the Heavy War Galleon mutinying and joining Nicholas when he sinks the Frigate off Costa Sinistra. Good mods live many lives.
    .
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

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

  6. #6
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

    Default Re: Scripting Question

    Hello HB :)

    Yes a bit like that I guess, I just want to learn the possibilities of scripting here, if someone is willing to share their knowledge on the subject.

    I mean I read the Scripting threads, one lists the triggers, the other tells how to send ready commands to the console. While both are good threads, I see the latter as a way of making custom cheats...which is not bad considering that it is a begining of exploration of what is possible or not, but in both cases I am not knowledgeable enough to turn this information in to something functional in game...in the sence that it is part of the gameplay of a given mod...

    Hence, this thread to ask help...
    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

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