DLL - Various Mod Components

For anybody else who's interested ...

... you just need to put the modified ChooseFreeItem.lua file into a mod and set it to VFS=true, no InGameUIAddin entry is needed

Thanks for the info! Would this work with overwriting other mods ChooseFreeItem.lua, too if I reference them?
 
Thanks for the info! Would this work with overwriting other mods ChooseFreeItem.lua, too if I reference them?

Sort of .. .possibly ... I recently discovered that if Mod X depends on both Mod A and Mod B, while you cannot enable X unless both A and B are enabled first, the contents of X will load after A or B or both have been loaded - which can be a right royal PITA
 
I see. Sounds like one has to try to limit dependencies as much as possible and using references.
 
V82 on my web-site and GitHub

Not save game compatible

"Radaring" fix no longer permits civilians to pass through foreign troops

Fix for improvements outside borders with a maintenance cost that can be built in a single turn being paid for twice

Fix for traits as policies/beliefs involving cumulative items (eg unhappiness from population) - thanks to Lynnes for helping track this down

HPHealedIfDestroyEnemy can be negative (ie additional damge for killing an enemy) - cannot kill the unit (will leave them on 1hp)

"AI - Great People Choices"
- If no religion (and can found one) or not enhanced their religion, pick a Great Prophet
- If Venice and still early game, pick a Merchant of Venice
- If going for a culture/tourism victory pick an artist, writer or musician if there are available great work slots (or send the musician on a concert tour)
- Fall-back is to pick a scientist

CSD v28 support - more details on the combined thread, please post questions/issues there
 
Why did you decide to not allow units die from the damage?
The game core has gone past the point where it checks for unit death in the combat - its expecting that unit to be alive - suddenly killing it introduces way too many complications
 
Thanks once again for the updates to the DLL whoward. Is there any chance of seeing Smart AI v3 incorporated at some stage?
 
Does DLL-VMC support Mac?
If not, would you plan to release a version compatible with Mac OS? ;)
 
Does DLL-VMC support Mac?
No, DLLs are a MS-Windows only technology

If not, would you plan to release a version compatible with Mac OS?
a) Aspry would need to release the source code, b) someone would have to pay me handsomely to do it (my loathing of all things i knows no bounds!)
 
Any chance we can have an effect similar to Scouts in CBP, where revealing tiles generate XP for the unit?

Why limit it to xp for revealing tiles? What if someone else wants to give faith for discovering mountains, or culture for marshes, or gold for mineral deposits? Or what if the tiles have to be on a different continent to the one you start on? Or shouldn't include ocean tiles? I'm really against Firixian style "let's hard-code a very specific game mechanic into the DLL".
 
Digging into how the CP codes XP for scouts, you can pretty much solve all possibilities by adding the unit info to the existing NaturalWonderDiscovered and TileRevealed events - I'll add this to the list of things to look into further.
 
Is there any way to create 'aura' effects other than using UnitSetXY?

If I want to code a unit that gives promotion for others within 1 rank, when using UnitSetXY, I have to create and re-create tables whenever the giver moves: check all units that are now within one tile and compare with the table, remove those that are in the table but aren't in range and then add those who are in range but not in the table... I mean, this is a bit of grunt work, but I wonder how much of a slow down this would cause if there are 50 of these effects in play at the same time.

I wonder how the UnitSetXY method relates to the Great General's bonuses, the Moai's or even the Maori Warrior's penalty.
 
I wonder how the UnitSetXY method relates to the Great General's bonuses, the Moai's or even the Maori Warrior's penalty.

It doesn't. The game core knows about these promotion columns so when a unit attacks (say) it looks for a GG in range. The GG knows nothing about the combats within range.

Same for the Moai, the Maori Warrior (or more accurately any unit with the associated promotion) looks for an appropriate improvement within (hard-coded, unless using VMC) range
 
If I want to code a unit that gives promotion for others within 1 rank
You could do this with the battle events - use BattleJoined to give the promotion and BattleFinished to remove it
 
Sure, that works for combat-related (and non-combat dying) situations, but fails for anything else.
If I want to give +1 movement, or +1 Spread use, or a 1% chance to kill on sight, etc, these events wouldn't work.


Reading that thread, it seems it would load the game too much anyway. I'll ignore aura effects for now...
 
Reading that thread, it seems it would load the game too much anyway.
For combat related proximity promotions, it'll load it way less than UnitSetXY would.
 
Back
Top Bottom