project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
19 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2008-11-26, 16:59   #1
dbzao
Retired PR Developer
Supporting Member

dbzao's Avatar
Default AAS Random CPs

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.

Quote:
Originally Posted by changelog
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.
dbzao is offline
Last edited by AFsoccer; 2011-02-21 at 17:05..
Reply With Quote
Old 2008-11-26, 17:04   #2
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Default Re: AAS Random CPs update

what happens if the SGID is 1, 2, 3 etc?

Rhino is offline Reply With Quote
Old 2008-11-26, 19:48   #3
dbzao
Retired PR Developer
Supporting Member

dbzao's Avatar
Default Re: AAS Random CPs update

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.
dbzao is offline
Last edited by dbzao; 2008-11-26 at 20:00..
Reply With Quote
Old 2009-03-03, 15:55   #4
AfterDune
Retired PR Developer
Supporting Member

AfterDune's Avatar
Default Re: AAS Random CPs update

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.

AfterDune is offline Reply With Quote
Old 2009-03-03, 17:23   #5
dbzao
Retired PR Developer
Supporting Member

dbzao's Avatar
Default Re: AAS Random CPs update

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.
dbzao is offline Reply With Quote
Old 2009-03-03, 17:40   #6
AfterDune
Retired PR Developer
Supporting Member

AfterDune's Avatar
Default Re: AAS Random CPs update

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.

AfterDune is offline Reply With Quote
Old 2010-07-20, 20:37   #7
Rudd
Retired PR Developer
Supporting Member

Rudd's Avatar
Default Re: [Map Tutorial] AAS Random CPs

if I set a flag to -1 will it be cappable vbf2 style, i.e. cappable at all times?


Rudd is offline Reply With Quote
Old 2010-07-20, 20:59   #8
dbzao
Retired PR Developer
Supporting Member

dbzao's Avatar
Default Re: [Map Tutorial] AAS Random CPs

Nope...


"There's always one more bug." - Lubarsky's Law of Cybernetic Entomology
dbzao is offline Reply With Quote
Reply


Tags
aas, cps, map, random, tutorial, update

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:02.