A Python package to make the creation of Cog actors easier!
Project description
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:
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file build_a_cog-0.0.4.tar.gz
.
File metadata
- Download URL: build_a_cog-0.0.4.tar.gz
- Upload date:
- Size: 243.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e26e1ff45a766956be2b2eb33bbbefe8d281a50576a5ec49dfee113eaede6b9e |
|
MD5 | e0a2d915ab9f142d24b66efe86ab1b57 |
|
BLAKE2b-256 | 4696658556314809c7c4c1444e5cf0e03ad7239ed4ee2e3741d99610294b6a55 |
File details
Details for the file build_a_cog-0.0.4-cp312-none-win_amd64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp312-none-win_amd64.whl
- Upload date:
- Size: 146.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f2aa7918a66097cf3d47d6930f51a40b526ee4ba01d422e4d81bb0c8bbdbea |
|
MD5 | 506a9586addce831ebabc07c494fda6b |
|
BLAKE2b-256 | 88c53addde75210f0a2fcb0ba993fb4eeb780d51715cf545a90209f2d80b13db |
File details
Details for the file build_a_cog-0.0.4-cp312-none-win32.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp312-none-win32.whl
- Upload date:
- Size: 141.1 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b61bf90fc045d2cbfcb6b0035eba098fe69ccd35f5ba2b69468ca615bd54b32 |
|
MD5 | e5d9814a3c4b5a0fe1a5f5ff82f022e8 |
|
BLAKE2b-256 | a49263d11522a8ef313c3f92bc5973672187513bdedc1b5bc448c34940b67ff0 |
File details
Details for the file build_a_cog-0.0.4-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 209.2 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 935fde94a7d3289e3798d3ef980c3c486111e2d88fba00e89032770ded0ff8fb |
|
MD5 | 98be5f24f030d848467e7f1327640ffe |
|
BLAKE2b-256 | 78aed5d6f6373b2e1327e81d899c0768266c3604ae8761421e366cbf561762e9 |
File details
Details for the file build_a_cog-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 216.5 kB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64844b44c952f9b4f34d89dc6104bfa9607b56622dbe6204108845aa28ee7cd7 |
|
MD5 | 4675756f0d7e533ca1b437916ecb2203 |
|
BLAKE2b-256 | 40aedec435275b6d5d1d81b5799c966f7ef5cf93d7bc90bbe6c96aa94eddfc6c |
File details
Details for the file build_a_cog-0.0.4-cp311-none-win_amd64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp311-none-win_amd64.whl
- Upload date:
- Size: 146.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3f313ed966c6dfba6c77a20408e122fd650d22c40968400041ed9641fee99c4 |
|
MD5 | ba2bf52324eb2293738a691f75edc89a |
|
BLAKE2b-256 | 9e9791c5b1b5c733787da3c81cb41f129cbec1f8d6dafebe60d6a36a38d9725e |
File details
Details for the file build_a_cog-0.0.4-cp311-none-win32.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp311-none-win32.whl
- Upload date:
- Size: 140.9 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03b6e5a503e369be85e1f13e82fcb34ebce8345bea40b3c9502cd29313512421 |
|
MD5 | 5d41c876554cd94725dd043fb3a24161 |
|
BLAKE2b-256 | f2e208c93d8422423f7d41fca8c4ec0bd2f1b15657872021a8cb19c5a68dedb7 |
File details
Details for the file build_a_cog-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 242.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 392e01fff1c70ffc9723d90290a07a650fac31cc1a3ed92bb3615d76eb43223a |
|
MD5 | 11f8a7297222ec3204ec9d0ef4848fc5 |
|
BLAKE2b-256 | 05a1444c9d4b3ee491e00b0d16c3bf7dcda7fd43dd9afd8454f4fbb604cb2aaa |
File details
Details for the file build_a_cog-0.0.4-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 209.0 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a34590a8738a55bcdec6891e0d640a0716875fc9fcbf216c619f30eb39a5c81 |
|
MD5 | c12d36fd69f11ab42ae6febc68a8b479 |
|
BLAKE2b-256 | 5d5dcd6d8a66d87d1f21445487b09217d7fb686e35d60bda5477dec986d01ef6 |
File details
Details for the file build_a_cog-0.0.4-cp311-cp311-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: build_a_cog-0.0.4-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 216.8 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8a5323aeb9cd50f7bc071a7508a6187aec7e833b15ccd2dad14d32a58609ea |
|
MD5 | 8b5e8abcc4ae2f5ee53788ec71ba9268 |
|
BLAKE2b-256 | af216212f36a47262eb410340bd51f4ca9de57593de4646104a7d3f3a67677b8 |