
04/11/2009, 16h47
|
 |
Ronald Reagan du QG
|
|
Date d'inscription: août 2005
Localisation: Höchlstr.2 8000 München 80
Messages: 5 300
|
|
For the Glory Carnet 10
Citation:
Hello everybody, and welcome to our tenth development diary for ‘For the Glory’ (FTG).
We’ll start today with a few more useful additions to the script engine.
It is often useful for a command to target provinces in a specific area, but until now the only control a modder had was to use the -4 target to get a random province in the Americas. So we extended this to its logical conclusion: since continents, regions, and areas are defined in geography.txt with unique IDs, we subtract the ID from -1000 to target a random province in that place (the -1000 is to avoid collisions with -1 and so forth). That sounds more complicated than it really is, so let's take an example.
To refresh your memory, here is what a continent entry looks like:
Code:
continent = {
id = 5
tag = "Oceania"
name = "CON_Oceania"
culture_change = yes
whiteman_penalty = yes
popgrowth_island_colony = 0.00
popgrowth_continent_colony = 0.00
popgrowth_penalty = no
cot_assign_penalty = no
combat_overrun = no
badboy_penalty = yes
hre_election = no
available_mercenaries = no
vp_first_establishment = 5
}
So if a modder wants to simulate early migration to Oceania, the command would be:
Code:
command = { type = poppercent which = -1005 value = 5 }
Want to help the French AI explore Canada? Take this:
Code:
area = {
id = 138
tag = "Grand Lacs"
name = "AREA_Grand_Lacs"
type = land
vp_discover_first = { desc = "SPEC_GREATLAKE" province = any value = 10 }
}
and make this:
Code:
command = { type = discover which = -1138 }
(As a side note, the -1 target is special for the discover command: since discovering a random province anywhere in the world wouldn't be very useful, the -1 target only applies to provinces adjacent to a province that is already known.)
Since that change frees up the special -4 target, we decided to put it to good use: -4 now targets any province or country which was not already randomly selected in the same action. To make this clearer, consider an action like this:
Code:
action_a = {
name = "OK"
command = { type = relation which = -1 value = 25 }
command = { type = relation which = -4 value = 25 }
command = { type = relation which = -4 value = 25 }
}
}
Using the -4 target prevents the same country from being selected more than once here. This is a trivial example, but it can come in quite handy with, say, conversion or fortifications.
Finally, the previously-unused -5 target now refers to the capital of the receiving country, and -7 targets a random elector.
To whet your appetite a little further, here are a couple more event pictures:

Another screenshot with enhanced city view under the snow:

I am playing Russia. Poland and Saxony are my allies in a war with Sweden. You can see the AI doesn’t try to siege with more than is really necessary. By the way, did I mention siege sprites are related to countries and tech levels?
Enough of winter, let’s go into warm water now:


Lastly, let’s talk about mods. You know mods can be selected in the Settings screen. There is also a shortcut in the start menu:

AGCEEP was the last-used mod, but there is no need to reload the game when choosing a different mod or reverting to standard scenarios.
The above list only shows mods that are bundled with the game, but beta testers who are also modders have worked very hard, and several mods will be available very soon. In fact, my own list is not really empty already...
|
__________________
Bon... J'ai peut-être fait quelques petites concessions...
|