Author Topic: Worm capture formula/rules  (Read 3138 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

Worm capture formula/rules
« on: January 16, 2014, 07:45:54 PM »
In the process of figuring out what was going on with the multi-capture that Buncle reported, I investigated the capture probability rules, and here's what I found (I only checked what looked like the relevant part of the code and made an educated guess or two, so it's possible I'm missing something, but I doubt it):
-It is said that native life-forms have a lower chance of capturing natives, and the more native life you have, the harder it is to capture more.  Neither of these is strictly true.  Native life-forms appear to have the same chance as anything else to capture, and the probability of capture is affected by how many you own of that unit type, but not other types of native life (so owning a lot of spore launchers won't affect your ability to capture a worm, only another launcher.)

In order to even attempt to capture, a number of conditions must be met:
-You must have positive PLANET, of course. 
-The attacker may not be an air unit.
-The unit type being attacked must be capturable (so not a fungal tower, and the code also excludes alien artifacts, though I'm not sure how that might be relevant except maybe for certain modded custom maps.)  This goes by the unit that would otherwise defend, so I suspect it may be possible to capture a fungal tower, provided it is in a stack with other native life and is damaged enough that it would not be the defender.  Not sure what you'd do with it, though, as I'm pretty sure any worms it spawned would still be native.
-The attacker must have at least one movement left, so no hasty attacks.  This applies even if the attacker is a native life form, which does not take an attack penalty on hasty attacks.  This condition (and only this one) is waived in the case of a guaranteed capture.

If the "defending" unit is the result of a fungal pop by the attacking faction, or the attacker's closest base is producing any ecodamage, capture is impossible and you will receive the "more powerful mind" message.  (Because I feel that it makes the game richer to make it nearly impossible to avoid any ecodamage, I now plan to add a variable in alphax that gives finer control of how the ecodamage in the nearest base affects capture chance.)

If the conditions are met and capture is possible, then if the attacking faction has an inherent bonus to PLANET, and controls none of the unit type to be captured, then the capture is guaranteed (will always happen, even with a hasty attack.)

Otherwise, capture is determined by your PLANET rating and the number of that unit type that you already own.  Firstly there is a 1 in 4 chance per PLANET (max 3/4) of a possible capture; if it fails, then the capture fails.  Then comes a 9/(100+1 per 5 turns passed)*(units of that type which you already own) chance that it will fail anyway, to a maximum of 90%.  If that passes as well, you capture all units in the square.

Online Buster's Uncle

  • In Buster's Orbit, I
  • Ascend
  • *
  • Posts: 49272
  • €442
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Worm capture formula/rules
« Reply #1 on: January 16, 2014, 08:47:50 PM »
I have captured a fungal tower stacked w/ worms; it reverted to native on the next turn.  I've only had it happen about twice in all these years of playing.

Offline Yitzi

Re: Worm capture formula/rules
« Reply #2 on: January 16, 2014, 09:13:53 PM »
I have captured a fungal tower stacked w/ worms; it reverted to native on the next turn.  I've only had it happen about twice in all these years of playing.

Ok, nice to know.

Offline Kirov

Re: Worm capture formula/rules
« Reply #3 on: January 17, 2014, 02:20:26 PM »
Most tremendous work, Yitzi!  ;b; Especially the part with no hasty attack sure explains a lot - common in worm hunting is roving in fungus with your own worms, for 3 tiles per turn. Now I get why the actual results differed from the theory.

Three things:

1) By the (100+1 per 5 turns passed) you mean just turns passed since MY 2101 or since some other trigger?

2) The issue with AA - when fighting other factions, more often than not you get to capture artifacts instead of destroying them. Is there any odd chance that native life can 'capture' them as well? This certainly wouldn't be a feature but a bug, but you know, maybe it can happen every now and then.

3) I don't remember right now - can you capture anything with spore launchers? They don't attack by attempting to move in the opponent's tile, after all. If you do attempt this, does it count as a capture?

Offline Yitzi

Re: Worm capture formula/rules
« Reply #4 on: January 17, 2014, 09:34:42 PM »
Most tremendous work, Yitzi!  ;b; Especially the part with no hasty attack sure explains a lot - common in worm hunting is roving in fungus with your own worms, for 3 tiles per turn. Now I get why the actual results differed from the theory.

Three things:

1) By the (100+1 per 5 turns passed) you mean just turns passed since MY 2101 or since some other trigger?

Just turns passed since game start; at 2105 it's 5, etc.

Quote
2) The issue with AA - when fighting other factions, more often than not you get to capture artifacts instead of destroying them. Is there any odd chance that native life can 'capture' them as well? This certainly wouldn't be a feature but a bug, but you know, maybe it can happen every now and then.

Could be what's going on there.

Quote
3) I don't remember right now - can you capture anything with spore launchers? They don't attack by attempting to move in the opponent's tile, after all. If you do attempt this, does it count as a capture?

Don't think so; it'd be the same rules as other artillery.

Offline Flygon

Re: Worm capture formula/rules
« Reply #5 on: January 27, 2014, 04:52:42 PM »
What about Spore Launchers capturing Spore Launchers?

I have vague memories of capturing them with one of their own, but it's been a while since I've checked.

Offline gwillybj

Re: Worm capture formula/rules
« Reply #6 on: January 27, 2014, 05:08:06 PM »
Spore Launchers can capture other Spore Launchers and Mind Worms. I've seen it and done it many times. (XP patch)
Two possibilities exist: Either we are alone in the Universe or we are not. Both are equally terrifying. ― Arthur C. Clarke
I am on a mission to see how much coffee it takes to actually achieve time travel. :wave:

Offline ete

Re: Worm capture formula/rules
« Reply #7 on: January 28, 2014, 06:25:58 PM »
This is very useful info, interesting to see how higher Planet changes things and how the game keeps max native army from exploding. Particularly how building native units will make captures less likely, and different units running on different counters so my previous "sacrifice excess launchers to reduce natives and hopefully get more worms" tactic was unhelpful.

Offline magic9mushroom

Re: Worm capture formula/rules
« Reply #8 on: June 10, 2023, 06:39:31 AM »
I think there's something dodgy going on with the checks for whether you already have one of the natives you're trying to capture when checking for autocapture. I think it updates immediately if you disband a unit, but doesn't update until end of turn when you capture.

This means that if you have zero worms, and two wild worms pop up in the same turn, they will both be autocaptured. It also means that if two wild worms pop up in the same turn and you only have one worm, you can disband the worm and then autocapture both wild worms. But if you have zero worms, two wild worms pop up, and you capture and disband one of them, the other one will not be autocaptured, because now the game thinks you have -1 worms which probably rolls under to 255 or 65535 or something.
« Last Edit: June 10, 2023, 08:37:04 AM by magic9mushroom »

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Human behavior is economic behavior. The particulars may vary but competition for limited resources remains a constant. Need as well as greed has followed us to the stars and the rewards of wealth still await those wise enough to recognize this deep thrumming of our common pulse.
~CEO Nwabudike Morgan 'The Centauri Monopoly'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 40.

[Show Queries]