You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A guide to texture names in brgs ~ EmjeR
posted 29 January 2009 04:55 AM EDT (US)   
This is my first guide, so don't expect much.

Many of you modders don't like to have too much unnessesary 'ReplaceTexture' in their anims. the solution for this is to change the name in the brg file.
some of you know how to do this, but there is always a problem that, when the name is shorter than the orginal texturename you have to put \x00 (hex code, means that there's no character at that place) after the name.
If the new name is longer you need to use ReplaceTexture.

>-----

In this guide I'll discribe how the material system of a brg works. and how to change the indicator wich difines the lenght of the name.
You'll need to download a hex editor.
There are many on the internet, just search hex editor on google.
Some recommed ones:
- http://www.pspad.com
- http://www.portablefreeware.com/?sc=23(portable one)
- http://www.softcircuits.com/cygnus/fe/

Follow everything step by step and read carefull, then you will get it!

First i'll show you how a the material part looks. You can find it on the end of a brg file.
This one is from the Infantry G Hypaspist_IdleA:


The red parts are the headers of a material. This is where the data of a material starts.
The orange parts sets the id of the material. This number is used in the data part before to define wich material a face uses.
It also conforms a defenition in the file materials.lib. Ykkrosh also used this in the names of the textures wich are created when converting a brg with aomed.
The blue parts are the texture names. They have to be the same as an existing texture or you have to replace them with ReplaceTexture.

The green part are what this tutorial is going about.
Its always the 13th byte after the MTRL header.

hex converting can just be done with the window calculator.

set the clac to scientific mode in the view menu.

lets have a look at the last material.
it has the hex lenght identifier '19'.
switch to he coding:


set the lenght on byte and type 19:

if you have a byte with the chars A,B,C,D,E or F, you can use this buttons on the bottom of the calc:


Than change to decimal coding. don't press any other button underwhile:


And see the result:

Count the chars in the name and you'll see that there are 25.

Now I'll show you how to add a new texture name to the file.
Lets saw you want to make a greek palagnite mod. and you want to add the textures Infantry G Palagnite Standard (two, one for player color) and Infantry G Palagnite Head Iron.
The first to are 29 chars long and the third 30.

So the first two can jst replace the orginal first two, but the second need an other lenght identifier.
so first convert it to hex.
Make sure you set the calc to 'dec' coding first:


Then fill in the lenght:


Switch to hex coding:


And copy the result:


Now you can type the byte and the new name into your brg file:

Make sure you spell the name right and that the material end with '00 00 80 3f'.
So save the file and test it. If everything went right, it should work.

So this how it works, enjoy modding!!!

regards,
EmjeR

>-----
Thanks to Scorpion Ra for the screenshot of the english calculator. (mine is dutch)

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!

[This message has been edited by EmjeR (edited 02-27-2009 @ 02:52 AM).]

Replies:
posted 29 January 2009 07:02 AM EDT (US)     1 / 22  
So, just type in the new name (insert if larger), and make sure there are 2 extra null values after it? .

-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 29 January 2009 07:35 AM EDT (US)     2 / 22  
Interesting subject, but I have the feeling that the guide is not finished yet?

Nice to hear you're making progress on the BCTool, EmjeR .
posted 29 January 2009 03:28 PM EDT (US)     3 / 22  
yeah man srry
i had to leave while i was makeing it.

and i also don't have much time now so i'll continue tomorrow.

EDIT: it's ready now!

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!

[This message has been edited by EmjeR (edited 01-30-2009 @ 12:33 PM).]

posted 30 January 2009 01:06 PM EDT (US)     4 / 22  
Awesome man! Nice guide with pictures

Do you know what the other numbers stand for? The ones you didn't colour?

Well anyway nice stuff! I'm looking forward to the BCTool . Will it be able to change the number of textures also?
posted 30 January 2009 02:38 PM EDT (US)     5 / 22  
ty man
i don't know about the rest...
except that '00 00 80 3f' means 1.0
but i don't know why there is so much space.
Well anyway nice stuff! I'm looking forward to the BCTool . Will it be able to change the number of textures also?
of course! even better, it will be detected automaticly.

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!

[This message has been edited by EmjeR (edited 01-30-2009 @ 02:41 PM).]

posted 30 January 2009 02:58 PM EDT (US)     6 / 22  
damn I'm excited about this you should have been here 5 years ago!

do you know where the number of frames is stored in the brg?

edit: maybe those 1.0 are used to store settings like opacity etc...?

[This message has been edited by yowzatest4 (edited 01-30-2009 @ 03:00 PM).]

posted 31 January 2009 03:01 PM EDT (US)     7 / 22  
no! i know where i the opacity is set, but i'll not explain it here.
the nuber of frames is on the top of the brg.

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
posted 31 January 2009 03:41 PM EDT (US)     8 / 22  
Good work EmjeR! I myself like to hack up AoM edit an Hex Editor .
Set the lenght on byte and type 19:
Well.. this step is what troubles me.. How is it necessary?

What does it really do?..

Keep up the good work, I want to see more of you .
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 02 February 2009 04:06 PM EDT (US)     9 / 22  
dunno only that you are are only allowed to type two numbers. And with 'Word' 4, with 'Dword' 8 and with 'Qword' 16.
i just said it to be sure.
one byte is always 2 numbers and has 'normaly' 8 bits (ones or zeros).

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
posted 03 February 2009 03:32 AM EDT (US)     10 / 22  
I'm editting a Turma (Javelin Cavalry) and i'm trying to replace the spear (which is attached IN the model) with a bow. I think this guide just came in helpfull

[This message has been edited by Nick The Hun (edited 02-03-2009 @ 03:46 AM).]

posted 03 February 2009 09:12 AM EDT (US)     11 / 22  
No is not. Dont get confused between models and textures. The model is the shape, the texture is like a cover for that shape, even if you replace the javelin texture with the one of the bow, the shape will still be a javelin.
posted 04 February 2009 06:20 AM EDT (US)     12 / 22  
maybe he just wanna say that he made a bow model and set it in the turma model, and then he just want to rename the texture to a bow

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
posted 04 February 2009 07:25 AM EDT (US)     13 / 22  
nop, i want my turmas to have bows and shoot arrows instead of the annoying spears / make it into a cavalry archer.
posted 04 February 2009 04:26 PM EDT (US)     14 / 22  
yes we understood that, but the question is ow

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
posted 04 February 2009 06:55 PM EDT (US)     15 / 22  
If you want turmas to fire bows you'll need to edit the model so its actually holding and firing a bow. If you simply attach a bow in the anim file it will look like they're trying to throw bows as well as once fired a spear would be launched since the projectile unit would still be a spear unless edited.
Doesn't really have anything to do with this thread since it is about changing textures not models. Changing textures won't get you any closer to cavalry archers. I suggest you read some modeling tutorials.
posted 05 February 2009 10:38 AM EDT (US)     16 / 22  
Thanks, but no i shall return to my AoM Editor and improve with making maps.
posted 26 February 2009 09:42 AM EDT (US)     17 / 22  
No!!

Where are the images?! I want this. .
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 27 February 2009 02:45 AM EDT (US)     18 / 22  
srry i jst moved them to another album of my photobucket...

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
posted 27 February 2009 04:05 AM EDT (US)     19 / 22  
Thanks.. But the frustration was killing me so I gave up.

I was trying to modify a new copied unit to use another texture.. Sigh*
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 28 February 2009 06:19 AM EDT (US)     20 / 22  
from where did go wrong??
post the end of the file here and i will help...

btw when are you going to post your "guide to waving water"??

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!

[This message has been edited by EmjeR (edited 02-28-2009 @ 06:22 AM).]

posted 02 March 2009 04:48 PM EDT (US)     21 / 22  
@ EmjeR
Not sure. To be honest, I cloned the Revealer object. Looked at anim, and traced down the brg file, which I also copied. Now inside it is says grid1. So I went to textures, and created a new texture named grid2 but with a different hue - more bluish looking. I changed it's name and nothing happened.. It was still loading grid1. It might look very noobish and I acknowledge it . I didn't even get to name the texture larger than the original name so..

That water thing is far too complex and honestly - quite unpractical to do it. I'll add on msn, and I can guide you through if you want tho. .
-invent00r

My Work: 1 2 3 4 5 6 7 8 9 10

WIP: Master XS Battle Micro AI
Paused: AI (%4.247)
Os segredos são de quem os souber guardar.
posted 03 March 2009 07:05 AM EDT (US)     22 / 22  
yeah!!!
look forward to speak you!

hmmm...
are you sure there is only one texture difined in the brg??

are you sure there is only one brg in the models folder for the revealer??
did you you past the texture in the tex folder(you could have forgotten it...)

wait...
you say youve cloned the revealer object...
so i guess you mean you copied the proto
so did you changed the name in the proto to the name of the cloned anim?
are you sure you've set all the ID (incl the displayID etc) tags to X?
if you didn't there would be two objects with name Revealer...

i think this is more a "oh i forgot that" mistake in the basics of modding.

>> www.EmjeR.com <<

Mods - EmjeR's eyecandy pack :: Improved Greeks look :: Ghengis Khan - Mods
Programs - BCTool Attachpoint Editor :: BCTool :: Words - Programs
Games - 0 AD :: Stronhold 2 :: BfME 2 - Games
!! Proud member of WildFire Games !!
Age of Mythology Heaven » Forums » Modding and Scripting » A guide to texture names in brgs ~ EmjeR
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames