Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Points: Print spending/gains to chat, award idle biters bonus points #48

Merged
merged 6 commits into from
May 1, 2021
Merged

AI Points: Print spending/gains to chat, award idle biters bonus points #48

merged 6 commits into from
May 1, 2021

Conversation

Dagothur
Copy link
Contributor

Configurable settings for:

  1. Printing AI point spending to chat
  2. Printing AI point gains to chat
  3. Granting "Idle Biters" bonus points

…ters bonus points

Configurable settings for:

1) Printing AI point spending to chat
2) Printing AI point gains to chat
3) Granting "Idle Biters" bonus points
@Dagothur Dagothur changed the title AI Points: Print spending/gains to caht, award idle biters bonus points AI Points: Print spending/gains to chat, award idle biters bonus points Apr 30, 2021
@veden
Copy link
Owner

veden commented Apr 30, 2021

Are 1 and 2 for debugging?
is 3 needed? Have you tried the latest Rampant for how it is accumulating points?

adds /rampantSetAIState command

sets the player's current surface to the state index passed to the command
@Dagothur
Copy link
Contributor Author

Hi Veden,

1 and 2 were originally for debugging, yes. The spending points option adds some GPS tags to the chat message as the squads spawn (and it automatically pings the map) which is pretty cool even if somewhat cheaty. They may be worthwhile keeping exposed as map options for players who are trying to diagnose issues with their map.

3 was originally designed for a version of Rampant that I don't believe was correctly generating passive points at lower evolution %s. However, I think this feature does still have a place as it raises the "difficulty floor" of a play through without raising the ceiling. For example, in the early game when not much is happening it allows you to give Rampant the ability to attack and expand. In the opposite direction, when Rampant is smashing you in Onslaught mode, it does nothing.

@veden
Copy link
Owner

veden commented Apr 30, 2021

for 3, have you tried it to see if it is functioning as you expect still?

@Dagothur
Copy link
Contributor Author

Yes. It's been rewritten and tested for 1.0.9.

@veden
Copy link
Owner

veden commented Apr 30, 2021

Is 3 for overrunning the points cap?
Why not just remove the point cap instead?

@veden
Copy link
Owner

veden commented Apr 30, 2021

how often is the cap reached and the passive increase triggers?
is there a particular AI state it triggers in?

@Dagothur
Copy link
Contributor Author

Is 3 for overrunning the points cap?
Why not just remove the point cap instead?

It's not specifically meant to overrun the points cap.

It does overrun it to the overflow limit. It doesn't need to though, it could be reworked to limit itself to the points cap rather than the overflow limit.

how often is the cap reached and the passive increase triggers?

The passive increase introduced by 3) occurs when Rampant did not spend or gain any points (passive point gain is not considered) in the last rolling 60 seconds. So for example, if 60 seconds pass and Rampant does not create any unit groups (i.e. point spending) or gain any points from an action (i.e. ion cannon, rocket launch, worm/nest death, player building destruction) then the configured point bonus is granted. Any time there's a non-passive point decrease or increase then the timer resets itself.

Let me know if I missed something else you were asking for this one.

is there a particular AI state it triggers in?

It will activate in any state.

@veden
Copy link
Owner

veden commented Apr 30, 2021

I'm trying to understand why it is needed and when it is typically firing because it most likely means there is another bug.

@Dagothur
Copy link
Contributor Author

Dagothur commented Apr 30, 2021

It increases the difficulty by giving the biters points when nothing is happening. One example: at the start of the game a good strategy is to clear the biters out of your pollution asap and not fight them until you absolutely need to (i.e. expansion). This starves them of AI points (i.e. you aren't killing their structures and they aren't killing yours). The implementation of 3) nerfs this approach by giving them points even though you're starving them out.


I do believe there's some sort of bug with biter expansions / the AI_MIGRATION state. I was trying to figure out how everything works yesterday and what may be broken but couldn't find anything conclusive. I can start up a game and with the settings introduced in this pull see that the biters are doing nothing. For example here: https://i.imgur.com/XEv1SYE.jpg But sometimes it seems to work fine.
Based on my tinkering yesterday my best guess is that there's a problem with the map.chunkToNests record keeping but as I mentioned I couldn't find anything conclusive.

There might also be problems with the AI_AGGRESSIVE state generating attacks at the start of the game too but I haven't spent the time to read over the code and try to understand how it's supposed to function yet.

@veden
Copy link
Owner

veden commented Apr 30, 2021

The AI will always accrue points up to the cap.
There was a bug in a previous version that was floor'ing off the fractional part of the point accrual, which was causing point gain to be lost at low levels of evolution.

@Dagothur
Copy link
Contributor Author

Yes, I have seen that occurring properly. I think there is room for 3) to co-exist (i.e. providing a setting to increase difficulty floor without raising ceiling). Or you may be able to think of a better implementation which has a similar effect.

Please let me know where you want to take the PR, if anywhere. Or if you want to discuss any details further.

We could re-tag the chat messages with Debug: and/or separate 3) out of it.

@veden
Copy link
Owner

veden commented Apr 30, 2021

if you would, please separate 3.
The next version has some adjustments.
Happy to post some changes if you want to take a look at a pre-release

@Dagothur
Copy link
Contributor Author

Dagothur commented May 1, 2021

Sure, seeing what's going to be updated would be cool.

@veden
Copy link
Owner

veden commented May 1, 2021

the latest has been pushed

@veden
Copy link
Owner

veden commented May 1, 2021

The location in chat with the icon on the map is neat.

@veden veden merged commit 339e338 into veden:master May 1, 2021
@veden
Copy link
Owner

veden commented May 1, 2021

thanks for the pull request

@Dagothur
Copy link
Contributor Author

Dagothur commented May 1, 2021

The location in chat with the icon on the map is neat.

Yeah it's pretty fun to see exactly what the AI is getting up to. We got smashed in Onslaught and I turned it on real quick before we reloaded and our entire base was surrounded by squad spawn pings, lol.

btw based on some very brief testing it looks like you got the expansion bug. It's a big difference now. Pretty much as soon as the biters have enough points to migrate they immediately do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants