Author Topic: Multiple Factories / Building Limit  (Read 3409 times)

k00kev

  • Posts: 67
    • View Profile
Multiple Factories / Building Limit
« on: October 10, 2011, 05:24:53 PM »
I've searched through and found a few topics concerning multiple factories, but it is often neglected next to the other questions along side it.

So, the question;
How can I modify the factory limit?
-OR-
How can I get around the factory limit and create a secondary factory?

Basically, I'm trying to have my main factory with the standard units, but would also like an assault factory to make advanced units.

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Multiple Factories / Building Limit
« Reply #1 on: October 10, 2011, 05:29:24 PM »
In your factory ODF, put the following:

[FactoryClass]
baseSlot = 2

Set that under factory bracket section. Set the number to whichever number you want the factory to be on, options are 1-9.


*****General BlackDragon*****

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #2 on: October 10, 2011, 05:41:40 PM »
Beautiful, now, I've read it elsewhere, but you wouldn't happen to know how to get it to show up on the Numbers? 1-2-3 are already there of course, but I heard that 4-5-6 can be stacked underneath?
« Last Edit: October 10, 2011, 05:48:40 PM by k00kev »

Warfreak

  • Posts: 11
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #3 on: October 10, 2011, 06:07:46 PM »
4-5-6 can be stacked underneath

You have to edit the .cfg that controls the HUD in order for those icons to show up underneath. The base code has those slots running into the existing F# slots.

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #4 on: October 10, 2011, 06:21:55 PM »
Where can I find the .cfg?

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Multiple Factories / Building Limit
« Reply #5 on: October 10, 2011, 09:20:22 PM »
bzshell_interface_base.cfg IIRC

look in 1.3's patch13.pak, config, interface folder.

Don't make any typos :P


*****General BlackDragon*****

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #6 on: October 12, 2011, 02:57:19 PM »
Okay, I found what you were talking about, it's in;
patch13/addon/config/game/ bzgame_base.cfg

Here's the coding for a base button 3 and 4.
It shows up
1-2-3
--4--
Once I get more things, I'll move 4 under 1.

Only problem now - and I knew it would happen - is that the SPACE Select bar shows
up over the bottom row. That's what I'll work on next. It's not a big deal really.

Also, the icon shows up as the Recy icon, so I'm going to take a look at how to fix that too.

Code: [Select]
CreateControl("Base3", "BUTTON")
{
Pos(170, 0);
Size(38, 54);
Style("TRANSPARENT", "ROLLOVER", "RADIO");

UseVar("control.base.select");
Value(3);

NotifyParent("Button::Select", "Base3");

CreateControl("Label", "BUTTON")
{
Pos(0, 0);
Size(38, 13);
Image("colorize.tga", 89, 17);
Style("INERT", "ROLLOVER", "RADIO");
Font("MEDIUM");
Text("3");

UseVar("control.base.select");
Value(3);
}

CreateControl("Back", "BUTTON")
{
ColorGroup("GROUPBACK");
Pos(0, 13);
Size(38, 41);
Image("colorize.tga", 89, 30);
Style("INERT", "ROLLOVER", "RADIO");

UseVar("control.base.select");
Value(3);

CreateControl("Icon", "STATIC")
{
ColorGroup("GROUPICON");
Pos(3, 0);
Size(32, 32);
Image("icon_base_recy.tga");
}

CreateControl("Light", "STATIC")
{
ColorGroup("WHITE");
Pos(4, 32);
Size(2, 5);
}
}
}

OnEvent("Base3")
{
Cmd("control.base.set3");
}

CreateControl("Base4", "BUTTON")
{
Pos(130, 55);
Size(38, 54);
Style("TRANSPARENT", "ROLLOVER", "RADIO");

UseVar("control.base.select");
Value(4);

NotifyParent("Button::Select", "Base4");

CreateControl("Label", "BUTTON")
{
Pos(0, 0);
Size(38, 13);
Image("colorize.tga", 89, 17);
Style("INERT", "ROLLOVER", "RADIO");
Font("MEDIUM");
Text("4");

UseVar("control.base.select");
Value(4);
}

CreateControl("Back", "BUTTON")
{
ColorGroup("GROUPBACK");
Pos(0, 13);
Size(38, 41);
Image("colorize.tga", 89, 30);
Style("INERT", "ROLLOVER", "RADIO");

UseVar("control.base.select");
Value(4);

CreateControl("Icon", "STATIC")
{
ColorGroup("GROUPICON");
Pos(3, 0);
Size(32, 32);
Image("icon_base_recy.tga");
}

CreateControl("Light", "STATIC")
{
ColorGroup("WHITE");
Pos(4, 32);
Size(2, 5);
}
}
}

OnEvent("Base4")
{
Cmd("control.base.set4");
}
}


Quick note, those last two "}" on the final "base button" are necessary, less you want the game to crash.
The first one more in line with the stuff above it ends the Base Button 4 code, and the one on the bottom ends
the entire code.
« Last Edit: October 12, 2011, 03:50:26 PM by k00kev »

Warfreak

  • Posts: 11
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #7 on: October 12, 2011, 05:28:46 PM »
The icon for the structure in the slot is not defined by the .cfg. It is defined rather by the unitIcon line under the [gameobjectclass] (ex. unitIcon = "fvrecy_mp1.png")

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #8 on: October 12, 2011, 05:35:51 PM »
The icon for the structure in the slot is not defined by the .cfg. It is defined rather by the unitIcon line under the [gameobjectclass] (ex. unitIcon = "fvrecy_mp1.png")

I figured as much, but the building I changed was a direct copy of the original factory? I never changed the icon in the odf

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Multiple Factories / Building Limit
« Reply #9 on: October 12, 2011, 08:44:05 PM »
quite right.


*****General BlackDragon*****

Warfreak

  • Posts: 11
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #10 on: October 12, 2011, 09:39:40 PM »
Yeah, funny thing about that. Apparently the default icon is the recycler icon, might be related to the mentions in the .cfg, but for all intents and purposes, just declaring the unitIcon should get around noticing that.

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #11 on: October 13, 2011, 11:40:09 AM »
Y'know, I figured that as well. Haha, oh well, the unit Icon isn't a big deal. The only thing I need to get around is the "hover bar"(Space interface bar? The bar that comes up when you mouse over a unit) in the way of the lower row. I've looked around and I think I find it at times, but I don't know. Trial and error is pretty annoying.

General BlackDragon

  • Administrator
  • BZ2 Fanatic
  • *
  • Posts: 1882
  • Nu Ani Anquietas
    • View Profile
    • ZEMod Forum
Re: Multiple Factories / Building Limit
« Reply #12 on: October 13, 2011, 12:08:57 PM »
It's in bzgame_command.cfg


*****General BlackDragon*****

k00kev

  • Posts: 67
    • View Profile
Re: Multiple Factories / Building Limit
« Reply #13 on: October 13, 2011, 07:52:08 PM »
Alright, yeah, I got it. Only problem after that is that when you change it, it's the bar for the menu as well. So I shifted everything down, and, well, it'll take some getting used to.