Éa III, Sword & Sorcery: Developer's Thread

If the Carnifex still doesn't work for some reason, I note that bouncymischa uploaded one.

Ugh, I feel so far behind, replying this late. Had some computer problems so I didn't get much modding done lately...

I mostly posted my Carnifex unit at the time because I was having troubles getting the sounds to work with the animations, so I think you've probably done a better job of it than me. I'm quite curious to take a look at your code and see how you may have gotten past the problems I had... there's still issues with some of the WH40K vehicles I'd love to use.
 
so I think you've probably done a better job of it than me.
No, I didn't fix any of the problems with the unit conversion; I just reduced the texture size and did some quick recoloring.
 
New WIP Game Manual linked in OP (65 pgs!). It has a lot of updates throughout, but major updates in Civ effects, Wonders and Spell lists. Not all the spells listed will be there for release, but these are the ones I'm working on. There are some inaccuracies (knowledge maintenance is not updated to new system).
 
Sure, I can integrate whoward's river connection code fairly easily.

I now have a solution for the "all connections require the player to be able to build a road first" - which means you can establish river connections at (say) boat building / sailing
 
I now have a solution for the "all connections require the player to be able to build a road first" - which means you can establish river connections at (say) boat building / sailing

Is that in your most recent DLL modcomps package yet? I haven't started the merge yet so I can still integrate this change.
 
It's in v47 (which should be on GitHub this evening - UK time) - but it only needs a few lines commenting out in CvAStar.cpp so I can easily post the fix.
 
I finally learned how to look at the dmp file to track down CTDs, all of which were triggered during AI strategy tests. I went through all the City, Economic and Military strategies and disabled the ones that weren't applicable or seemed dangerous for the mod. This seems to have worked. I've now run out 5 autoplays in a row to turn 350+ (after which a specific Lua bug kills the game but I know exactly what that one is).

Still some lingering AI issues, listed roughly in order of importance:
  1. There are two Builds for most improvements, one that removes features and one that does not. Only one is available to a particular player (depending on whether they have the Pantheism policy). The 2nd set is not being performed by AI even though it works for human player. I haven't looked yet but I'm suspicious that the AI code expects a 1-to-1 relationship between Builds and Improvements in the table (it is 1-to-1 from the point of view of player).
  2. AI doesn't know about the mod's Living Terrain system (well, how could it?). Non-Pantheistic civs need to clear out Forest, Jungle and Marsh much more aggressively. I'll write some mod-specific code to fix this.
  3. AI civs are not attacking each other as much as they should when they have a massive/overpowering military buildup. This could be due to all Leader flavors set at 5 right now, or due to global strategy foul-up (see next point) causing AI civs to never seek conquest victory.
  4. The four Global Strategies are mostly (or maybe all) fouled up. Their selection depends on the existence of certain things like space ship parts or specific victory conditions that don't exist in the mod. I need to either alter selection code or design new global strategies. Mostly this affects endgame but doesn't matter in early to mid-game.

1-3 need to be solved before release. #4 probably isn't noticeable to players since the base AI is so horrible at the endgame anyway. But I have a lot better understanding of AI code now so I think I can work through this list.

One thing I didn't understand before is that we can add both flavors and AI strategies (City, Economic and Military) outside the dll. I still hate the flavor system. But I'm resigned to it so I should start adding some flavors and strategies directed toward the mod's specific mechanics.
 
Regarding 3:

Possibly related to how when they made BNW they added ridiculously heavy warmonger penalties and made a lot of the AI either completely pacifist or world dominating megalomaniacs? At least they seemed to from what I've seen and played.
If the AI was actually changed in stead of just strongly weighting the warmonger penalty (I'm assuming you reverted it to what was normal for G&K; if not, this may simply be the problem), perhaps this change has carried over into the new version which uses BNW AI as opposed to G&K AI?

I think that the original idea was to make the AI act like how modern countries act and how war is now perceived but the impact of a. modern media and b. nuclear deterrent was neglected so the penalty exists from the beginning of the game. Sorry I may be going off on a tangent. Either way I don't think that it's really applicable here as much so I would suggest nerfing it back to G&K levels if you haven't already done so.
If you have removed the penalty, perhaps compare the G&K AI decision making (related to going to war and similar) to BNW AI?
 
Yeah, I preferred the earlier more dangerous AI stance, where having a good deterrence was necessary (usually) to maintain peace. (Neither the new nor the old AI develops anything like alliance or vassalage, but that is a different issue.)

What I don't know is whether the change from G&K to BNW was in the core AI C++ logic or just in Leader personality weightings. Maybe someone else knows?

Some bad performance is expected now because all the personality setting are at 5. The reason for this is that I have a total of 66 personality settings x 115 great people (any of which can become leader) = 7590 settings. Would anyone like to set these for me? :crazyeye: OK, more seriously, what I need to know is a good "baseline" set of settings. Which BNW leader plays the "smartest" without always being a warmonger or pacifist? I could set them all to that and then make adjustments up/down for individuals.
 
Yeah, I preferred the earlier more dangerous AI stance, where having a good deterrence was necessary (usually) to maintain peace. (Neither the new nor the old AI develops anything like alliance or vassalage, but that is a different issue.)

What I don't know is whether the change from G&K to BNW was in the core AI C++ logic or just in Leader personality weightings. Maybe someone else knows?

Some bad performance is expected now because all the personality setting are at 5. The reason for this is that I have a total of 66 personality settings x 115 great people (any of which can become leader) = 7590 settings. Would anyone like to set these for me? :crazyeye: OK, more seriously, what I need to know is a good "baseline" set of settings. Which BNW leader plays the "smartest" without always being a warmonger or pacifist? I could set them all to that and then make adjustments up/down for individuals.

I'd be more in favor of the same personalities for everyone (for now), because it makes AI debugging and improvement far easier to work with, as there are fewer variables.
 
That's fine (for now) but the current all 5's is probably not good. I'll start by bumping up a few across the board to make everyone a little more expansiony and aggressive. And there should be some differentiation by class. A Warrior GP as leader should be somewhat different than a Sage GP as leader, otherwise the AI player isn't taking full advantage of leader effects.
 
I was right on #1 above. CvBuilderTaskingAI::AddImprovingResourcesDirectives only looks at the first Build that will result in an improvement (for a given plot). If the worker can't do that particular Build, then it stops testing subsequent Builds. It's an easy fix though: just a change from "break" to "continue".

Just another case of "The tables allow it and the human player can do it, but that doesn't mean the AI can".
 
I've just began merging Whoward's river connections code, I'll probably be able to test it tomorrow and commit assuming there aren't any major issues.

Edit: OK, I'm a bit confused now. I merged the code related to MOD_EVENTS_CITY_CONNECTIONS, but that doesn't seem to be the one which controls the river connections (or I merged it wrong). What part of the new Whoward DLL handles river connections?
 
I need names for two more cults. Does anyone have inspiration for me?

The first is earth/underworld/wealth-themed, and includes the gods Erecura, Vosegus, Nantosuelta and Dis Pater. The second is desert-themed as includes the gods Nergal, Wadd, Abgal and Nesr. (All of those gods can be found in wiki.) The existing five cults are Cult of Leaves, Cult of Epona, Cult of Pure Waters, Cult of Ægir and Cult of Bakkheia. Doesn't necessarily have to be "Cult of ..."
 
Chthonic Haze for the first one? Might be too sinister though.

Etemenanki for the second one? As the house of the god Marduk.
 
earth/underworld/wealth-themed, and includes the gods Erecura, Vosegus, Nantosuelta and Dis Pater

Cult of Ploutōn, the god Hades in his aspect as the deity of the earth's hidden stores of wealth.

The second is desert-themed as includes the gods Nergal, Wadd, Abgal and Nesr.

I don't see any relation between Nergal and the others. "Cult of Hubal" would work for Arab style paganism.
 
I need names for two more cults. Does anyone have inspiration for me?

The first is earth/underworld/wealth-themed, and includes the gods Erecura, Vosegus, Nantosuelta and Dis Pater. The second is desert-themed as includes the gods Nergal, Wadd, Abgal and Nesr. (All of those gods can be found in wiki.) The existing five cults are Cult of Leaves, Cult of Epona, Cult of Pure Waters, Cult of Ægir and Cult of Bakkheia. Doesn't necessarily have to be "Cult of ..."

Wealth: Tears of Greed (icon is a golden tear).
Desert: Cult of Welcoming Oases (unless the cult is more hostile, in which case something like the Dessication Legion would be better).
 
Cult of Ploutōn, the god Hades in his aspect as the deity of the earth's hidden stores of wealth.
I like this one the best, with the focus on earth's wealth.

I don't see any relation between Nergal and the others.
Same source region as the others and "...seems to represent the sun of noontime and of the summer solstice that brings destruction, high summer being the dead season in the Mesopotamian annual cycle." So that seemed to fit a desert god. I'm not quite satisfied with any names yet. "Desiccation Legion" has the right connotation (although the cult isn't purely negative; maybe more negative than positive though).

Edit: Cult of Çahra
 
I've just began merging Whoward's river connections code, I'll probably be able to test it tomorrow and commit assuming there aren't any major issues.

Edit: OK, I'm a bit confused now. I merged the code related to MOD_EVENTS_CITY_CONNECTIONS, but that doesn't seem to be the one which controls the river connections (or I merged it wrong). What part of the new Whoward DLL handles river connections?

The code is all controlled by MOD_EVENTS_CITY_CONNECTIONS which appears in
Code:
CvGameCoreDLL_Expansion2\CustomMods.cpp
CvGameCoreDLL_Expansion2\CustomMods.h
CvGameCoreDLL_Expansion2\CvAStar.cpp
CvGameCoreDLL_Expansion2\CvCityConnections.cpp
CvGameCoreDLL_Expansion2\CvCityConnections.h
CvGameCoreDLL_Expansion2\CvTreasury.cpp
CvGameCoreDLL_Expansion2\CvTreasury.h

If you then enable the EVENTS_CITY_CONNECTIONS option, you'll start getting the required events.
Code:
<!-- Events sent to ascertain if one city is connected to another (v33) -->
<!--   GameEvents.CityConnections.Add(function(iPlayer, bDirect) return false end) -->
<!--   GameEvents.CityConnected.Add(function(iPlayer, iCityX, iCityY, iToCityX, iToCityY, bDirect) return false end) -->

The first event (CityConnections) is used to register an interest in receiving the second event for the given player and connection type (otherwise the DLL would be sending a lot of unwanted events)

You now need a lot of Lua to work out if two cities are connected - for rivers this is all in RiverConnections.lua - see this thread

For example mods, see "Trait - River Connection" and "Global - Air Routes"

Any other questions, probably easier for me to spot them if you ask them on the thread linked above.

HTH

W
 
The code is all controlled by MOD_EVENTS_CITY_CONNECTIONS which appears in
Code:
CvGameCoreDLL_Expansion2\CustomMods.cpp
CvGameCoreDLL_Expansion2\CustomMods.h
CvGameCoreDLL_Expansion2\CvAStar.cpp
CvGameCoreDLL_Expansion2\CvCityConnections.cpp
CvGameCoreDLL_Expansion2\CvCityConnections.h
CvGameCoreDLL_Expansion2\CvTreasury.cpp
CvGameCoreDLL_Expansion2\CvTreasury.h

If you then enable the EVENTS_CITY_CONNECTIONS option, you'll start getting the required events.
Code:
<!-- Events sent to ascertain if one city is connected to another (v33) -->
<!--   GameEvents.CityConnections.Add(function(iPlayer, bDirect) return false end) -->
<!--   GameEvents.CityConnected.Add(function(iPlayer, iCityX, iCityY, iToCityX, iToCityY, bDirect) return false end) -->

The first event (CityConnections) is used to register an interest in receiving the second event for the given player and connection type (otherwise the DLL would be sending a lot of unwanted events)

You now need a lot of Lua to work out if two cities are connected - for rivers this is all in RiverConnections.lua - see this thread

For example mods, see "Trait - River Connection" and "Global - Air Routes"

Any other questions, probably easier for me to spot them if you ask them on the thread linked above.

HTH

W

OK, thanks, it is a missing lua thing then, and not something I did wrong.

@Pazyryk: When do you want me to add the DLL support for the river connections?
 
Top Bottom