Category Archives: Python

Yet another Arcemu Python Engine video

This video shows a scripted NPC (Guard Roberts) during the human quest Garments of the Light.

You get quest credit for the following:

  • Heal Guard Roberts with Lesser Heal rank 2
  • Buff Guard Roberts with Power Word: Fortitude rank 1

When healing he stands up, turns towards you, bows, and thanks you.

After buffing him, he cheers, thanks you again and goes on his way saying his farewells. Then despawns and respawns.

Up until now this wasn’t working in Arcemu, making the quest unfinishable.

The script can be found here: https://github.com/arcemu/arcemu/blob/master/src/scripts/pythonscripts/prod/guard_roberts.py

…and here’s a video:

Arcemu Python Engine showoff video #1

I’ve recorded and uploaded a video to show off some of what can be done with Python NPC scripts in Arcemu.

I think it’s quite fun.

The script itself can be found here:
https://github.com/arcemu/arcemu/blob/master/src/scripts/pythonscripts/dev/mohawk.py

Arcemu Python Engine (APE)

I’ve just pushed a new Arcemu scripting engine’s code (195 commits) to Arcemu’s main code repository.

Lately I’ve had to deal a lot with Python at work, and I thought it would be a nice experiment to add Python scripting support to Arcemu, so during last year’s Christmas I started implementing it.
To make this work first I had to get and compile Python with CMake and both Visual Studio 2010 as Arcemu still supports that.
I made my version of Python 3.4.10 separately available on my Github page as well, so if anyone would like to play around with that they can find it here:

https://github.com/dfighter1985/python34

After that I had to learn to both extend and embed Python. You can find some details about those in the official documentation of Python:
https://docs.python.org/3/extending/extending.html
https://docs.python.org/3/extending/embedding.html

While this new Arcemu scripting engine is still experimental and not at all complete it can still be fun for others too. That’s why I decided to push it today.

The “release” if you will includes some sample Python scripts that I used for testing functionality that I implemented. You can find these here:
https://github.com/arcemu/arcemu/tree/master/src/scripts/pythonscripts

If you’d like to try make sure to set BUILD_PYTHONENGINE and INSTALL_EXAMPLE_PYTHON_SCRIPTS to True in CMake when building the code.
I will continue to extend it and will probably write about it more at a later time.

Until then have fun!