XCOM 2
255 ratings
Free Carry Drop Subdue WOTC
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
169.258 KB
8 Sep, 2017 @ 3:37pm
21 Mar, 2022 @ 12:28pm
8 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Free Carry Drop Subdue WOTC

Description
Carry, Drop and Subdue are now free at 100%.

If you dont like the option being available even if nobody has any action left like EVAC, you can configure it in the INI file. But it doesnt happen enough for me personnally that it annoys me.

V2.0 - Converted to OnPostTemplatesCreated

V2.1 - Explicitly disallowed the abilities to break concealment. I've done all i could, now if you still break concealment because you pick up a prisoner in the Rescue Ally mission after silently opening the door, i cant do much more. I hope it works. All 3 abilities now have ConcealBreak = Never.

V2.2 - You can now control if it ends the turn or not.

V2.3 - Fixed issue with carry cost (Thanks to MrMister)

They are all configurable individually in the INI file.

C:\Program Files (x86)\Steam\steamapps\workshop\content\268500\1130901449\Config\XComFreeUnitCarryAndDrop.ini
68 Comments
MrMister 16 Nov, 2022 @ 5:20am 
Yes it is.
hottt3 16 Nov, 2022 @ 4:13am 
Is it compatible with LWotC ? Thanks)
ADVENT Avenger  [author] 21 Mar, 2022 @ 12:29pm 
Your fix is up. You are lucky, it instantly launched ModBuddy and it was configured correctly i forgot that VS is for Chimera Squad. Try this version with your fix now up.
ADVENT Avenger  [author] 21 Mar, 2022 @ 12:19pm 
My VSCode isn't working I'll try to fix it
MrMister 21 Mar, 2022 @ 11:55am 
So you're saying you can't update the mod anymore? If so I can just released a fixed redux version, but that'd be a shame as the work and credit is still all yours.
MrMister 21 Mar, 2022 @ 11:55am 
I found the cause and the fix!

You forgot a line in the Carry script block

// Carry Unit free
CurrentAbility = AllAbilities.FindAbilityTemplate('CarryUnit');
CurrentAbility.AbilityCosts.Length = 0;
ActionPointCost = new class'X2AbilityCost_ActionPoints'; <<<---- THIS IS WHAT YOU MISSED
ActionPointCost.iNumPoints = default.PICKUP_ACTION_POINTS;
ActionPointCost.bConsumeAllPoints = default.PICKUP_ENDS_TURN;
ActionPointCost.bFreeCost = default.PICKUP_TOTALLY_FREE;
CurrentAbility.AbilityCosts.AddItem(ActionPointCost);
CurrentAbility.ConcealmentRule = eConceal_Always;

Because you forgot to declare ActionPointCost anew for Carry, it was reusing the one for Drop (further up in the code) and overriding its values.


I rebuilt the mod just adding that one line, and it works! I can make Carry cost 1 AP while Drop costs 0 AP.
ADVENT Avenger  [author] 21 Mar, 2022 @ 8:51am 
I cant and i dont code anymore its possible. The initial goal of the mod was making everything free, exposing the variables came after.
MrMister 21 Mar, 2022 @ 6:37am 
Testing with no other mod at all except this, I have identified the exact issue, albeit not the cause.

It seems like Drop uses the same "_IS_TOTALLY_FREE" behaviour as in PICKUP_TOTALLY_FREE, ignoring or overriding DROP_TOTALLY_FREE.

Why, I do not know - looking at your source code, the variable called is the correct one.

To confirm this: try the same settings as what you had, but with

DROP_TOTALLY_FREE = true
PICKUP_TOTALLY_FREE = false

and you will see that dropping costs 1 AP when it should cost 0, and that similarly

DROP_TOTALLY_FREE = false
PICKUP_TOTALLY_FREE = true

costs 0 AP when it should cost 1.

Again, no idea why this should happen from a look at your code, but it does happen. Can you confirm it?
ADVENT Avenger  [author] 17 Mar, 2022 @ 3:29pm 
Note: This mod does not support LWOTC. If you are trying to mod Long War, it may not work. It may, but it also may not i have not tested.
ADVENT Avenger  [author] 17 Mar, 2022 @ 3:28pm 
I confirm its working correctly. I picked up a unit and dropped it back, with no AP cost and i had 1 AP. Parameters used:

; Mod default is 0 AP
DROP_ACTION_POINTS = 1; 0-2. Actions required for ability to be available to use, but not necessarily it's cost if you flag TOTALLY_FREE on. But it is usually its cost.
PICKUP_ACTION_POINTS = 1;
SUBDUE_ACTION_POINTS = 1;

; Mod default does not end the turn (False).
DROP_ENDS_TURN = false; True or false, default in this mod is false. Put to true to end the turn like regular XCOM. We dont want the turn to end.
PICKUP_ENDS_TURN = false;
SUBDUE_ENDS_TURN = false;

; Mod default is the ability does not cost it's required AP. (true)
DROP_TOTALLY_FREE = true; AP will be required if specified, but will not be consumed. 0 AP and TOTALLY FREE behaves like EVAC and is available after a soldier has nothing left to do.
PICKUP_TOTALLY_FREE = true;
SUBDUE_TOTALLY_FREE = true;