17. Okt 2018, 01:23 Hallo Gast.
Willkommen Gast. Bitte einloggen oder registrieren. Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge. Hierbei werden gemäß Datenschutzerklärung Benutzername und Passwort verschlüsselt für die gewählte Dauer in einem Cookie abgelegt.


Select Boards:
 
Language:
 


Autor Thema: Different textures on default objects  (Gelesen 1675 mal)

DrHouse93

  • Edain Betatesting
  • Elronds Berater
  • ***
  • Beiträge: 326
Different textures on default objects
« am: 29. Sep 2015, 12:32 »
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

  • Edain Team
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 11.507
Re: Different textures on default objects
« Antwort #1 am: 29. Sep 2015, 12:44 »
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 )

Object RockGrey08
 ReplaceModule ModuleTag_01
   Draw = W3DScriptedModelDraw ModuleTag_01GG
    RandomTexture = PROldForest01.tga 0 PRGrey.tga
        OkToChangeModelColor = Yes
DefaultModelConditionState
Model = PRG08
End
  End
 End
End

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:
    RandomTexture = PROldForest01.tga 0 PRGrey.tga
        OkToChangeModelColor = Yes
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

  • Edain Betatesting
  • Elronds Berater
  • ***
  • Beiträge: 326
Re: Different textures on default objects
« Antwort #2 am: 29. Sep 2015, 14:47 »
Ok, this is what I did:
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
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

  • Edain Team
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 11.507
Re: Different textures on default objects
« Antwort #3 am: 29. Sep 2015, 15:28 »
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:
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
For this object it's called ModuleTag_Draw, you have to replace this.
So you have to use:



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
(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

  • Edain Betatesting
  • Elronds Berater
  • ***
  • Beiträge: 326
Re: Different textures on default objects
« Antwort #4 am: 29. Sep 2015, 16:18 »
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

Gnomi

  • Edain Team
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 11.507
Re: Different textures on default objects
« Antwort #5 am: 29. Sep 2015, 16:57 »
Those files aren't in any ini-file.^^
You have to open the moddle in the w3d viewer and then find out this way what texture the object is using.

DrHouse93

  • Edain Betatesting
  • Elronds Berater
  • ***
  • Beiträge: 326
Re: Different textures on default objects
« Antwort #6 am: 29. Sep 2015, 18:39 »
That's the problem. I've looked in Edain textures, Standard textures, and even BFME2 textures...but I didn't find them anywhere ._.
Maybe I missed them, I'll check better. The only place where I haven't look is inside BFME I textures

Ealendril

  • Edain-Gründer
  • Bewahrer des roten Buches
  • *****
  • Beiträge: 19.695
Re: Different textures on default objects
« Antwort #7 am: 29. Sep 2015, 18:47 »
The model rbwalls is using the texture rbgate.tga.

DrHouse93

  • Edain Betatesting
  • Elronds Berater
  • ***
  • Beiträge: 326
Re: Different textures on default objects
« Antwort #8 am: 29. Sep 2015, 21:11 »
YES! It finally works! It looks horrible, but it works^^
Thank you both so much. I can finally start again works on my map^^

hoho96

  • Verteidiger Morias
  • **
  • Beiträge: 515
  • You Can not Hide!
Re: Different textures on default objects
« Antwort #9 am: 30. Sep 2015, 08:33 »
Zitat
It looks horrible, but it works^^
This one made my day   [ugly]