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

Diplo modifier DLL support is now available, currently it only handles warmonger modifiers but if you want me to extend the support please let me know.
 
OK. I'm traveling again and I have ModBuddy set up on my laptop for Lua modding, but not VS. Could you attach new dll and post new Lua API for me?

I'd like city razing to be a factor too. However, I'm not sure whether that should be added as "Warmonger" mod (via dll change) or added to my Lua-side "You are Evil" effect. Either seems reasonable. If you want to do it in dll, go ahead. If you don't I'll added it to Lua diplo mod.
 
Sorry for poking my nose in your private thread ;)
If you want to include city razing, consider checking for city religion. Razing a city full of Anjra worshipers busy consuming mana probably shouldn't get you a "you are evil" diplo modifier, especially if razing the city "disables" a nearby temple, or at least it should be reduced significantly.
 
That's the same exact treatment I'll be giving for DoW and city capture. Basically the penalties will shrink as a function of mana consumed by player. So it will be marginally reduced for any fallen civ, but then reduced to no penalty at all if they are doing serious damage.

Then there are the Heldeofol, which are just vermin ... so no diplo consequence at all regardless of what you do to them. (They are themselves totally uncaring about your warmonger status, so you won't even get a Heldeofol penalty for abuse of Heldeofol. But they hate you without that anyway.)
 
OK. I'm traveling again and I have ModBuddy set up on my laptop for Lua modding, but not VS. Could you attach new dll and post new Lua API for me?

I'd like city razing to be a factor too. However, I'm not sure whether that should be added as "Warmonger" mod (via dll change) or added to my Lua-side "You are Evil" effect. Either seems reasonable. If you want to do it in dll, go ahead. If you don't I'll added it to Lua diplo mod.

Capture vs Razing has no impact in the vanilla Warmonger calculations. So unless you want me to modify wholesale the vanilla diplo mechanics any Razing-specific effects should be done in lua (assuming we have a city razed event, if not Whoward has one we could steal).
 
if not Whoward has one we could steal.

Feel free to use/abuse whatever you want from my DLL - no need to "steal" it ;)
 
@ls612, Some C++ grunt work if you are interested: (...perhaps not the most inspiring way to ask, but honest ;))

We need CvCity::GetFaithPerTurnFromSpecialists(), exposed to Lua for UI. I had assumed that YIELD_FAITH from specialists was added to dll based on a stray reference to it, but that was a mistake.

I can do this if you are busy with other stuff, but I'm currently very bogged down in v6 changes.
 
@ls612, Some grunt C++ work if you are interested:

We need CvCity::GetFaithPerTurnFromSpecialists(), exposed to Lua for UI. I had assumed that YIELD_FAITH from specialists was added to dll based on a stray reference to it, but that was a mistake.

I can do this if you are busy with other stuff, but I'm currently very bogged down in v6 changes.

I have the time to do that this week.
 
Pazyryk: I have a loaded question...
It doesn't really matter if the answer is "not now, not ever".

Do you plan to have at least a few more "binding-loreish" options in Ea ?
I mean : UU, UB...Etc, specific twists on great-warriors... or something ?


I think it would be worthwhile to give 2-3 UU and 1-2 UB to each name ... but you may be able to mutualise by linking them to the name-specific policies:

eg: all names allowed to get caravaners get "camels" in replacement of basic horseman (small str/movement variation, unique art), all names allowed to get architects can build "palaces" instead of "castle" in cities, brings culture and gold, all names allowed to get war tacticians get a different Warrior GP class : tactician: slighlty different in power, and in visuals..
and maybe UU (either for GP or for units) for pantheists cults.... (not only specific promotions)

(Edit: Idea from brokensky: seafarer/naval civs get : Boarding parties instead of light infantry and Marines UU instead of medium infantry).

I know it is much work. But IMO, the visual effect (UU) and the goals that it gives you in planning your techs/policies might be able to bring even more fun and immersion.
in FFH, what is fun is not only that you have different palaces, world-spell, mechanics and a wide tree (melee/magic/horses/religion/recon), and very different religions... it is also the huge number of UU (at least graphically) and the few UB...which gives you goals in your tech tree / culture tree (for Master of mana).

I mean that in Ea, you can get rewarded of an early choice (name) which helps you continuing the that direction. After that, you have to adapt to the game you are in, and notwithstading that help in that initial direction (which can be small sometimes),

However there is nothing on the game that show that you are Fir bolg versus
Luchtain. all your units are exactly the same... even Ikkos only have mounted units that are slightly more experienced.
There is nothing that you should strive for as Luchtain as it would give you a further advantage if you reach it... neither in your favored techs, nor in other techs.
Maybe luchtain/Petra could get improved forts improvements, with slightly different visual ? and if they go out of their base tech, maybe their harbors can get a fortified sea-wall, or with advanced irrigation they can build "dams" and creates lakes on river ? + dam improvement? ...or something.
 
Not for all 50 civs, no. But there is nothing stopping us from adding UU or UB for any number of individual civs (except modding time). Most likely we can use these where the current civ effect is too weak or not very interesting. There is certainly work to be done making each civ interesting, different and balanced.

But I want to finish civ-specific policies first (the mechanic is added, but I need to add the individual policies and effects).
 
There's a game hang that happens now when player presses Begin Your Journey for a new game. Never for loaded game. But it happens maybe 40% of the time for new game [Edit: well, on some days it is 70% on others it is 0% ... seems that some playtesters see it and others don't]. It's a permanent hang that never CTDs. (I might be seeing a quick graphic glitch in the unit selection animation but I'm not 100% sure about that.) I've ruled out (as best as possible) Lua with print statements. There are three functions that run after pressing this button: the first 2 start and finish OK, the 3rd never starts.

And in one game I even saw this again:
Spoiler :
[*]Something really weird happened in my first autoplay game. Starting exactly on turn 96 and thereafter, on each Barb turn GameEvents.PlayerPreAIUnitUpdate fires exactly 13 or 14 times consecutively for Barb player only. I don't know much more or whether barb was actually getting to play 13 turns. It's hard to imagine this isn't a dll bug (although we are constantly surprised). Game CTD'd after turn 145 - not sure if that is helpful though since it was messed up already on turn 96.
[/LIST]
The Minidump wasn't helpful when this happened before - I think because the game doesn't crash for many turns after the problem starts...


So I'm going through the painstaking process of using old dlls to see where the problem was introduced (we've both done significant changes). I'll update here as I go, but so far:

14df7eb (current) - game hangs / [re-compiled - testing again... OK, no more hang :confused:]

441a56e - saw hang at least once / recompiled: started 4 games with no hang

c3ecf72 - started 4 games with no hang

c487b7b - started 8 games with no hang


OK, well that was a wild-goose chase apparently. I believe this is the 2nd time that I've compiled a broken dll, only to recompile and have it work fine. The "hang" symptom was new this time. But it's weird that the problem above (in spoiler) came up again (on the same exact turn!).


Edit: Problem not solved!

Fortunately, we have a play tester (Bhaal) who is seeing the hang more consistently, so here is the exercise again, with commits ordered from newest to oldest:

14df7eb: Failed 3 Times.
441a56e: 1st Worked. 2nd Failed. 3rd Failed (Very quickly after "freezing" this time Civ went unresponsive which was different).
f5ec276: Worked 3 Times.
c3ecf72: Worked 3 Times.
c487b7b: Worked 3 Times.
4f0c278: Worked 3 Times.
33b4dc4: Worked 3 Times.

441a56e is right after f5ec276, so that appears to be the problem. There were 3 things changed in that one:
  1. Addition of GameEvents.GameSave
  2. A calendar hack to remove "BC/AD" from default gamesave names; it didn't work but I forgot to remove the hack
  3. Code to allow combat unit to attack out of a city that has a GP.
I'll test out on Bhaal again with calendar hack removed. Unfortunately, I suspect it is the GameEvents.GameSave, since that times exactly with the hang. It only happens for the autosave that runs immediately on Begin Your Journey, and it doesn't seem to matter if there is Lua attached to the event. So maybe the problem is running gDLL->GetScriptSystem() at this particular time. If so, then we need to bypass this code at this particular time.


FINAL RESOLUTION:

Seems a little strange, but the problem was calling gDLL->GetScriptSystem() for GameEvents.GameSave from CvDllGame::Write (or CvGame::Write, doesn't matter) on the first save after player presses Begin Your Journey for new game only. At all other times it is fine. Didn't matter whether any Lua hooked up to the GameEvents or not, so it seems to be the statement gDLL->GetScriptSystem() all by itself.

The fix I implemented was simply to skip the first save that occurs (using a new member boolean in CvGame).
 
Top Bottom