keeperfx icon indicating copy to clipboard operation
keeperfx copied to clipboard

Allow directly calling temple rewards via script, or allow rewards even when player has no temple

Open Spatulade opened this issue 5 months ago • 1 comments

It would be useful to be able to directly call certain temple recipes via script. Adding creatures to the sacrifice pool via SET_FLAG works, but not when the player has no temple. Specifically, PosUniqFunc = COMPLETE_RESEARCH, COMPLETE_MANUFACTR, CHEAPER_IMPS and NegUniqFunc = KILL_ALL_CHICKENS, COSTLIER_IMPS can't be done or fudged via script currently (or at least CHEAPER_IMPS can't, and this would be very useful, especially for creating custom specials.

Perhaps something like COMPLETE_SACRIFICE([player],[type],[subtype],[no temple needed]), e.g. to lower the cost of Create Imp one stage, even without a temple, it would be COMPLETE_SACRIFICE(PLAYER0,PosUniqFunc,CHEAPER_IMPS,1). Naturally this wouldn't work with MkCreature or MkGoodHero if the player did not own a Temple.

Spatulade avatar Jul 29 '25 19:07 Spatulade

A workaround is available by using SET_ROOM_CONFIGURATION to give another room (like a Lair) the role ROOM_ROLE_SACRIFICE before triggering the temple function. This will satisfy the script condition of there being a center slab inside a sacrifice-room, and the function would trigger.

Loobinex avatar Jul 29 '25 23:07 Loobinex