Page 1 of 1

Unit Help

Posted: Mon Sep 01, 2008 8:23 pm
by bokkenblader56
I'm trying to create my own side for a map I'm trying to make, and I'm stuck. I've read the Custom Side: How To (FAQ) topic, but my internet blocks whatever screenshots he posted. I'm trying to do several things.
The first is:
Add Stealth as a secondary weapon. This seems relatively easy to me, but the problem is that there is no file for rebels in my "sides" folder. If there should be, I'm in *big* trouble.

The second is:
Write a .req file for my unit. I don't understand them at all, and as I said, the screenshots from the guide are blocked. I have 3 primary weapons and 2 secondary weapons (not including the currently unsuccessful stealth).

If I need to give any other information, please let me know.

Re: Unit Help

Posted: Mon Sep 01, 2008 10:36 pm
by Forsyer
1.look in the assets folder as opposed to your map folder. Just look for BF2_ModTools\assets\sides\all\odf\all_weap_inf_invisibility.odf

2. To make it easy, copy a req file from one of the sides, such as BF2_ModTools\assets\sides\all\req\all_inf_rifleman.req, then open in notepad and replace "all_inf_rifleman" with the name of your unit. For the side's req, do the same except with C:\BF2_ModTools\assets\sides\all\all.req, and replace ALL's unit's & vehicles with yours.

Anything else you need?

Re: Unit Help

Posted: Tue Sep 02, 2008 4:44 pm
by bokkenblader56
Well, so far that's helped a ton! But, still slight problem with the .req files. Should I replace the weapons? For example, this stuff:

Code: Select all

 }
    REQN
    {
        "model"
        "hud_imp_flamethrower"
    }
    REQN
    {
        "texture"
        "hud_white"
    }
    REQN
    {
        "texture"
        "imp_weap_inf_rifle"
What do I need to do with that? Like the models and textures.
*EDIT* And am I supposed to have a Rebels file?

Re: Unit Help

Posted: Tue Sep 02, 2008 4:55 pm
by Forsyer
If you look at the rep reqs, or most unit reqs for that matter, all they list is the "class" function.
ie:
Hidden/Spoiler:
(rep_inf_ep3_rifleman.req)

ucft
{
REQN
{
"class"
"rep_inf_ep3_rifleman"
}
}
If you just want to make it simple (as you can tell that's my main interest), just put the unit's odf under "class" for a unit's req, and put all unit reqs under "lvl" for a side's req. A shell for a side is not necessary btw, unless a weapon just isn't showing up for a unit in-game.

Look at assets for most examples. Need anymore info?

Re: Unit Help

Posted: Wed Sep 03, 2008 4:28 pm
by bokkenblader56
Okay, so here's my Unit req file:

Code: Select all

ucft
{
REQN
{
"class"
"die_inf_uberman"
}
}
And here's my Side req file:

Code: Select all

ucft
{
    REQN
    {
        "lvl"
        "Uberman"
    }
}
Is that right? And I need to know the place in the scripts where I need to copy and paste my side's stuff...again, blocked screenshot. Thanks for all your help so far!

Re: Unit Help

Posted: Wed Sep 03, 2008 4:57 pm
by Culvar
This:
ucft
{
REQN
{
"lvl"
"Uberman"
}
}

Needs to be this:
ucft
{
REQN
{
"lvl"
"die_inf_uberman"
}
}

Re: Unit Help

Posted: Wed Sep 03, 2008 5:03 pm
by Forsyer
IF you named the req file "die_inf_uberman". If you named the unit's req file Uberman, you're good to go.

Re: Unit Help

Posted: Wed Sep 03, 2008 5:04 pm
by Caleb1117
Forsyer wrote:IF you named the req file "die_inf_uberman". If you named the unit's req file Uberman, you're good to go.
No, they should all be the same.

Re: Unit Help

Posted: Wed Sep 03, 2008 5:09 pm
by Maveritchell
Caleb1117 wrote:
Forsyer wrote:IF you named the req file "die_inf_uberman". If you named the unit's req file Uberman, you're good to go.
No, they should all be the same.
The only reason they should all be the same is because it's easier to keep track of. Forsyer's right, though, as long as his .req is named "uberman," he's ok with his current setup.

Re: Unit Help

Posted: Wed Sep 03, 2008 9:06 pm
by SBF_Dann_Boeing
You can put multiple units in the same req file, like they did with the ewok side (with ewk_inf_basic.req). It can help keep them grouped together so you don't have to add as much to the lua and req, but it doesn't really make any difference.

Re: Unit Help

Posted: Wed Sep 03, 2008 9:22 pm
by bokkenblader56
OK...it's coming together relatively well. So, in the script, should I add this:

Code: Select all

ReadDataFile dc:("SIDE\\die.lvl",
                    "die_inf_uberman")
Below this?

Code: Select all

    ReadDataFile("SIDE\\imp.lvl",
                    "imp_inf_rifleman",
                    "imp_inf_rocketeer",
                    "imp_inf_engineer",
                    "imp_inf_sniper",
                    "imp_inf_officer",
                    "imp_inf_dark_trooper",
                    "imp_hero_bobafett",
                    "imp_fly_destroyer_dome" )
Or should I replace it? Also, is the dc: correctly positioned (especially, is the spacing correct?)?

Re: Unit Help

Posted: Wed Sep 03, 2008 9:46 pm
by SBF_Dann_Boeing
if your using the units and such from the imp readdatafile in your map, keep it, if you arnt, you can delete it.

Remember before munging to put a DIE folder in _Build/sides with a munge.bat and clean.bat in it.

Re: Unit Help

Posted: Thu Sep 04, 2008 6:30 pm
by bokkenblader56

Code: Select all

ERROR[levelpack req\die.req]:Expecting bracket, but none was found.
File : munged\pc\die_inf_uberman.lvl.req(1)...

ucft <--
ERROR[levelpack req\die.req]:Expecting bracket, but none was found.
File : munged\pc\die_inf_uberman.lvl.req(1)...

ucft <--

   2 Errors    0 Warnings
This popped up while munging. No idea what to do about it. Also, once I munged, I tried playing my map. It was still Imps vs Rebels. What might be causing this? I'm just trying to get my side vs. the rebels.

Re: Unit Help

Posted: Thu Sep 04, 2008 7:44 pm
by SBF_Dann_Boeing
What is the name of your unit's specific REQ file. It looks like earlier you marked it in the side REQ file has "Uberman," which would have to be the name of your unit's specific REQ file. That would also mean that you would have to put "Uberman" in the readdatafile, and not die_inf_uberman. The ReadDataFile section refers to REQ's while the SetupTeams section refers to ODF's.

And do you mean it simply says its imp vs rebs, or does it also have imp units vs rebs.

Fixing the names you can do in EditLocalize.bat under common/sides, where you can rename the "imp" string from Imperials to "Team Uber" or whatever.

If the imp units are still showing up, that means you still need to fix up the setup teams section of the lua with your side.

Re: Unit Help

Posted: Fri Sep 05, 2008 4:51 pm
by bokkenblader56
I changed both the req file for the unit and the text in the side's req file to die_inf_uberman since it seemed like a better way to keep track of everything. It's not just the team name Empire that's showing up, it's the Empire's units themselves. Here's the text from the Setup Teams.

Code: Select all

SetupTeams{
		all = {
			team = ALL,
			units = 20,
			reinforcements = 150,
			soldier	= { "all_inf_rifleman",9, 25},
			assault	= { "all_inf_rocketeer",1,4},
			engineer = { "all_inf_engineer",1,4},
			sniper	= { "all_inf_sniper",1,4},
			officer	= { "all_inf_officer",1,4},
			special	= { "all_inf_wookiee",1,4},

		},
		die = {
			team = DIE,
			units = 20,
			reinforcements = 150,
			soldier   = {die_inf_uberman",9, 25},
I just replaced the Empire's stuff with my own, but I'm not sure whether it's right or not...? I also edited the Empire's name, so thanks for that.

Re: Unit Help

Posted: Fri Sep 05, 2008 5:19 pm
by Maveritchell
Fix your "dc:". It should be:

Code: Select all

ReadDataFile("dc:SIDE\\die.lvl",[/code), not
[code]ReadDataFile dc:("SIDE\\die.lvl",
And don't change the name of the team in setupteams, use the localize tool to change what "imp" is localized as.

Re: Unit Help

Posted: Fri Sep 05, 2008 7:11 pm
by bokkenblader56
OK, sorry for being completely clueless, I know I'm probably getting annoying. I no longer get the error while munging, so that's a good thing.

I changed the .lua script to what I understood it needed to be, so here it is:

Code: Select all

ReadDataFile("dc:SIDE\\die.lvl",
                    "die_inf_uberman")
And the SetupTeams...

Code: Select all

	SetupTeams{
		all = {
			team = ALL,
			units = 20,
			reinforcements = 150,
			soldier	= { "all_inf_rifleman",9, 25},
			assault	= { "all_inf_rocketeer",1,4},
			engineer = { "all_inf_engineer",1,4},
			sniper	= { "all_inf_sniper",1,4},
			officer	= { "all_inf_officer",1,4},
			special	= { "all_inf_wookiee",1,4},

		},
		imp = {
			team = IMP,
			units = 20,
			reinforcements = 150,
			sniper	= { "die_inf_uberman",1,4},
		},
	}
I tried changing the imp localization using the Language Files doohickey and this guide, but I'm still a little foggy. I tried going into entity -> imp -> Right Click -> Add Key, and added the key as inf_uberman. I tried munging it with that, tested it, and it crashed...Did I add the
key wrong?