Feature Requests and Discussion

I guess I did not explain myself well.

You can call canDoReligion to find out whether or not a player is allowed to convert to a religion.

There is not an exposed function that canDoReligion checks in order to allow modders to block pertain players from adopting certain religions.

Since I can already limit what can be selected in the religion screen, simply a way to suppress the popup that suggests converting to religion the first time it spreads to your cities would be enough.


I discovered that I could use CvEventManager.py's def onPlayerChangeStateReligion(self, argsList): to force a player that should be ineligible for a religion to abandon it as soon as he adopts it, and also eliminate the anarchy at the same time. There may still be issues with alignment changes though, and with prohibiting another conversion within the next 10 turns.

It would be nice to have a more elegant way to block specific religions for specific players, but it is not a particularly high priority.

I would much rather be able to take advantage of the improvements you have already made than keep waiting for more improvements to be added before your next release.
 
How much do people actually care about converting religions through those popups without first visiting the religion screen to check the possible benefits from doing so?

If you simply replaced the "Yes, start the incantations!" button that converts the religion immediately with a button that takes the player to the religion screen, then there would not be much need for a new callback.

(That is, assuming that AI players are limited like human players are by the religion screen code.)

--------

This is not the highest priority, but I was wondering if you could make some changes that would let me keep the functionality that my modmod gains from using CvGameUtil.py's def unitCannotMoveInto(self,argsList): without slowing the game down so much.


Could you make a tag (maybe called <bOwnBordersPassable>) that allows units with <TerrainImpassables> andFeatureImpassables> to still be able to pass through those normally impassable features and terrains so long as they are within the owner's (teams') cultural borders?

Currently CvUnit.cpp's bool CvUnit::canMoveInto(const CvPlot* pPlot, bool bAttack, bool bDeclareWar, bool bIgnoreLoad) const checks if (DOMAIN_SEA != getDomainType() || pPlot->getTeam() != getTeam()) to allow things like workboats and galley's to cross oceans within cultural borders. If it checked for this tag rather than for DOMAIN_SEA, then I could let Balors and the Seven Demon Lords freely move in their own territory but never be able to leave hell terrain otherwise. (I do this already through the Bound By Compact dummy promotion and unitCannotMoveInto, but that seems inefficient.)


Of course, I would then still have to use the callback for my Ring of Warding to function, unless you also went ahead and made a tag for buildings that would make a city's tile impassable to any non-magic immune hostile summons. (In my latest version I also make the Sidar Shrine of Arawn UB prevent undead units from entering the city, but I am not sure I want to keep it that way.) I don't know if that would be worth your effort.

Of course, unitCannotMoveInto would probably not slow things down as much if everything was placed within if pPlot.isEnemyCity(pUnit):


----

Could you add a tag to allow a building to make a city immune to blockades? The code I use to try to make the Smuggler's Port end the blockades of rival ships within its cultural borders does not seem very efficient or always effective.

----

Could spells be given an <inCityRadius> tag, which when combined with the <BuildingPrereq> tag would make the spell available only if the unit is within the radius of a city with that building?

(I'm thinking that could greatly increase the efficiency of the dummy spell I use to make the Nullstone Citadel block casting.)

---

Could you make <BuildingClassOwnedPrereq> (or a new tag if you prefer) count at the team level rather than the player level?

(I would like teammates to be able to share the benefits of the Guild of the Nine and the Shrine of Sirona.)
 
I love the improvements to worldbuilder in MNAI v2.5. I would have requested them myself if I had known they were possible.

Could you improve the Unit Data part by allowing us to use worldbuilder to change a unit's religion too?

I long ago added dummy promotions which use a <PyPerTurn> to change the unit's religion, but I'd rather be able to get rid of those.

Edit: Also, it would be nice if we could easily use world builder to set as unit as having casted or not, similar to how we can now use it to set whether it has already attacked. Since there are no units capable of interception at least in base FfH2, it would make sense to simply re-purpose that toggle. Edit2: I just figured out how it works and made that change myself.
 
I would prefer if checking the "unrestricted leaders" option still made the AI choose its traditional leaders unless I force it otherwise.

EDIT: Alternatively, there could be two different options: "unrestricted leaders" which defaults to one of the normal ones but allows you to pick a different one, and "random leaders" that works the way unrestricted leaders is working in 2.5.
 
Could you add the ability to change a player's Alignment in the World Builder Edit Control Player Data?
 
Could you make a tag (maybe called <bOwnBordersPassable>) that allows units with <TerrainImpassables> andFeatureImpassables> to still be able to pass through those normally impassable features and terrains so long as they are within the owner's (teams') cultural borders?

Could you add a tag to allow a building to make a city immune to blockades?

Could spells be given an <inCityRadius> tag, which when combined with the <BuildingPrereq> tag would make the spell available only if the unit is within the radius of a city with that building?

Could you make <BuildingClassOwnedPrereq> (or a new tag if you prefer) count at the team level rather than the player level?

OK. Added these to the request list.

Of course, I would then still have to use the callback for my Ring of Warding to function, unless you also went ahead and made a tag for buildings that would make a city's tile impassable to any non-magic immune hostile summons. (In my latest version I also make the Sidar Shrine of Arawn UB prevent undead units from entering the city, but I am not sure I want to keep it that way.) I don't know if that would be worth your effort.

Thats a bit too specific.

I love the improvements to worldbuilder in MNAI v2.5. I would have requested them myself if I had known they were possible.

Could you improve the Unit Data part by allowing us to use worldbuilder to change a unit's religion too?

I long ago added dummy promotions which use a <PyPerTurn> to change the unit's religion, but I'd rather be able to get rid of those.

Edit: Also, it would be nice if we could easily use world builder to set as unit as having casted or not, similar to how we can now use it to set whether it has already attacked. Since there are no units capable of interception at least in base FfH2, it would make sense to simply re-purpose that toggle. Edit2: I just figured out how it works and made that change myself.

Could you add the ability to change a player's Alignment in the World Builder Edit Control Player Data?

Good ideas! Please direct requests to Platyping in his thread. I just copied his code. It's all done in python, so you could take a stab at these changes yourself.


I would prefer if checking the "unrestricted leaders" option still made the AI choose its traditional leaders unless I force it otherwise.

EDIT: Alternatively, there could be two different options: "unrestricted leaders" which defaults to one of the normal ones but allows you to pick a different one, and "random leaders" that works the way unrestricted leaders is working in 2.5.

Not worth adding another option IMO. You can always manually set the leaders and civs you want to play with.
 
OK. Added these to the request list.
Thanks.

Thats a bit too specific.
Yeah, I figured it was
Good ideas! Please direct requests to Platyping in his thread. I just copied his code. It's all done in python, so you could take a stab at these changes yourself.
I don't know that I'd want to bother him with things that are not applicable outside of FfH2 modmods.


When I went to the [PYTHON] Platy World Builder thread, I noticed that there was a new version updated just yesterday. I went ahead and merged in the updated code.

(Worldbuilder seems more stable now. It is no longer crashing if I forget to press enter after inputting a value. It seems impossible to edit terrain types with anything larger than a 1x1 brush though.Edit: Ok, it again seems to crash if I forget to press enter after typing in a number for progress towards a technology. Still, taking the screen resolution into accounts makes the window sizes more manageable.)

I then went ahead and edited Player Data so that it includes an "Alignment" drop down menu, and edited Unit Data so that it includes a "Unit's Religion" drop down menu, a "Has Casted" radio button, and also a "Duration" number box. I had some trouble at first, but they all seem to be working perfectly now.

You are of course welcome to borrow the code from my modmod.

I'll probably release it tomorrow night.

Not worth adding another option IMO. You can always manually set the leaders and civs you want to play with.

Does this mean that you'll be leaving Unrestricted leaders as it is now, or making it so that leaders that don't fit with the civ won't be assigned randomly but can be manually assigned?

My personal preference is the same as doktarr's here.
 
I would prefer if checking the "unrestricted leaders" option still made the AI choose its traditional leaders unless I force it otherwise.

EDIT: Alternatively, there could be two different options: "unrestricted leaders" which defaults to one of the normal ones but allows you to pick a different one, and "random leaders" that works the way unrestricted leaders is working in 2.5.

Not worth adding another option IMO. You can always manually set the leaders and civs you want to play with.
Ugh. Not only is that a real pain to set up (AFAIK, there's no way to make the pulldown faction/leader selections stick from game to game) but that means I know which leader for those civs is in each game.

If you don't want to make another option, why not change it back? What was the rationale for this change? (FWIW the same argument you make here works in reverse - players who want fully random leaders can set them manually.)
 
If you don't want to make another option, why not change it back? What was the rationale for this change? (FWIW the same argument you make here works in reverse - players who want fully random leaders can set them manually.)
well, if you want random ennemy leaders you cannot SET them manually... that wouldn't be random.
 
well, if you want random ennemy leaders you cannot SET them manually... that wouldn't be random.
Do I even have to state the obvious?

OK, I will: this exact same argument applies if I liked the way unrestricted leaders worked in 2.4 and I want it to work that way.

This isn't regular Civ 4. Some leader/civ combos are really bad fits. Do people really want to play against Arcane leaders of the Khazad? I don't get it. Don't the civ leaders tend to beeline the religions that fit their civ, too? I'm playing against FoL-following Lanun with a Ljosalfar leader right now.

If some people really want unrestricted leaders to work this way, OK, that's cool, but let's provide the original FFH2 version of unrestricted leaders, too. Or, if someone could explain how to change it back.
 
Changing it back requires changes in the DLL and compiling it. Your best bet IMO is making a feature request to have a new setting in the next version of MNAI. If Tholal wants it, and since it should be simple and I rewrote the part of the code that chooses leaders as part of a bug fix, I'll try to code this feature if I get the time.
 
since you wisely removed azers from the lair exploration henchmen list, could you also remove mistforms? those are also a death sentence if popped early due to their invisibility.

also, it seems like the code that tries to place enemy spawning lairs away from starting positions could still use some improvement. you can still spawn with multiples of these very close.

I've noticed Acheron is shooting meteors, due to the new held promo I guess? that seems too powerful alongside with the disciples and sons with fireballs and elementals.
 
Changing it back requires changes in the DLL and compiling it. Your best bet IMO is making a feature request to have a new setting in the next version of MNAI. If Tholal wants it, and since it should be simple and I rewrote the part of the code that chooses leaders as part of a bug fix, I'll try to code this feature if I get the time.
Thank you. If some people want the full random, then there's no real reason to not have both that option and the original FF2 version of unrestricted leaders.
 
I went ahead and updated Platy World Builder to include practically all of the new functions that Kael added. (It does not include things that wouldn't make such sense for world builder, like whether a unit resisted a spell.) Half of these changes were made after the last release of my modmod.


Game Data now allows you to change the Global Counter (i.e., Armageddon Counter) and the Scenario Counter.

Player Data allows you to change the player's Alignment and Traits.

Unit Data allows you to change the Unit' Religion, the Base Defensive Strength, whether it Has Casted, its Duration, and its Scenario Counter.

Plot Data Mode lets you change Moves Disabled for AI, Moves Disabled for Humans, Improvement Building Disabled, City Founding Disabled, Portal Exit X Coordinate, Portal Exit Y Coordinate, and the Minimum Level required to enter.

(Note: Kael exposed pPlot.setMinLevel(i), but he never exposed pPlot.getMinLevel(). Because of this, the minimum level of a tile will always appear to be 1 in world builder, even if you set it to something else. I would like Tholal to expose pPlot.getMinLevel() so that I can remove this confusion.)



I would like to request that you adopt these changes, both because it would make it easier for me to merge the mods in the future and because it adds functionality that would be extremely helpful to scenario-makers.



I have attached all of the files relevant to this modcomp (except for CvGameUtils.py, where the few relevant lines have not changed since the MNAI v2.5 release.)

Note that CvWorldBuilderDiplomacyScreen.py is not included, because it is no longer necessary. Playpting removed it from the updated version of his modcomp on which I based this version. Also note that he consolidated all of the relevant TXT_KEYs into one file, and that I added all of my new World Builder TXT_KEYs to the same file.

Edit: After making this post I noticed that Playpting had made another update. I have now incorporated those changes too, and decided to place it in a file structure so that it can simply be copied over the assets folder.

Edit2: I just realized that I forgot to delete Playpting's version of CvGameUtils.py from the file structure. It should not be there. Do not allow it to overwrite the versions of that file in base FfH2, MMAI, or especially MagisterModmod, as some key mechanics depend on it.

Edit3: I also just came across a rather obvious mistake where there is an extra set of parentheses in line 1100 of CvWorldBuilderDiplomacyScreen.py
 
you might want to change the AIweight for the event choice of the harpy event that triggers the great bard ( I set it to 0 down from 1000 for example ) , since the AI has no way of correctly evaluating if it's a wise choice or not and it usually ends up stunting its growth with unhappiness early on.
 
there's a change in Extramod that changes Liches to be "per player" instead of "per team" , seems like a nice fix :)

also consider raising level prereq for barbarian spectre morphing into wraiths to lvl 6 up from 5, a lucky skeleton can quickly turn into a real monster that way.
 
Back
Top Bottom