OpenRA / OpenRA/OpenRA

Carryable: ignores Conditions under specific circumstances

Open
#17,316 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
C#
Stars
17.4k
Forks
3k
Avg merge
1d 12h
Merged PRs (30d)
14

Description

When a unit has WithSpriteBody: & WithFacingSpriteBody: , alongside GrantConditionOnDeploy: & Carryable:

The Carryable: trait ignores any conditions given to the unit & defaults to WithSpriteBody over WithFacingSpriteBody.

Easy repo:

  1. Add the following to any vehicle in RA, I used MRJ & added RequiresCondition: deployed to the spinner.
	GrantCondition@AlwaysActive:
		Condition: alwaysactive
	WithFacingSpriteBody:
		RequiresCondition: undeployed
		Name: bodymove
	WithSpriteBody@deployed:
		Sequence: idle
		RequiresCondition: !undeployed && alwaysactive
	Carryable:
		LocalOffset: 0,0,200
	GrantConditionOnDeploy:
		DeployedCondition: deployed
		UndeployedCondition: undeployed
		Facing: 0
		AllowedTerrainTypes: Clear, Road, Rough
		UndeployOnMove: true
		UndeployOnPickup: true
  1. Add the Carryall trait to the Transport heli:
	Carryall:
		BeforeLoadDelay: 10
		BeforeUnloadDelay: 15
		LocalOffset: 0, 0, -128
		AllowDropOff: True

This will result in:
magicmrj

This is because alwaysactive is not granted to the unit when it is picked up.

If you delete:

GrantCondition@AlwaysActive:
		Condition: alwaysactive

It will be the same, except this time it will render WithSpriteBody@deployed: & not WithFacingSpriteBody:, because undeployed has not been granted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the MRJ and Transport heli configuration described in the report, including GrantConditionOnDeploy, Carryable, Carryall, WithFacingSpriteBody, and WithSpriteBody. Trace how pickup affects conditions and sprite-body selection. Done means carried units retain the relevant conditions and select the expected sprite body in both deployed and undeployed states.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.