Skip to content

Adds Props as a new object type #6836

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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

MjnMixael
Copy link
Contributor

@MjnMixael MjnMixael commented Jul 14, 2025

This PR adds Props as a distinct new object type. Props work very similarly to ships in most cases but there are some key assumptions that make them unique:

  • Props cannot move
  • Props are not interactable except for being collided with

Props are meant to be scenery, set pieces, decoration, or even objects rendered by Lua in the UI only. Props do not take up ship slots and are not limited. Props are created in FRED using the new second dropdown with ctrl-shift-click instead of just ctrl-click
image

Props have a basic set of flags to start:

  • No Collide
  • No FRED
  • No Lighting

Props have a basic set of sexps to start:

  • add-to-collision-group-prop
  • remove-from-collision-group-prop
  • get-collision-group-prop
  • prop-create
  • prop-vanish

Props have basic Lua support including collision hooks and table indexing with a standard set of members and methods. Props are also a valid type for Lua SEXPs. Props are viewable in the F3 Lab as well. Props have stubbed in support for @BMagnu animation system and glowpoints but both are inactive for now.

Props.tbl is modular with -prp.tbm. It supports both +nocreate and +remove. Props can be categorized with colors for easy browsing in FRED. A sample table looks like this:

#PROP CATEGORIES

$Name: Planets
+Color: (0, 125, 0)

#PROPS

$Name: Planet-Antares1
	$POF file: planet-antares1.pof
	$Closeup_pos: 0.0, 0.0, -6000
	$Closeup_zoom: 0.5
	$Detail distance: (0)
	$Category: Planets
	$Custom Data:
	+Val: Category Between the Ashes
	$Custom Strings
	$Name: MapText
	+Value: -1
	+String: The first planet of the Antares System.
	$end_custom_strings

#END

Many thanks to @BMagnu and @Baezon for the assistance in various places of this PR, especially with collisions.

Fixes #4727

@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 41df668 to 9119837 Compare July 14, 2025 19:14
@wookieejedi wookieejedi added the feature A totally new sort of functionality label Jul 14, 2025
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 3695e5f to 560ef58 Compare July 14, 2025 23:06
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 560ef58 to 56e68c4 Compare July 18, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A totally new sort of functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Idea: New object type for terrain
3 participants