I haven't looked into it in detail, eg which files are concerned, but assuming so myself (suspect EDB only which gets edited by delphor as well) - hence why I was asking if he incorporated it.
I'm very excited for your patch, Delphor! Been checking every so often. I stopped trying to fix certain things on my installation. Have the sound issues for some gunmen been fixed? Also I noticed either huge or large walls had inappropriate smaller siege towers and ladders used on them, and the projectiles from the towers would come out as if they are from smaller level walls (shooting through walls instead of the windows).
Have the recruitment priorities been touched up? It felt like the ai kept building some odd armies, sometimes foregoing some slightly lower tier units that would've helped balance their armies. There was also an oddity that the English would only build Longbowmen, and never Yeomans or Retinue Longbowmen. I often would edit the recruit priorities of rival factions during my campaigns (couldn't figure out the longbowman thing though).
One suggestion: I feel Wales is worthy of being able to have the Woodsman's Guild (with or without Sherwood Archers), but that is easily added by anyone if they so choose.
Second suggestion: Is there any chance you'd be interested in making it so that once a faction acquires a guild headquarters, with a guild-specific recruitable unit, being able to retrain that unit in any huge city or citadel they own? Something like a 0.1 replenishment rate, without actually being able to recruit a full unit (similar to the unique units in the Crusaders Expansion). I don't know if this is possible, but it would make me want to actually use guild units.
Last edited by Watchful48; January 21, 2023 at 08:47 AM.
1. I have not noticed the towers/ladders issues for the walls, but can try to replicate/fix it. I've tested all the gunmen and haven't had any sound bugs so if you could tell me which units have issues that would be appreciated.
2. Were you using my earlier mod version with the weird recruitments/armies, or base KGCM? I've edited the AI priorities a bit in the unit files and by giving each AI recruitment personalities in the campaign files, but could edit them further.
5.002, RubyGon's fix, and any updates I have made will either be included or replaced by other files in the new version, so it's the only thing needed besides 5.0.
Last edited by Maximinus Thrax; January 23, 2023 at 02:35 AM. Reason: posts merged
It may be that I do not have a proper install (am using Mac). I'll try to do a fresh install and see what happens. IIRC, the issue with walls and siege equipment happened in campaign, but not custom battles. The gunpowder units that had the arrow sound effect were basically all the expansion gunpowder units.
I'm quite sure I used the current latest version of your submod, linked in Gigantus' first post on this thread. I think when/if your mod is combined with KGCM in one full download, I might not experience any issues (which formerly could have easily been a result of my not understanding Mac installations).
As far as recruitment priorities, I think it's up to difference in preference. It's been too long since I've played to remember clearly why I changed priorities, but I think the motive was to try to make ai factions have a more typical balance of infantry, spearmen, skirmishers, and cavalry. I recall thinking Ireland relied too much on Gaelic Archers, often having stacks of nothing but Gaelics and cavalry.
Is there a way to use an event having happened in campaign_script? I have no clue why the game is telling me the new world has been discovered so early in the campaign, and I am trying to add world_is_round as a requirement for america_discovered. Currently, I have this, but it doesn't seem to be working:
;-- America discovered --
monitor_event TileSeen not FactionType aztecs
and not FactionType slave
and event_counter world_is_round 1
and IsPositionInRect 0 106 60 252
historic_event america_discovered event/america_discovered.bik
terminate_monitor
end_monitor
and I_EventCounter world_is_round > 0
I just got a bug message and can confirm it: wall level 2 in descr_walls is missing the ballista tower section. No idea why. Simply grab the file from a kingdoms mod (like Bare Geomod) and add it to your update.
I switched the code to only use regular counters and to use the I_CompareCounter function but I still have an error. Do you know why this won't work? I want to make the script set holds_genoa to 1 at the start of the campaign so Milan can make Genoese Crossbowmen.
declare_counter holds_genoa
if I_CompareCounter holds_genoa = 0
set_counter holds_genoa 1
end_if
monitor_event SettlementTurnEnd
if I_SettlementOwner Genoa = milan
if I_CompareCounter holds_genoa = 0
set_counter holds_genoa 1
end_if
end_if
if not I_SettlementOwner Genoa = milan
if I_CompareCounter holds_genoa = 1
set_counter holds_genoa 0
end_if
end_if
end_monitor
That's not going to work for a variety of reasons. The major one being that the EDB only accepts event counters.
The way I understand the monitor it's originally supposed to set the counter to 1 only when genoa holds milan - but you want to it set to 1 from the start, eg permanently.
If permanently then simply remove the event counter from the EDB entry, that's the easiest solution. For good housekeeping you could remove the monitor in the campaign script but that's not mandatory. Because the on\off principle you are creating will reset the recruit pool to zero (no pool, no recruiting) every time the value changes - which is every turn as long as genoa doesn't own milan.
This seems to be working:
monitor_event SettlementTurnEnd
if I_SettlementOwner Jerusalem = jerusalem
set_event_counter lost_jerusalem 0
end_if
if not I_SettlementOwner Jerusalem = jerusalem
set_event_counter lost_jerusalem 1
end_if
end_monitor
In edb, I am setting the unit to test if the event_counter is 0, since it seems to start at 0. This way, it should be set to 1 if the settlement is lost. Is my thinking about how this works correct? Do I need to pre-declare this variable somewhere else?
That is an extremely confusing monitor. Why is the event counter zero if the settlement is owned by the specified faction? That's inviting logical pitfalls: 0 = false
Your goal is to enable Genoa's unit recruiting at all times if I understood you correctly which makes any check superfluous, eg no need for monitors and EDB conditions. If I misunderstood please specify the condition under which Genoa can't recruit the unit.
I don't want jerusalem to recruit the unit if they lose jerusalem (but to have it when the game starts). Whether that happens at 0 or 1 is irrelevant from a logical perspective, humans are just used to 1 meaning it's okay. Since variables are declared to 0 by default, I made it so the variable will be set to 1 IF Jerusalem falls. in edb, jerusalem requires the counter to be set to 0 for recruitment. Therefore, when it's changed to 1, the recruitment should stop. I did it this way because variables are set to 0 by default.
Event counters start always in a zero state, correct. My point simply was that you did things backwards which may lead to logical pitfalls in the long run - essentially you are using the 'two false make one true' approach.
Either way you will run into logical stuff: the moment you own jerusalem recruiting will stop as the counter is then 1 if recruiting is possible when the counter 'not 1'.
You can solve your conundrum by creating a second recruit line with a 'not 1' event counter (eg initial_recruit) and then have the 'owns_jerusalem' condition the normal way.
owns jerusalem = set intial_recruit 1, set owns_jerusalem 1
doesn't own jerusalem - set owns_jerusalem 0
EDB line 1 = and not initial_recruit 1
EDB line 2 - and owns_jerusalem 1
Effect - initially enabled recruiting of line 1 will stop permanently when jerusalem is owned the first time while line 2 will be available normally according to ownership. Note that I (obviously) did not use the full, correct formats, just the logical setting.
I think this worked, and has held up to my testing, thank you! I also found out that some of the gunmen do have some weird sound effects (guns + arrows at the same time, for example), so I'll try unpacking and fixing the sounds data next.
I believe (as long as I don't somehow find this caused a separate bug) I fixed the unit sounds for Magnelwyr, Lithuanian Arquebusiers, Calivermen, Mounted Calivermen, and Spanish Dragoons.
I can't wait for the new version to come out! great work!
I am still having difficulty making it so the new world doesn't get discovered too early (america_discovered event). As far as I can tell in descr_events "world_is_round" doesn't happen until the proper time much later in the game, and otherwise in campaign_script the events for america_discovered seem the same as vanilla, except with an alternate rectangle to see tiles in (0 106 60 252, instead of 0 48 40 141) for america_discovered because of the different map. Do you have any idea why america_discovered keeps getting triggered early (around 5-20 turns or so in)?
In my files the 'round' event gets triggered only in descr_events between year 266 and 274. Which then triggers the monitor (as usual) in the script too lift the radar map restriction.
'discovered' is only in the script and gets triggered by presence in the rectangle. The specs for the rectangle are slightly different: 0 48 40 141 (vanilla) vs 0 85 69 252, apparently longer and broader. The first set is bottom left, the other top right - it comes close to the African West coast in kgcm. Plus there is no 'high sea' ground type between Africa and America - which means a regular AI ship will sooner or later wander into that box.
The best approach would be to split the box - a narrow one at the bottom part and a broader one at the top. Underneath the two monitors required for that. The am_discovered event counter makes sure the movie\message gets displayed only once.
Code:;-- America discovered -- monitor_event TileSeen not FactionType aztecs and not FactionType slave and IsPositionInRect 0 85 40 260 if I_EventCounter am_discovered > 0 terminate_monitor end_if historic_event america_discovered event/america_discovered.bik set_event_counter am_discovered 1 terminate_monitor end_monitor monitor_event TileSeen not FactionType aztecs and not FactionType slave and IsPositionInRect 0 260 70 336 if I_EventCounter am_discovered > 0 terminate_monitor end_if historic_event america_discovered event/america_discovered.bik set_event_counter am_discovered 1 terminate_monitor end_monitor
Is 'high sea' just that extra dark red splotch in map_ground_types? Could I copy that color from base medieval 2 total war's map_ground_types and use it in the tga for kgcm to add back in the 'high sea' to keep the ai from drifting over there (I realize it will keep the player from doing it too).