Decreasing power requirements
Decreasing power requirements
I'm not much of a modder, and by that I mean none. Is it possible to decrease the power consumption for 3 neutral buildings so that when captured they don't eat up power?
And if it is, could someone kindly point me in the right direction to do that? Thanks.
And if it is, could someone kindly point me in the right direction to do that? Thanks.
- Murto the Ray
- Posts: 487
- Joined: Mon Nov 10, 2014 4:34 pm
All of the actor definitions go below the "Rules:" bit of your map.yaml. Something like this would reduce the soviet barracks' power consumption to 0:
The "BARR:" bit means you are redefining some parameters of the barracks, the "Power:" trait means you are redefining something to do with the power and the "Amount: 0" redefines the amount of power that that barracks uses.
You can find a complete list of traits here!
Code: Select all
Rules:
BARR:
Power:
Amount: 0
You can find a complete list of traits here!
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Ok al I did was copy everything from "fix" and changed this to fix2, then replaced the actor with fix2. But when I try to view the map the game crashes what have I missed?
Code: Select all
FIX2:
Inherits: ^BaseBuilding
Valued:
Cost: 500
Tooltip:
Name: Repair Facility
Description: Repairs vehicles Footprint: _x_ xxx _x_
Dimensions: 3,3
Selectable:
Bounds: 64,34,0,3
SelectionDecorations:
VisualBounds: 72,48
Health:
HP: 600
RevealsShroud:
Range: 5c0
Bib:
HasMinibib: Yes
Reservable:
RepairsUnits:
Interval: 15
RallyPoint:
WithRepairAnimation:
Power:
Amount: 0
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Code: Select all
fix2:
Inherits: ^BaseBuilding
Valued:
Cost: 500
Tooltip:
Name: Repair Facility
Description: Repairs vehicles Footprint: _x_ xxx _x_
Dimensions: 3,3
Selectable:
Bounds: 64,34,0,3
SelectionDecorations:
VisualBounds: 72,48
Health:
HP: 600
RevealsShroud:
Range: 5c0
Bib:
HasMinibib: Yes
Reservable:
RepairsUnits:
Interval: 15
RallyPoint:
WithRepairAnimation:
Power:
Amount: 0
RenderSprites:
Image:
fix
- Murto the Ray
- Posts: 487
- Joined: Mon Nov 10, 2014 4:34 pm
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm
Ok I think I got almost everything out, but now I'm getting this:
Tiberian Dawn Mod at Version release-20160508
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.AggregateException`: One or more errors occurred.
Inner Exception of type `System.InvalidOperationException`: Cannot locate type: RenderspritesInfo
at OpenRA.ObjectCreator.<MissingTypeAction>m__7(String s)
at OpenRA.ObjectCreator.CreateObject[T](String className, Dictionary`2 args)
at OpenRA.ObjectCreator.CreateObject[T](String className)
at OpenRA.ActorInfo.LoadTraitInfo(ObjectCreator creator, String traitName, MiniYaml my)
at OpenRA.ActorInfo..ctor(ObjectCreator creator, String name, MiniYaml node)
at OpenRA.Ruleset.<LoadDefaults>c__AnonStorey0.<>m__1(MiniYamlNode k)
at OpenRA.Exts.ToDictionaryWithConflictLog[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, String debugName, Func`2 logKey, Func`2 logValue)
at OpenRA.Ruleset.MergeOrDefault[T](String name, IReadOnlyFileSystem fileSystem, IEnumerable`1 files, MiniYaml additional, IReadOnlyDictionary`2 defaults, Func`2 makeObject)
at OpenRA.Ruleset.<LoadDefaults>c__AnonStorey0.<>m__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at OpenRA.Ruleset.LoadDefaults(ModData modData)
at OpenRA.ModData.<ModData>m__2()
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at OpenRA.ModData.get_DefaultRules()
at OpenRA.Ruleset.LoadDefaultsForTileSet(ModData modData, String tileSet)
at OpenRA.Map.PostInit()
at OpenRA.Map..ctor(ModData modData, IReadOnlyPackage package)
at OpenRA.ModData.PrepareMap(String uid)
at OpenRA.Game.StartGame(String mapUID, WorldType type)
at OpenRA.Game.LoadShellMap()
at OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
at OpenRA.Game.InitializeMod(String mod, Arguments args)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
Tiberian Dawn Mod at Version release-20160508
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.AggregateException`: One or more errors occurred.
Inner Exception of type `System.InvalidOperationException`: Cannot locate type: RenderspritesInfo
at OpenRA.ObjectCreator.<MissingTypeAction>m__7(String s)
at OpenRA.ObjectCreator.CreateObject[T](String className, Dictionary`2 args)
at OpenRA.ObjectCreator.CreateObject[T](String className)
at OpenRA.ActorInfo.LoadTraitInfo(ObjectCreator creator, String traitName, MiniYaml my)
at OpenRA.ActorInfo..ctor(ObjectCreator creator, String name, MiniYaml node)
at OpenRA.Ruleset.<LoadDefaults>c__AnonStorey0.<>m__1(MiniYamlNode k)
at OpenRA.Exts.ToDictionaryWithConflictLog[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, String debugName, Func`2 logKey, Func`2 logValue)
at OpenRA.Ruleset.MergeOrDefault[T](String name, IReadOnlyFileSystem fileSystem, IEnumerable`1 files, MiniYaml additional, IReadOnlyDictionary`2 defaults, Func`2 makeObject)
at OpenRA.Ruleset.<LoadDefaults>c__AnonStorey0.<>m__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at OpenRA.Ruleset.LoadDefaults(ModData modData)
at OpenRA.ModData.<ModData>m__2()
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at OpenRA.ModData.get_DefaultRules()
at OpenRA.Ruleset.LoadDefaultsForTileSet(ModData modData, String tileSet)
at OpenRA.Map.PostInit()
at OpenRA.Map..ctor(ModData modData, IReadOnlyPackage package)
at OpenRA.ModData.PrepareMap(String uid)
at OpenRA.Game.StartGame(String mapUID, WorldType type)
at OpenRA.Game.LoadShellMap()
at OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
at OpenRA.Game.InitializeMod(String mod, Arguments args)
at OpenRA.Game.Initialize(Arguments args)
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
- Graion Dilach
- Posts: 277
- Joined: Fri May 15, 2015 5:57 pm