Our system of governing conquered provinces - in order to have the AI use it correctly, we have to have some way of removing the old government when the province is taken over.
I first tried the potential destroy_building command using the same parameters as the create_building but with no success.
I then tried the same approach as Myrddraal used in his campaign script for the multiple turns - simulating button clicks but there you need to know what the UI element is called. So I'm now looking for the alleged available_ui_elements.txt that may or may not have come with the demo.
But all this, of course, is reliant on the player clicking a showme button which when the trigger is something that's activated by something in the AI's turn brings its own problems.
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
Unless you incorperate it into one script that runs in the background. A scirpt that checks if the building exists and if so destroys it. I'm not sure if this is possible, but it might be...
Another question like this: Is it possible to script building construction, and make a city build a building as soon as it's captured? Maybe something to put a building in the building queue directly after the city is captured? I've just read something about create_building, what does this do?
create building makes the building appear immidiately, not put it on the building queue.
You could do this by simulating the mouse clicks again.
@ Nero
How to: Create Buildings using scripts
@ Myrddraal
Yes, of course, my head was just in completely the wrong place.
So, just to spout code randomly:
Code:declare_counter TarquiniiCaptured monitor_event GeneralCaptureSettlement FactionType romans_julii and SettlementName Tarquinii set_counter TarquiniiCaptured 1 inc_counter citiescaptured 1 terminate_monitor end_monitor monitor_conditions I_CompareCounter TarquiniiCaptured = 1 console_command destroy_building milita_barracks ; if such a command exists ;don't know if you could destroy AI buildings by mouse clicks end_monitor
Last edited by Epistolary Richard; 04-25-2005 at 15:18.
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
Bookmarks