rebel5555
10th Oct 06, 9:16 PM
This tutorial will expalin how to limit how many of a certain unit you can have at once.
If you want a better reference than the pictures that I will use for this, open sbps\races\axis\soldiers\officer_squad.lua and goto
(squad_requirement_ext)
(requirement_table)
(required_1)
First things first, find the unit that you want to limit.
(For Example: sbps\races\allies\soldiers\ranger_elite.lua)
Next open the rgd file of that unit and find (squad_requirement_ext)
Now expand the tab and you should see (requirement_table)
http://img242.imageshack.us/img242/3126/untitledig6.jpg (http://imageshack.us)
Under required_1 we will be adding tags to it, So right click on required_1 and click add child. Now lets name our child (no pun intended) max_squad_cap.
http://img143.imageshack.us/img143/3098/untitledpo8.jpg (http://imageshack.us)
Next, use the same steps that we used to add our child (max_squad_cap) to add the folowing child
(squad_name)
http://img143.imageshack.us/img143/7232/untitledup7.jpg (http://imageshack.us)
Now click on required_1 find the reference tag and add this (requirements\required_squad.lua) to it.
Then, click on the child (max_squad_cap) and change the data type to Number. Under value is where you put how many units that you want to be built.
Finally, click on (squad_name) and change the data type to text. Under value put the name of your squad.
(for example: sbps\races\allies\soldiers\ranger_elite.lua) Below you should see what it will look like if you were to click required_1.
http://img143.imageshack.us/img143/5103/untitledjc0.jpg (http://imageshack.us)
Make sure that the child (reason) has usage for it's value. Also, If you are wondering what the child (ui_name) is for go here: http://forums.relicnews.com/showthread.php?t=112051
I hope this helps people who want to limit certain units such as the howitzer.
If you want a better reference than the pictures that I will use for this, open sbps\races\axis\soldiers\officer_squad.lua and goto
(squad_requirement_ext)
(requirement_table)
(required_1)
First things first, find the unit that you want to limit.
(For Example: sbps\races\allies\soldiers\ranger_elite.lua)
Next open the rgd file of that unit and find (squad_requirement_ext)
Now expand the tab and you should see (requirement_table)
http://img242.imageshack.us/img242/3126/untitledig6.jpg (http://imageshack.us)
Under required_1 we will be adding tags to it, So right click on required_1 and click add child. Now lets name our child (no pun intended) max_squad_cap.
http://img143.imageshack.us/img143/3098/untitledpo8.jpg (http://imageshack.us)
Next, use the same steps that we used to add our child (max_squad_cap) to add the folowing child
(squad_name)
http://img143.imageshack.us/img143/7232/untitledup7.jpg (http://imageshack.us)
Now click on required_1 find the reference tag and add this (requirements\required_squad.lua) to it.
Then, click on the child (max_squad_cap) and change the data type to Number. Under value is where you put how many units that you want to be built.
Finally, click on (squad_name) and change the data type to text. Under value put the name of your squad.
(for example: sbps\races\allies\soldiers\ranger_elite.lua) Below you should see what it will look like if you were to click required_1.
http://img143.imageshack.us/img143/5103/untitledjc0.jpg (http://imageshack.us)
Make sure that the child (reason) has usage for it's value. Also, If you are wondering what the child (ui_name) is for go here: http://forums.relicnews.com/showthread.php?t=112051
I hope this helps people who want to limit certain units such as the howitzer.