[en] - Modding Corner > Modelling / Skinning
Different textures on default objects
DrHouse93:
Greetings, staff of the Edain^^
I know I already asked this question time ago on the EIC, but since the forum has been closed, I lost the answer. So here's my question:
How can I apply to - for example - Rohan's Castle Walls the textures of - for example - Minas Tirith Walls, but keeping the model of the first one? (So i would have straight climbable stony walls, rather than circular ones, or wooden ones)
I need them for a map I'm working on^^
Gnomi:
It will never work perfectly, as you can just replace a texture by another one - but you can't replace it, so it can happen that the texture for the wall is on top of the modell or the stair texture is on the side of the walls.^^ Looks really funny. :D (I had once a bridge which had the face of Aragorn all over it. :D )
--- Code: ---Object RockGrey08
ReplaceModule ModuleTag_01
Draw = W3DScriptedModelDraw ModuleTag_01GG
RandomTexture = PROldForest01.tga 0 PRGrey.tga
OkToChangeModelColor = Yes
DefaultModelConditionState
Model = PRG08
End
End
End
End
--- Ende Code ---
This is how I've replaced the textures of a normal Rock to a rock with more grass on it. You can see multiple examples in the map.ini of my lorien-map for edain. :)
You have to replace the modeldraw with a new one which includes everything and also this here:
--- Code: --- RandomTexture = PROldForest01.tga 0 PRGrey.tga
OkToChangeModelColor = Yes
--- Ende Code ---
The Randomtexture replaces the right texture with the left texture.
So the right texture has to be the old texture of the object (and always have to end .tga, even though those files are NO .tga files) and the left texture is the name of the new texture (also has to end with .tga, even though those files are no .tga files)
DrHouse93:
Ok, this is what I did:
--- Code: ---Object RohanWall
AddModule
Draw = W3DScriptedModelDraw Draw_WallNEW
RandomTexture = GBMinwallA.tga 0 RBCasteWall.tga
OkToChangeModelColor = Yes
DefaultModelConditionState
Model = RBCastWALL
End
End
End
DisplayName = OBJECT:GondorCastleWall
End
--- Ende Code ---
But it doesn't work. It keeps the default texture, even if it looks like the new textures "sparkles" over the old one. I tried with ReplaceModule, but it says that both "ModuleTag_01" and "Draw_Wall" doesn't exist for that object. What should I do?
Gnomi:
Yeah, just adding won't work, you'll always have to replace the old one.^^
Just also look in the inis what the module is called. :)
This is the ini of the object:
--- Code: ---Object RohanWall
; *** ART Parameters ***
SelectPortrait = BRCastleWall
; ButtonImage = SNReactor
;day
Draw = W3DScriptedModelDraw ModuleTag_Draw
OkToChangeModelColor = Yes
UseStandardModelNames = Yes
DefaultModelConditionState
Model = RBWalls
End
WallBoundsMesh = wall1
End
PlacementViewAngle = 0
; ***DESIGN parameters ***
DisplayName = OBJECT:RohanWall
Side = Rohan
EditorSorting = STRUCTURE
ThreatLevel = 1.0
BuildCost = 1
BuildTime = 5.0 ; in seconds
VisionRange = 160.0 ; Shroud clearing distance
ShroudClearingRange = 160
ArmorSet
Armor = StructureArmor
End
; For Testing Purposes
; *** AUDIO Parameters ***
; #include "..\..\..\Includes\StandardBuildingEvaEvents.inc"
SoundOnDamaged = BuildingLightDamageWood
SoundOnReallyDamaged = BuildingHeavyDamageWood
; VoiceSelect = NuclearReactorSelect
; UnitSpecificSounds
; UnderConstruction = UnderConstructionLoop
; End
CampnessValue = CAMPNESS_WALL
; *** ENGINEERING Parameters ***
RadarPriority = STRUCTURE
KindOf = PRELOAD STRUCTURE IMMOBILE SCORE WALK_ON_TOP_OF_WALL CHUNK_VENDOR NOT_AUTOACQUIRABLE MADE_OF_WOOD
Behavior = CastleMemberBehavior ModuleTag_CMB
CountsForEvaCastleBreached = Yes
End
Behavior = SiegeDockingBehavior ModuleTag_SiegeDocking
End
Body = StructureBody ModuleTag_05
MaxHealth = 1500.0
GrabObject = EntThrownBuildingRock
GrabFX = FX_WallGrab
GrabDamage = 490
GrabOffset = X:16 Y:0
End
Behavior = DestroyDie ModuleTag_07
;nothing
End
Behavior = AttributeModifierAuraUpdate ModuleTag_WallBonus
StartsActive = Yes ;If no, requires upgrade to turn on.
BonusName = WallBonus
RefreshDelay = 2000
;Range = 120 ; Range is overridden to affect people on us since we are a wall
;TargetEnemy = Yes ; Alliances are ignored to affect people on us since we are a wall
End
Geometry = BOX
GeometryMajorRadius = 50.0
GeometryMinorRadius = 35.0
GeometryHeight = 60.0
GeometryContactPoint = X:-50 Y:-40 Z:0 Grab
GeometryContactPoint = X:0 Y:-40 Z:40 Grab
GeometryContactPoint = X:50 Y:-40 Z:0 Grab
GeometryContactPoint = X:-50 Y:40 Z:0 Grab
GeometryContactPoint = X:0 Y:40 Z:40 Grab
GeometryContactPoint = X:50 Y:40 Z:0 Grab
GeometryIsSmall = No
Shadow = SHADOW_VOLUME
BuildCompletion = PLACED_BY_PLAYER
End
--- Ende Code ---
For this object it's called ModuleTag_Draw, you have to replace this.
So you have to use:
--- Code: ---
RemoveModule ModuleTag_Draw
AddModule
Draw = W3DScriptedModelDraw ModuleTag_DrawNew
RandomTexture = GBMinwallA.tga 0 RBCasteWall.tga
OkToChangeModelColor = Yes
UseStandardModelNames = Yes
DefaultModelConditionState
Model = RBWalls
End
WallBoundsMesh = wall1
End
End
--- Ende Code ---
(or use Replace instead of Remove/add, but I always like to write all Removes at the top to have a better overview)
I haven't tested it yet, but it should work.^^
DrHouse93:
A bridge with Aragorn face should be cool :D
Anyway, it keeps not working. But I think the problem is I make the script to replace the wrong picture (I'm pretty sure RBCasteWall.tga are not the textures used for Rohan Walls)
In fact, my main problem was I wasn't able to find the appropriate .ini file, so I have no clues on which texture should be replaced with the GBMinwallA one
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln