DLL - Various Mod Components

Please note, this mod is only an example of how to change the base max hit points for a unit class (via the <Units> table) along with example promotions to give specific units additional max hit points, either as a fixed amount or a percentage of base max hit points.

It is NOT a complete stand-alone mod.

To make it stand-alone, you will need to add and then mod three core game UI files - PlotMouseoverInclude.lua, EnemyUnitPanel.lua and UnitPanel.lua - to remove references to GameDefines.MAX_HIT_POINTS (also coded as GameDefines["MAX_HIT_POINTS"]) and replace them with pUnit:GetMaxHitPoints() (or appropriate variant).

Without the appropriate changes, a unit's hit points will show as (100 - damage), as the game tracks damage taken by a unit and not it's remaining hit points.

However, creating such a mod will make it incompatible with every other mod/pseudo-DLC that also alters any of these three files. Conversely, any mod that alters these three files while keeping the coding to GameDefines.MAX_HIT_POINTS will be incompatible with any mod trying to use the new max hit points feature(s).

Note: Any Pick'N'Mix mod that alters these files, eg "UI - Condensed Promotions" has been changed as required in the latest version.
Better add this to the mod description at your picknmix website, since this thread is quite big and your statement could get lost here.
 
Note: Any Pick'N'Mix mod that alters these files, eg "UI - Condensed Promotions" has been changed as required in the latest version.

Are you going to update the Airships-Mod as well? It includes the EnemyUnitPanel.lua.
 
Are you going to update the Airships-Mod as well?

Picky, picky, picky! :D You want me to update the mod as well as editing the files on my hard-disk :lol:
 
v80 uploaded to web-site and GitHub

Russian translation by Tomahawk.nsk
C4DF bug fix
Diplomacy - By Numbers (and micro-mod)
 
Please note, this mod is only an example of how to change the base max hit points for a unit class (via the <Units> table) along with example promotions to give specific units additional max hit points, either as a fixed amount or a percentage of base max hit points.

It is NOT a complete stand-alone mod.

To make it stand-alone, you will need to add and then mod three core game UI files - PlotMouseoverInclude.lua, EnemyUnitPanel.lua and UnitPanel.lua - to remove references to GameDefines.MAX_HIT_POINTS (also coded as GameDefines["MAX_HIT_POINTS"]) and replace them with pUnit:GetMaxHitPoints() (or appropriate variant).

Without the appropriate changes, a unit's hit points will show as (100 - damage), as the game tracks damage taken by a unit and not it's remaining hit points.

However, creating such a mod will make it incompatible with every other mod/pseudo-DLC that also alters any of these three files. Conversely, any mod that alters these three files while keeping the coding to GameDefines.MAX_HIT_POINTS will be incompatible with any mod trying to use the new max hit points feature(s).

Note: Any Pick'N'Mix mod that alters these files, eg "UI - Condensed Promotions" has been changed as required in the latest version.

What happens, if a lua calls pUnit:GetMaxHitPoints(), without your DLL active? Would the result just be nil, or would there be an error?
If it would be an error, how write it that way, that the lua uses pUnit:GetMaxHitPoints() if you the function exists, and uses the standard GameDefine, if the function does not exist?

I mean I would like to do sth like:
Code:
local max = pUnit:GetMaxHitPoints()
if not max then
    max = GameDefines.MAX_HIT_POINTS
end
 
pUnit:GetMaxHitPoints() is a Firaxis Lua API method - they just choose not to use it!
 
Just returned to Civ 5 after a long hiatus.
Glad to see you're still going strong with this mod.
Do you still put out 34/43/62 versions of the latest DLL?
(On your website v66 seems to be the last available.)
Special request? :please:
 
Do you still put out 34/43/62 versions of the latest DLL?
No ... because nobody's asked for them and they're annoying to build every time (the dll is easy, merging the database changes is a pain)

Special request? :please:
As you've asked so nicely ... watch this space

Edit: And now watch my web-site :)
 
Bang goes that idea :(

Incognito units ... HOORAY!!!
Spoiler :
attachment.php


BOO!!!!!!
Spoiler :
attachment.php
 

Attachments

  • UnitsIncognito1.jpg
    UnitsIncognito1.jpg
    185.5 KB · Views: 261
  • UnitsIncognito2.jpg
    UnitsIncognito2.jpg
    131.2 KB · Views: 261
No ... because nobody's asked for them and they're annoying to build every time (the dll is easy, merging the database changes is a pain)


As you've asked so nicely ... watch this space

Edit: And now watch my web-site :)


You, my good sir, absolutely, positively, and indisputably ... Rock!
 
With the hidden nationality will the unit always appear as Barbarian?

If you mean the column in the <Units> table, it pretty much does nothing - makes a unit look like a Barbie and hides who killed/died in a combat. It doesn't permit units to enter territory, attack, capture civilians without war being declared ... so it's pretty pointless.

As far as the AI is concerned, it thinks its like every other of it's normal units.

Now, what I had in mind ... is pretty much moot as I can find no way to change the SV map, so you can always switch view to get the true nationality of the unit :(
 
If you mean the column in the <Units> table, it pretty much does nothing - makes a unit look like a Barbie and hides who killed/died in a combat. It doesn't permit units to enter territory, attack, capture civilians without war being declared ... so it's pretty pointless.

As far as the AI is concerned, it thinks its like every other of it's normal units.

Now, what I had in mind ... is pretty much moot as I can find no way to change the SV map, so you can always switch view to get the true nationality of the unit :(

You couldn't somehow edit UnitFlagManager?
 
Back
Top Bottom