Bots and Simulations > Bot Tavern

Quick question

<< < (4/5) > >>

abyaly:

--- Quote from: EricL ---From a quick look at the code, -1 and -6 shot range appears not to depend on the body of the shooter at all.
--- End quote ---
Err..  what?
If not body, then it depends on something very closely correlated.

EricL:
The code is a total mess and super hard to read.  

Wait, here we go.  Looks like it depends on .vbody, not body, which for single bots is the same thing.

Looks like a shot's range (no .shootval specified) is

(ln(vbody) * 60 + 41) /40

So, shots from a small bot with body of 100 will last about 8 cycles.

A large bot with body of 32000 will last about 16 cycles.

abyaly:
Thanks, Eric.

PS - what is vbody?

EricL:
It looks like it's a half-finished multi-bot feature - the 'virtual body' of a multibot.   The code calculates it as the sum of the bodies of all the directly connected bots if a bot is a multi-bot and stores it on that bot's structure internally (but curiously, it does not do so transitivly).  The only place it's referenced in the code is for shot range (which is why I was confused before) but the code to provide multibot's greater shooting range based on this appears to be incomplete and ineffective.  I do not beleive multi-bots gain a shot range advantage currently.   .vbody is internal and not reflected out as a sysvar (values could exceed 32000).  My guess is that some previous coder wanted to give multibots advantage proportional to thier combined body and this was a start.

Numsgil:
Multibots used to have a whole host of extras that were enabled with .vbody.  Longer range, stronger shots, etc. etc.  After Helios demonstrated that a MB is strong enough on its own, I went through and unplugged .vbody from most of those features.

Those shot routines always have been a huge mess.  The problem is that it's so gnarly I was always afraid to seriously revamp it in case I screwed something up subtley.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version