I know it's possilbe to make ALL orders able to self-target via Firegraft's Exe Edits. But that solution also allows self-targeting Yamato Gun etc. I just want self-targeting for the Restoration spell. Is it possible, through coding in GPTP maybe?
Maybe in hooks/recv_commands/receive_command.cpp ?
There's a CanTargetSelf, maybe skipping it (making it as if it returned true) if the mainOrderId is Restoration would be enough?
Excellent, it now works: Restoration can self-target, but Yamato etc. can't! Thank you very much!
Here's the modified beginning of the CanTargetSelf function in receive_command.cpp:
bool CanTargetSelf(CUnit* unit, u8 orderId) {
bool return_value;
/////// OWN // -------
if (orderId == OrderId::Restoration)
return_value = true;
else
/////// OWN Ende -------
if(
unit->status & UnitStatus::GroundedBuilding &&
[...]
^^Additional note for future beginner searchers: I had to use orderID instead of MainOrderIDI also attached the modified receive_command.cpp (& modified game_hooks.cpp that makes Restoration heal hp) for future visitors.
Attachments: