Results 1 to 10 of 10

Thread: More noobd scripting questions....

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default More noobd scripting questions....

    I'm trying to create a building system where the buildings would be destroyed if they every change hand, no matter who capture it from who.... (mostly to depict the destruction of systems whenever regions fall, obviously you can't just "repair" things like feudal fief setups.)

    I have very little clue on scripting, looking through Ultimate Document 4.0 and asking around a little I THINK what i'm attempting should be something like...

    monitor_event GeneralCaptureSettlement FactionType lithuania
    and SettlementBuildingExists = feudalism
    destroy_buildings feudalism true

    terminate_monitor
    end_monitor
    but it's not working which isn't surprising I guess, I'm not really sure what I should do though.... i'm faiiirly sure that this should be doable... but how?
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

  2. #2

    Default Re: More noobd scripting questions....

    It's more like:-
    Code:
    monitor_event GeneralCaptureSettlement FactionType lithuania
    and SettlementBuildingExists = hospital
    destroy_buildings lithuania hospital true
    end_monitor
    Use terminate_monitor only when you want to fire the script once in game.
    From EDB:-
    Code:
    building hospital
    {
        levels bimaristan great_bimaristan 
    .............

  3. #3
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default Re: More noobd scripting questions....

    feudalism is the building I added to the edb that's not the real key obviously I know how to change that around

    I talked to Rozonov and he stated that the destroy building script will destroy all the same type building in all settlements and not just one, is that confirmed ?

    For example I have a feudalism building in 3 settlement and I capture a new settlement that also have the building, if I fire this script i'll end up destroying all 4 building and not just the one in the newly captured settlement?

    I thought there use to be times when you capture settlements some buildings will be destroyed (or maybe i'm remembering the ole MTW and STW .... those certainly had that...)
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

  4. #4

    Default Re: More noobd scripting questions....

    Lol I know that feudalism is a building i should've highlighted the faction name in the destroy command as in the OP you are not using it. It's required otherwise the command won't work. And yeah this command will remove all buildings in a chain for the whole faction so not useful on what you are trying to achieve.
    And such a command is used in the Teutonic campaign for destroying taverns for Teutonic faction since it was a religious order.

  5. #5
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default Re: More noobd scripting questions....

    well it is still useful and it is what I want to achieve, what this means is that i'll basically have to make one of these building for one faction (a few might share one .. like the italian states).
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

  6. #6

    Default Re: More noobd scripting questions....

    What you can do is say make these buildings restricted in certain settlements only. Then you can re-spawn them in other settlements via script.

  7. #7
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default Re: More noobd scripting questions....

    nah.. i guess i'll just do something like...

    For example I call all the buidling Feudalism_XXX (faction)

    so Lithaunia is feudalism_lithuania

    and the script will be

    monitor_event GeneralCaptureSettlement FactionType lithuania
    and SettlementBuildingExists = feudalism_england
    or SettlementBuildingExists = feudalism_scotland
    or SettlementBuildingExists = feudalism_france
    or SettlementBuildingExists = feudalism_hre

    destroy_buildings lithuania feudalism_england true
    destroy_buildings lithuania feudalism_scotland true
    destroy_buildings lithuania feudalism_france true
    destroy_buildings lithuania feudalism_hre true

    end_monitor
    and obviously make one for every faction.

    I had wanted to eventually make one for each faction anyway, I guess this just force me to get to that sooner than i'd hoped
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

  8. #8

    Icon1 Re: More noobd scripting questions....

    RollingWave: You don't really need to worry about testing for the building:
    Code:
    	monitor_event GeneralCaptureSettlement FactionType lithuania
    		destroy_buildings lithuania feudalism_england true
    		destroy_buildings lithuania feudalism_scotland true
    		destroy_buildings lithuania feudalism_france true
    		destroy_buildings lithuania feudalism_hre true
    	end_monitor
    Or you could do something like this:
    Code:
    	monitor_event FactionTurnStart FactionType lithuania
    		and FactionBuildingExists >= bimaristan
    		destroy_buildings lithuania hospital true
    	end_monitor

  9. #9
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default

    yeah.. but I want it to be destroyed on conquest...

    heh, I tested it, for some reason if I go with capturesettlement it'll destroy the onces I have... except for the onces in the settlement I actually capture... woops, guess using FactionTurnStart is indeed a better idea
    Last edited by Ishan; March 08, 2011 at 11:51 PM. Reason: double post
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

  10. #10

    Icon1 Re: More noobd scripting questions....

    Quote Originally Posted by RollingWave View Post
    heh, I tested it, for some reason if I go with capturesettlement it'll destroy the onces I have... except for the onces in the settlement I actually capture... woops, guess using FactionTurnStart is indeed a better idea
    One thing to keep in mind when using the ‘destroy_buildings’ command is that it will destroy all buildings in that chain across the entire faction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •