Skip to content

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 2 times, most recently from 560ef58 to 56e68c4 Compare July 18, 2025 20:04
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 56e68c4 to 6d47939 Compare July 24, 2025 16:09
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 2 times, most recently from db0b6a8 to 8b802ba Compare July 30, 2025 15:00
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 3 times, most recently from 7e3bbbc to 3d00c18 Compare August 5, 2025 22:15
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 3 times, most recently from 3cea937 to d331d00 Compare August 15, 2025 14:30
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 5 times, most recently from f27e2f0 to 2050d6d Compare August 25, 2025 13:26
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 3 times, most recently from 4dbc80a to 5053b91 Compare September 4, 2025 19:47
@MjnMixael MjnMixael force-pushed the add_prop_object_type branch 2 times, most recently from ef81fc3 to 4ed7f50 Compare September 21, 2025 22:53
Copy link
Member

@BMagnu BMagnu left a comment

Choose a reason for hiding this comment

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

Great work.
A few small things, otherwise this is pretty much there.
Just as a list of ToDo you mentioned in the code and that I can think of that should be done in future PRs, as a reference here:
Modelanimation support
Multithreaded collision support
Possibly support as a permanent particle host (think something like a Volcano spewing smoke)

@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 92fecb8 to 27a65e3 Compare October 17, 2025 14:26
@MjnMixael
Copy link
Contributor Author

Great work. A few small things, otherwise this is pretty much there. Just as a list of ToDo you mentioned in the code and that I can think of that should be done in future PRs, as a reference here: Modelanimation support Multithreaded collision support Possibly support as a permanent particle host (think something like a Volcano spewing smoke)

And full QtFRED support which I'll get to once I finish rewriting sexp tree to be shared between FRED and QtFRED.

@BMagnu BMagnu added the Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle label Oct 18, 2025
Copy link
Member

@BMagnu BMagnu left a comment

Choose a reason for hiding this comment

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

Looks good.
Would be IMO ready for testing in nightlies once stable hits.

@MjnMixael MjnMixael force-pushed the add_prop_object_type branch from 1acf108 to 2a0a78a Compare October 27, 2025 19:49
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 Waiting for Stable Marks a pull request that is to be merged after the next stable release, due to a release cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: New object type for terrain

5 participants