B) Reserved Entity Names "!player" <- refers to the (potentially unnamed) player. "!playerController" <- refers to the (potentially unnamed) player controller if one exists. (There are used by cut scenes) "!dialogpartner" <- When you begin a conversation with someone, this refers to the person you are talking to. It only remains valid while the conversation is active.
Theoretically you could just set each NPC to trigger some Python scripts OnDialogBegin and OnDialogEnd inside the map.
Any way to read to a variable a currently bound setting without rereading the settings file (which i can do, but it's a bit costly for IO?)For instance, if i wanted to find if there was what was bound to 'move forward' (to restore after the dialog).
def FixKeyBindings(): data = '' fin = None try: config = nt.getcwd() + "\\Bloodlines_Prelude_I\\cfg\\config.cfg" fin = open(config,"r") line = fin.readline() while line: atk = line.rfind('"+attack"') dsc = line.rfind('"vdiscipline_last"') if -1 != atk: r = atk atk = line.find(' ') data='%sbind %s "+OnPressedAttack"\n' % (data,line[atk:r].strip()) elif -1 != dsc: r = dsc dsc = line.find(' ') data='%sbind %s "+OnUseDiscipline"\n' % (data,line[dsc:r].strip()) line=fin.readline() finally: if fin: fin.close() if 0 != len(data): console = nt.getcwd() + "\\Bloodlines_Prelude_I\\cfg\\console.cfg" cfg=open(console, 'w') try: cfg.write(data) finally: cfg.close() c.execonsole=""
Right i had something like that already, but i was hoping that there was a way to do it without actually changing the cfg.
I think i'm going to take inspiration from that and (assuming vamputil.py gets reloaded on every load save) going to actually *write* the restore code to fix it up on that case... let's see if that works.