Jump to content


Photo

Different textures


  • Please log in to reply
20 replies to this topic

#1 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 06:55 PM

Hey ! Thanks for attention.

 

I might be appearing as a noob, but I just wanted to know how to change the texture of a gobelin soldier. I mean I would like to add a new gobelin soldier with a new texture.

 

I already know how to edit original textures. Anyway I searched in the code of the horde and the gobelin fighter (let's call it gobelin looter) and didn't find anything to change the unit texture, only the sword...

 

Help ? ^^'


Edited by CobrasShadows, 17 March 2015 - 08:15 PM.

ocarina_bookmark___song_of_time_by_empir


#2 Irenë Hawnetyne

Irenë Hawnetyne

    -

  • Hosted
  • 3,073 posts

Posted 17 March 2015 - 07:25 PM

Okay, for one, you should start by using proper English with structured posts. It makes me like you more.

 

Essentially, you have to import the goblin W3D model, which if you haven't figured out already is in art/w3d/mu/mugblnswrd_skn.w3d into RenX or 3DS Max 8.

Then, apply your new Goblin Warrior texture to the model. Bind the model to its skeleton. How to do this stuff in-depth is all contained in this article.

 

Then export the model using mugblnswrd_skl.w3d as a skeleton, and create an asset.dat with the model included to art/w3d/mu/mu%your name of the new model% and then you simply code it in as a ChildObject of the original Goblin Warrior with a changed model reference.


"Everyone's a hero when there's nowhere left to run."

 

Auxiliary Skarn, 2333rd Cohort


#3 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 07:37 PM

Oh okay thanks ^^ I didn't understood everything but I'm going to try ! Also sorry if my english is not good, I'm french xD


ocarina_bookmark___song_of_time_by_empir


#4 Irenë Hawnetyne

Irenë Hawnetyne

    -

  • Hosted
  • 3,073 posts

Posted 17 March 2015 - 07:46 PM

That's alright, at least you're trying - I thought you were a native English speaker, so you're doing good :) and see how far you get with the tutorials on the3rdage.net, they're very good.


"Everyone's a hero when there's nowhere left to run."

 

Auxiliary Skarn, 2333rd Cohort


#5 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 07:47 PM

Okay so I made what you did but I'm using the "-mod" command. I don't understand how to create the asset.dat :/ Is there a way by putting the models in the mod folder ?


ocarina_bookmark___song_of_time_by_empir


#6 Irenë Hawnetyne

Irenë Hawnetyne

    -

  • Hosted
  • 3,073 posts

Posted 17 March 2015 - 07:49 PM

Ta-dah: http://www.the3rdage...?apage=373#page


"Everyone's a hero when there's nowhere left to run."

 

Auxiliary Skarn, 2333rd Cohort


#7 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 08:07 PM

Oh thanks... I'm so incompetent. x)

 

Just for the child object. I wanted to make a proper unit, I mean in another faction (gobelins) and not in the wild faction. I want to have a proper file for the unit (I already have it). Is it possible to specify model/texture in my gobelinlooter.ini file ? :x If I'm obliged to use a child object i'll do this way. ^^

 

Oh wait ! I just understood xD mugblnswrd_skl.tga is the texture of the soldier, and not the sword (I thought swrd was an abreviation for sword -.-'')... So I can just create a new texture for the gobelin and specifying this new .tga file in the unit .ini file no ? (In my compiledtextures mod folder)

 

(PS: I tried structuring my reply. Dunno if it's good enough xD)


Edited by CobrasShadows, 17 March 2015 - 08:09 PM.

ocarina_bookmark___song_of_time_by_empir


#8 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 17 March 2015 - 08:19 PM

You would need to use a texture replacement line of code:

RandomTexture = newone.tga 0 oldone.tga

 

It would be somewhere right above or below the DefaultModelConditionState :)


Ridder Geel

#9 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 08:24 PM

Yeah thanks I already located these lines before ^^ Okay I'm gonna try and see...


ocarina_bookmark___song_of_time_by_empir


#10 Irenë Hawnetyne

Irenë Hawnetyne

    -

  • Hosted
  • 3,073 posts

Posted 17 March 2015 - 08:40 PM

Wait, RG does that work for every model in game?


"Everyone's a hero when there's nowhere left to run."

 

Auxiliary Skarn, 2333rd Cohort


#11 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 17 March 2015 - 09:07 PM

Okay so I tried by myself in a lot of different ways... Finally I obtained a nice result... A full pink goblin xD Not what I wanted ^^" I'm just gonna try patching it with the asset cache builder an it should work. The problem now is, that I have for only one goblin the texture I want. For a horde it's still the basic texture (note that I copied the Goblin fighter .ini horde file). What do I need to change so I can have an army of pink missing textures goblins ?

 

GoblinHordes.ini (modified copy of WildHordes.ini)

Object GoblinLooterHorde

  	; This is required for garrisoned objects - please put in all objects.
	ButtonImage		= WOR_GoblinFighters
	SelectPortrait	= UPWild_GoblinWarrior

	Draw = W3DScriptedModelDraw ModuleTag_W3DModelDraw
	    DependencySharedModelFlags = EMOTION_ALERT EMOTION_MORALE_HIGH EMOTION_MORALE_LOW EMOTION_AFRAID EMOTION_COWER SELECTED EMOTION_TERROR EMOTION_LOOK_TO_SKY SIEGE_CONTAIN
		DefaultModelConditionState
			Model = None ;InvisHrdeTmp
		End
		ModelConditionState = HORDE_EMPTY
			Model = None
		End		
		ModelConditionState = WORLD_BUILDER
			Model = HordeMarkAUGFi
		End
	End
	
	Side			= Goblin
	EditorSorting	= UNIT
	EmotionRange	= 0
	DisplayName		= OBJECT:HordeGoblinLooter
	DisplayNameStrategic = CONTROLBAR:LW_Unit_GoblinFighterHorde
	DescriptionStrategic = CONTROLBAR:LW_ToolTip_GoblinFighterHorde
	
	IsAutoBuilt		= Yes

	WeaponSet
		Conditions	= None 
		Weapon		= PRIMARY    NormalMeleeHordeRangefinder
		AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT	FROM_AI ; ;bt
	End

	; *** AUDIO Parameters ***;
	; Note: Don't put voice parameters here -- they will be ignored. Voice play requests
	; are always passed through to members


	BuildCost		= 300
	BuildTime		= 0	
	   
	VisionRange = 46000
	ShroudClearingRange = 46000
	
	VisionSide = 50%
	VisionRear = 25%
	
	MaxVisionBonusPercent = 300%
	VisionBonusTestRadius = 200
	VisionBonusPercentPerFoot = 1.0% 
	
	CrushableLevel	= 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
	CrusherLevel	= 3 ;What can I crush?: 0 = small animals, 1 = infantry, 2 = trees, 3 = vehicles 
	CommandPoints	= 40 ; ;60
	CommandSet		= GoblinLooterHordeCommandSet
	FormationWidth	= 2 ; Width it occupies in formations. Current choices are 1 or 2.
	FormationDepth	= 2 ; Depth it occupies in formations. Current choices are 1 or 2.
	
    TransportSlotCount = M_TRANSPORTSLOTCOUNT_LARGE_HORDE
	KindOf = SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT INFANTRY HORDE MELEE_HORDE ARMY_SUMMARY LARGE_RECTANGLE_PATHFIND CAN_CLIMB_WALLS ;BUILD_FOR_FREE - Not anymore
	
	ThreatLevel = M_GOBLIN_FIGHTER_HORDE_THREAT
	ThreatBreakdown GoblinFighterHorde_DetailedThreat
		AIKindOf = INFANTRY
	End
	
	#include "..\..\..\includes\StandardHordeEvaEvents.inc"

	Body = ImmortalBody ModuleTag_ImmortalBody
		MaxHealth = 1
	End
	
	Behavior = StancesBehavior ModuleTag_StancesBehavior
        StanceTemplate = FighterHorde
    End

	Behavior = HordeAIUpdate ModuleTag_HordeAIUpdate
		AutoAcquireEnemiesWhenIdle	= Yes ATTACK_BUILDINGS
		MoodAttackCheckRate			= 500
		AILuaEventsList				= InfantryFunctions
		MaxCowerTime				= 5000
		MinCowerTime				= 3000
		AttackPriority				=  AttackPriority_Infantry
	End

	Behavior = HordeContain ModuleTag_HordeContain
		FrontAngle = 270
		FlankedDelay = 2000
		ObjectStatusOfContained = 
		InitialPayload	= GoblinFighter 10
		Slots			= 10
		PassengerFilter = ANY +INFANTRY
		ShowPips		= No
		
		; Banner Carrier info		
		BannerCarriersAllowed	= WildBannerGoblin								; types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:GoblinFighter	Pos:X:60.0 Y:0.0	; (DEFAULT) position of banner carrier for fighter horde
		
		RandomOffset = X:5 Y:5	
		
		MeleeBehavior = Amoeba
		End
		
		RankInfo = RankNumber:1 UnitType:GoblinFighter Position:X:50 Y:0		Position:X:50 Y:20		Position:X:50 Y:-20		Position:X:50 Y:40		Position:X:50 Y:-40 
		RankInfo = RankNumber:2 UnitType:GoblinFighter Position:X:30 Y:0 Leader 1 0	Position:X:30 Y:20 Leader 1 1	Position:X:30 Y:-20 Leader 1 2	Position:X:30 Y:40 Leader 1 3	Position:X:30 Y:-40 Leader 1 4
		RankInfo = RankNumber:3 UnitType:GoblinFighter Position:X:10 Y:0 Leader 2 0	Position:X:10 Y:20 Leader 2 1	Position:X:10 Y:-20 Leader 2 2	Position:X:10 Y:40 Leader 2 3	Position:X:10 Y:-40 Leader 2 4
		RankInfo = RankNumber:3 UnitType:GoblinFighter Position:X:-10 Y:0 Leader 3 0	Position:X:-10 Y:20 Leader 3 1	Position:X:-10 Y:-20 Leader 3 2	Position:X:-10 Y:40 Leader 3 3	Position:X:-10 Y:-40 Leader 3 4
		



		RanksToReleaseWhenAttacking = 1

		MeleeAttackLeashDistance = 1; How far the hordes can move from the center of the horde when melee attacking.
	End
	
	Behavior = PhysicsBehavior ModuleTag_PhysicsBehavior
		GravityMult = 1.0
	End
	
	Behavior = LargeGroupBonusUpdate ModuleTag_LargeGroupBonus
		UpdateRate			= 1000
		HordeMemberFilter	= NONE +GoblinFighter +GoblinArcher	
		Count				= 100
		Radius				= 160.0
		RubOffRadius		= 160.0
		AlliesOnly			= Yes
		AttributeModifier	= MordorLargeGroupBonus
	End
	
 	Behavior = EmotionTrackerUpdate	Module_EmotionTracker
 		
 		TauntAndPointDistance		=	M_INFANTRY_TAUNT_POINT_RADIUS; 350		; max distance to taunted/pointed objet
		TauntAndPointUpdateDelay	=	1000	; how often scan (milliseconds)
		TauntAndPointExcluded		=	NONE
		AfraidOf					=	M_EMOTION_AFRAIDOF_OBJECTFILTER
		AlwaysAfraidOf				=	M_EMOTION_ALWAYS_AFRAIDOF_OBJECTFILTER
		PointAt						=	M_EMOTION_POINTAT_OBJECTFILTER
		HeroScanDistance			=	150
		FearScanDistance			=	M_INFANTRY_FEAR_SCAN_RADIUS ;250

		AddEmotion	=	Terror_Base
		AddEmotion	=	Doom_Base
		AddEmotion	=   BraceForBeingCrushed_Base
		AddEmotion	=	UncontrollableFear_Base_Evil
		AddEmotion	=	FearIdle_Base
		AddEmotion	=	FearBusy_Base
		AddEmotion	=	Point_Base
		
		AddEmotion	=	OVERRIDE Taunt_Base	
 		;	AttributeModifier		=	GondorFighterTaunt
 		End	
		
		AddEmotion	=	CheerIdle_Base
		AddEmotion	=	CheerBusy_Base
		AddEmotion	=	HeroCheerIdle_Base
		AddEmotion	=	HeroCheerBusy_Base
		AddEmotion	=	Alert_Base
	End		



; What is SET_NORMAL here should soon be SET_WALL_SCALING	
;	LocomotorSet
;		Locomotor     = NormalMeleeHordeLocomotor
;		Condition     = SET_NORMAL
;		Speed         = M_NORMAL_EVIL_INFANTRY_HORDE_SPEED
;	End
	LocomotorSet
		Locomotor     = TestWallScalingHordeLocomotor
		Condition     = SET_NORMAL
		Speed         = M_NORMAL_WILD_FAST_HORDE_SPEED
	End

	Behavior = ProductionUpdate ProductionUpdateModuleTag
		GiveNoXP = Yes
	End

	Behavior = LevelUpUpgrade ModuleTag_BasicTraining
		TriggeredBy			= Upgrade_WildBasicTraining
		LevelsToGain		= 1
		LevelCap			= 2
	End

	; ;#include "..\..\..\includes\CaptureBuilding.inc"

	Behavior = SpecialPowerModule ModuleTag_CaptureBuilding
		SpecialPowerTemplate		= SpecialAbilityCaptureBuilding
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= No
	End
	Behavior = SpecialAbilityUpdate ModuleTag_CaptureBuildingUpdate
		SpecialPowerTemplate		= SpecialAbilityCaptureBuilding
		StartAbilityRange			= 15.0
		UnpackTime					= 1
		PreparationTime				= 20000 ; ;15000
		PackTime					= 1
		DoCaptureFX					= Yes
	End
    
	Behavior = HordeDispatchSpecialPower ModuleTag_PoisonedBladeDispatch
		SpecialPowerTemplate		= SpecialAbilityGoblinFighterPoisonedBlades
		StartsPaused		  		= No
	End

    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
		TriggeredBy = Upgrade_WildHeavyArmor
	End
	
	Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality3
		TriggeredBy = Upgrade_WildForgedBlades
	End
	
	Behavior = PickupStuffUpdate ModuleTag_PickupStuffUpdate
		SkirmishAIOnly = Yes
		StuffToPickUp = NONE +CRATE
		ScanRange = 200
		ScanIntervalSeconds = 0.5
	End
	
	
	;///////////////////
	; AISpecialPowers
	;///////////////////
	
	Behavior = AISpecialPowerUpdate GoblinFighterHordeCaptureBuildingAI
		CommandButtonName = Command_CaptureBuilding
		SpecialPowerAIType = AI_SPECIAL_POWER_CAPTURE_BUILDING
	End
	
	Geometry = BOX
	GeometryMajorRadius = 40.0
	GeometryMinorRadius = 50.0
	GeometryHeight = 20.0
	GeometryIsSmall = No
	
	
	; *** AUTO RESOLVE DATA *** 
	AutoResolveUnitType = AutoResolveUnit_Soldier
	AutoResolveCombatChain = AutoResolve_SoldierCombatChain

	AutoResolveBody = AutoResolve_WildFighterHordeBody

	AutoResolveArmor
		RequiredUpgrades = Upgrade_WildHeavyArmor
		Armor = AutoResolve_GoblinWarriorHeavyArmor
	End

	AutoResolveArmor
		ExcludedUpgrades = Upgrade_WildHeavyArmor
		Armor = AutoResolve_GoblinWarriorArmor
	End

	AutoResolveWeapon
		RequiredUpgrades = Upgrade_WildForgedBlades
		Weapon = AutoResolve_GoblinWarriorUpgradedWeapon
	End

	AutoResolveWeapon
		ExcludedUpgrades = Upgrade_WildForgedBlades
		Weapon = AutoResolve_GoblinWarriorWeapon
	End
	
	WorldMapArmoryUpgradesAllowed = Upgrade_WildBasicTraining Upgrade_WildForgedBlades Upgrade_WildHeavyArmor
End

ocarina_bookmark___song_of_time_by_empir


#12 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 18 March 2015 - 08:45 AM

@ Irenë

Yep, at least almost every one of em :p

 

...

In the horde you would need to change most occurences of the old unit with your new one (GoblinFighter).

Behavior = HordeContain ModuleTag_HordeContain
        FrontAngle = 270
        FlankedDelay = 2000
        ObjectStatusOfContained =
        InitialPayload    = GoblinFighter 10
        Slots            = 10
        PassengerFilter = ANY +INFANTRY
        ShowPips        = No
        
        ; Banner Carrier info        
        BannerCarriersAllowed    = WildBannerGoblin                                ; types of units that are allowed as banner carriers
        BannerCarrierPosition    = UnitType:GoblinFighter    Pos:X:60.0 Y:0.0    ; (DEFAULT) position of banner carrier for fighter horde
        
        RandomOffset = X:5 Y:5    
        
        MeleeBehavior = Amoeba
        End
        
        RankInfo = RankNumber:1 UnitType:GoblinFighter Position:X:50 Y:0        Position:X:50 Y:20        Position:X:50 Y:-20        Position:X:50 Y:40        Position:X:50 Y:-40
        RankInfo = RankNumber:2 UnitType:GoblinFighter Position:X:30 Y:0 Leader 1 0    Position:X:30 Y:20 Leader 1 1    Position:X:30 Y:-20 Leader 1 2    Position:X:30 Y:40 Leader 1 3    Position:X:30 Y:-40 Leader 1 4
        RankInfo = RankNumber:3 UnitType:GoblinFighter Position:X:10 Y:0 Leader 2 0    Position:X:10 Y:20 Leader 2 1    Position:X:10 Y:-20 Leader 2 2    Position:X:10 Y:40 Leader 2 3    Position:X:10 Y:-40 Leader 2 4
        RankInfo = RankNumber:3 UnitType:GoblinFighter Position:X:-10 Y:0 Leader 3 0    Position:X:-10 Y:20 Leader 3 1    Position:X:-10 Y:-20 Leader 3 2    Position:X:-10 Y:40 Leader 3 3    Position:X:-10 Y:-40 Leader 3 4
        



        RanksToReleaseWhenAttacking = 1

        MeleeAttackLeashDistance = 1; How far the hordes can move from the center of the horde when melee attacking.
    End

Edited by Ridder Geel, 18 March 2015 - 08:46 AM.

Ridder Geel

#13 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 18 March 2015 - 06:56 PM

Well I replaced GoblinFighter 5 by GoblinLooter 5 and I get an army of pink goblins... Plus it's not a horde, just plenty of units selectable one by one...


Edited by CobrasShadows, 18 March 2015 - 07:22 PM.

ocarina_bookmark___song_of_time_by_empir


#14 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 18 March 2015 - 08:19 PM

Because in that module, you also have UnitType:.....

Did you change that? :p

As i said you need to change most occurences of the unit :p (well all actually :p)


Ridder Geel

#15 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 18 March 2015 - 08:33 PM

Yeah I changed that too ! Apparently it's just the textures not showing xD Pink goblin army... Maybe it's my asset cache builder application ? I made the file under a .tga, not working. Same for a .dds file...


ocarina_bookmark___song_of_time_by_empir


#16 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 19 March 2015 - 08:44 AM

What builder are you using? :p


Ridder Geel

#17 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 19 March 2015 - 06:49 PM

The official one from EA.


ocarina_bookmark___song_of_time_by_empir


#18 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 20 March 2015 - 12:06 PM

You need to rename compiledtextures to textures, then run the builder, and rename it back :p


Ridder Geel

#19 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 21 March 2015 - 07:10 PM

I know but when I was not doing it it was working anyway -.-


ocarina_bookmark___song_of_time_by_empir


#20 CobrasShadows

CobrasShadows
  • Members
  • 42 posts
  • Location:Equestria, near Ponyville
  • Projects:A mod, school, and so many others...
  •  Lord of the Ponies

Posted 21 March 2015 - 07:43 PM

Okay so it's finally working, thanks a lot for your help ! ^.^ I think I'm gonna stay in this cool and helpful modding community :D


ocarina_bookmark___song_of_time_by_empir





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users