Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mk64] wip Actors menu from sm64 Objects #471

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

MegaMech
Copy link

@MegaMech MegaMech commented Oct 15, 2024

Placing Empties should pop up an actor window (like with sm64 objects).

Object Type should contain: Actors, Train Stuff

Train Stuff will contain

  • Crossing (an xyz pos used to generate a volume hitbox the train touches)
  • Signal (a blinking light to warn racers when the train is coming)

Actors will contain:

  • ItemBox
  • Foliage
  • Falling Rock optional_value = index (rock1 = 0, rock2 = 1, etc.)
  • Palm Tree
  • Piranha Plant
  • Cow

They should output the following C code:
// x, y, z, optional_value

struct ActorSpawnData[] = {
    {   200, 1500, 200 , 0},
};

Also need a way to make a Blender path or bezier curve output:

TrackWaypoint test_course_path[] = {
    {    0, 0, 0, 0},
    {    0, 0, -100, 1},
    {    0, 0, -200, 1},
    {    0, 0, -300, 1},
   // etc
    { -32768, -32768, -32768, 0 } // Terminator

Here's a Python script that outputs a course path, it just needs to be converted to fast64 and the output altered:
https://pastebin.com/cWw3t6GH

Copy link
Contributor

@Yanis002 Yanis002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how I can test this because I know nothing about this game but here's my current thoughts

("FALLING_ROCK", "fallingRocks", "fallingRocks"),
("PALM_TREES", "palmTrees", "palmTrees"),
("PIRANHA_PLANT", "piranhaPlant", "piranhaPlant"),
("Cow", "cow", "cow"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not uppercase like the other ones? (I mean the first element of that tuple), is it just because it's done like that in decomp?

]

class SearchModelIDEnumOperator(bpy.types.Operator):
bl_idname = "object.search_model_id_enum_operator"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how it is on sm64-side but make sure you don't use the same ID twice here (for instance on OoT we're using object.oot_thing_operator)

note: I don't know if this is actually an issue but I guess it's better to be careful

if not obj_details.uses_rotation and not all_values_equal_x(obj.rotation_euler, 0):
warnings.add("Object's rotations must be set to 0")

if len(warnings):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nothing and can probably be ignored but personally I don't like doing if len(x), I prefer if len(x) > 0 to make the intention clear

Comment on lines +168 to +173
self.draw_act(obj, acts, 1)
self.draw_act(obj, acts, 2)
self.draw_act(obj, acts, 3)
self.draw_act(obj, acts, 4)
self.draw_act(obj, acts, 5)
self.draw_act(obj, acts, 6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.draw_act(obj, acts, 1)
self.draw_act(obj, acts, 2)
self.draw_act(obj, acts, 3)
self.draw_act(obj, acts, 4)
self.draw_act(obj, acts, 5)
self.draw_act(obj, acts, 6)
for i in range(1, 6):
self.draw_act(obj, acts, i)

something like this is cleaner imo (idr if the range include 1 and 6 in my suggestion but I think it does)

@Yanis002 Yanis002 added the mk64 Has to do with the Mario Kart 64 side label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mk64 Has to do with the Mario Kart 64 side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants