Page 1 of 2
Decreasing power requirements
Posted: Sat May 28, 2016 5:31 am
by Blackened
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.
Posted: Sat May 28, 2016 8:20 am
by Murto the Ray
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:
Code: Select all
Rules:
BARR:
Power:
Amount: 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!
Posted: Sat May 28, 2016 10:50 am
by Blackened
Wouldn't that set any soviet barracks to 0 power drain?
Posted: Sat May 28, 2016 10:57 am
by Graion Dilach
Yes, that would.
If you want to change 3 exact building on the map like that, you have to clone their type into a new one (XY: Inherits: type RenderSprites: type, with ofc proper indenting) and replace the three instances with your new type.
Posted: Sat May 28, 2016 11:17 am
by Blackened
Ok I stayed up all night trying to figure this out. I made
some progress. Baby steps. Baby steps.
90% of what you just said went straight over my head
but I'm going to assume that is the sleep deprivation and not my complete lack of understanding what the hell I'm doing.
Posted: Wed Jun 01, 2016 5:15 am
by Blackened
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
Posted: Wed Jun 01, 2016 6:52 am
by Graion Dilach
fix2 requires to need RenderSprites: Image: fix. It has no artwork atm.
Posted: Wed Jun 01, 2016 10:25 am
by Blackened
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
added but still crashing. is there something else I'm doing (or not doing)?
Posted: Wed Jun 01, 2016 1:18 pm
by Murto the Ray
"fix" needs to be after "Image:" on the same line
Posted: Wed Jun 01, 2016 10:04 pm
by Blackened
Still crashing. Where exactly should this code be inserted?
Also thanks for the help thus far.
Posted: Thu Jun 02, 2016 12:04 am
by Graion Dilach
Posted: Thu Jun 02, 2016 12:58 am
by Blackened
I meant into the correct .yaml file.
Posted: Fri Jun 03, 2016 6:58 am
by Blackened
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)
Posted: Fri Jun 03, 2016 12:33 pm
by Graion Dilach
It's RenderSprites not Rendersprites. This game is case-sensitive.
Posted: Sat Jun 04, 2016 4:28 am
by Blackened
Alright all but 1 thing is working now. I tried looking through all the traits to see if there was a specific one I was missing but I can't seem to find it. The modified repair facility won't allow units on to be repaired. Do you know how I would go about doing that?