The condition IfRegionOneOf takes the parameter region_id:
In most cases, I've seen that supplied as a number. Where do I find the number?Code:IsRegionOneOf 77
The condition IfRegionOneOf takes the parameter region_id:
In most cases, I've seen that supplied as a number. Where do I find the number?Code:IsRegionOneOf 77
Surely in some files in the data folder, evem if I don't remember which ones. but you can also launch the game, put the console command
show_cursorstat
and it will show position of the mouse (x,y) AND the Id of the region you're on.
descr_regions.txt in the base folder, sorry mis-read.
anyway to answer your question:
It is to do with how the map is created (map.rvm), the map is created from left to right, top to bottom and then depends on where the actual settlement is located in that order.
For example the settlement in the top left if it is the highest up, will be number 1, then the settlement bottom right if it is the lowest will be 199, or your max number of amount of regions!
Last edited by danny X; October 15, 2011 at 07:33 PM.
erasmus777: You can just use the region's name instead of its number with the ‘IsRegionOneOf’ condition. The advantage of using a region's name is that, if you add a region, you won't need to rewrite your script:
Spoiler Alert, click show to read:
I don't think the "IsRegionOneOf" works properly with the region name (London_Province).
Apparently not. While either the id or region name works in script, only the id works in export_descr_ancillaries.txt and export_descr_character_traits.txt. Using region name in those files silently fails: no log errors and the condition evaluates to false so the anc/trait is not acquired.
Yup. The real trick for me will be remembering that I need to re-check all of my IsRegionOneOf conditions whenever I make map changes.