AAS Random CPs

Information and tutorials related to modding BF2.
Post Reply
dbzao
Retired PR Developer
Posts: 9381
Joined: 2006-06-08 19:13

AAS Random CPs

Post by dbzao »

This has been replaced by AASv4. Please refer to the new tutorial here.

Just wanted to explain to the mappers about a change I just committed on how to define random cps. It's pretty much the same, but now you can define how many you want to be left on that group after the removal.
'changelog' wrote: PYTHON: Updated random cps to consider the second digit in the supplygroupid as the number of cps to be left in the group after the random removal. So if sgid = 21, then group = 2 and leave = 1; sgid = 22, group = 2 and leave = 2; sgid = 2 or sgid = 20, then group = 2 and leave = all (not random). (dbzao)
Before, it was just sgid = 11, 21, 31, 41, etc, but now the second digit number actually defines the amount of cps to be left.

If you set in the same group sgid = 21 and sgid = 22, I will consider the definition of only one of those (the first in the order the engine gives me the cp list), so make sure all cps on a group have the same sgid. You can of course have random and not random cps by having sgid = 21 on some and sgid = 20 or sgid = 2 in others.

I think we should increase the use of random CPs more and more as they are great for changing the way we play the maps on the same layer. Specially big maps like Muttrah, Fools Road, etc.
Last edited by AFsoccer on 2011-02-21 17:05, edited 1 time in total.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: AAS Random CPs update

Post by Rhino »

what happens if the SGID is 1, 2, 3 etc?
Image
dbzao
Retired PR Developer
Posts: 9381
Joined: 2006-06-08 19:13

Re: AAS Random CPs update

Post by dbzao »

Rhino, if there's no second digit, that flag wont be random. It's the same as the current code, and I said that somehow twice in the post. SGID = 2 = 20, SGID = 1 = 10, etc.

Nick, the second digit is how many will be left in the map after the removal, so you did it wrong. Example:

Flags: A, B, C, D, E

Groups:
1 = A
2 = B, C, D
3 = E

You want group 2 to only have 1 left, this means or B, or C, or D. So the final SGIDs for the flags would be

A = 1 or 10
B = 21
C = 21
D = 21
E = 3 or 30

If you wanted to have 2 cps left in group 2, they would be 22 -> 2-2 -> group 2 - 2 left.
Last edited by dbzao on 2008-11-26 20:00, edited 1 time in total.
AfterDune
Retired PR Developer
Posts: 17093
Joined: 2007-02-08 07:19

Re: AAS Random CPs update

Post by AfterDune »

I have two flags, both supply group id = 11. If I'm right, this means that I want one of the two flags to spawn. This works fine, only one flag spawns.
But, the spawnpoint and objectspawners of the flag that did NOT spawn still spawns? How can I fix that?

Thanks.
Image
dbzao
Retired PR Developer
Posts: 9381
Joined: 2006-06-08 19:13

Re: AAS Random CPs update

Post by dbzao »

Are those spawners related to the flag? There's some code that says "this spawner is from this flag", don't remember the name.

If they are defined and still spawn, then probably it just won't work. We never setup random main bases, so it's probably a problem.
AfterDune
Retired PR Developer
Posts: 17093
Joined: 2007-02-08 07:19

Re: AAS Random CPs update

Post by AfterDune »

Yeah, they are two starting positions of which Python should choose. Each spawnpoint and objectspawner are connected to one of these flags. I'll look into your suggestion, it may work, who knows.

Otherwise, it's not possible at the moment. Might be interesting to implement though, if it's possible. It would make maps even more dynamic. Well, only if the map is suitable for that system of course, you can't implement it on any map.
Image
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: [Map Tutorial] AAS Random CPs

Post by Rudd »

if I set a flag to -1 will it be cappable vbf2 style, i.e. cappable at all times?
Image
dbzao
Retired PR Developer
Posts: 9381
Joined: 2006-06-08 19:13

Re: [Map Tutorial] AAS Random CPs

Post by dbzao »

Nope...

"There's always one more bug." - Lubarsky's Law of Cybernetic Entomology
Post Reply

Return to “Modding Tutorials”