PDA

View Full Version : Modding "Tutorials"


Hermann
05-04-2010, 08:33 PM
Hi everyone

Where I can find information about modding the 7.62. As long as I remember there were some interesting posts on Strategy First forums. But now forum is down and its quite problematic to find information about modding 7.62. I think it will be very helpfull for everyone.

Best regards

R@S
05-13-2010, 10:22 AM
What kind of modding do you have in mind?

There are some manuals for adding and creating weapons made for Brigade E5 and they are still valid.

If you're interested in character models and textures there's no actual manual available, but post your Q's here and we'll try to answer you.

If it's playing around with the source code there's no manal either. You need some skills and knowledge of programing to be familiar with the syntax and whatnot. I could post a few "examples" to get you started, it will make it easier to figure out how it all works. Just let me know.

R@S
05-16-2010, 11:46 AM
I've been asked to make a small tutorial about making a new uniform, so here you go:

A uniform has several textures, one for the shop item and a few for the actual model skin, male, female and so forth.

The shop item textures can be found in the BMP\Items\ folder while the model textures are in the Media\actors folder, probably inside the Pack0.azp archive.

We'll start by creating the shop item and add it to the game. You need to add the uniform to several files in the INI\ folder:
\INI\economy.ini
Item "My New Uniform" 1000.0

\Ini\Items\ITEMINFO
ITEM "My New Uniform" //this is the name the engine uses to keep track of the item
RealName "Uniform" // this entry is what you'll see in the shop
Add your description here
END

\Ini\Items\ITEMLEVELS.INI
"My New Uniform"0 0 // the first number is the CGL and the second is the %chance of the item turning up in the shops.

\Ini\Items\ITEMS
"My New Uniform"
UniformItem
None "Items\carabineeruniform.act""carabinersol.e6b" //these entries calls the pic and model for the shop item
Uniform
Stalker //Loyalty(can be Algeira, Guerillas, Palinero or something you make up yourself, like I did with the Stalker faction)
Stalker //Type (can be Guards, Police, Soldiers and so forth. I made a new type called Stalker)
Soldier //Rank (What epaulets will ne used, if any.)
2600 //Weight

\Ini\Items\ITEMSROTATION
"My New Uniform"
X 0
Y 0
Z 0

\ShopINI\LasVacasionesNonLegalTraderShop.INI //this is the trader in Puerto Viejo.
Item "My New Uniform"
Level 1
Price 5000.0

We now have a new uniform in the game that can be bought at the trader that you added it to in the shopINI file. The character still don't change the model when the uniform is put on, so that's what we'll be fixing next. We need a 3d model that uses the uniform that you plan to change and use, the 236_carabineer_01.azp will be the one we're using today.

These are the packs for that model, the first is the pointer file while the second the male and the third the female. Since this model wears gloves there's only one model for the male, others might use two, one white and one black.

\Actors\Monsters\236_carabineer_01.azp
\Actors\Monsters\236_carabineer_01_body.azp
\Actors\Monsters\236_carabiner_bodyW.azp

Start by renaming them, something like this:
New_Uniform_01.azp
New_Uniform_01_body.azp
New_Uniform_bodyW.azp

Then open up the New_Uniform_01.azp and change the pointer in the ACTOR.ACT.DESCR to this:
COPYFROM Body New_Uniform_01_body
COPYFROM Head 236_carabineer_Head //this wont be used unless you change some entries in the EQUIPMENT.INI which I wont do for this exercise
END

Now it's time to find the skins for these models, they are located in the \media\Actors\ folder and the exact name can be found in one of the ACT files inside the New_Uniform_01_body.azp and New_Uniform_bodyW.azp archives. There are several ACT files that calls different parts of that model, and we're looking for the one that is the body textures. in this case they're called 236_bodyblack_s.tga and 236_bodyblack_s_W .tga and can be found in the \Media\Actors\ folder inside the Pack0.azp archive. But we need to rename them so that only the textures for this uniform is changed when wearing it, not the original carabineer textures. To do this you need a hex or binary editor since the ACT files are in a binary format. I use Binedit which is a free prog that makes it very easy for you. There is one thing that is important to keep in mind, the number of letters in the new texture file name must be the same as in the original.

236_bodyblack_s.tga -> 400_bodyblack_s.dds
236_bodyblack_s_W .tga -> 400_bodyblack_s_W .dds

You need to change the ACT file as well as the LOD1 and LOD2 files, those LOD files are for viewing the model from a distance and if you don't change them as well the model will still be using the original textures.

Notice that I changed the file ending from TGA to DDS. The TGA's are actually renamed DDS files and some texture progs will have a problem if they're not changed back to DDS format and the mipmaps might be lost if you continue to use the TGA format.

You can now edit the 400_bodyblack_s.dds and 400_bodyblack_s_W .dds to your liking.

The final step is adding the new uniform to the soldier list so that the game engine changes the model when the uniform is worn. This is done in the \ini\SOLDIERS file.

Combatant Stalker //Remember this from the ITEMS file?

Army Stalker // also connected to the ITEMS file

New_Uniform_01 White Man

New_Uniform_01_body White_Sebastian Man


New_Uniform_bodyW White Woman

New_Uniform_01 Nigga Man

New_Uniform_01 BigNigga Man

Then we have the Epaulets which is controlled by the \ini\SOLDIEREPAULETS file

Combatant Stalker

Army Stalker Stripe "Media\Actors\nashivka_s.tga"

0 Soldier Epaulet "Media\Actors\epaulet_r_01.tga"


You can make new Epaulets if you wanna, just make some new ones and point at them from this file.

Place all the new files in your game directory and see if it works by buying it at the trader in Puerto Viejo

Good luck

R@S

Edit: I forgot about the shop model and textures, The ITEMS file points to them so they're easy to find. It's the same procedure with the ACT file as I showed above, but this time they should be in the TGA format

R@S
05-16-2010, 11:57 AM
How to script a mission:

The most important thing to remember is to never alter the original source files. If you need to change something in those files you have to use a Replace Function. There is one exception, the e6q.a file where you activate your mod. At the end of that file, just above the initial part you need to add your mod. Like this:

#include "MOD\Temp_mod.a"

Then in your newly created folder called MOD you create the file(Temp_mod.a) that controls which other files that are to be included in your mod.

Another thing to keep in mind is to have an empty line at the end of every file. If you don't you'll get a bunch of weird error messages when compiling it.

// ************************************************** ***********************
// Temp_mod (Temp_mod.a)
// ************************************************** ***********************

MOD "Temp_mod" Version "01"

#include "MOD\TemplateQuest.a" // a quest
#include "MOD\QuestGiver.a" // a character

INITIAL
//Test by adding a hummer at the start of the game
call AddCar("Hummer")
END INITIAL

ERROR
ModUpdateList Add Next "0"
END ERROR

END MOD


// ************************************************** ***********************
// Creating a quest in the source code (TemplateQuest.a)
// ************************************************** ***********************

ROOM TemplateQuestRoom // *** Marks the beginning of the TemplateQuest Room *** \\
def object TemplateQuest
begin // *** Marks the beginning of the TemplateQuest object *** \\

Attribute State = qAvailable

phrase TakeQuest()
this.State = qGiven
call PrintToJournal(this, "TemplateQuest Taken. ")
end phrase

phrase GoalReached()
if (this.State==qGiven)
this.State = qGoalReached
call PrintToJournal(this, "TemplateQuest Goal Reached. ")
end if
end phrase

phrase CompleteQuest()
this.State = qCompleted
if (this.State==qCompleted)
call PrintToJournal(this, "Missions complete. ")
end if
Player.AddMoney(5000)
Player.ChangeReputation(5-10)
Player.ChangeProfessionalship(10)
throw "Finish Template"
end phrase

phrase GoalFailed()
if (this.State==qGiven)
this.State = qGoalFailed
call PrintToJournal(this, "TemplateQuest Goal Failed. ")
end if
end phrase

phrase FailQuest()
this.State = qFailed
if (this.State==qFailed)
this.State = qFailed
call PrintToJournal(this, "Mission failed.")
end if
throw "Finish Template"
end phrase

// ************************************************** **************
// For QuestGiver // This is where the character dialog jumps in
// when called from the character object
// ************************************************** **************

phrase CompletedFor_QuestGiver()
if (this.State in [qGoalReached, qGoalFailed])
return Yes
else
return No
end if
end phrase

phrase PrintCompletedUserChoices_QuestGiver(StartPos)
if (this.State==qGoalReached)
print("Tells about quest when it's finished and waiting for reward ")
userch("Sweet. ", 5)
end if
if (this.State==qGoalFailed)
print("Tells about quest when it's failed ")
userch("Drat.", 7)
end if

switch (askch)
when 5:
TemplateQuestRoom.QuestGiver_D1_3()
when 7:
TemplateQuest.QuestGiver_D1_4()
end switch
end phrase

phrase RelatedTo_QuestGiver()
if (this.State in [qAvailable, qGiven])
return Yes
else
return No
end if
end phrase

phrase PrintRelatedUserChoices_QuestGiver(StartFrom)
if (this.State==qAvailable)
print("Tells about quest before it's taken ")
userch("Sounds fun.", 3)
end if
if (this.State==qGiven)
print("Tells about quest when it's taken ")
userch("Forgot.", 4)
end if

switch (askch)
when 3:
TemplateQuestRoom.QuestGiver_D1_1()
when 4:
TemplateQuestRoom.QuestGiver_D1_2()
end switch
end phrase

// ************************************************** ***********************
// The initial part where you set up the characters involved and quest name
// ************************************************** ***********************

initial
TemplateQuest.inherit StdQuest
TemplateQuest.RegisterMe("TemplateQuest Name")
QuestGiver.AddQuest(TemplateQuest, NULL)
end initial

end // *** Marks the end of the TemplateQuest object *** \\

// ************************************************** ***********************
// Dialogs for QuestGiver NOTE: they are outside the TemplateQuest
// object but inside the TemplateQuest room
// ************************************************** ***********************

phrase QuestGiver_D1_1()
print("Tells about quest.")
userch("Player accepts quest. (end conversation).", ucOK)

if (askch==ucOK)
TemplateQuest.TakeQuest()
stop chat imm
end if
end phrase

phrase QuestGiver_D1_2()
print("Reminds what needs doing.")
userch("D'oh. (end conversation).", ucOK)

if (askch==ucOK)
stop chat imm
end if
end phrase

phrase QuestGiver_D1_3()
print("Says attaboy and gives reward.")
userch("Thx. (end conversation).", ucOK)

if (askch==ucOK)
TemplateQuest.CompleteQuest()
stop chat imm
end if
end phrase

phrase QuestGiver_D1_4()
print("Falure dialog.")
userch("Sorry. (end conversation).", ucOK)

if (askch==ucOK)
TemplateQuest.FailQuest()
stop chat imm
end if
end phrase

end ROOM // *** Marks the end of the TemplateQuest Room *** \\


// ************************************************** ***********************
// Creating a character in the source code (QuestGiver.a)
// ************************************************** ***********************

def object QuestGiver
begin

List Attribute Quests
List Attribute QuestRelations
List Attribute MyFriends
List Attribute MyEnemies

phrase PrintGreetings()
call PrintToJournal(QuestGiver, "Here you can have a short description and bio of the character that will show up in the population tab. ")
print("Yes? ")
end phrase

phrase PrintJustTalkUC()
if(TemplateQuestRoom.TemplateQuest.State in [qAvailable, qGiven]) then userch("Let's talk about new quest.", 1)
if(TemplateQuestRoom.TemplateQuest.State in [qGoalReached, qGoalFailed]) then userch("Let's talk about active quest.", 1)
userch("Never mind. (end conversation)", ucStopChat)

switch (askch)
when 1:
callm TemplateQuestRoom.TemplateQuest.PrintRelatedUserCh oices_QuestGiver()
when 2:
callm TemplateQuestRoom.TemplateQuest.PrintRelatedUserCh oices_QuestGiver()
when ucStopChat:
stop chat imm
end switch
end phrase

initial
QuestGiver.inherit StdSubject
QuestGiver.RegisterMe("QuestGiver.ini") // Remember to create the INI file for the character
end initial
end

ROOM QuestGiverRoom
conv Main check (call CombatMode() == No)
QuestGiver.MainConv()
end conv
END ROOM

// ************************************************** ***********************
// A small example of Patrol phrases
// ************************************************** ***********************

phrase Patrols()
QuestGiver.RegisterMe("QuestGiver.ini")
QuestGiver.BecomeNeutral(Player)
QuestGiver.MySector = LasVacasiones
QuestGiver.LocationInSector = "Patrol P2"

on event "Sector loading finished "+str(LasVacasiones.Name) callm this.PPoint_1()
delete when "Finish Example01"
end phrase

phrase PPoint_1()
QuestGiver.ForceSetLocation("Patrol P1")

on event str(QuestGiver.ININame)+" reached " + "Patrol P1" callm this.PPoint_2()
delete when "Finish Example01"
end phrase

phrase PPoint_2()
QuestGiver.ForceSetLocation("Patrol P2")

on event str(QuestGiver.ININame)+" reached " + "Patrol P2" callm this.PPoint_1()
delete when "Finish Example01"
end phrase

// ************************************************** ***********************
// A Selection of Uselful User Functions
// ************************************************** ***********************

Player.AddMoney(5000)
Player.DecMoney(5000)

Player.DelItem(Stuff)
Player.AddItem(Stuff)

Player.AddToTeam(Guy)
Player.DelFromTeam(Guy)

Player.Say("Hello!")
Guy.Say("Hello!")

Guy.RegisterMe("Guy.ini")
Guy.BecomeNeutral(Player)
Guy.MySector = Artrigo01
Guy.LocationInSector = "Some Place"

Guy.ForceSetLocation("Some Other Place")

if (callm Player.HasItem(Stuff)==Yes)
userch("Ok. ", ucOK)
end if

if (callm Player.HasInTeam(Guy)==Yes)
userch("Ok. ", ucOK)
end if

if (callm Player.CanAddTeamMember()==Yes)
userch("Come with me. (joins team)", ucOK)
end if

if (callm Player.GetMoney()>=1000)
Player.DecMoney(1000)
end if

if (callm Player.HasWeaponInHands()==Yes)

if (callm Guy.CanSee(OtherGuy)==Yes)

if (EventParmStr==SpecialItem)

call SetTalkingWithInCode(Guy.ININame)

call MakeExplosion("MinePlace", TNT)

call SetDisplayImage("bmp\\Quest\\Pic.jpg")
call ClearDisplayImage()

on event TIMER1+5 callm this.StartAttack()
delete when "Finish TemplateQuest"

on event "Guy reached " + "SomePlace" callm TemplateQuest.GotThere()
delete when "Finish TemplateQuest"

on event "Killed finally "+str(Guy.ININame) callm this.HimDead()
delete when "Finish TemplateQuest"

on event "Sector loading finished "+str(Artrigo.Name) TemplateQuest.SetUpMap()
delete when "Finish TemplateQuest"

MoreDread
05-16-2010, 01:26 PM
great, just great
thx for responding to my request as fast as you did.
I'll mess around with this and come up with something.

MoreDread
05-16-2010, 06:27 PM
allright i followed your instructions and ran into a few probs...
the icon shows up, the item mesh works, the description does as well...
but the character model wouldn't show up.

so i looked at the sniper camo suit and that had a different setup, linking to the AZP directly in the ITEMS file. it worked this way, no epaulets are showing, but i wanted it to be like that anyway.. additionally i think it should now give a bonus to camo, which only makes sense at night, but hey (its a black retex again)...

now i'm pretty satisfied with the thing, but i'd really love to use the carabineer_head as well.

i tried adding the lines

Head
ID 1 "236_carabineer_Head" STD

at the bottom, but that didn't do it..
do i have to place the carabineer model into my main char's head.azp and load it under head_armor? i hope theres a better way to do this because this way i'd have to copy the model for each character individually....

edit: tried putting the model inside my head.azp and add the line
ID 3 "Nightops uniform" STD
under headarmour

i guess this would only work if my uniform was in the helmet slot?

hmmm...

any ideas?

R@S
05-16-2010, 06:48 PM
the troubles you encountered with invisible models should've shown up in the log file, You can alt+tab out of the game and open the log file when the game is running. Then you'll get very good clues as to what is causing the problem. But since you found another way to do it, I mention this for future references:)

I think you've run into a engine limitation issue since the uniform only changes the body, not the head. To do that you would need to create the balaclava as a helmet that fits in the helmet slot. The drawback is that if you wear it you wont be able to wear a helmet.

Since I never actually did it myself, I've only talked about it with my Russian friends I'm entering unkown territory so what I say may not be exactly correct. Anyways, here's what I think you should do.

You're on the right track by adding it to the AZP pack, and you need to add it to all the RPC AZP packs(36?). What you also need to do is add it to the EQUIPMENT.INI file under the HeadArmour entry, that should make the model swapping happen.

Sorry, but that's my limited knowledge on the subject, I hope it helps.

MoreDread
05-16-2010, 08:20 PM
ok i copied the titanium helmet in armourinfo and made the required entries in itemlevels, iteminfo, itemsrotation, equipment and economy, placed the model in the azp package of my main char, renaming it to actor.4 + lod1 and 2. then i added the line:

Mesh "actor.act.4" link "Bip01 Head" HELMET 3

to its ACTOR.ACT.DESCR and

ID 3 "Ski Mask" STD

under HeadArmour in equipment.ini
but i'm having the same prob as before with the uniform...
every aspect of the item seems to work like it should, but it's not displayed on my character when i equip it.

i can't really think of anything else to do right now so i'll call it a day,
grab my pizza and continue some other time...

i'm thinking that maybe theres someplace where i have to define the ID # that i have overlooked...

if someone else has an idea, please tell me.

tomorrow i will start working on my new job in the animal shelter so i might not have alot of free time during next week. we shall see.

i'm out!

R@S
05-17-2010, 02:31 PM
I have one last idea that might help you. The latest version of HLA has added a lot of helmets and AZP packs for those. Try checking that out and you might find some info on how it's done. That's how I learn - "monkey see, monkey do":grin:

MoreDread
05-17-2010, 03:50 PM
monkey see, monkey do.. and i have to clean up the poo... :mad:

and its absolutely incredible where in their cage they managed to get it smeared on.

phew.

anyway yea thats a good idea, i'll see if i can figure out how they did it.

EDIT: ah crap .. this mod is russian only? its still worth a try but seems rather unlikely i will get it

MoreDread
05-18-2010, 06:38 AM
allright i downloaded the helmets mod 1.0 and the fix for it.. extracted the files and some of the azp packages and well...

they have actually removed the helmets from all the head azps
and created new packages with only the helmets in them.

the equipment.ini was set up exactly like i thought it should be done.

other than that i wasn't able to locate any other files related to what i'm looking for... so these are either part of the main mod (waiting to dl right now) or they aren't included as complete files and the installer adds the entries to the already existing files. in that case i think i'm screwed because i don't own 7.62 reloaded and if i got that right, its required for HLA to work.

additionally they managed to do what i had wanted to do when i turned benicia into a fully working rpc and created a head azp for her with her original head.

but now that i got used to it, i kinda prefer my own version based on lambert's head...

anyway to get back to the point... i might figure out something based on this... but i'm afraid that i also might not get very far without talking to the dev's of HLA.

If getting this to work requires coding, then i would like to request a version of the helmet addon that works for the BSM + an additional slot for a ski mask model, since my coding skills don't exceed that of a script kiddie.

R@S
05-18-2010, 12:07 PM
I just had another idea that might help you. By now you've noticed that there are 2 kinds of AZP archives for characters, one where there's a pack for body and head and another where the body and head are in the same archive. Since you use the ghillie suit for your uniform it changes the whole model, so if you make a model that has both head and body in the AZP archive it should change the entire model. I think the 263_bgmen.azp is a good place to start, just relace the body ACT files with the carabineer one, the head already wears a ski mask. I think you might need to add a female model to it as well, but that's not very hard to do.

MoreDread
05-18-2010, 01:47 PM
i've been thinking about that, too...

and it works, well almost.
the head model gets displayed when placed in the AZP as well...
but the original head is still displayed as well.

i have to find a way to disable the original head somehow...

don't know how its done with the sniper suit.. possibly its hard coded, or hidden in some ini file i haven't discovered yet.. or the model is just bigger than all the other heads and they don't clip through

EDIT: hmm i just placed the sniper camo suit models in my nightops package to see what happens, and the head now clips through the camo head model, so its not big enough to envelop the original head.. it has to be configured elsewhere.
also theres no entry for the sniper camo suit in the INI/SOLDIERS file ... so how can i tell the darn thing whether to use a male or female model?

it looks like i will just have to make two items.. one for males and one for females... as it is right now the women use the male model with horribly deformed fingers in some anims

R@S
05-19-2010, 07:25 PM
Hey, I just had another idea, but it involves some coding.

There's an event trown in the game called "Player took on" that has to do with the uniforms. And another that changes the model used by a character(call ChangeModel(Player.ININame, "New_male model")) that could be used along with a check to see what sex the main merc is. I think with a bit of playing around with this could lead to what you wanna accomplish. If you want I can look into it for you, but it'll take a few days, I don't have much spare time until this weekend.

MoreDread
05-19-2010, 10:30 PM
that would be awfully nice of you.

theres no need to hurry tho because i won't have access to the web for a while... the laptop i'm using right now will be on on vacation in morocco along with its owner for about a week. (starting tomorrow)

in the meantime i will spend most of my free time familliarizing myself with blender. started doing some tutorials today and modeled a head.
i'm quite surprised that i can still do it :cool:

here let me show off a little:

http://img684.imageshack.us/img684/9545/headmdl01.jpg

http://img199.imageshack.us/img199/1944/headmdl02.jpg

http://img25.imageshack.us/img25/4271/headmdl03.jpg

http://img21.imageshack.us/img21/3409/headmdl04.jpg

0a.Archangel.a0
05-20-2010, 07:58 AM
very good looking. nice job. i am working with blender for a couple of years, purely graphical and simple logics. I am not that good on mesh work while creating faces, I sooner create mutants, thats why i usually use outside resources for human mesh body. Curently I am trying to dig deep in python, do you have any skill with it too?

BTW - while modeling head what you do to improve the smoothens of loading it into game logic? You know minimalising of verticies, colour schemes used, texture and material? While i have problem in programing this :-(. I allways make it in high ress (reports: sucks to play on low class machines:-P) and do not know what to take out to not lose much of the graphic quality :-(. This is just a question if you have any usefull glyph or advice that you are willing to share?

Nice to hear that someone uses blender here ;-) btw.: If you plan to implement your creations into 7.62 you will need a converter. I have used tranformer, but it was useable only for simple items f.... up human faces so i threw it away recently. If you find something that works 100% even on high detailed multi-mesh objects than let me know, thx. Dont know why blender doesnt have it own support for this format :-(, sucks. Yet i am to lazy to write about it on Blenders forums :-P as I am figuring python, C++ looks like children garden when compared to it. Or maybe I am just dumb at this point...jeesh.

One more thing: Good luck with further mods :-)

MoreDread
05-26-2010, 03:42 PM
to get some good hints on polycount reduction you should head over to the
Polycount forums/ (http://www.polycount.com/forum/)

its a great community for 3d game design, many big industry professionals are frequently visiting that place.

i haven't done any modelling in a few years so i'll have to spend some time catching up with the new techniques..

i haven't found a way to im/export the character meshes either... which is a little sad.. i really wanted to make some of the chars look a little more like their portrait and fix some issues with the body meshes...
animations would be great, too...
i'm quite good with those, so there'd be some martial arts moves n stuff if i managed to get new anims ingame...

well if i find a way, i'll let you know...

EDIT:

also you might wanna check out this tutorial:
using retopo tool (http://www.katsbits.com/tutorials/blender/using-retopo-tool.php)