Skip to main content

build-a-cog

A Python package to make the creation of Cog actors easier!

Dependencies

build_a_cog depends on Panda3D. If you have not installed it already, you can do so with the following command:

pip install Panda3D

Installing

To install the latest version of build_a_cog, open your favorite command terminal and use the following command:

pip install build_a_cog

If for whatever reason you are unable to install build_a_cog through pip, you can also install it through the latest source distribution released on GitHub. Download the .whl file and open your favorite command terminal. Navigate to wherever the file was downloaded and run the following command:

pip install [file]

Usage

With build_a_cog, the creation of Cog actors becomes much easier.
Like with any other Panda3D Toontown project, you must first extract the Phase Files. You can do so with the following command, with [x] being replaced by the id of the phase file:

multify.exe -xf phase_[x].mf

With build_a_cog, you will need phase_3, phase_3.5, phase_4, phase_5, phase_6, phase_7, phase_11, and phase_12. Once these files are extracted, drop them into the same directory you want to have your Python files in. Your directory should look similar to this:

| phase_3
| phase_3.5
| phase_4
| phase_5
| phase_6
| phase_7
| phase_11
| phase_12
| test_cog.py

Next, drop the three suit type models in your main directory. tt_a_ene_cga_zero.bam, tt_a_ene_cgb_zero.bam, and tt_a_ene_cgc_zero.bam are all in phase_3.5/models/char. Finally, you will need the suit icon model: ttr_m_gui_gen_cogIcons.bam. You can find this file in phase_3/models/gui. Once these files are in your directory, it should look like this:

| phase_3
| phase_3.5
| phase_4
| phase_5
| phase_6
| phase_7
| phase_11
| phase_12
| test_cog.py
| tt_a_ene_cga_zero.bam
| tt_a_ene_cgb_zero.bam
| tt_a_ene_cgc_zero.bam
| ttr_m_gui_gen_cogIcons.bam

Now that all the necessary files are here, you can open the Python file containing your scene and start to program! Here's an example scene:

from direct.directbase.DirectStart import base

import build_a_cog as cog

yesman = cog.build(cog.Cog(suit=cog.Suit(model="tt_a_ene_cga_zero.bam",
        sigil="CorpIcon",
        torso="phase_3.5/maps/c_blazer.jpg",
        arms="phase_3.5/maps/c_sleeve.jpg",
        legs="phase_3.5/maps/c_leg.jpg",
        hands=(0.95,0.75,0.75,1.0)
    ),
    head=cog.Head(file="phase_4/models/char/suitA-heads.bam",
        node="yesman",
        texture=None,
        color=None
    ),
    animation=cog.Animation(file="phase_5/models/char/tt_a_ene_cga_song-and-dance.bam",
        anim_loop=True,
        loop_from=None,
        loop_to=None,
        loop_restart=None,
        pose=False,
        pose_frame=None
    )
))

yesman.setPos(0,20,-4.2)
yesman.setH(180)
yesman.reparentTo(render)

base.run()

This code will produce the following cog:

A Yesman cog from Toontown performing the Song and Dance animation.

Documentation

You can find documentation for build_a_cog in the rustycog lib.rs file.

License

Code in build_a_cog is licensed under the MIT License.

Release files for build-a-cog 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for build-a-cog 0.0.4
File Size Uploaded
build_a_cog-0.0.4.tar.gz 243.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for build-a-cog 0.0.4
File
build_a_cog-0.0.4-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
build_a_cog-0.0.4-cp312-none-win32.whl CPython 3.12 none Windows x86-32 Details
build_a_cog-0.0.4-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
build_a_cog-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
build_a_cog-0.0.4-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
build_a_cog-0.0.4-cp311-none-win32.whl CPython 3.11 none Windows x86-32 Details
build_a_cog-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details
build_a_cog-0.0.4-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
build_a_cog-0.0.4-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details

Total release size: 1.9 MB

Release files / build_a_cog-0.0.4.tar.gz

Download URL build_a_cog-0.0.4.tar.gz
Size 243.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e26e1ff45a766956be2b2eb33bbbefe8d281a50576a5ec49dfee113eaede6b9e
BLAKE2b-256 checksum
How to use checksums
4696658556314809c7c4c1444e5cf0e03ad7239ed4ee2e3741d99610294b6a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp312-none-win_amd64.whl

Download URL build_a_cog-0.0.4-cp312-none-win_amd64.whl
Size 146.8 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
94f2aa7918a66097cf3d47d6930f51a40b526ee4ba01d422e4d81bb0c8bbdbea
BLAKE2b-256 checksum
How to use checksums
88c53addde75210f0a2fcb0ba993fb4eeb780d51715cf545a90209f2d80b13db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp312-none-win32.whl

Download URL build_a_cog-0.0.4-cp312-none-win32.whl
Size 141.1 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
1b61bf90fc045d2cbfcb6b0035eba098fe69ccd35f5ba2b69468ca615bd54b32
BLAKE2b-256 checksum
How to use checksums
a49263d11522a8ef313c3f92bc5973672187513bdedc1b5bc448c34940b67ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp312-cp312-macosx_11_0_arm64.whl

Download URL build_a_cog-0.0.4-cp312-cp312-macosx_11_0_arm64.whl
Size 209.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
935fde94a7d3289e3798d3ef980c3c486111e2d88fba00e89032770ded0ff8fb
BLAKE2b-256 checksum
How to use checksums
78aed5d6f6373b2e1327e81d899c0768266c3604ae8761421e366cbf561762e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl

Download URL build_a_cog-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl
Size 216.5 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
64844b44c952f9b4f34d89dc6104bfa9607b56622dbe6204108845aa28ee7cd7
BLAKE2b-256 checksum
How to use checksums
40aedec435275b6d5d1d81b5799c966f7ef5cf93d7bc90bbe6c96aa94eddfc6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp311-none-win_amd64.whl

Download URL build_a_cog-0.0.4-cp311-none-win_amd64.whl
Size 146.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d3f313ed966c6dfba6c77a20408e122fd650d22c40968400041ed9641fee99c4
BLAKE2b-256 checksum
How to use checksums
9e9791c5b1b5c733787da3c81cb41f129cbec1f8d6dafebe60d6a36a38d9725e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp311-none-win32.whl

Download URL build_a_cog-0.0.4-cp311-none-win32.whl
Size 140.9 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
03b6e5a503e369be85e1f13e82fcb34ebce8345bea40b3c9502cd29313512421
BLAKE2b-256 checksum
How to use checksums
f2e208c93d8422423f7d41fca8c4ec0bd2f1b15657872021a8cb19c5a68dedb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL build_a_cog-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
Size 242.5 kB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
392e01fff1c70ffc9723d90290a07a650fac31cc1a3ed92bb3615d76eb43223a
BLAKE2b-256 checksum
How to use checksums
05a1444c9d4b3ee491e00b0d16c3bf7dcda7fd43dd9afd8454f4fbb604cb2aaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp311-cp311-macosx_11_0_arm64.whl

Download URL build_a_cog-0.0.4-cp311-cp311-macosx_11_0_arm64.whl
Size 209.0 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5a34590a8738a55bcdec6891e0d640a0716875fc9fcbf216c619f30eb39a5c81
BLAKE2b-256 checksum
How to use checksums
5d5dcd6d8a66d87d1f21445487b09217d7fb686e35d60bda5477dec986d01ef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release files / build_a_cog-0.0.4-cp311-cp311-macosx_10_12_x86_64.whl

Download URL build_a_cog-0.0.4-cp311-cp311-macosx_10_12_x86_64.whl
Size 216.8 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3e8a5323aeb9cd50f7bc071a7508a6187aec7e833b15ccd2dad14d32a58609ea
BLAKE2b-256 checksum
How to use checksums
af216212f36a47262eb410340bd51f4ca9de57593de4646104a7d3f3a67677b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.5.1

Release history Release notifications | RSS feed

This release

0.0.4 This release

10 release files

0.0.3

10 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page