Events that need fixing/tweeking

Uhm, I am playing with patch k (albeit with Vehem's new civs) and the Lanun get the witch event something like every three turns or so.... I guess they kill her all the time, but if I understood what Kael said correctly it shouldn't repeat no matter what they do with her.
 
Uhm, I am playing with patch k (albeit with Vehem's new civs) and the Lanun get the witch event something like every three turns or so.... I guess they kill her all the time, but if I understood what Kael said correctly it shouldn't repeat no matter what they do with her.

The witch event can reoccur. Though every 3 turns seems way way way to frequent.
 
I updated the first post with a couple of event issues that were reported in the bug thread.

I also added edit information for events that are (hopefully) working right in patch K.
 
mid-game it seems every Civ but me discovers a child in some kind of prophecy...
 
Obelisk +3 food is overpowered, so is the free forge. Borderline are free sage, free carnival, and free great prophet.

---

I did not get the mobility promotion when it told me I would (on that unit). After I teched horseback, still no mobility promo showed up.
 
No units that are granted through an event come with promotions right now. So that isn't an isolated glitch. The problem is that the event chooses its target when it starts, and will do everything on THAT target. Since the unit doesn't exist at the start of the event, it cannot get any promotion from it (and that is why the one in which you can have an adept enchant your units weapons, or hire him winds up giving the enchantment promotion to the unit instead of the adept).

Obelisk was placed on the list of changes for patch K or L, can't recall which right at present.
 
It wouldn't be hard to have the event give the unit and promotion through python though, would it?
 
Well, the trick to it as I see it is managing to select the proper unit (Assuming you already got the timing right and ensured the unit is created before the python is called). Ideally it shouldn't be too hard, but I am not sure how the game can tell the difference between a stack of warriors that already existed and one which it just created. It ought to be able to go off of creation time since it just made the unit, but how easily is that referenced?

Also, in the case of Hiring the wandering Adept, he shows up in your capitol, while the unit is out on the field. So the python has to reference a completely seperate tile AND a unit which has just been called into being.


Events can force another event to happen after they have finished very easily. At first I had thought to use this mechanic to apply the promotions, but the issue of properly targetting the follow-up is the big snagging point each time. About the best way I can think of to accomplish this is to create a Placeholder unit which exists for nothing BUT this task and applying the promotions to it, then changing it to the unitclass which was meant to be awarded. This sort of a solution isn't very elegant though, so I highly doubt it will be used in the main game. I will probably make use of it in the event-fix module when I get around to adding more than just Circle of Gaelan to the list.
 
It's actually pretty easy to add a new unit with any promotions you want in python (it must be if I can do it!), in general. There are events that are already working this way (the new mercenary events or spider mine, off the top of my head). If you use pickCity and/or have a plot selected with the XML, you can use either or both locations to add units with or without promotions.

The problem with the older events is that they attempted to add promotions to a unit created just using the XML, which happens as xienwolf described. The old events just need to be updated to use python instead of XML.
 
After a quick scan of the XMLs, these quests are the offenders for trying to create new units with promotions via XML only:
CIRCLE_OF_GAELAN_3_1
GUILD_OF_THE_NINE_1_1
GUILD_OF_THE_NINE_1_2
GUILD_OF_THE_NINE_2_1
GUILD_OF_THE_NINE_3_2
OVERCOUNCIL_GIFT_2
UNDERCOUNCIL_GIFT_1
CARNIVAL_STAR_3
CARNIVAL_STAR_4
ASHEN_VEIL_DEAL_SALLOS_1
HUNTER_5
ENCHANTER_3

While considering these, I thought of a potential "gotcha" when converting them to python...

There is the potential for an event to try to create a unit not usually available to the played civilization. For example, Calabim triggering an event that offers Warriors. First off, would it work? I'm guessing yes, but not sure. Second, is it desireable to create Warriors, or to try to catch them somehow and create Blood Pets? Probably an event-by-event decision, depending on flavor, etc.

If you were to try to "catch" invalid units, would this part of the Horse Whispering event python be doing this already?

Code:
	iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_HORSE_ARCHER')
	iUnitType = gc.getCivilizationInfo(player.getCivilizationType()).getCivilizationUnits(iUnitClassType)
	
	if iUnitType != -1:
		for i in range(iNumUnits):
			player.initUnit(iUnitType, plot.getX(), plot.getY(), UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)

Sorry, I don't have the time or game (just some files I copy to a thumb drive and take with me to play with in down-times) available at the moment to play with it... so I'm just asking some random things that popped in my head :)


And now back to your regularly scheduled event tweaking discussion.
 
As long as you are referencing UNITCLASS_ and not UNIT_ it will come out as the unit which the Civ is allowed to have. I am not sure if any of those events offer a unit which any civ cannot normally acquire on their own (if the enchanter is a Mage that means it would be disallowed to the Khazad), so that would be a small problem if it were done that way which would result in some upset players who do not recieve the reward promised.

I'd bet that the Mercenary ones should be UNIT_ though since you are specifically hiring people who are not from your Civilization.
 
As long as you are referencing UNITCLASS_ and not UNIT_ it will come out as the unit which the Civ is allowed to have. I am not sure if any of those events offer a unit which any civ cannot normally acquire on their own (if the enchanter is a Mage that means it would be disallowed to the Khazad), so that would be a small problem if it were done that way which would result in some upset players who do not recieve the reward promised.

I'd bet that the Mercenary ones should be UNIT_ though since you are specifically hiring people who are not from your Civilization.

If as a Civ I can "gift" a mage to the Khazad civilization shouldn't it be possible for an event to do the same??? and would 1 khazad mage be all that game breaking, still can't upgrade him to an archmage.
 
After a quick scan of the XMLs, these quests are the offenders for trying to create new units with promotions via XML only:
CIRCLE_OF_GAELAN_3_1
GUILD_OF_THE_NINE_1_1
GUILD_OF_THE_NINE_1_2
GUILD_OF_THE_NINE_2_1
GUILD_OF_THE_NINE_3_2
OVERCOUNCIL_GIFT_2
UNDERCOUNCIL_GIFT_1
CARNIVAL_STAR_3
CARNIVAL_STAR_4
ASHEN_VEIL_DEAL_SALLOS_1
HUNTER_5
ENCHANTER_3

While considering these, I thought of a potential "gotcha" when converting them to python...

There is the potential for an event to try to create a unit not usually available to the played civilization. For example, Calabim triggering an event that offers Warriors. First off, would it work? I'm guessing yes, but not sure. Second, is it desireable to create Warriors, or to try to catch them somehow and create Blood Pets? Probably an event-by-event decision, depending on flavor, etc.

If you were to try to "catch" invalid units, would this part of the Horse Whispering event python be doing this already?

Code:
	iUnitClassType = CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_HORSE_ARCHER')
	iUnitType = gc.getCivilizationInfo(player.getCivilizationType()).getCivilizationUnits(iUnitClassType)
	
	if iUnitType != -1:
		for i in range(iNumUnits):
			player.initUnit(iUnitType, plot.getX(), plot.getY(), UnitAITypes.UNITAI_ATTACK, DirectionTypes.DIRECTION_SOUTH)

Sorry, I don't have the time or game (just some files I copy to a thumb drive and take with me to play with in down-times) available at the moment to play with it... so I'm just asking some random things that popped in my head :)


And now back to your regularly scheduled event tweaking discussion.

Thanks for thie info. I have added it to the first thread.

Sorry that I have not been keeping up with this the last few days. I had some computer problems that needed fixing that kept me off the forums.
 
I was in HS debate club. There is no way I am not going to debate that political challenger!

However, for a coin flip, you get 1 happy (no big deal) vs...

4 turns of anarchy and cultural collapse. Some tiles are not recovered when your culture re-appears.

It's just too much. Perhaps because I'm quick speed, but it's completely ridiculous to temporarily lose cultural influence and suffer 4 turns of anarchy on a coin flip for 1 happy.

I'm 1/4 (or 5). I don't think I'm going to do it anymore. The cost of trying (I don't even really care about the 1 happy) is just too great.

Has noone else chosen to debate, failed and then "holy crap, what the hell just happened to my capital!?"

In OCC, I really won't risk it anymore - ever again (or until modified).
 
If you get the 1 happy (rarely) it only lasts for a few turns. It is not permanent.
 
I read about it in the bugs thread. Kael said that he already fixed it in the next patch, so I'm going to omit that one from the list on the first post. Darn modders fixing probles before they can be documented as such. He'll never have a future as a commercial game programmer. That requires making players wait months in frustration for fixes if they ever come at all.

Nice job BTW, just in case you didn't get my sarcasm. Thanks for the great mod and quick patches/updates.
 
By the way, this is an amazingly handy thread Mesix. Thanks for keeping on top of this.
 
Back
Top Bottom