View Full Version : AE Basics: Hard Caps & Cumulative Group Caps
22nd Oct 07, 4:55 PM
This is mega-simple, but hard caps and group caps are a relatively commonly asked question so I figured I'd just rattle this off in a couple of minutes. Everyone knows hard caps, all the elites in the game are hardcapped and this annoys the hell out of some people. Many people also want to group cap their troops in much the same way as table top rules - this means that out of a pool of units you are allowed any combination but the combined total is set. All this requires is the use of one special requirement, it's just that the use of it is not quite that intuitive.
Let's take the Imperial Guard Elites - Kasrkins and Orgyns. We'll try and group cap these so that you can have up to 3 Elites, but also hard cap them to a maximum of 2 of either kind. So you're options will be 2 x Ogryns and 1 x Kasrkins, or 2 x kasrkins and 1 x Orgyns, but not 3 of either.
Okay, so you've set up your fresh mod - go find the squad file (SBPS) for each squad. Expand squad_blueprint, squad, guard_squad and you'll find them there. Now look in the squad_requirement_ext for each and you should find one using required_squad_cap. This is the hard cap - you'll see that it is set to 1 currently. Change the 1 to a 2. Now you can have 2 of each. Simple. Feel free to save to binary and test this. If you want to remove them completely then just set it to required_none instead of required_squad_cap; if you want to add hard caps to a unit then just add this requirement to it and pick a number. Easy.
Fig 1. the hard cap requirement
Now for the group caps. Set one of the blank requirements to required_cumulative_squad_cap. A squad table will appear and a max cap field too. Put 3 in the max cap field and in one of the squad table drop boxes put THE OTHER squad you want to limit it with, NOT this squad but the other one. So if you're editing Kasrkins put Ogryns in the squad table only and nothing else, and vice versa.
Fig 2. the group cap requirement in action
Save both files to binary and go test them. You should still only be allowed a maximum of two of each, and also a further limit of three in total.
Fig 3. one of each squad
Fig 4. building a second kasrkin squad has capped both elites for me now, totalling three squads. Notice the yellow text says Limit 3 and Limit 2 - one is the group cap and the other is the hard cap.
Cumulative Squad Caps are obviously usuable without including hard caps if you so wish and can also include as many units as you want. Try setting the Space Marine Terminator Squads and grey Knights to use a cumulative cap of 2 between them and no hard caps. You should list the OTHER two units in the squad table for each unit and not the unit you are currently editing. You will only be able to pick two out of the three squads in game or two of any one kind.
Have fun! :)
23rd Oct 07, 7:26 PM
Thanks for the tutorial. The required_cumulative_squad_cap solved a lot of my problems...
29th Oct 07, 10:13 PM
neat, i didn't even realize you could do that. i have much to tinker with.
PS, i'm sure a veteran like yourself would know; how do you get a custom icon? does it require some kind of rank on this forum? cause i can't find the "upload custom icon" button/field anywhere in the CP....
30th Oct 07, 4:37 AM
It's all in the stickies (http://forums.relicnews.com/showthread.php?t=92710)
11th Feb 08, 1:48 AM
Is there a way that a hard cap can be modified.
Say I have a hard cap of 5 for space marines. Is there a modifier for when space marines squads die so that I can drop the cap by 1 thereby enforcing a perminant limit on marines.
If there is no way to do it this way is there a better way?
11th Feb 08, 1:49 AM
No, hard caps cannot be altered with AE.
3rd Mar 08, 6:41 PM
I have been trying (failing?) to create a "requirement_unit_ratio" along the lines of the "requirement_structure_ratio" such that there's a hard cap of a particular unit for a particular structure, which increases if more structures are built (e.g., 1 chaplain per HQ, but a possible total of 5 chaplains if all 5 HQs are built). Is this a straight-forward modification, or something brand new?
3rd Mar 08, 8:39 PM
well thats basically what I asked, to be able to modify a hard cap.
But anyway, what you can do is modify cost,build time etc to make the unit more easy to create.
you can also modify the squad loadout using the "max_troopers_squad_modifier". This will allow a squad to hold additional units.
3rd Mar 08, 11:18 PM
I've done a lot of work with sbps and ebps, so I've done all those things. I've exhausted my skills there, and went to create new "requirement category" to represent the idea that more resources would be available if another HQ is "deployed" to a battle area. The "required_structure_ratio" is used for power stations and bolter turrets and the like.
I've used both Corsix and the Relic tools, and created (what I think) are the proper requirement luas and rgds, but like you, Adovid, I can't get the new requirement to "take hold" in the mod. I know there's got to be a way to create new requirements... I'm missing something. We've seen it in other mods.
Regarding your task, Adovid, I have no idea how to modify a cap DOWN during the game. Maybe there's a tricky way to use a cumulative cap - somehow find the code that "counts" the lost units, and add that to a "dummy unit" count. The idea would be to have a cumulative cap between "space_marine_squad_tactical" and something like "space_marine_squad_wacked" which was increased by one each time a squad was eliminated. (Of course, I have no idea how or where that information would be kept in the game...)
If you're looking to put a cap on the number of troopers in a squad (so that the squad couldn't be reinforced once it's been filled the first time), that just makes my brain hurt...
Hopefully, someone can help us, or tell us "no way!" so the pain can stop...
4th Mar 08, 4:16 AM
You cannot make new requirements.
The words you are using are just meaningless strings of letters to the computers. There is nowhere for you explain what you want the engine to do with it. This is also known as hard coding. And yes, hard coded stuff is a complete arse. Sorry.
4th Mar 08, 10:03 AM
Aw, well... Such is the life of a "user"...
Thanks, anyway. I'll stop the head banging...
4th Mar 08, 11:12 PM
I have coded one :D.
5th Mar 08, 1:51 AM
Nice, quite a few people will find that useful. You can do a lot with SCAR coding. HOw does it behave it you queue units up etc.? That's often the way round things like that. Does it give you requirement text btw?
5th Mar 08, 12:40 PM
Doesn't provide requirement text, you will have to add that manually as it works completely independent from the unit caps(I can't see how to change those from scar atm). It works by restricting player production of a particular unit as you may notice that it completely removes the icon from the building (rather than showing a grey icon).
If it is made to run slower it won't be able to remove units already in the production queue but it counts units in production when it checks the ratio and because I have it running in the game loop it checks(as far as I can tell) before player input.
I may go back and try to find ways to optimise it if anyone complains about lag or sync errors but from playing against the ai it doesn't seem to add too much overhead on my computer.
14th Mar 08, 7:22 PM
Cue the "We're Not Worthy" sound bite from Wayne's World...
15th Apr 08, 10:22 AM
Not sure if it just cause I've done something wrong but was that meant to make it so I could build them without having to tech up to teir 3 and buying the quaters upgrades? Not that i'm complaining like, Karskins at teir 1 is intresting idea.
15th Apr 08, 10:54 AM
No, sounds like you've done something wrong. You're supposed to leave the majority of the requirements, but it sounds like you've set them all to required_none, rather than just the one I mentioned. You're only supposed to be changing one of them and adding another. Be careful to add the new one, rather than overwriting an existing one.
27th Jul 08, 3:03 AM
This will limit in only one way, is that right?
To explain: Let's say I want to make it so that I can either have 2 different not-so-super units, or 1 of this other really-super unit. Is that possible?
27th Jul 08, 3:21 AM
Well, that can be achieved, but you need to use another requirement as well.
Use "required_squad" [squadX] = 0. This means that as soon as the named squad is present you wont be able to build the squad with the requirement. Put this on each squad and have it refer to the other group (i.e. the no-so-supers refer to the super, and the super refers to BOTH the not-so supers).
Then hard cap the super to one and group/hard cap the not-so-supers to two.
9th Aug 08, 5:00 AM
Sorry for the delay, but I was busy - and now realise I have no idea what to refer to. What existing units use this kind of cap, so that I can refer to them? Alternatively, how would you do this in AE?
On a related note, let's say I want to have 2 of the same type of not-so-super unit, or 1 of a really-super unit. How would I carry this out?
9th Aug 08, 5:25 AM
The method I suggested works for what you said also.
The only other thing that uses the requirement I mentioned is the bloodthirster research I believe. Don't worry about it, it's a really simply requirement, you just add it as an extra one in the squad_requirement_ext bit. It's all in the dropboxes.
26th Sep 08, 7:08 PM
I figured out how to do all the editing int he Attributes Editor, and I can save it, but when I try to save the Binary it Freezes. Any help?
Should I just save binary 1 or save the whole Binary?
27th Sep 08, 2:21 AM
It hasn't frozen, saving to binary takes ages. Just let it do its thing. Saving binary 1 will only save the file the you have selected and it's easy to miss other important files that you've edited and then wonder why it's not working in-game.
27th Sep 08, 4:47 PM
Hmmm. I will jsut save binary 1 from now on. I mean, just save a file everty time I edit it.
3rd Oct 08, 2:03 AM
i'm using corsix's studio and there's not the appropriate new drop-down tables when i add the req_cum_etc. know of any units in either vanilla, dc, or dcpro that uses this so i can c&p?
3rd Oct 08, 2:20 AM
DC Heroes (FC certainly) have it, though they don't have it implemented properly - don't mimic their squad tables.
20th Jan 09, 11:58 PM
eh can i use normal units like sm and am and combine them like this tutorial did?
21st Jan 09, 1:51 AM
You can use it on any SBPS (squads, which includes vehicles and heroes as they are simply squads of size 1) that you like. They don't have to be hard-capped already or anything, just add the appropriate requirement. You may find on some that there's no squad_requirement_ext, so you'll need to add it: with the file selected in the AE, right-click on the right portion of the screen, click "add something or other", click squad_extension from the list and then find squad_requirement_Ext, auto name it, then OK it. Can't remember what the first part of the menu is, so just play around till you get it.
1st Jan 11, 2:46 PM
I don't know if everyone here has retired already but... the search feature on this forum seems screwed and I just wanted to know how to edit Hard Caps with Corsix's Mod Studio 0.5.5, I've been able to change how much they take up in support and vehicle cap but can't seem to find where the hard cap is.
I downloaded a mod and I'm just wanting to make a few quick edits for me and my mates.
It's the Half-Scale with Triple Caps mod.
All I want to do is:
triple things like the basilisk, dreadnoughts, Necron Monolith (not so much things like the bloodthirster and avatar), and other special units.
triple the number of orbital relays (I think I see how to increase their load capacity) for more deep strikes
and that's about it...
We used to play this mod called Armageddon which trippled EVERYTHING and it was epic... but that modder quit by the time DC and SS came out. Which made our little LAN crew sad.
Well, for anyone still reading this stuff (because newer games suck and they wanna return to the classics), I've found where, in Corsix, the Hard Cap is.
Somewhere in Requirements 1 through whatever
Now... I wonder if I can merge a half-scale mod with another mod and if it would half scale the other things.
<---- is total newb in the dark ages where all the mod masters have perished lol
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.