Skip to content

A simple Python script to assist with managing RSDKv5/U projects.

Notifications You must be signed in to change notification settings

Jdsle/gameapi_util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gameapi_util

A simple Python script to assist with managing RSDKv5/U projects.

Screenshot of the main interface

Dependencies

urwid is used for the console interface. It can be installed using:

pip install urwid

Default Functions

  • Update All.cpp/All.hpp & CMake Project

    • This function generates All.cpp & All.hpp includes and Objects.cmake.
    • Forward declarations are included in the header.
  • Generate public functions

    • This function generates PublicFunctions.hpp. Entity events are not included.
  • Create new object

    • Creates a new object in the specified directory.
    • After creation, you can optionally run project_update to generate new All.cpp and All.hpp files.

Configuration

gameapi_util_cfg.py is used for configuring various things, such as the path to your objects directory.

Available options:

GAME_PATH        = "src"
OBJECT_PATH_NAME = "Objects"
ALL_CODE_NAME    = "All.cpp"
ALL_HEADER_NAME  = "All.hpp"
GAMEAPI_INC_PATH = "Game.hpp"
PUB_FNS_PATH     = "PublicFunctions.hpp"
OBJECT_NAMESPACE = "GameLogic"

# cmake configuration
CMAKE_PATH = "Objects.cmake"
GAME_NAME  = "${GAME_NAME}" # The game directory to look into

OBJECT_PATH = f"{GAME_PATH}/{OBJECT_PATH_NAME}"

Extending the main menu

You can extend the main menu with the init function of your configuration file. For example:

def init(app_in):
    global app
    app = app_in

    app.add_option('Validate Objects', ens_obj_valid)
    app.add_option('Check Status', do_status_check)
# init -> (app_in)

Screenshot of the main interface, after being extended by gameapi_util_cfg.py

About

A simple Python script to assist with managing RSDKv5/U projects.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages