Routine system - DRincs-Productions/NQTR-System GitHub Wiki

INFO: with tag you can customize some checks: Tag

INFO: with ch_talkobj_dict={"character_id" : TalkObject(bg="bg character_id location_id talk") you can customize some checks: Talk System

IMPORTANT: To get the list of character icons, the tool relies on ch_talkobj_dict, in case a you want to vacation the chance to arlare with the character a stratagem is: ch_talkobj_dict={"alice" : None}

IMPORTANT: in case no particular value is set, default icon will be set based on dictionary key of ch_talkobj_dict, Explained here: Character icon



The Commitment class is the fundamental element.

Add an Commitment in dictionary


(code-snippets: DR_RoutineAdd_in_dict)

# dictionary editable at runtime, but it is strongly discouraged to pre-enter elements (dictionary contents are based only on saves)
default routine = {}

# habitual routine
# dictionary that cannot be modified at runtime, only by modifying the code. (content is not based on saves, but from the code)
define df_routine = {
        "alice_sleep"       :   Commitment(ch_talkobj_dict={"alice" : TalkObject(label_name="talk_sleep")}, tm_start=20, tm_stop=10, location_id="house", room_id="alice_room", bg="bg alice roomsleep"),
        "alice_lounge"      :   Commitment(ch_talkobj_dict={"alice" : None}, tm_start=10, tm_stop=14, location_id="house", room_id="lounge", bg=None),
        "alice_go_school"   :   Commitment(tm_start=10, tm_stop=14, location_id="school", type="no_week", bg=None),
        "alice_read"        :   Commitment(ch_talkobj_dict={"alice" : TalkObject(bg="bg alice terrace talk")}, tm_start=14, tm_stop=20, location_id="house", room_id="terrace", bg="bg alice terrace"),

Add an Commitment

(code-snippets: DR_RoutineAdd)

routine["stagealice1"] = Commitment(ch_talkobj_dict={"alice" : None}, tm_start=14, tm_stop=20, location_id="house", room_id="terrace")


IMPORTANT: in case at the end of the event the same event occurs again the event will be deleted (to avoid loops). to not delete it you can use some stratagems with these functions: Methods for closing a label

By Events we mean: a label that is automatically started as soon as the player is in a certain position and/or at a certain time and/or based on the tag check.

To implement it simply pass it by parameter to a Commitment event_label_name

Add an Event in dictionary


(code-snippets: DR_EventAdd_in_dict)

Add an Event

(code-snippets: DR_EventAdd)


Returns the commitments of the ch (NCPs) in that Location at that time. Prioritize the special commitment and then the first commitment found.