Page MenuHomeWildfire Games

Make rubble non-decaying by default.
ClosedPublic

Authored by leper on Sep 30 2017, 8:46 AM.

Details

Reviewers
fatherbushido
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP20244: Make rubble non-decaying by default.
Summary

Explicitly specify that the rubble placed on death is decaying.

This breaks quite a few mods, then again the fix is running sed.

Rough command to update things find binaries/data/mods/*/simulation/templates -name '*.xml' | sed -i 's,<SpawnEntityOnDeath>rubble/,<SpawnEntityOnDeath>decay|rubble/,'. This should be correct for everything but fields, which at least in the public mod use a different delay.

Test Plan

Check that rubble placed in atlas doesn't decay, but rubble from destroyed buildings still does.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

leper created this revision.Sep 30 2017, 8:46 AM
Vulcan added a subscriber: Vulcan.Sep 30 2017, 12:12 PM

Build is green

Updating workspaces...
Updating bundled third-party dependencies...

FCollada/FCollada.cpp
FCollada/FColladaPlugin.cpp
FCollada/FCDocument/FCDAnimated.cpp
FCollada/FCDocument/FCDAnimationChannel.cpp
FCollada/FCDocument/FCDAnimationClip.cpp
FCollada/FCDocument/FCDAnimationClipTools.cpp
FCollada/FCDocument/FCDAnimation.cpp
FCollada/FCDocument/FCDAnimationCurve.cpp
FCollada/FCDocument/FCDAnimationCurveTools.cpp
FCollada/FCDocument/FCDAnimationKey.cpp
FCollada/FCDocument/FCDAnimationMultiCurve.cpp
FCollada/FCDocument/FCDAsset.cpp
FCollada/FCDocument/FCDCamera.cpp
FCollada/FCDocument/FCDController.cpp
FCollada/FCDocument/FCDControllerInstance.cpp
FCollada/FCDocument/FCDControllerTools.cpp
FCollada/FCDocument/FCDEffectCode.cpp
FCollada/FCDocument/FCDEffect.cpp
FCollada/FCDocument/FCDEffectParameter.cpp
FCollada/FCDocument/FCDEffectParameterFactory.cpp
FCollada/FCDocument/FCDEffectParameterSampler.cpp
FCollada/FCDocument/FCDEffectParameterSurface.cpp
FCollada/FCDocument/FCDEffectPass.cpp
FCollada/FCDocument/FCDEffectPassShader.cpp
FCollada/FCDocument/FCDEffectPassState.cpp
FCollada/FCDocument/FCDEffectProfile.cpp
FCollada/FCDocument/FCDEffectProfileFX.cpp
FCollada/FCDocument/FCDEffectStandard.cpp
FCollada/FCDocument/FCDEffectTechnique.cpp
FCollada/FCDocument/FCDEffectTools.cpp
FCollada/FCDocument/FCDEmitter.cpp
FCollada/FCDocument/FCDEmitterInstance.cpp
FCollada/FCDocument/FCDEmitterObject.cpp
FCollada/FCDocument/FCDEmitterParticle.cpp
FCollada/FCDocument/FCDEntity.cpp
FCollada/FCDocument/FCDEntityInstance.cpp
FCollada/FCDocument/FCDEntityReference.cpp
FCollada/FCDocument/FCDExternalReferenceManager.cpp
FCollada/FCDocument/FCDExtra.cpp
FCollada/FCDocument/FCDForceDeflector.cpp
FCollada/FCDocument/FCDForceDrag.cpp
FCollada/FCDocument/FCDForceField.cpp
FCollada/FCDocument/FCDForceGravity.cpp
FCollada/FCDocument/FCDForcePBomb.cpp
FCollada/FCDocument/FCDForceWind.cpp
FCollada/FCDocument/FCDGeometry.cpp
FCollada/FCDocument/FCDGeometryInstance.cpp
FCollada/FCDocument/FCDGeometryMesh.cpp
FCollada/FCDocument/FCDGeometryNURBSSurface.cpp
FCollada/FCDocument/FCDGeometryPolygons.cpp
FCollada/FCDocument/FCDGeometryPolygonsInput.cpp
FCollada/FCDocument/FCDGeometryPolygonsTools.cpp
FCollada/FCDocument/FCDGeometrySource.cpp
FCollada/FCDocument/FCDGeometrySpline.cpp
FCollada/FCDocument/FCDImage.cpp
FCollada/FCDocument/FCDLibrary.cpp
FCollada/FCDocument/FCDLight.cpp
FCollada/FCDocument/FCDLightTools.cpp
FCollada/FCDocument/FCDMaterial.cpp
FCollada/FCDocument/FCDMaterialInstance.cpp
FCollada/FCDocument/FCDMorphController.cpp
FCollada/FCDocument/FCDObject.cpp
FCollada/FCDocument/FCDObjectWithId.cpp
FCollada/FCDocument/FCDocument.cpp
FCollada/FCDocument/FCDocumentTools.cpp
FCollada/FCDocument/FCDParameterAnimatable.cpp
FCollada/FCDocument/FCDParticleModifier.cpp
FCollada/FCDocument/FCDPhysicsAnalyticalGeometry.cpp
FCollada/FCDocument/FCDPhysicsForceFieldInstance.cpp
FCollada/FCDocument/FCDPhysicsMaterial.cpp
FCollada/FCDocument/FCDPhysicsModel.cpp
FCollada/FCDocument/FCDPhysicsModelInstance.cpp
FCollada/FCDocument/FCDPhysicsRigidBody.cpp
FCollada/FCDocument/FCDPhysicsRigidBodyInstance.cpp
FCollada/FCDocument/FCDPhysicsRigidBodyParameters.cpp
FCollada/FCDocument/FCDPhysicsRigidConstraint.cpp
FCollada/FCDocument/FCDPhysicsRigidConstraintInstance.cpp
FCollada/FCDocument/FCDPhysicsScene.cpp
FCollada/FCDocument/FCDPhysicsShape.cpp
FCollada/FCDocument/FCDPlaceHolder.cpp
FCollada/FCDocument/FCDSceneNode.cpp
FCollada/FCDocument/FCDSceneNodeIterator.cpp
FCollada/FCDocument/FCDSceneNodeTools.cpp
FCollada/FCDocument/FCDSkinController.cpp
FCollada/FCDocument/FCDTargetedEntity.cpp
FCollada/FCDocument/FCDTexture.cpp
FCollada/FCDocument/FCDTransform.cpp
FCollada/FCDocument/FCDVersion.cpp
FCollada/FMath/FMAllocator.cpp
FCollada/FMath/FMAngleAxis.cpp
FCollada/FMath/FMColor.cpp
FCollada/FMath/FMInterpolation.cpp
FCollada/FMath/FMLookAt.cpp
FCollada/FMath/FMMatrix33.cpp
FCollada/FMath/FMMatrix44.cpp
FCollada/FMath/FMQuaternion.cpp
FCollada/FMath/FMRandom.cpp
FCollada/FMath/FMSkew.cpp
FCollada/FMath/FMVector3.cpp
FCollada/FMath/FMVolume.cpp
FCollada/FUtils/FUAssert.cp

http://jenkins-master:8080/job/phabricator/2083/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jenkins-master:8080/job/phabricator_lint/558/ for more details.

fatherbushido accepted this revision.EditedSep 30 2017, 2:59 PM

I tested it against D935

As far as I tested, it's complete (should be anyway with sed).
Atlas works fine.
(Rubbles won't be displayed in Unit demo map as they have no footprint which is used to place the things. They have neither obstruction.)
I guess their won't be people wanting rubble with 57 and 46 and 25 decay time so the special filter folder won't be spam.

edit: spam -> spammed

This revision is now accepted and ready to land.Sep 30 2017, 2:59 PM
This revision was automatically updated to reflect the committed changes.

I'm a bit suspicious about there being two variants of the special template with different numbers. It would be great to leave out the balancing and fine-tuning of numbers of that folder and only have it influence logic / code flow, so that it is robust for the future and won't become mesy or messed up.
Even more so since there is only one user of that file (fields).

Shouldn't we and modders instead add a decayable field rubble template inheriting the nondecayable field rubble and keep decayable as a general purpose one?
Modders might want to change more component properties and values than having the choice between 15s and 60s.

In D938#36711, @elexis wrote:

I'm a bit suspicious about there being two variants of the special template with different numbers. It would be great to leave out the balancing and fine-tuning of numbers of that folder and only have it influence logic / code flow, so that it is robust for the future and won't become mesy or messed up.

(Actual commit duplicates the file, since inheritance doesn't work there (yes, I didn't test that part before proposing this differential.)
There are two variants because that's what the templates did up to now. If someone (modders or otherwise) wants to change that they can either modify the filter, or change the placed rubble (and filter).

Even more so since there is only one user of that file (fields).

If someone dislikes that file and wants to make it use the same as all other templates, go ahead and propose that.

Shouldn't we and modders instead add a decayable field rubble template inheriting the nondecayable field rubble and keep decayable as a general purpose one?
Modders might want to change more component properties and values than having the choice between 15s and 60s.

Modders can (or should if that's what they want) add new filters and use them, or modify existing filters, or add new rubble templates and use those.

Meant the public mod could have templates/rubble/rubble_field.xml and templates/rubble/rubble_field_decayable.xml and not use a special filter in that one case.
I remain the right to complain or propose a diff once the second special filter variant is introduced. :P

I just noticed (am I right?) that we could have just filtered the <Decay><Active> bool
So it'll adress the elexis wonder.

I just noticed (am I right?) that we could have just filtered the <Decay><Active> bool
So it'll adress the elexis wonder.

Right, care to commit that? (Don't forget to remove the decay_60 filter and remove that from the field SpawnEntityOnDeath entry.)