DLL - Lua API requests

Is there anyway to allow a function that forces a defensive pact between two civs, akin to the existing DoForceDoF()?
V54 will come with
Code:
pPlayer:DoForceDefPact(iOtherPlayer)
which is basically the same as the players making a trade deal with a def pact on both sides
 
My other ideas apparently weren't good enough to warrant any acknowledgement, how about an API that changes the level of Warmonger of a Leader?

Right now, we have these:
Key Value
"NO_THREAT_VALUE" -1
"THREAT_NONE" 0
"THREAT_MINOR" 1
"THREAT_MAJOR" 2
"THREAT_SEVERE" 3
"THREAT_CRITICAL" 4
"NUM_THREAT_VALUES" 5

But we are only able to GET them, not to SET/CHANGE them. I can think of a few uses for a SetWarmongerThreat(). :)
 
to warrant any acknowledgement

There are only so many modding hours in a day ;)

Before I can say "yea or nay" I like to investigate the complexities of the issue - and at the moment all of my modding hours (and then some) are being consumed by Unified Yields
 
Before I can say "yea or nay" I like to investigate the complexities of the issue - and at the moment all of my modding hours (and then some) are being consumed by Unified Yields

And for doing so you will forever be honoured as the pre-eminent modder. At least as far as I am concerned.

If I haven't said so enough before, thank you very much.:goodjob:
 
pPlayer:
  • IsAtWar, bool

Since this function checks for whether or not the player is at war with the Barbarians, it returns true in almost all cases. May I request a "pPlayer:IsAtWarExcludesBarbarians()" or something similar, so that I can quickly determine if a Civ is at war with any Civilization or City-State without looping through all of them? Thank you!
 
pPlayer:
  • IsAtPeaceAllMajors, bool
  • IsAtPeaceAllMinors, bool
  • IsAtWarAnyMajor, bool
  • IsAtWarAnyMinor, bool

Edit: and I've excluded the barbarian player from these 4 and the original 2 methods
 
GetBaseCombatStrength() and GetBaseRangedCombatStrength() both exist, but to set, there is only one (SetBaseCombatStrength).

pUnit:SetBaseRangedCombatStrength(iStrength) (and the associated 20 or so internal changes to support it) will be in V60 of the code base
 
pPlayer:
  • IsAtPeaceAllMajors, bool
  • IsAtPeaceAllMinors, bool
  • IsAtWarAnyMajor, bool
  • IsAtWarAnyMinor, bool

Edit: and I've excluded the barbarian player from these 4 and the original 2 methods


Awesome. Thanks!

pUnit:SetBaseRangedCombatStrength(iStrength) (and the associated 20 or so internal changes to support it) will be in V60 of the code base

This should also prove quite useful. Thanks for this one as well.
 
Something like player:GetNumPuppetCities() would be useful.

Additionally, would it be possible to add something like player:ChangeScoreFromReligion(change), akin to player:ChangeScoreFromTechs()?
 
Something like player:GetNumPuppetCities() would be useful.

Bizarrely, there is a C++ GetNumPuppetCities() method already, I'll expose this to Lua in the next build (v65 of my DLL)
 
Additionally, would it be possible to add something like player:ChangeScoreFromReligion(change), akin to player:ChangeScoreFromTechs()?

It's actually ChangeScoreFromFutureTechs() - which is handled differently from GetScoreFrom/Policies/Techs/Cities/Religion() etc

There are 4 more general purpose "scorers" - ChangeScoreFromScenario1() thru ...4(), so you can probably just use one of these.
 
I've tried the Game.CreateGreatWork in DVMC v60 like:
Game.CreateGreatWork(GameInfoTypes.GREAT_WORK_1812_OVERTURE, 0, GameInfoTypes.ERA_ANCIENT, "TXT_KEY_REIMU_HAKUREI")

but it seems nothing happened. What else should I do?
 
Did you assign the new great work to a building with a free slot in a city?

pCity:SetBuildingGreatWork(iBuildingClass, iSlot, iGreatWorkIndex)

where iGreatWorkIndex is the return value from Game.CreateGreatWork()
 
Did you assign the new great work to a building with a free slot in a city?

pCity:SetBuildingGreatWork(iBuildingClass, iSlot, iGreatWorkIndex)

where iGreatWorkIndex is the return value from Game.CreateGreatWork()

Thanks! It works very well.
 
Back
Top Bottom