• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

MichaelM

For the Glory lead
10 Badges
Jun 30, 2004
3.978
343
crystalempiregames.com
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • For The Glory
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • 500k Club
Get it in the Tech Support forum (requires registration of your game copy).

Changes since 17 November:

- Fixed bug with in-game load/save dialog preventing any saves when not using a mod.
- Fixed bug causing settings.txt to be written out to the mod's directory when a mod is selected, preventing the game from finding it on the next start.
- Fixed bug causing fleets with high attrition to return to a port which is not the closest.
- New AI parameter: ignore = { }, which prevents the AI from targeting any province in that continent/region/area for colonization.
- New command target: which = -10/overlord (equivalent)
- New command: type = ai_add which = <list> value = <value>, where <list> is one of the lists used in AI files (currently continent, region, area, ignore, and combat).
- New command: type = ai_rem which = <list> value = <value>, same as ai_add.
- New command: type = ai_set which = <name> value = <value>. <Name> can be any AI non-list preference, or garrison.<subtype> or conquest.<subtype>.
- New event option: hidden = yes, which prevents an event which happens to another country (even a network player) from appearing in the player's log.
- New trigger: emperor = { }, which shifts the scope of the contained triggers to the current HRE.
- New trigger: overlord = { }, which shifts the scope of the contained triggers to the receiving country's overlord (with an implicit "isvassal = yes").
- New define: _MER_CAVALRYAFTER_OFFSET_ to govern when mercenary companies can include cavalry. By default it is set to 0, allowing them from game start.

Post feedback here!
 
Last edited by a moderator:
Awesome work, Michael, really appreciated.

New trigger: emperor = { }
So, this might be a kind of dumb question, but what values should be put between those brackets? Will -1 work?

And all those AI options are really great but I think we still lack some kind of tutorial how to write a decent AI file...
 
Oh wow. This is awesome!

Edit:
So, this might be a kind of dumb question, but what values should be put between those brackets? Will -1 work?
If this is what I think it is, then you can put triggers inside those brackets and they will be checked for the country that is currently emperor.
 
Last edited:
Nein said:
Hopefully your efforts will keep this game alive forever.

I dislike doing that but fixed that for you. ;)

Ah damn, I'm so much in Darkest Hour now, but Michael the Man, he keeps going! Who knows, maybe at this rate we'll get something magical for Christmas?

Thanks Michael.
 
Feedback: Not sure if this is new, but it seems that only country-specific events with a description give message popups when they happen to other countries. Possibly a side effect of implementing the hidden = yes/no parameter?

Also, when you surrender and start a new game, the minimap isn't updated with the knownprovinces from the scenario.

Edit: The commands ai_add, ai_rem and ai_set seem to work fine, with two exceptions:
- In events that trigger at the beginning of the scenario, i.e. right when AI files are loaded, only the ai_add command works. I thought this might be due to events being fired before AIs are loaded, but then the ai_add command shouldn't work either, right?
- The command ai_add writes items into lists even if they already exist there, and the command ai_rem only removes one instance.


I'll test AI colonisation (no land connections and ignore list) later; so far everything else seems to work great.
 
Last edited:
As always I will quote my favorite change:

- Fixed bug causing fleets with high attrition to return to a port which is not the closest.New AI parameter: ignore = { }, which prevents the AI from targeting any province in that continent/region/area for colonization.

Good work! :)
 
So, I've tested the colonisation AI a bit, and while the AI does now indeed seem to be confined to the same rules as human players, the ignore list is kind of weird. I wrote a simple event to add all continents to the ignore lists of all countries, and checked the savegame to make sure everything looked as it should. (Side note: I had an "ai = yes" condition in the trigger but the event didn't fire for NAT, PIR and so on, which is actually fine, but I thought since the last patch these countries were considered AI countries? Slightly confused here.)

Then, I let the game run and observed two things:
- After having discovered Cuba and Haiti (the colonisation areas as defined in the AI file) Spain sent Columbus along the Brazilian coast south towards Cape Hoorn. I checked ai_info.txt to find the destination, which turned out to be the Bering Strait, and indeed a few months later Columbus discovered the Bering strait. The same thing with Portugal's Vasco da Gama, except he went the other way round. I noticed a white PTI spot in that province, and saw in province.txt that province 0 ("PROV_Terra_Incognita") did not have a continent assigned (in Watkabaoi). I gave the province a continent but this didn't make any difference. I then tested the same thing in vanilla, and it took a little longer (presumably because SPA has more areas and regions in their expansion lists) but by 1500 Columbus had discovered the Bering Strait. On both maps the PTI spot is there, but the province is also the first listed sea province, maybe that's got something to do with it?
- Spain tried to establish trading posts along the Brazilian coast and also in Senegal; neither of which was listed in expansion lists or had provinces that were Spain's ToT cores.

These are the events I used to fill the ignore lists:
Code:
event = {
	id = 50010000
	country = MUS
	action = {
		command = { type = setflag which = strict_col }
	}
}
event = {
	id = 50010001
	persistent = yes
	hidden = yes
	trigger = {
		MUS = { flag = strict_col }
		NOT = {
			flag = ignore_all
			tag = MUS
		}
		ai = yes
	}
	deathdate = { year = 1999 }
	action = {
		command = { type = ai_add which = ignore value = Africa }
		command = { type = ai_add which = ignore value = America }
		command = { type = ai_add which = ignore value = Asia }
		command = { type = ai_add which = ignore value = Europe }
		command = { type = ai_add which = ignore value = Oceania }
		command = { type = setflag which = ignore_all }
	}
}


On an unrelated note, after restarting FtG I randomly got a message that some army sprites were missing, which is great, but I don't understand why this didn't happen right away?


Also, events with random triggers now seem to fire properly. No need for a new RNG. :)


Edit: In a vanilla test run I just noticed this:

screensave00006xqcx6.png


I'm pretty sure something went wrong there. Maybe Russia started building trading posts from Yanin towards Ekimcan and then lost at least three of them to natives? It's only been like 20 game years, though... :confused:


Also, with the relocation of settings.txt (which was very annoying because it created two duplicates in the mod folder and in documents and didn't even copy the contents of the original file) I first couldn't start more than 3 instances simultaneously (I have a batch file that tries to start 8 instances) because the others reported errors when attempting to access config.ftg. Closing all instances and running the batch file again, I could start 5 instances with 3 errors; the next time I tried all 8 instances started, but half of them had no mod specified and I saw that the settings.txt in documents had the mod folder (and only the mod folder) reset. I changed it back and everything started up fine, but while attempting to start a scenario, the second instances had a critical error: Access denied while opening file gfx\goods\small\small_empty.bmp. This is a new good type I had created long ago, and apparently I forgot to also create a small image for it. I copied an image from vanilla and renamed it, and the next time I ran the batch file 5 instances immediately reported they couldn't access "T-ARMY C-ABB A-FIRE D-NE L-1.spr" which definitely exists, but is alphabetically the first army sprite file. Since the file was there, I just started another 8 instances, and this time only 3 of them had that error. Tried it again, this time 3 instances had the previous error where they couldn't access config.ftg. Starting another 8 instances, 5 couldn't access the ABB sprite file, and at that point I gave up.
 
Last edited:
Now there's something really disturbing me: Michael, are all manpower thingies working correctly?

1419 Plvs Vltra Poland has like 130k of support, 218k (!!!) with war taxes.
1419 Vanilla Poland is around 100k but still, that feels somewhat wrong.

I changed wartax manpower to 10%, launched PV Poland -> attacked TEU -> enacted war taxes -> support dropped to 38k, same as manpower probably.

So, is there anything I am missing? I really can tell that there was never so much manpower in the world before November beta. I might be missing something obvious, so someone please enlighten me. :(

And now absolute cracker: France and Russia in 1795 vanilla have 1.1 god damn million support. Realism is one aspect, but overall it completely removes even remote need to control your manpower and support situation.

Hell, now go and take wartaxes and you can recreate god damned Red Army...as hillarious as it sounds, it really bugs me :(
 
Last edited:
Feedback: Not sure if this is new, but it seems that only country-specific events with a description give message popups when they happen to other countries. Possibly a side effect of implementing the hidden = yes/no parameter?
Is that different from before? It shouldn't have changed.

Also, when you surrender and start a new game, the minimap isn't updated with the knownprovinces from the scenario.
Can you elaborate? I started a 1419 game as China, immediately surrendered, and then started a 1419 game as England. The minimap looked perfectly normal.

Edit: The commands ai_add, ai_rem and ai_set seem to work fine, with two exceptions:
- In events that trigger at the beginning of the scenario, i.e. right when AI files are loaded, only the ai_add command works. I thought this might be due to events being fired before AIs are loaded, but then the ai_add command shouldn't work either, right?
Not sure why there would be inconsistency; once the scenario is loaded, all three commands should work.

- The command ai_add writes items into lists even if they already exist there, and the command ai_rem only removes one instance.
Good catch.
 
So, I've tested the colonisation AI a bit, and while the AI does now indeed seem to be confined to the same rules as human players, the ignore list is kind of weird. I wrote a simple event to add all continents to the ignore lists of all countries, and checked the savegame to make sure everything looked as it should. (Side note: I had an "ai = yes" condition in the trigger but the event didn't fire for NAT, PIR and so on, which is actually fine, but I thought since the last patch these countries were considered AI countries? Slightly confused here.)

Then, I let the game run and observed two things:
- After having discovered Cuba and Haiti (the colonisation areas as defined in the AI file) Spain sent Columbus along the Brazilian coast south towards Cape Hoorn. I checked ai_info.txt to find the destination, which turned out to be the Bering Strait, and indeed a few months later Columbus discovered the Bering strait. The same thing with Portugal's Vasco da Gama, except he went the other way round. I noticed a white PTI spot in that province, and saw in province.txt that province 0 ("PROV_Terra_Incognita") did not have a continent assigned (in Watkabaoi). I gave the province a continent but this didn't make any difference. I then tested the same thing in vanilla, and it took a little longer (presumably because SPA has more areas and regions in their expansion lists) but by 1500 Columbus had discovered the Bering Strait. On both maps the PTI spot is there, but the province is also the first listed sea province, maybe that's got something to do with it?
- Spain tried to establish trading posts along the Brazilian coast and also in Senegal; neither of which was listed in expansion lists or had provinces that were Spain's ToT cores.
I did not outright ban exploration or colonization in the ignored lists, instead applying a penalty of -1000 to the calculation. This should result in the normal prioritization taking over if no un-ignored province remains, but perhaps there is a bug and it just takes them in order of ID.

Also, with the relocation of settings.txt (which was very annoying because it created two duplicates in the mod folder and in documents and didn't even copy the contents of the original file) I first couldn't start more than 3 instances simultaneously (I have a batch file that tries to start 8 instances) because the others reported errors when attempting to access config.ftg. Closing all instances and running the batch file again, I could start 5 instances with 3 errors; the next time I tried all 8 instances started, but half of them had no mod specified and I saw that the settings.txt in documents had the mod folder (and only the mod folder) reset. I changed it back and everything started up fine, but while attempting to start a scenario, the second instances had a critical error: Access denied while opening file gfx\goods\small\small_empty.bmp. This is a new good type I had created long ago, and apparently I forgot to also create a small image for it. I copied an image from vanilla and renamed it, and the next time I ran the batch file 5 instances immediately reported they couldn't access "T-ARMY C-ABB A-FIRE D-NE L-1.spr" which definitely exists, but is alphabetically the first army sprite file. Since the file was there, I just started another 8 instances, and this time only 3 of them had that error. Tried it again, this time 3 instances had the previous error where they couldn't access config.ftg. Starting another 8 instances, 5 couldn't access the ABB sprite file, and at that point I gave up.
I'd guess it's a problem with simultaneous access. I don't know for sure, and this is very much an edge case. It's a little more work, but could you use VMs to isolate each instance or something?
 
Now there's something really disturbing me: Michael, are all manpower thingies working correctly?

1419 Plvs Vltra Poland has like 130k of support, 218k (!!!) with war taxes.
1419 Vanilla Poland is around 100k but still, that feels somewhat wrong.

I changed wartax manpower to 10%, launched PV Poland -> attacked TEU -> enacted war taxes -> support dropped to 38k, same as manpower probably.

So, is there anything I am missing? I really can tell that there was never so much manpower in the world before November beta. I might be missing something obvious, so someone please enlighten me. :(

And now absolute cracker: France and Russia in 1795 vanilla have 1.1 god damn million support. Realism is one aspect, but overall it completely removes even remote need to control your manpower and support situation.

Hell, now go and take wartaxes and you can recreate god damned Red Army...as hillarious as it sounds, it really bugs me :(
I will investigate.
 
Can you elaborate? I started a 1419 game as China, immediately surrendered, and then started a 1419 game as England. The minimap looked perfectly normal.
Tried to replicate it, and now I see the bug only occurs when picking MER with knownprovinces = { }. So it's really not important.


Is that different from before? It shouldn't have changed.
You're right, it's actually the same with older betas. I think all events except randomevents should give message popups by default, though.


Not sure why there would be inconsistency; once the scenario is loaded, all three commands should work.
Just tried it again, and in fact it's not that only some commands work; it's that the event fires before the AI is loaded and all values/lists that are present in the AI file are overridden. So you can add stuff to ignore lists since they're not in any AI files, but you can't add stuff to combat lists.


I did not outright ban exploration or colonization in the ignored lists, instead applying a penalty of -1000 to the calculation. This should result in the normal prioritization taking over if no un-ignored province remains, but perhaps there is a bug and it just takes them in order of ID.
Would it be possible to prohibit the AI from expanding to any provinces listed in the ignore list unless the area/region/continent is also listed in an expansion list? I think it's the modder's responsibility to make sure there's not too much in the ignore list, and if only the relative priorities change, then you can't easily prevent e.g. Denmark from colonising the Black Sea coast if those provinces are empty and Denmark have finished colonising Greenland.
Also, I'm still not sure why everyone tries to find the Bering strait, but ideally, the ignore lists shouldn't have any impact on AI exploration. In fact separate exploration, tradingpost and colony lists would be great, but I think that's not possible due to the way the AI handles colonisation, right?


I'd guess it's a problem with simultaneous access. I don't know for sure, and this is very much an edge case. It's a little more work, but could you use VMs to isolate each instance or something?
It works if instead of running FtG via the batch script, I start each instance manually once the previous instance has finished loading. So no need for fixing anything.
 
The same thing would probably happen in vanilla then.

I don't know if this is still the case but the tendency for AI to target provinces on the basis of ID order used to apply to land provinces as well e.g. the Irish provinces which come first in Europe tended to be invaded a lot and usually ended up being taken by random states.

I'm not sure if Michael did this already but if possible AI preference should be changed to take into account parameters like culture, religion, CoT presence, BTV and MP. As regards seazones, AI preference can be changed to those having the mentioned parameters in adjacent provinces.
 
Honestly, I'd be happy already if the AI simply randomly chose from all the provinces it is allowed to colonise. With unlimited areas, the ignore list, and the ai_add and ai_rem commands, you can theoretically pretty much control what the AI does, but working around hardcoded preferences is often a pain in the arse. Is the area > region > continent preference for colonisation still there? Either way, it's more complex than it should reasonably be.
 
Would it be possible to make a relatively small yet important visual change?

I don't know if other people share this, but I find it rather hard i.e. eye tiring to read event texts, especially the longest ones. The problem gets even worse with AGCEEP (my standard choice when playing FtG) which has loads of events, many of which can be many lines long; but it is tied exclusively to the contrast between text and background.

What I'm asking, then, is if it would be doable to change the current setup (yellow text on dark background) to black text on white background, as in everyday's normal texts.
 
I guess it might be moddable actually. One can set color of font somewhere in Db/interface afaik and background have to be changed somewhere in Gfx files. But it's probably a quick thing to do ;)

EDIT:

Changing text's colour changes all the in-game texts colour unfortunately. Unless I am missing something (I never really edited this file tbh).

So maybe it's down to making a event-text colour setting separate from general text? Alternatively you can change descriptions in localisation files, that's probably possible but unimaginably tedious.
 
Last edited:
Well, I also think it ought to be moddable somehow but I've actually made a scan of some folders (namely the gfx one) and couldn't find the file used for text backgrounds... provided it's actually a graphical file, like a palette or something. Did you manage to?

Also, what did you do in order to change the font colour?