RelicNews Forums

Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Reply
 
Thread Tools
Old 22nd Oct 07, 4:55 PM Forum Rules   # 1
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

AE Basics: Hard Caps & Cumulative Group Caps

Rating: Newbie

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.

Hard Caps

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

Group Caps

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!
__________________
"Life is not full of successes, it is full of failures from which we learn" - Tony Benn
Octopus Blog (14.02.10)DOW2 2.2.2 GridKeys
DOW1 Modding Tutorial ListDOW2 Tactical Primer

Last edited by Octopus Rex : 9th Feb 09 at 5:41 AM. Reason: Spelling mistakes
Octopus Rex is offline  
Old 23rd Oct 07, 7:26 PM   # 2
theoak
Member
 
theoak's Avatar
 
Join Date: Jul 2006
Location: USA

Thanks for the tutorial. The required_cumulative_squad_cap solved a lot of my problems...
theoak is offline  
Old 29th Oct 07, 10:13 PM   # 3
is--josef
Guest
 

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....
 
Old 30th Oct 07, 4:37 AM Forum Rules   # 4
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Octopus Rex is offline  
Old 11th Feb 08, 12:48 AM   # 5
Adovid
Member
 
Join Date: Dec 2007

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?
Adovid is offline  
Old 11th Feb 08, 12:49 AM Forum Rules   # 6
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

No, hard caps cannot be altered with AE.
Octopus Rex is offline  
Old 3rd Mar 08, 5:41 PM   # 7
SchleebMeister
Member
 
SchleebMeister's Avatar
 
Join Date: May 2007
Location: Illinois

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?

Thanks ...
__________________
But why is all the rum gone?
SchleebMeister is offline  
Old 3rd Mar 08, 7:39 PM   # 8
Adovid
Member
 
Join Date: Dec 2007

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.
Adovid is offline  
Old 3rd Mar 08, 10:18 PM   # 9
SchleebMeister
Member
 
SchleebMeister's Avatar
 
Join Date: May 2007
Location: Illinois

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...

SchleebMeister is offline  
Old 4th Mar 08, 3:16 AM Forum Rules   # 10
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.
Octopus Rex is offline  
Old 4th Mar 08, 9:03 AM   # 11
SchleebMeister
Member
 
SchleebMeister's Avatar
 
Join Date: May 2007
Location: Illinois

Aw, well... Such is the life of a "user"...

Thanks, anyway. I'll stop the head banging...
SchleebMeister is offline  
Old 4th Mar 08, 10:12 PM   # 12
Adovid
Member
 
Join Date: Dec 2007

Adovid is offline  
Old 5th Mar 08, 12:51 AM Forum Rules   # 13
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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?
Octopus Rex is offline  
Old 5th Mar 08, 11:40 AM   # 14
Adovid
Member
 
Join Date: Dec 2007

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.
Adovid is offline  
Old 14th Mar 08, 7:22 PM   # 15
SchleebMeister
Member
 
SchleebMeister's Avatar
 
Join Date: May 2007
Location: Illinois

Many Thanks, Gracias, Spacibas, etc...



Cue the "We're Not Worthy" sound bite from Wayne's World...
SchleebMeister is offline  
Old 15th Apr 08, 10:22 AM   # 16
Tarik GK
Guest
 

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.
 
Old 15th Apr 08, 10:54 AM Forum Rules   # 17
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.
Octopus Rex is offline  
Old 27th Jul 08, 3:03 AM   # 18
WarpObscura
Guest
 

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?
 
Old 27th Jul 08, 3:21 AM Forum Rules   # 19
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.

Make sense?
Octopus Rex is offline  
Old 9th Aug 08, 5:00 AM   # 20
WarpObscura
Guest
 

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?
 
Old 9th Aug 08, 5:25 AM Forum Rules   # 21
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.
Octopus Rex is offline  
Old 26th Sep 08, 7:08 PM   # 22
SeathCFF
Guest
 

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?
 
Old 27th Sep 08, 2:21 AM Forum Rules   # 23
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.
Octopus Rex is offline  
Old 27th Sep 08, 4:47 PM   # 24
SeathCFF
Guest
 

Hmmm. I will jsut save binary 1 from now on. I mean, just save a file everty time I edit it.
 
Old 3rd Oct 08, 2:03 AM   # 25
phordicus
Guest
 

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?
 
Old 3rd Oct 08, 2:20 AM Forum Rules   # 26
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

DC Heroes (FC certainly) have it, though they don't have it implemented properly - don't mimic their squad tables.
Octopus Rex is offline  
Old 20th Jan 09, 10:58 PM   # 27
Mad_scientist
Guest
 

eh can i use normal units like sm and am and combine them like this tutorial did?
 
Old 21st Jan 09, 12:51 AM Forum Rules   # 28
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

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.
Octopus Rex is offline  
Reply



Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 9:04 PM.

Page generated in 0.47565794 seconds (91.50% PHP - 8.50% MySQL) with 9 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.