Act of War Wiki
Advertisement
autosize
"What? Those tapes are classified!"
This section of the Act of War wiki is archived, containing information from defunct fansites and wikis.
Do NOT edit any information in the archives unless it is fixing up spelling mistakes.
How to add a python extension

For example, if you want to use the win32clipboard module (from the win32 python extension), just copy win32clipboard.pyd into your game directory.

If you want to distribute your mod, you will have to give this module separately from the other mod files, because it will not be packaged in the mod file.

After you add this file, you can use this module. For example to copy a text into the clipboard :

<ndf>
Test is SEQ with
[
  TemplateCopyString :
    StringToCopy = 'hello world'
]

Template TemplateCopyString [ StringToCopy = '' ] is TEffetDescriptor_EffetPythonInstantane :
  ParamsNoEval = MAP
                 [
                   ('STRING', <StringToCopy>),
                 ]
  Code ="""
    import win32clipboard
    win32clipboard.OpenClipboard(0)
    win32clipboard.EmptyClipboard()
    win32clipboard.SetClipboardText(STRING.Value)
    win32clipboard.CloseClipboard()
  """
</ndf>
Advertisement