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

You can add it now. Watch out for merge conflicts in CvAStar.cpp. I've done a lot of modding in there for GP movement.

OK, pull request sent. Note that you will now have to test Whoward's RiverConnection.lua code to make sure it works with Ea movement rule changes.
 
OK. I'll take a look at changes (I think I can spot any conflicts) and merge if it looks safe. I guess that the real logic for this system is on the Lua side? I'll try to get that in and tested for release.

On a different note, there will be a new Media Pack sometime soon. There's so many new units to add. And I need to rebuild the mod's soundtrack. It doesn't work now because it was added by a hack back when soundtrack modding wasn't supported.
 
OK. I'll take a look at changes (I think I can spot any conflicts) and merge if it looks safe. I guess that the real logic for this system is on the Lua side? I'll try to get that in and tested for release.

Yes, the logic is in Lua. Whoward linked to the thread where it is discussed on the previous page.
 
The RiverConnections lua code has been extensively tested (as it forms part of the trait of my Morindim civ I've been playing a lot of games with it recently) - it will cope with complex river systems including ones that bifurcate (which almost never happens in real life - see the fork in the magenta circle). Recently I also had the situation where A and B were on the same river and B and C were on a different river (ie B was on two distinct rivers) and it managed to figure out that C was connected to the capital at A.

There is a call-back function to determine if a plot is traversable (for when you need to find a river bank route) so adapting to any "living terrain" logic should be straight forward.
 
Issue with the civilian stacking code, won't affect Ea but does impact the "No more ..." mod

Aircraft cannot attack cities. Caused by the weirdness in the DLL that the code only treats units with a melee attack as "combat units" (and not those with a range only - ie aircraft) so it tries to rebase the plane to the city rather than attack it.

Two occurances of IsCombatUnit() in CvUnit.cpp need replacing with (a new method) "!IsCivilianUnit()" and the new method needs defining in CvUnit.h

CvUnit.h
Code:
  [COLOR="Magenta"]inline bool IsCivilianUnit() const
  {
    return !(IsCombatUnit() || isRanged());
  }[/COLOR]

  inline bool IsCombatUnit() const


CvUnit.cpp
Code:
  // Added in Civ 5: Destination plots can't allow stacked Units of the same type
  if((bMoveFlags & MOVEFLAG_DESTINATION) && [COLOR="magenta"]!IsCivilianUnit()[/COLOR])


Code:
  if ([COLOR="magenta"]IsCivilianUnit()[/COLOR])
    return false;

  if(isHuman() && getOwner() == GC.getGame().getActivePlayer())
 
Major new development build committed at the Ea_III_Sword_and_Sorcery repository. Follow the link in the Readme there to the new Media Pack v4 (required).

This fixes the broken soundtrack and adds tons of new units, both wandering animals and barbs (with new barb encampment types). A few units added in Media Pack aren't added to game yet, but will be soon.

Edit: Almost forgot, the Éa III Sword & Sorcery Manual is now online here. I still have some updating to do before official release, but it's close...
 
Major new development build committed at the Ea_III_Sword_and_Sorcery repository. Follow the link in the Readme there to the new Media Pack v4 (required).

This fixes the broken soundtrack and adds tons of new units, both wandering animals and barbs (with new barb encampment types). A few units added in Media Pack aren't added to game yet, but will be soon.

Edit: Almost forgot, the Éa III Sword & Sorcery Manual is now online here. I still have some updating to do before official release, but it's close...

It's kinda hard to build the Media pack without the modbuddy solution. ;) Other than that, I'm liking what I'm seeing in the changes.
 
It's kinda hard to build the Media pack without the modbuddy solution. ;) Other than that, I'm liking what I'm seeing in the changes.
I forgot I was supposed to post the project and not the build. Is there any reason you need the project for that? They are not that frequent and we can't GitHub them anyway.
 
I forgot I was supposed to post the project and not the build. Is there any reason you need the project for that? They are not that frequent and we can't GitHub them anyway.

I need to build it once in order to launch the mod. The file you linked to in the readme is the unpackaged media pack, and since Ea III hasn't been officially released yet I need to build everything manually to play.
 
... I need to build everything manually to play.
No you don't. Éa Media Pack (v 4) is just a stand-alone mod, completely separate from Éa III Sword and Sorcery (although the later depends on the former). It's already built with its modinfo file. Unzip it in your MODS folder and you should be ready to go.
 
No you don't. Éa Media Pack (v 4) is just a stand-alone mod, completely separate from Éa III Sword and Sorcery (although the later depends on the former). It's already built with its modinfo file. Unzip it in your MODS folder and you should be ready to go.

Ah, I didn't realize that. Nevermind then.
 
Just started playing a test game with Ea III, and I'm a bit confused by this message. Is the text about unhappiness from cities the bug? Or is something else going on?

 
It's a mod bug.

Actually, this tracks back to a Lua kludge that I invented to work around the limitation that you can't add unhappiness via a building. I give unhappiness via Defines, then a compensating happiness via hidden building, then take away the building :cringe:.

I could fix the UI to support the kludge, or, better, one of us could mod dll to support negative happiness from buildings. It's low priority though (there are bigger problems to find).

Watch out for new commit in next hour or so. I've been debugging spells.
 
one of us could mod dll to support negative happiness from buildings. It's low priority though (there are bigger problems to find).

Already done - CvCity::processBuilding()

Code:
#if !defined(MOD_API_EXTENSIONS)
// Trust the modder if they set a building to negative happiness
if(pBuildingInfo->GetHappiness() > 0)
#endif
{
  ChangeBaseHappinessFromBuildings(pBuildingInfo->GetHappiness() * iChange);
}

#if !defined(MOD_API_EXTENSIONS)
// Trust the modder if they set a building to negative global happiness
if(pBuildingInfo->GetUnmoddedHappiness() > 0)
#endif
{
  ChangeUnmoddedHappinessFromBuildings(pBuildingInfo->GetUnmoddedHappiness() * iChange);
}
 
Grrrr... Thanks. But my head is about to explode with a more pressing problem. I can't get AI units to do a ranged attack.

This works for active player but not any AI player:
Code:
unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, x, y)

I use this all the time with MissionTypes.MISSION_MOVE_TO and it works for human and AI player. In fact, it is working quite well to make AI melee unit attack an enemy unit.

There are some args after x, y but I always leave those default.

Just to be complete in my posting, my test setup is "unit" (Player 1 archer) and I'm trying to get it to attack a giant spider at 53, 32:

Code:
> unit:CanRangeStrikeAt(53, 32)
true
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1, nil, Map.GetPlot(53, 32), unit)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1, nil, unit:GetPlot(), unit)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1, -1, unit:GetPlot(), unit)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1, 19, unit:GetPlot(), unit)
> unit:PushMission(GameInfoTypes.MISSION_RANGE_ATTACK, 53, 32, 0, 0, 1, 19, Map.GetPlot(53, 32), unit)

19 is the enum integer for MISSIONAI_ASSAULT.

But none of this makes the archer fire. (The first 4 at least would work for active player, but I'm pretty sure that the last 3 args don't do anything for active player.)

I thought about playing with flags (arg 4), but none of them seem likely to be relevant here:
// These flags determine plots that can be entered
Spoiler :
#define MOVE_TERRITORY_NO_UNEXPLORED (0x00000001)
#define MOVE_TERRITORY_NO_ENEMY (0x00000002)
#define MOVE_IGNORE_STACKING (0x00000004)
// These two tell about presence of enemy units
#define MOVE_UNITS_IGNORE_DANGER (0x00000008)
#define MOVE_UNITS_THROUGH_ENEMY (0x00000010)
// Used for human player movement
#define MOVE_DECLARE_WAR (0x00000020)
// Used for AI group attacks (??). Not really a pathfinder flag
#define MISSION_MODIFIER_DIRECT_ATTACK (0x00000040)
#define MISSION_MODIFIER_NO_DEFENSIVE_SUPPORT (0x00000100)

#define MOVE_MAXIMIZE_EXPLORE (0x00000080)
//
// Used for route information
#define MOVE_ANY_ROUTE (0x80000000) // because we're passing in the player number as well as the route flag
#define MOVE_ROUTE_ALLOW_UNEXPLORED (0x40000000) // When searching for a route, allow the search to use unrevealed plots


Can anyone help me out here?
 
Ah! Thanks!

Just made a new commit with lots of spell fixes:

Magic Missile: fixed for AI players by whoward69 answer above (& uses Nutty's invisible rocket artillery now)
Explosive Rune: this one too (I use a dummy cruise missile for exploding effect)
Death Rune: level drain fixed
Reanimate Dead: added
Raise Dead: fixed
Summon Archdemon: fixed
Call Archangel: fixed

--all had some problems before but are working in test now.
 
Top Bottom