Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*Request* Reenable CustomModOption EVENTS_UNIT_CAPTURE #4993

Closed
UndeadDevel opened this issue Dec 14, 2018 · 14 comments
Closed

*Request* Reenable CustomModOption EVENTS_UNIT_CAPTURE #4993

UndeadDevel opened this issue Dec 14, 2018 · 14 comments

Comments

@UndeadDevel
Copy link
Contributor

UndeadDevel commented Dec 14, 2018

1. Mod version (i.e Date - 4/23):
11-30-18

2. Request
In trying to get whoward's mod "Capture Great People" to work and failing in that, I noticed that the issue stems from the CustomModOption EVENTS_UNIT_CAPTURE breaking unit capturing when enabled (it is disabled by default in VP). However, without this option, the unit capture event is not sent to the mod so that the mod cannot react to it.
Specifically, when enabling the option the mod will essentially work except that in my test case of capturing a worker the worker still belonged to the civ that produced it and just ran away to their city on the next turn; I got the notification, however (I modified some code such that it does this for all units) so I know the mod works with that option. I also tested with only the option enabled and nothing else (all other code commented out) and the unit capture failed, so it's definitely something in the DLL that leads to EVENTS_UNIT_CAPTURE breaking unit capturing.

So the request is this: is it possible to make unit capture work properly with this CustomModOption enabled? I just need the event to be sent so that the mod can process it.

Edit: I should probably add that when I asked whoward about this he said the mod worked fine with his custom DLL so it's likely changes to the DLL in VP that are at issue

@LoneGazebo
Copy link
Owner

I think I've fixed, we'll see.

@JFDaly
Copy link
Collaborator

JFDaly commented Jan 15, 2019

Seems to still be broken with the latest version (15th Jan), unfortunately. I was just about to report this issue anew :p

@JFDaly JFDaly reopened this Jan 15, 2019
@UndeadDevel
Copy link
Contributor Author

sad face

I rally like the Capture Great People mod...hope you guys can fix it.

@LoneGazebo
Copy link
Owner

Which part isn’t working l?

@LoneGazebo
Copy link
Owner

I tested part of it and it worked.

@JFDaly
Copy link
Collaborator

JFDaly commented Jan 15, 2019

Well, if all I do I set EVENTS_UNIT_CAPTURE to 1, manually and in the CustomModOptions.xml, and with no other mods active (sans IGE), then military units just stand on top of enemy Civilian Units, unable to capture them and the Civilians remain under the control of the enemy civ. Switching that setting back to 0 remedies the issue. The tested enemy was Barbarian.
EDIT: same issue with a major civ as the enemy.

@LoneGazebo
Copy link
Owner

Just looked, you have to fill out the table in the Unit XML for a unit to have a capture type. I'm pretty sure it has always been that way?

@JFDaly
Copy link
Collaborator

JFDaly commented Jan 15, 2019

Yeah. This is an issue with Workers and Settlers as well as Great People. Workers and Settlers have Capture set as UNITCLASS_WORKER by default (unchanged from vanilla), Great People have nil. Workers and Settlers should both become Workers when captured, and Great People should just disappear entirely. But this is what happens instead:

Alt Text

@LoneGazebo
Copy link
Owner

Oh, I see, it looks like my else if fix didn't make it into production during a manual merge - I probably thought it was an accident and refused the change 🗡

@LoneGazebo
Copy link
Owner

Uploading a debug DLL now...

@LoneGazebo
Copy link
Owner

@LoneGazebo
Copy link
Owner

Drop that in your CP and see if it now works correctly. It should.

@JFDaly
Copy link
Collaborator

JFDaly commented Jan 15, 2019

Perfect, that does it. Thanks for the quick fix.

@LoneGazebo
Copy link
Owner

wahoo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants