RelicNews Forums

Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Reply
 
Thread Tools
Old 12th Jul 07, 2:57 PM Forum Rules   # 1
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Hex Editing: Duplicating Models + Terminator Sergeants

Rating: Rookie to Competent modders

Duplicating a model to use as a variation in the game.

Okay, so I don't have 3DS max, but I want to create some variations on existing models using different skins. How can I do this as I can only have one skin applying to each model?

Also, this method applies when using a model from another race without changing them at all eg using Grey Knights with Imperial Guard. If you just use the model as it is (in the old races folder) and remove it from the build options on the old race you will most likely get team-colour bleed, where the wrong team colours appear. It is also not enough to simply copy the model and textures into the new races folder, you need to duplicate the modele properly including the file paths in the same way as I will describe here.

Here we will learn how create Terminator Sergeants by cloning the Terminators and using an edited skin for them.

Tools you will need:
Relic ModTools - specifically the Attribute Editor and the ModPackager
A hex editor - I use this one: it's simple and free http://www.chmaas.handshake.de/delp...xvi32/xvi32.htm
***It is assumed that you know how to setup a mod and how to operate and setup the Attribute Editor****

To edit the skin you will also need:
Graphics editing package such as Photoshop or The Gimp
IBBoard's texture tool - http://skins.hiveworldterra.co.uk/D...extureTool.html
***It is assumed that you can edit textures already***

Extract the files
First you need to extract - dark crusade\w40k\W40kdata-whm-high.sga and dark crusade\w40k\W40kdata-sharedtextures-full.sga using the ModPackager that comes with the Relic ModTools. I find it best to extract them to a separate folder, but that's personal preference. Open the packager, then locate the correct .sga archives and extract the whole thing to a folder of your choice.


Fig 1 - the Mod Packager in action.

From these extractions you then need to find/get hold of:
terminator.whm, terminator.whe (found in art\ebps\races\space_marines\troops in wmh-high)
terminator_unit.rsh, terminator_unit_default.wtp (found in art\ebps\races\space_marines\texture_share in shared textures)
Found 'em? Ok, leave them alone for a second. (There's a shed load of .rtx files in there too for the termies, but leave them for now.)

Recreate the Structure
Now setup an exact copy of the folder structure in your mod's NewMod\Data folder, though some of the work is done for you already.

Okay, copy into your mod folder tree and rename the termy model (the pair of files .whe and .whm) to an appropriate name eg terminator_sergeant.whe and terminator_sergeant.whm. It is important that both the names are the same, except for the file extension.


Fig 2 - note the structure of the folder tree.

Now you need to recreate the folder tree in the same way for the texture files, although you will find that most of it is exactly the same as the last one, so really you will only need to add a "texture_share" folder alongside the troops folder.


Fig 3 - more folders

Rename the Textures
Now copy and rename the texture files too but make sure the names are OF THE SAME LENGTH IN CHARACTERS AS THEY PREVIOUSLY WERE!! That's very important. Also, they must have the same name, except for the word "_default" on the end of the .wtp.


Fig 4 - name your textures files carefully

So, I have chosen to change terminator_unit for term_sergt_unit, but terminator_serg or termie_sgt_unit would do too. Notice how all of them are 15 characters long - whatever length they started at they must stay at (except for the "_default" already mentioned).

Hex Editing
Now, you need the edit the binary code so that the model now looks for the new textures when it wants skins, as so far you've only renamed it, which will not affect it at all.

The .whm file points to the .rsh file which points to .wtp file. The .rsh isn't really used, it is almost always overridden by the .wtp or .rtx, but there are instances (eg Toth the Inquistor) where the .rsh is used. All that needs to happen is for the .wtp to have that "_default" stuck on the end and it will override the .rsh when present.

Okay, go back to your whm and open it with the Hex Editor.

Now you need to find all the instances that point to the old .rsh file and change them to point to the new one.


Fig 5 - hex-editing the whm

Using the find function convert the word terminator_unit to hex and then find and edit all the times that appears to your new .rsh name (term_sergt_unit in this case). Don't use the delete key as removing letters will change length, simply overwrite each time and start again if you mess it up (quit without saving). There was eight instances of "terminator_unit" and I changed them all. It may be a different amount for different models, I'm not sure, so just keep going!!! Save the hex edited file when you are done.

Now we need to do the same thing with the .rsh. There was four instances of "terminator_unit" in the .rsh. Save the hex edited file.


Fig 6 - hex-editing the rsh

Right, now you're done hex editing.

The Rest
Now you need to add him into the AE. I'll assume that you can use the AE already as this tutorial is not for that. Remember: to add a new lua right click (on the lua you want to copy), add new subtype, right click on the new one, edit metadata, change nothing, OK, the Save (not binary) THEN you can edit it. (phew!)


Fig 7 -thumbnail of AE entry for EBPS

I've copied the normal terminator, got rid of his upgrades weapons and given him more HP. Make sure you edit the entity_blueprint_ext to link it to the new model (use the new model name, without whe or whm). I haven't given the sergeant rally ability, I think I'll give him something more interesting some other time. I've also assigned a custom terminator sergeant icon for him (not covered in this tutorial). Don't for get to do the UCS tooltips as well.

Remember to edit the SBPS too, add the leader_ext and stick the serg in there.

Lastly, you need to actually edit your texture to what you want (if you want it to be different) using the aforementioned tools. I assume you can do this, there's plenty of tutorials if you can't. Then you're done!


Fig 8
-Woo-hoo! A simple termy serg (ok, so no fancy models but it's fun and useful for your owns mods! - stop complaining)

Also - because I'm a nice guy, if you don't know how to edit textures or use graphics stuff yet here's a download with an edited texture and a terminator sergeant icon pair. You have to put these in the right place and rename etc. yourself though, this is a tutorial after all!

http://mods.octopusrex.co.uk/conten...ng_tutorial.zip

Note: RTX files - these are needed if you plan to use them in the campaign or if you turn team-colours off. I don't bother with these mostly, as it's just too much hassle for something I'm never going to use, but it's up to you and depends on the mods function.
__________________
"Life is not full of successes, it is full of failures from which we learn" - Tony Benn
Octopus Blog (14.02.10)DOW2 2.2.2 GridKeys
DOW1 Modding Tutorial ListDOW2 Tactical Primer

Last edited by Octopus Rex : 13th Feb 09 at 6:15 AM. Reason: Added Icon Picture just for kicks.
Octopus Rex is offline  
Old 12th Jul 07, 8:54 PM   # 2
ravenmorpheus
Member
 
Join Date: May 2007
Location: Right at the back of your mind, chipping away at your sanity

Great tutorial, just one question though regarding the terminator serg.

Is it possible to put a normal head without a helemt on him by editing the texture or will it just wrap the head around the helmet shape and thus require the model to be re-done?
ravenmorpheus is offline  
Old 12th Jul 07, 9:47 PM   # 3
jeddy00
Guest
 

it'll just wrap the head around the model shape and require the model to be redone
 
Old 12th Jul 07, 11:06 PM   # 4
Radulykan
Member
 
Radulykan's Avatar
 
Join Date: Dec 2006
Location: Putnam County,State Of West Virginia,U.S.A

Thank's for this Rex!,Awesome tutorial,Later and have a good one.
__________________

Outlaw guns and the only ones who will be armed are the outlaws,Criminals will be armed regardless of more silly gun laws,"ΜΟΛΩΝ ΛΑΒΕ"
DOW2 Modding Petition
Radulykan is offline  
Old 13th Jul 07, 4:22 AM Forum Rules   # 5
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

@ravenmorpheus: you can do some clever stuff with textures and achieve some good almost 3d effects, but basically it's like this - the model is the shape and the texture simply defines the colour of that shape and can not affect actual shape in anyway (other than possibly transparency effects)
Octopus Rex is offline  
Old 23rd Aug 07, 4:08 AM   # 6
Woohamer40
Guest
 

how comes i can't find the sarge in AE when i done the process?
 
Old 23rd Aug 07, 4:44 AM Forum Rules   # 7
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

You have not done the process fully.

Quote:
Originally Posted by Octopus Rex
Now you need to add him into the AE
You have to add him yourself.
Octopus Rex is offline  
Old 23rd Aug 07, 9:10 AM   # 8
Woohamer40
Guest
 

but how
 
Old 26th Aug 07, 2:29 AM   # 9
Promythyus
Member
 
Promythyus's Avatar
 
Join Date: Jul 2006
Location: The Land of the Internet.

In Corsix's Tools is the Easiest, just Copy the Terminator File, then rename the entity_blueprint to the terminator_sergeant. now, go into combat_ext>hardpoints>hardpoint01>weapons & remove the assault cannon & heavy flamer.

Now go into the terminator squad & add the terminator sergeant as a squad_leader
__________________
Promythyus is offline Send a message via ICQ to Promythyus Send a message via AIM to Promythyus Send a message via MSN to Promythyus Send a message via Yahoo to Promythyus  
Old 19th Jun 08, 7:38 PM   # 10
WarpObscura
Guest
 

I'm having trouble trying to hex edit Tankbustas. When I put the whm in the hex editor, I can't find the corresponding texture in hexadecimal, which is "boyz_unit_page" if the reskins on Hiveworld Terra are correct. Does anyone know how to duplicate Tankbustas this way? Or am I simply looking at the wrong texture file?
 
Old 20th Jun 08, 2:17 AM Forum Rules   # 11
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

It seems the tankbustas are using one of the base mesh WHMs (art/ebps/orks/base_mesh/boyz_unit.whm). Duplicate this one too and do the editing on it. Then you should be fine.
Octopus Rex is offline  
Old 24th Jun 08, 8:26 PM   # 12
roospion
Member
 
Join Date: Aug 2006

Octopus_Rex, can this concept be used for SP,OP and Relic?
(where I would like to create an invisible flagpole for non-default new races)

Cuz I tried but to little success and wonder if there are just more than meets the eye
__________________
Ultramarines? Ultraguards?! Ultramar!!!
Alliance v0.20
v3.0 DCPro
v4.5 DoWXP
v2.5 AI Mod
TTRU
roospion is offline  
Old 25th Jun 08, 3:04 PM Forum Rules   # 13
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Dunno about that.
Octopus Rex is offline  
Old 3rd Jul 08, 3:30 AM   # 14
WarpObscura
Guest
 

I managed to get my duplicated Tankbustaz to work! Thanks OctoRex!
 
Old 24th Aug 08, 1:55 PM   # 15
Silanoliel
Member
 
Join Date: Sep 2007

I have been attempting to follow your tutorial, but have run into difficulty. I have done all the hex-editting -EXACTLY- as you said to, rsh names have the same amount of characters as they should, I typed them all in perfectly. Yet for some odd reason, the Blue Horror texture I made with the help of Pogs "How to edit a texture" tutorial just will not show on the model. Instead, it remains using the pink texture it normally has. Now, I have checked the new rsh files, and when converted into dds and tga they remain blue, as I editted them to be. But for some odd reason, they remain using the pink horror texture.

I have no idea how to solve this, at all. And to be honest, the longer I'm trying, the more and more I'm loathing any form of DoW texturing and model duplication. I'm utterly lost.
Silanoliel is offline  
Old 25th Aug 08, 12:37 AM   # 16
Jaguar-Lord
Member
 
Jaguar-Lord's Avatar
 
Join Date: Feb 2007
Location: france

some things to now :

the my_new_model.rgd point to my_new_model.whm, when you open my_new_model.whm in (any text editor) you can see what textures the mesh is using.

read carefully wich .rsh file are being used, sometimes it can be confusing.
Make sure you change every occurence of the texture name in the my_new_model.whm file and that you saved it as the new file.

you must change the header name in the my_new_model.whm file too:
you want to change pink_horror.whm to blue_horror.whm (same character lenght)
edit the pink_horror.whm with the hex editor (or code ,i use SCite myself)

look for any occurence of "pink_horror" using the search function and replace by "blue_horror"

then look for the texture name the .whm is using in the example
the line data/art/ebp/race/chaos/troops/texture_share/horror_01.rsh

change any occurence horror_01.rsh to horror_02.rsh

THEN:

when compiling the horror_02.rsh with IBBoard texture tool, make sure your dds name is "horror_02" because if not the rsh wont be named properly even if you change the rsh file name, the name of the rsh file is embeded "inside" the file from the dds file name, that why a improperly dds made into an rsh wont work properly and can lead to strange result.

is that better?
__________________
Jaguar-Lord is offline  
Old 7th Aug 09, 12:11 PM   # 17
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Help!!!

Having problems with hex editing, as i keep getting a pink cube as a unit when i change everything, i wanted to make a unit for my 'Digganobs Mod' so i copied "guardsmen.whm, guardsmen.whe and ig_guardsmen.rsh, renamed them "digganob.whm", "digganob.whe" and "digga_troops.rsh", and replaced the string "ig_guardsmen" with "digga_troops" in both the WHM and RSH files.

What could i be doing wrong, should the WHM and WHE be the same amount of characters aswell ?.

Neilmarines
neilmarines is offline  
Old 7th Aug 09, 12:50 PM Forum Rules   # 18
corncobman
Hands of doom
 
corncobman's Avatar
 
Join Date: Dec 2006
Location: Norn Iron

The trouble is that it's not the names that has to be the same length but the whole path, including the race names have to be taken into account as well.

art/ebps/imperial_guard/texture_share/

art/ebps/orks/texture_share/

So there's a difference of 11 characters between orks and imperial_guard. Making the file names the same length isn't enough.
__________________
-It's not the fall that kills you, it's the sudden stop at the end (Douglas Adams)-
-Make something idiot proof and nature will create a better idiot.-
corncobman is offline Send a message via ICQ to corncobman Send a message via AIM to corncobman Send a message via MSN to corncobman Send a message via Yahoo to corncobman  
Old 7th Aug 09, 1:28 PM Forum Rules   # 19
thudmeizer
Resident AI guy
 
thudmeizer's Avatar
 
Join Date: Sep 2004
Location: North Toronto, Canada

Use Kontuz app to change the texture_share race paths. It is a miracle tool -- I can remove colour bleed from all mod projects now within minutes what would have taken so much longer!!
__________________
thudmeizer is offline  
Old 7th Aug 09, 1:37 PM   # 20
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

So is it not possible to give textures to unit and give units to another race ?, so you could have two races with the same unit but each with a different texture, or can it only be done by editing the models in 3ds max ?

Neilmarines.
neilmarines is offline  
Old 7th Aug 09, 1:42 PM Forum Rules   # 21
thudmeizer
Resident AI guy
 
thudmeizer's Avatar
 
Join Date: Sep 2004
Location: North Toronto, Canada

Well the texture has to made specifically for the unit. If it is and you are just doing a reskin then its easy to see the texture_share path in the whm file using a HexEditor, then change the texture_share path using Kontuz's tool.
thudmeizer is offline  
Old 7th Aug 09, 4:08 PM Forum Rules   # 22
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

neilmarines - it's perfectly possible to do what you want without 3Ds max, you just didn't make the names add up in terms of characters. To expand on corncobman's examples:

art/ebps/imperial_guard/texture_share/guardsmen.whm = 43 characters +.whm

art/ebps/orks/texture_share/digganob_morewords.whm = 43 characters +.whm
Octopus Rex is offline  
Old 8th Aug 09, 3:50 AM   # 23
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Oh, i get you

So, for example for my race 'Digganobs' i could have:

art/ebps/digga_nobz/texture_share/digganobs_boyz_unit_page
art/ebps/imperial_guard/texture_share/ig_guardsmen_sergeant

art/ebps/digga_nobz/texture_share/digganob_troops
art/ebps/imperial_guard/texture_share/ig_guardsmen

But the WHM can be any length, it does`nt have to match the original length WHM .

i`ll try it out.

Cheers OctoRex .

Last edited by neilmarines : 8th Aug 09 at 4:36 AM.
neilmarines is offline  
Old 13th Aug 09, 7:01 AM   # 24
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Tried it but it still did`nt work, for example it tried:

art/ebps/digga_nobz/texture_share/digganobs_boyz_unit_page
art/ebps/imperial_guard/texture_share/ig_guardsmen_sergeant

and it did`nt work, and i also changed to my race digganobs to digganobs_race so it would match the character length on everyting, example:

art/ebps/digganobs_race/texture_share/digganobs_boyz_troops
art/ebps/imperial_guard/texture_share/ig_guardsmen_sergeant

so now all the character lengths are the same, but no luck.

ps have to wait for kontuz`s tools to come out
neilmarines is offline  
Old 13th Aug 09, 7:07 AM Forum Rules   # 25
thudmeizer
Resident AI guy
 
thudmeizer's Avatar
 
Join Date: Sep 2004
Location: North Toronto, Canada

Not sure what happened to Kontuz.. he just.. vanished.
thudmeizer is offline  
Old 13th Aug 09, 1:01 PM Forum Rules   # 26
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

You have to be careful with new race folders; setting up a whole new race can be fiddely. I recommend that in order to test whether you have the right method or not you try and duplicate the IG Sergeant into and existing race first. That way you can start eliminating possible issues. Also, you need to make sure you edit all the rights parts. If I remember correctly (it's been a while now) it goes WHM -> RSH -> WTP. Make sure you have those three edited up and double-check with the FIND command that you haven't missed any. Then make sure your WHE is in place too (note all these files are not in the same folder). The biggest hurdle is making you caught EVERY instance of the name while hex-editing. Don't search for the whole name, search with PART of the name as not all instances are exactly the same.

Hope some of that helps.
Octopus Rex is offline  
Old 18th Aug 09, 4:59 AM   # 27
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Hi Octorex.

I have managed to duplicate the terminator sergeants for the space marines for example you could have a "blood angels" terminator for any other space marine chapter, but when i give the this unit to another race a does`nt work i just shows up as a pink cube.

Thanks for your help Neil.
neilmarines is offline  
Old 18th Aug 09, 10:32 AM Forum Rules   # 28
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Ok, right, so that's progress at least. Great. Modding your way through problems is often a process of slow, but steady steps. Eliminate as may variables as possible for each experiment and slowly, gradually home in on the exact nature of the problem. I remember once when I had 20 Imperial guard HWTs running around the map on fast game speed continually entrenching and un-entrenching like some Benny Hill movie to try and recreate a crash bug!! I had to figure out how to recreate the damn bug before I could even think about fixing it!! Man, that was a pain in the ass!

So what now eh? Well, it would seem that you can successfully hex-edit the correct files. Don't rest of your laurels with that though, you need to be very vigilant with it every time you do it.

What do you mean by 'give it to another race exactly'? Walk me through your process step by step? Do you simply add the new unit to the build list on the barracks? Or do you copy over all the right files (WHE, WHM, RSH, WTP) and edit them appropriately? Do you copy over the EBP (entity) file into the other race's folders? And the SBP (squad) file?
Octopus Rex is offline  
Old 20th Aug 09, 2:53 AM   # 29
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Hi again octorex.

Sorry i wasn`t more specific, I`m currently making a "Digganobs" mod which adds the digganobs race to the game using ork structures but imperial guard units, i have managed to reskin the NPC Leman Russ with a edited ork looted russ texture to make my digga looted tank, and also have edited the NPC guardsmen texture for one of my troops, but wanted to copy (WHM, WHE, RSH, WTP) Imperial guard sergeant a rename as another troop for my race but using with edited textures to make them look abit more like digganobs instead of just using the standard unit, as making models from scratch is not posssible with my skills, i can edit the RGD`s and Lua`s, and edit textures no problem, i`ll just have double check all the path`s and start again as i`ve probably missed something stupid .

Thanks Neil.

Last edited by neilmarines : 20th Aug 09 at 2:59 AM.
neilmarines is offline  
Old 20th Aug 09, 5:58 AM   # 30
Jaguar-Lord
Member
 
Jaguar-Lord's Avatar
 
Join Date: Feb 2007
Location: france

advice :

when cloning existing ebps and sbp files from an existing model :

check the you animator extension points (entity_blueprint_ext-- to the right whm file (and double check characters length and exact spelling...)

do not forget to replace not only the texture file name in the whm but also the whm file name inside the whm file header (it should be the same as the ebps entity animator extension .

instead of searching for the texture file name alone in the whm do a "search an replace" for the whole path.
( example : "search and replace" *art/ebps/digganobs/texture_share/renamed_texture* instead of "search" *renamed_texture* )
because in some particular case it can severely bugged the whm
(like in the guard_inquisitor model, i got a model holding a sword-hammer weapon wich was quite unesthetic, to say the least...)

check the loadout_ext in the ....sbp (or so i think it is located in the sbp...) it points to the ebps used by the rgd.
this was my problem when i started cloning models a few monthes ago.
edit: i mean the atrib/sbp file "squad_loadout_ext--"trooper_base"--"type" extension, in the type field make sure you got the corect atrib/ebp path and ebps file name.
acording to the folowing chain:

sbp-->ebp-->whm/whe-->texture.rsh/wtp

and don't forget to compile your rsh from a corectly named .dds

it may be unclear but i'll check this tonigh and corect this post if i'm wrong.

Last edited by Jaguar-Lord : 20th Aug 09 at 11:10 AM.
Jaguar-Lord is offline  
Old 20th Aug 09, 9:31 AM Forum Rules   # 31
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

In case you have seen it already, this tutorial might be some help in setting up your race. Good luck neil.
Octopus Rex is offline  
Old 28th Aug 09, 9:28 AM   # 32
neilmarines
Member
 
neilmarines's Avatar
 
Join Date: Jul 2009
Location: England

Fixed Digganobs Race Texture problems

Hi.

Thanks for your advice, i have now fixed the problem with the units, i accidently replaced the all the "guardsmen" strings instead of the ig_guardsmen string so it messed up the model, and had miss spelt a few file paths , so units are now complete, although having a problem with a ork building i`m using a have changed the texture from an ork texture to my new digganob desert colour custom texture, but the building junk ball is not the same as the building colour, how do you change that aswell ?, is it linked to a seperate WHM, RSH, WTP ?

Thanks Neilmarines.
neilmarines is offline  
Reply



Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 9:15 PM.

Page generated in 0.70905590 seconds (86.85% PHP - 13.15% MySQL) with 9 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.