MOO2Civ

MOO2Civ Patch4f is now at 4,700+ downloads.:)

Unfortunately, I'm not done with Patchg... I mostly only have time to mod on week-ends for MOO2Civ; lately I've not been able to and I'm currently down with the flu. :health: :sad:
 
As is, yes. Why do you ask?

I wasn't going to say anything until I was sure I could do it, but I've imported the unit capturing code (the version used by the command promotion) from Fall from Heaven 2 into MOO2Civ (actually the assimilation mod, which is the dll used here), as I said I would do lo these many months past.
The basic part of having promotions give X% chance to capture defeated units is done, but I should have something in there to prevent capturing of defencive units (either through a promotion like in FfH or by checking the unit type) so there isn't a stack of captured immobile units stranded next to a captured planet. I also forgot to test what happens to a captured starbase. Would it correctly switch the culture field it generates? If it doesn't then it shouldn't be capturable.

I assume this is something you would want to have.
 
You have assumed correctly; the possibility to capture units (i.e. spaceships) is a feature of MoO currently not represented in the mod. It would be great if that could be implemented!:thumbsup:
 
Yes. The python code for generating the culture is run every turn.

Yes, it did work but unfortunately captured units move to the tile the capturing unit was on to prevent enemy units from occupying the same tile. So starbases would shift tiles if captured, thus I should probably just prevent any 0 movement unit from being captured.
 
That sounds like a sensible approach. (To be true, in all of my MoO games I don't think I've ever captured a starbase; ships, yes.)
 
I ran into a problem trying to prevent starbases and city defence units from being captured. Firstly the two unit types don't have much in common. defence units have 0 :move: and domain_space while starbases have 1 :move: but are domain_immobile. I had trouble getting it to read the movement of the defeated unit to see if it had zero :move:, but it was very easy to get it to check the units domain and prevent domain_immobile from being captured.
So my question is, is there a reason the city defence units need to be domain_space with 0 :move: rather than be domain_immobile?
 
There is: I first had the PDFs at domain_IMMOBILE, but that didn't seem to work; setting movement to zero did. (Also, PDFs gain mobility with the +1 movement tech advances, so they're not identical to Starbases, which can never move.) But I see no problem with PDFs being subject to capture; the only difference with regular spaceships is that they start out being planetbound. So can I suggest just focusing on Starbases not being subject to capture by enemy units?
 
OK that problem's solved then. Making starbases uncaptureable was easy.
You'll need to go into CIV4PromotionInfos.xml and set the capture percent for any promotions that will have it. I'm pretty sure the order of xml fields in the file is important so place <iCombatCapturePercent> after the <Button> line. Also in CIV4PromotionInfos.xml you only need to put a line in if the promotion has that ability so you don't need to add <iCombatCapturePercent>0</iCombatCapturePercent> to everything else. Keep in mind that each promotion is calculated separately, not added together. So if you had five promotions with 20% chance of capture, it's not 100%. It's actually about 67%. With the CIV4PromotionInfos.xml file I used I only had capturing on neutron blaster, and bulrathi, at 50% and trained officers at 100% for testing purposes, so make sure you change those. The changed files are attached, hopefully I didn't forget any.
 
Cool! Thanks a lot.:goodjob: (As well for the added explanation. I'll playtest and release it as a patch ASAP. );)
 
Did some MP playtesting with Zippadeedoodah and the capture promotion seems to work perfectly. Will upload Patch4h first thing tomorrow.;)

(Noticed some misnaming with the latest patch - should be Patch4g - and corrected all references and links.)
 
Back
Top Bottom