Hegemony III: Clash of the Ancients

Hegemony III: Clash of the Ancients

Alternate Start Dates v3.1
104 Comments
fisto the robo Sep 2 @ 1:50pm 
something funny would be a scenario with literally every individual city states, migrators, invaders or colonial forces on the map at once. a real italian vendetta
Fristi61  [author] Aug 26 @ 6:39am 
Yes, all the invasions and events of later bookmarks will happen. :-)
fisto the robo Aug 26 @ 5:24am 
another super interesting mod :)

checking something before starting, if starting in 753 does the greek or italic invasions of later bookmark happen and does the colonial lands still split in cities? im not expecting to have a carthaginian invasion after 300 years of gameplay but its really interesting to have a larger narrative experience on a sandbox campaign.
Iakovosian Apr 25 @ 7:01pm 
FYI - starting as Syracousai in "Resources/Scenarios/ASD/753.xml", Selinous and Himera (and two others) start as my allies with supply truce. On week 12, Carthage launches an invasion, on them both, I help them via the 'Invasion Forecast' objective, which awards me a free truce with them both (amongst other things). However this free truce overrides the existing supply truce which was better before! Could you check for existing truces in similar events to not accidentally downgrade the existing truce type?
mazytus Apr 6 @ 5:29am 
[string "resources/scripts/asdhistoricevents/breakas..."]:9: Usage: Faction:hastrucewithfaction(Faction rOtherFaction) -> bool
Stack trace:
[C]:-1
[string "resources/scripts/asdhistoricevents/breakas..."]:9


Non-stop spam over 30 second
Canute VII Nov 16, 2024 @ 11:35am 
Maybe it would be worth considering to give an upgrade on gamestart only to a faction if it can actually use it? The barracks e.g. in this screenshot is useless, because the required skill to recruit hoplites is missing.
https://steamcommunity.com/sharedfiles/filedetails/?id=3366968408
Fristi61  [author] Sep 30, 2024 @ 5:55am 
entity:isvalid() is hardcoded in the engine AFAIK so I'm not sure exactly how it works.
I know the vanilla scripts sometimes use it on brigades prior to modifying them.

I try to use it to be on the safe side, if I remember to :-p
Canute VII Sep 29, 2024 @ 10:04pm 
What does isvalid() do? I've never used it, maybe I should?
Fristi61  [author] Sep 29, 2024 @ 3:24pm 
Yeah I wouldn't have thought. Right now I'm thinking the culprit is either a general governing the city, an empty brigade without recruits, your scripts somehow modifying or deleting a brigade in an unexpected way, or some other "content" being added to a city that is not a proper entity.
I don't have time to test these ideas right now :-/

Maybe also I could just do isvalid() before isbrigade() and that might or might not sort it out, but it'd be annoying not knowing the exact culprit.
Canute VII Sep 29, 2024 @ 2:12pm 
So I've just verified that isbrigade() is giving "true" for the new brigades I have introduced. At least we know that this isn't the problem now... :-)
Fristi61  [author] Sep 29, 2024 @ 1:44pm 
Nah, they're different event types that are triggering the same "city conversion" function at some point which is in turn triggering the same vanilla "is brigade" function where it trips up.
Canute VII Sep 29, 2024 @ 1:40pm 
@Fristi Yes, yesterday I've uploaded the new version to the workshop, since I didn't encounter the bug - but it seems to persist. The message, however similar, seems a little bit different though. mazytus last line is "[string "resources/scripts/asdhistoricevents/doevent..."]:45" and mine was "[string "resources/scripts/asdhistoricevents/doevent..."]:47", also the number and reference of the HelperFunctions.lua entries are different starting from the 4th line. Just saying, don't know if you have noticed or if it's revealing anything.
Fristi61  [author] Sep 29, 2024 @ 11:46am 
@Canute Hmm, since mazytus seems to be getting the same bug with what I guess is this the public version of Mos Maiorum, it seems it's not your temporary local experimentations that were too blame.

Since it's so inconsistent, it has to be some kind of edge case. But its inconsistency also makes it hard to know if Mos Maiorum introduces the edge case or if it's a bug in ASD itself...
mazytus Sep 29, 2024 @ 10:47am 
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2279: Forcing script to end: [string "resources/scripts/asdhistoricevents/doevent..."]@45
Stack trace:
...Clash of the Ancients/Resources/Scripts/Entities.lua:298
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2279
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2047
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:175
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:160
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:31
[string "resources/scripts/asdhistoricevents/doevent..."]:45
Canute VII Sep 26, 2024 @ 1:47pm 
I have now played some more and didn't encounter the error, either. Maybe experimenting with my new objectives scripts somehow corrupted the game? Also today I adjusted a different script where I was basically repeatedly writing info into a global.quest variable, I made that a local varialbe (in the hope that it might help with performance). Maybe that somehow congested I/O? However that wasn't a new script either. Well, I'll have to play some more and monitor that the issue doesn't reoccur - release of the next MoMa patch has to wait then, time for more polishing I guess... :-)
Canute VII Sep 26, 2024 @ 1:46pm 
Hey, no I have not modified the vanilla scripts... I have also not had the error in the current workshop MoMa version, only in my local one where I have added two objectives (but that could of course also be because I didn't start with the right faction). In one of the objectives I use the getplayerfaction():getbrigades() command to loop through playerbrigades and identify ones of interest to the objective, after user has clicked on the objective subtask. Nowhere do I use the isbrigade() command, but sometimes I use the getmetatable().__class == "LongbowGames.Brigade" etc. commands (but that's already in older scripts of mine.
Fristi61  [author] Sep 26, 2024 @ 11:57am 
I played for a year as Kroton in the "Eve of Democracy" start with Mos Maiorum mod active and did not receive the error at all. I'm not sure what is going on.

You have not accidentally modified the Hegemony III/Resources/Scripts/Entities.lua script, have you? Particularly, line 298
Fristi61  [author] Sep 26, 2024 @ 9:52am 
Well it seems that the error ultimately happens in the vanilla Entities.lua script with the LongbowGames.Entity:isbrigade() function. It's very non-descriptive but I'll see if I can reproduce it this evening
Canute VII Sep 25, 2024 @ 2:20pm 
Well, actually in the (test) game I've started tonight, this happend already twice... I'm a bit concerned that some of my script is actually interfering with yours. However, the console error only mentions your scripts... :steamsad: If you need any more information from my side, I'll happily provide it.
Canute VII Sep 24, 2024 @ 2:49pm 
Hey Fristi, a rare event happened ... ;-) Somehow it seems one of your scripts stopped responding. I had started a game as Kroton and I believe "Eve of Democracy" start date. Not sure if that makes a difference, but when this happened I had the objectives open and also the manual.

Hegemony III 3.3.5 rev.43872 x64
...
Iberia300BCDLC
DLC/TheEagleKing is active
AlternateStartDates is active
Loading game: Resources/Scenarios/ASD/753.xml
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2279: Forcing script to end: (tail call)@-1
Stack trace:
...s\common\Hegemony III/Resources/Scripts/Entities.lua:298
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2279
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:2047
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:340
...ources/Scripts/ASDHistoricEvents/HelperFunctions.lua:223
[string "resources/scripts/asdhistoricevents/doevent..."]:47
Fristi61  [author] Jun 9, 2024 @ 2:23am 
Noted, sleepyhead ;-)
Canute VII Jun 9, 2024 @ 1:35am 
Yes, thx, I must have been veeerry tired not to think of it... maybe rename "number of cities" to "number of controlled cities" to help tired men? :steamfacepalm:
Fristi61  [author] Jun 8, 2024 @ 2:56pm 
Number of cities = the total number of cities this faction has occupied.
Number of native cities = the total number of native cities for this facion on the map, regardless of who occupies them.
So, if native cities > cities, this indicates a faction that has lost some of its native cities to foreign occupiers.
Canute VII Jun 8, 2024 @ 1:21pm 
Hi, please see screenshots that I have just uploaded: number of native cities > number of cities :-) ?
Snowduck Jun 7, 2024 @ 8:39am 
Awesome, its working now, thanks for the quick fix.
Fristi61  [author] Jun 7, 2024 @ 2:21am 
Thanks for the report. I found the error and uploaded a fixed version.
Snowduck Jun 6, 2024 @ 2:12am 
I tried to play the 753 BCE start as Rome and it would get stuck in inventing technologies. I'm not sure what is causing it to freeze but this is what was displayed on the console.

Hegemony III 3.3.5 rev.43872 x64
Welcome to the debug console. For a list of commands, type 'commands()' in the field below, or use 'commands("filter")' to show only the commands you're interested in. Press F2 to close this window.
Loading game: Resources/Scenarios/ASD/753.xml
Loading game: Resources/Scenarios/ASD/753.xml
...sources/Scripts/Scenarios/StartDatesInvaderStart.lua:48: bad argument #1 to 'ipairs' (table expected, got nil)
Stack trace:
[C]:-1
...sources/Scripts/Scenarios/StartDatesInvaderStart.lua:48
(tail call):-1
...sources/scripts/scenarios/startdatesstartsandbox.lua:54
(tail call):-1
[string "startscenario"]:1
Help us debug this script! Type 'clipboard(history())' to copy everything above into your clipboard, so you can send it to a dev!
> clipboard(history())

Also love the mod
Fristi61  [author] Jun 2, 2024 @ 1:54am 
I guess I could. Truth be told, the other attacking and defending factions don't "do" much other than the possibility for them to rope the player into it... although I think they might get some minor diplomacy effects on them depending on the player's choice, hmm...
Canute VII Jun 1, 2024 @ 1:14pm 
Mmh, o.k. - maybe in the objective you could give more information on who exactly is involved on the attacking and on the defending side. The defending side is clear from the ambassador message, but the attacking side less so. Maybe two (cosmetic) subtasks showing all factions attacking and all factions defending?
Fristi61  [author] Jun 1, 2024 @ 1:00pm 
Basically it's:
-if you have discovered the invader faction, they will personally request your assistance
-if you are one of the factions that historically helped with the invasion, the invader faction will personally request your assistance even if you have not discovered them
-if you have not discovered the invader faction, but you have discovered a faction that historically helped with the invasion, then that faction will request for help instead
-otherwise, you will not be called in to help with the invasion

A similar mechanic occurs for being requested for help on the defending side.
Fristi61  [author] Jun 1, 2024 @ 12:51pm 
Invasion events can have multiple factions involved on the attacking side, even if there is only one faction actually doing the invasion.
Any of the factions involved on the attacking side may request for the player's assistance, if the player has discovered them. As Athens in this case, you are allied with the Elymoi, who are assisting the invasion, so they are the logical ones to do the request.
(In fact, Carthage's invasion of western Sicily at this point in time was specifically caused by a request for help by the Elymoi)
Canute VII Jun 1, 2024 @ 11:33am 
hey, me again... I had the "invasion forecast" event and it keeps confusing me, and now I understand why. The event messenger was an Elymian ambassador (Screenshot 1) , but the faction actually planning the invasion was Carthage
(Screenshot 2) . They want to invade Selinous and Himera, but non of these have anything to do with Elymoi? Might there be something messed up somehow or am I just not understanding?
Canute VII May 11, 2024 @ 3:15am 
(1) valid points, valid points... (I will probably then just "rename" the capital string in my mod for these special cases, so not showing "capital city" but "expeditionary capital" or so to give the situation proper representation)
(2) great :-)
(3) if that works then this actually is a very powerful tool to do all kinds of stuff like new skills, firing up the AI, difficulty scaling etc. :-))
Fristi61  [author] May 11, 2024 @ 1:47am 
(3) Yes you can do all kinds of globals stuff. You can load different globals mid-game, I think. Note that globals are NOT stored in the save file, so it is necessary to also reload them with a PostLoadInit.lua type of file (at least if you're globals are scenario-specific, if you want certain globals to always be active regardless of setting you might also do it with a startup.lua I believe).
Fristi61  [author] May 11, 2024 @ 1:47am 
Thanks! :-)
(1) There are far too many scripts that require there being a capital. For instance, any objective to give X resources to faction Y requires those goods to be accumulated at the capital, the companions brigade scripts, the faction screen scripts, etc...
Sure, some of these things could be worked around, at the cost of extra complexity and potential for bugs due to having to implement these mechanics and objectives in a different way, which would probably also end up less intuitive to the player at the end.
(2) Hmm, yes I could do this but I should note that this start as Athens is an extreme outlier, to do with the complex web of alliances in the Peloponnesian War. Usually, there won't be near this many discovered factions at the start, which is why I hadn't thought of it.
But, sure, I'll slap it on the todo list to also automatically discover the capitals.
Canute VII May 11, 2024 @ 12:24am 
Btw: I've now noted your loadglobalfile("resources/asdskillrates.xnt") in the startdatedstartsandbox.lua - do you think this would work for all sorts of modifications to the globals file? And if yes, then I guess it needs to be in the stardatesstartsandbox.lua and cannot be loaded at some time later, e.g. mid-game?
Canute VII May 11, 2024 @ 12:24am 
Hi Fristi: good job and congrats on the new milestone reached! :-) So I've started up Athens in the last bookmark and noticed a few things.
(1) Athens starts with a capital city in Katane. Wouldn't this expedtion actually be one of those rare cases where it actually makes sense for the faction to NOT have a local capital? Rather it may be an interesting twist to give them a customeffectable like for migrants, e.g. "Expedition" which could represent financing by the mother city Athens.
(2) A lot of factions are now known in the diplomacy screen from start but the map is still quite black. Wouldn't it make some sense to at least reveal those factions' capital city and - if they are bordering the local presence of e.g. the Athenians - also the cities in Athenian neighbourhood? E.g. the Athenians should by now already have discovered the location of Syrakus, shouldn't they?
Fristi61  [author] May 10, 2024 @ 1:15pm 
Canute VII Apr 16, 2024 @ 1:12pm 
Alas, I have the impression it would be easy to fix for you, if you had access to the source code stuff :-(
Fristi61  [author] Apr 16, 2024 @ 12:51pm 
Ah. No the exact combination of tags doesn't matter. The thing about a br element is it doesn't have content "inside of it" (it's just a line break).
When an XML element doesn't contain content you don't need to do <element>CONTENT HERE</element> with separate opening and closing tags, instead you can do what is called a "self-closing" syntax like just <element/>. :-)

Yes, the diplomacy screen tooltips are nasty buggers. They also contain the XML parsing bug that the faction selection screen has, but unlike that screen they are hardcoded so I can't fix them :steamsad:
Given that the full faction description is just one click away at that point, I was hoping it wouldn't be too bothersome. I'm somewhat torn on this
Canute VII Apr 16, 2024 @ 12:21pm 
I meant: you are correct, the vanilla Pedia *generally* uses <br/>, but its usually in combination with other tags such as <p></p><br/> or <a ... ></a><br/> Not sure if that would make a difference, it's just an observation.

But I also see that you seem to have looked up the Ausones in the ingame pedia and the text is represented correctly. Yes, I can confirm. I have seen the funny <br/> when hovering the mouse over the faction logo in the diplomacy screen: https://steamcommunity.com/sharedfiles/filedetails/?id=3224438904
Fristi61  [author] Apr 16, 2024 @ 8:33am 
I now no longer understand what you mean. The pedia page for Ausones looked fine on my end just now. Screenshot?
Canute VII Apr 16, 2024 @ 8:31am 
I can confirm the Pedia is using it >:-]
Fristi61  [author] Apr 16, 2024 @ 8:20am 
<br/> is correct. </br> maybe could work on some systems as an alternative but is not common.
Other faction tooltips of similar length do also use it. It just depends on the exact window/tooltip, some of them have XML parsing issues which is basically a vanilla bug.

There are various in-game screens where the <br/> tags work just fine, such as the 'pedia' windows.
Canute VII Apr 16, 2024 @ 8:10am 
Mmh, well, I actually didn't notice it in the faction selection screen but ingame afaik. In this particular case I'm not sure why you're using it at all, since other faction tooltips seem to be of similar length and you don't use it. Btw I think I've seen </br> in the vanilla string file, but <br/> seems a bit strange to me. Googling tells me it should be o.k., but well maybe longbow's using some older xml version that doesn't support it? Anyway, at least you're aware of the "problem" :steamthumbsup:
Fristi61  [author] Apr 16, 2024 @ 6:49am 
Many factions have this. <br/> is a XML tag for formatting.
Well, the vanilla version of the faction selection menu tooltip didn't properly parse XML tags for some reason, but in v3 I already made my own tooltip for that menu which works better.
Canute VII Apr 15, 2024 @ 12:46pm 
Master Fristi, please look up the Factions::Asd_Ausones::TOOLTIP and you'll see several "<br/>" that don't look pretty in game... ;-)
Fristi61  [author] Apr 14, 2024 @ 8:38am 
I've not really noticed them be more passive than vanilla, other than maybe some of the scripted events that can happen when uniting your native cities that don't happen here.
Canute VII Apr 14, 2024 @ 7:40am 
Another thing I've noticed is, that raiders are very passive in ASD. I've did some superficial search in the game files and discovered a few scripts that seem to "activate" the raiders, like e.g. create taskforces etc., but these seemed to be used only in the "prelude". I wonder if you've noticed the same raider behaviour, or if it's just "(bad) luck" in my game?
Fristi61  [author] Apr 3, 2024 @ 9:04am 
Yes I did also realize I could tweak not just the starting gold but the food and recruits as well. I haven't implemented it quite yet as I'm focusing on the extension of the historical period/events/objectives first but will get round to it soon I think