Can anyone tell me how I might add a building to a settlement in a campaign before the player has his turn - but using a script? It is a descr_strat script, but I am not sure of the coding. Thx.
The coding is:
Note that "settlement name" in this case is the name that appears on the map in-game.Code:console_command create_building [settlement name] [building level id]
It should work from a DS script. I use it in XGM to do some AI balancing at campaign start. There are some limitations. You can't upgrade buildings (it has to be a type that doesn't exist in the settlement yet) and you can't add things that would be visible on the strat map like walls, roads, or ports.
Does it do all levels of buildings in a tech tree if they are all set at the same settlement level?
The test I am using is seeking to add a new building (i.e. one created by us) - which has no prior tree level present - to a village; the tech tree being keyed to the village level.
So, to recap, I have:
script
script.txt
at the end of the DS file. And then the script.txt is in the same folder as DS (this is a provincial campaign), that file being a single line as:
console_command create_building [settlement name] [building level id]
The settlement name is recognised as I added population to it in the RomeShell. I have tried various alternatives such as putting "script" and "end script" in and alos the tech tree level as well as just the level codename of the building. I even tried it without the console_command prefix.
There is no recognition by the game of this script.
I should confess I am not a scripter and do not intend to use scripts for anything but small tasks where they are essential to the game - no doubt just these campaign scripts for initial game set up. All the tutorials seem to be on all the other types of scripting :(
Maybe now someone can see what I may be doing wrong.
Okay, campaign scripts can be a little fiddly:
Your script file should look something like:
Note it does not need the 'script' command at the beginning as it would with a show_me script.Code:console_command create_building Londinium muster_field console_command puppify_my_love end_script
Also, and I don't know why this is, leave a few blank lines at the bottom of your DS file and at the top of script.txt.
As for creating stuff in a village - you can put anything anywhere using a script - you can put a Royal Barracks in a village if you want. The only thing you have to be careful of is buildings that affect the look of the campaign map (governor houses, roads, ports, walls), some of these cause problems.
Last edited by Epistolary Richard; 04-14-2006 at 10:58.
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