PDA

View Full Version : Mapping AAS Random CPs


dbzao
2008-11-26, 15:59
This has been replaced by AASv4. Please refer to the new tutorial here (https://www.realitymod.com/forum/f189-modding-tutorials/93932-map-tutorial-aasv4.html).

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.


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.

Rhino
2008-11-26, 16:04
what happens if the SGID is 1, 2, 3 etc?

dbzao
2008-11-26, 18:48
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.

AfterDune
2009-03-03, 14:55
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.

dbzao
2009-03-03, 16:23
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
2009-03-03, 16:40
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.

Rudd
2010-07-20, 20:37
if I set a flag to -1 will it be cappable vbf2 style, i.e. cappable at all times?

dbzao
2010-07-20, 20:59
Nope...