Modified DLL - "Control more Stuff"

Vehem

Modmod Monkey
Joined
Nov 22, 2005
Messages
3,219
The Good News
I've been working on a few changes to the DLL that may be useful for what I'm doing with Fall Further and a few people have put in requests for other changes that I've incorporated as well.

The Bad News
It's based on the 2030h DLL. This means that (at least) the Event Trigger selection update that Kael made is not included. There may have been another change that I have not seen, but as far as I'm aware, that's the only thing missing.

The Silver Lining
This one is available now, and the next version will be based on the 2031 DLL when the source code becomes available. For now, this one is usable and (as far as tested) stable in-game, so it's fine for developing Modmods with, just not ideal for releases.

Anything else?
I've still got a couple of requests to work on regarding the DLL, but if there's anything else of a similar nature (ie "changes that enable you to control more functions of the game via XML/Python") that you'd like to see - post them here and I'll see what I can manage.

Current Download and Changelog
[Download for Compiled DLL, necessary XML changes and changed DLL Source]

Spoiler ModfiedDLL-FFH2030h-Vehem A :
Code:
Modified DLL Ffh2030h - Vehem-A
===============================

The DLL is currently based on the source for FfH2030h released by Kael.
The following functionality is added/changed.

------------------------------------
Added Python Hook CannotGrow(PyCity)
------------------------------------
This function is called (in Python) when a city is due to grow. If it returns 1, the 

city growth is prevented.

Purpose: Python control of growth

--------------------------------------
Added Python Hook CannotStarve(PyCity)
--------------------------------------
This function is called (in Python) when a city is due to starve. If it returns 1, the 

city starvation is prevented.

Purpose: Python control of starvation

---------------------------------
Changed - Civic Feature Happiness
---------------------------------
Feature Happiness from civics is now expressed as a percentage value instead of integer.
	* A value of 100 will provide 1 happy face per feature of this type
	* A value of 50 will provide 0.5 happy faces per feature of this type
	* A value of 357 will provide 3.57 happy faces per feature of this type

NB: You must change each Civic that uses this tag to be 100x it's original value. An 

original value of 1 Happy per feature would be 0.01 Happy per feature 

Purpose: More precise control of civic happiness

------------------------------
Changed - Civic Unit Happiness
------------------------------
Feature Happiness from stationed unitsis now expressed as a percentage value instead of 

integer.
	* A value of 100 will provide 1 happy face per unit stationed
	* A value of 50 will provide 0.5 happy faces per unit stationed
	* A value of 357 will provide 3.57 happy faces per unit stationed

NB: You must change each Civic that uses this tag to be 100x it's original value. An 

original value of 1 Happy per unit stationed would be 0.01 Happy per unit stationed

Purpose: More precise control of civic happiness
 
If you ever find a way to make everything reference properly for Modular Loading, that'd be swell by me :) There is quite the list of things which don't work properly, but I assume a fairly common link to it. So for starters you could check out Pre-requisites for Promotions. (if you want a more complete list I can generate one fairly quick and easy, I just create a module with everything blank and see what gets changed of the existing information in the game).
 
If you ever find a way to make everything reference properly for Modular Loading, that'd be swell by me :) There is quite the list of things which don't work properly, but I assume a fairly common link to it. So for starters you could check out Pre-requisites for Promotions. (if you want a more complete list I can generate one fairly quick and easy, I just create a module with everything blank and see what gets changed of the existing information in the game).

I'd need to delve into the way modular loading is handled, but if you can sort out the list, I'll try to find some common element that may be causing it (or alternatively discover there isn't one and it's just missing a load of functionality).

To be honest, at the moment I've never looked at the Modular stuff, but then again, until tonight I'd never tried to add an XML-tag variable and have it read by the DLL and accessible by Python (that went rather well and I'm quite chuffed about it :D).
 
Nice. I may base my modmod on this (or on the .31 version). I figured I go ahead and list a few more changes I'd like to see:

The ability to gift (instead of just liberate) cities to vassals.

I'd like it if you could change it so that you could liberate individual cities (preferably those that do not share your cultural borders) without the retirement that they be on a different continent. I found a code that apparently changed this, but it instead seems to make it impossible to liberate a colony under any circumstances.


I would really like the Impersonate Leader spell not to switch you to controlling another civ, but to give you control of both civs; make it work like a hotseat game, where you play a turn as one then a turn as the other until you are discovered and go back to controlling only your own civ. As it is, the AI often messes up your empire as much as you can theirs.

I would love it if buildings could grant an arbitrary number of an arbitrary number of bonuses, instead of an equal number of no more than 3.

Promotions should be able to grant a combat bonus verses multiple promotions (Kael said he will probably add this eventually, but not soon enough for me)

If the weapons promotions are still to be granted automatically in C++ , then it should definitely have tech prereqs (preferably assigned in xml global defines, so you could set it to none)
(I may remove this altogether, since I'd like a more strategic system with more types of promotions with different strengths and weaknesses, and gold costs, probably best handled through spells. If that is the case, making weapontier a tag that allows spells could be useful)

Adding civic options prereq tag to the spells schema would be quite useful.

I'd like HN units to be able to capture/spawn units, but not take cities (this requires making HN units unable to enter rival cities). I already make this change work, so I could easily do it for myself if you don't want to. Making this an option defined in xml could be good.


It might be good if units captured/spawned by combat got the free promotions that they would get if they had been summoned.

I don't think that HN summoners should summon units that are automatically HN; they should start with the HN promotion (easily done in XML), but I hate units that are HN without the promotion. It is hard to keep track of what is and what isn't HN, and you can't declare nationality if you want to. (I think this was pretty simple and I think I already did it, but I don't quite remember)


I'd like units (instead of just promotions) to have the pypPerTurn function/tag. In .31, I would also like promotions to have the pyOnCombatVoctory and pyOnCombatDefeat tags instead of just units.

I'd like a promotion tag that grants a combat bonus (and withdrawal bonus?) based on the percent the owner's culture on the tile. I think that the Homeland promotions should work this way. (maybe something like a (culture %-30)% bonus, which could make them weaker on the offense?) That way Defensive trait leaders are better at defending and at retaking their territory, but not so good at expanding, conquering, or guarding their new acquisitions.

I'd like to make the Grand Menagerie require only a majority of the animal cages it requires, since I plan to add many more types of animals/cages.

I'd like units to get the free promotions that they would get if built in a city if upgraded there (e.g., a scout upgraded in a city with a Hippus Stable should get Horselord, a warrior upgraded to an archer in a city with a Ljosalfar archery range should get Dexterous). Alternatively, such buildings could be made to grant promotions on move, but only to units of the same team. (I think I made some sory of mistake when I tried to do this myself, but it shouldn;t be hard to do.)

The way that Snarko allowed decimal xp in his options mod was kinda cool.

Paradropping probably shouldn't require the unit be in a city; the "Tesserct" spell I added is less useful that way. (This is so simple that I have already done it myself)

Units should unload all their cargo before the die when their duration runs our; otherwise my tesseract spell can very easily kill a stack of you best units, if you forget to unload them manually. (This is so simple that I have already done it myself)



Probably a long shot, but I'd love to see affinity mechanics changed. I'd like it if the damage type was defined in the unit/promotions xml, instead of always being the same for a given resource. I'd also like it if affinity was not just for strength, but could also be applied to movement (possibly also to free strikes, chance to turn barbarian, chance promotions wearing off, various percent bonuses, etc., but lets just start with movement for now as it is the most important and applying it to everything could get really complicated). I think that you should be able to assign fractional affinity, which should probably be rounded or truncated before being applied. Sometimes you want to give a unit affinity, but 1 per mana just seems like too much.


Eventually I'd like to completely revamp the espionage system , which would certainly require major SDK changes. I'd like to allow all units of the Esus religion to conduct espionage. I'd like to make espionage points (called divination points) still effect mission cost and passive missions, but to make active missions cost gold instead. Espionage would probably have to be allowed when the unit is visible. It would be really nice if units could have invisible religions/promotions which could be made visible by Revelation and by passive espionage (which should probably not actually kill the spies it detects, just reveal the religion/promotion, and maybe also be able to remove the HN promotion), and if espionage would require the religion/promotion not be revealed.
 
Back
Top Bottom