Oriental Empires

Oriental Empires

View Stats:
Haddon 17 Nov, 2023 @ 8:16pm
I broke my mod. No idea how. Broke the AI. Please help.
I didn't notice and overwrote 2 backups. If I can't get this to work I will have lost over a week's work. Please help. I am not a coder, just been figuring things out bit by bit as I do the modding.
AI::
Exception throw during turn of Min Yue System.NullReferenceException: Object reference not set to an instance of an object
at Irrelevant.Assets.Scripts.AI.UnitClassification.GetClass (Irrelevant.Assets.Scripts.CoreTypes.UnitType ut) [0x00000] in <filename unknown>:0
at Irrelevant.Assets.Scripts.AI.ArmyAnalyzer.GetPotentailUnitValues (System.Collections.Generic.List`1 buildableTypes) [0x00000] in <filename unknown>:0
at Irrelevant.Assets.Scripts.AI.ArmyAnalyzer.DoStartOfTurnAnalysis () [0x00000] in <filename unknown>:0
at Irrelevant.Assets.Scripts.AI.AIPlayer.DoTurn () [0x00000] in <filename unknown>:0
at Irrelevant.Assets.Scripts.CoreGame.Players.Player.DoAITurn () [0x00000] in <filename unknown>:0
at Irrelevant.Assets.Scripts.AI.AIManager.AsyncWorkerStart () [0x00000] in <filename unknown>:0

Getting this error for every faction. No idea what it means. No idea how long it has been going on, but I was able to play a normal game off my build just yesterday, though it was from a continued save. Trying to load that crashes now.
< >
Showing 1-6 of 6 comments
Neutron  [developer] 21 Nov, 2023 @ 4:05am 
Looking at the error location, you might have defined a unit type that doesn't have any elements. Suggest you check that first.

More likely something else is screwed up that prevents the game initiialing its data structures properly. You can press the ~ key (shift top left on english keyboards) to bring up the debug window that may have some more errors that shed light on things.

If not, I can have a look at it for you if you send me your mod. But I won't be able to get to it until next week
Haddon 21 Nov, 2023 @ 4:36pm 
Originally posted by Neutron:
Looking at the error location, you might have defined a unit type that doesn't have any elements. Suggest you check that first.

More likely something else is screwed up that prevents the game initiialing its data structures properly. You can press the ~ key (shift top left on english keyboards) to bring up the debug window that may have some more errors that shed light on things.

If not, I can have a look at it for you if you send me your mod. But I won't be able to get to it until next week
Ok I will try the in-game debugging. Completely forgot that was a thing.
I will work on this some tonight, got frustrated and put it aside for awhile.
Thanks so much for your help. I did already find one issue, an extra " in a bunch of the element numbers, must have done an improper find/replace. Might be an element I forgot to close. Will look around
Haddon 21 Nov, 2023 @ 4:49pm 
YESSS! I fixed it, thank you so much!
I had 2 major issues, 1 was a "bodyuard" class unit, haha, and the other was accidentally putting nomad horde on the wrong unit, so it seems the AI was convinced they could only settle (I increased base settler cost) by using a faction-specific unit they didn't have access to.
Thank you again!
Haddon 21 Nov, 2023 @ 5:47pm 
BTW, give my mod a look, even just to read. I remember YEARS ago, you and I discussing Chinese history a bit, and you wanting the game to remain historical (which I appreciate so much!). I think you will appreciate the research I've done and put into faction descriptions.
Haven't done the technology and unit descriptions yet, haven't figure out how to do those.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3059342650 It is a mix of sort of the 3rd and 4th centuries, with a little bit outside of that for flavor. The factions are mostly historical, though some were long gone by the end of the Warring States, and of course you can't have rebellions against Imperial forces before an empire, and some don't belong in the part of China I cover.

I absolutely love this game. So much so, I still try to get other people I know to buy it, people that are itching for something that isn't Total War. And making this mod has got me so much more interested in Chinese history, just like Rome Total War did when I was a teenager. So thank you for that Neutron.
Last edited by Haddon; 21 Nov, 2023 @ 5:52pm
Neutron  [developer] 21 Nov, 2023 @ 7:13pm 
Glad you found your problem.

Yes Chinese history is fascinating once you dive into it. I didn't know much about before I started OE, and was originally thinking of a more Civ style game with asian factions. But once I started reading up on Chinese history I realized there was more then enough there for the whole game, and that'd be cool to try to raise awareness about it for a western audience. If I've got you hooked, then mission at least partially accomplished.

Off to Hong Kong tomorrow for some tabletop miniatures gaming, though I'm not actually taking a Chinese army this year. I'll subscribe to your mod and take a look when I get back.
Haddon 21 Nov, 2023 @ 10:20pm 
Originally posted by Neutron:
Glad you found your problem.

Yes Chinese history is fascinating once you dive into it. I didn't know much about before I started OE, and was originally thinking of a more Civ style game with asian factions. But once I started reading up on Chinese history I realized there was more then enough there for the whole game, and that'd be cool to try to raise awareness about it for a western audience. If I've got you hooked, then mission at least partially accomplished.

Off to Hong Kong tomorrow for some tabletop miniatures gaming, though I'm not actually taking a Chinese army this year. I'll subscribe to your mod and take a look when I get back.
One of the big things about the game was it immediately became clear it wasn't Civ, it was focused on the military...because Chinese civilization absolutely was. We think of the Shi class as the scholarly class, and that is definitely true, but they were only the scholarly class because they also happened to be the Feudal ruling class. In other times and places we call that a warrior class, and they absolutely were. OE understands that in a way that Koei games never really have, because they have always focused in on a very small period of history. Never on the expanse of Chinese pre- and early history.

I am a Roman historian, and it is fascinating to understand other cultures, and where their cultures came from (hint: if it is an empire, their culture came from war). The Chinese are so vastly different from the West that I study, but in so many ways almost exactly the same. Especially when it comes to the formation of early armies, into organized armies, professional armies, and finally mixed "imperial style" armies utilizing foreign troops and specialists and engineers etc.

Anyway, thank you again, and hope your army CRUSHES your opposition! I've actually been thinking about getting into tabletop gaming a little bit. I designed a board game, wanted to take it in to the board game groups in my area to get it tested.
< >
Showing 1-6 of 6 comments
Per page: 1530 50