GithubHelp home page GithubHelp logo

Comments (9)

JustDerb avatar JustDerb commented on August 28, 2024

The AI is pretty dumb right now as it's using the built-in AI framework they wrote. I'll be working on a more intelligent AI in the next coming releases.

from ror2-protectthevip.

JustDerb avatar JustDerb commented on August 28, 2024

The VIP also contributes to Teleporter charge rate

This shouldn't be the case as it's not counted as an active player.

from ror2-protectthevip.

Hanabanashii avatar Hanabanashii commented on August 28, 2024

The VIP also contributes to Teleporter charge rate

This shouldn't be the case as it's not counted as an active player.

It does for me, maybe it is conflicting with another mod but if it isn't in the zone it takes noticeably longer.

The AI is pretty dumb right now as it's using the built-in AI framework they wrote. I'll be working on a more intelligent AI in the next coming releases.

I've noticed, wonder if there's a priority system as vanilla minions tend to follow you over go after an enemy. If it could be made to follow you like that or just make its way toward the teleporter it would make it much more interesting.

from ror2-protectthevip.

JustDerb avatar JustDerb commented on August 28, 2024

The VIP also contributes to Teleporter charge rate

This shouldn't be the case as it's not counted as an active player.

It does for me, maybe it is conflicting with another mod but if it isn't in the zone it takes noticeably longer.

Might be another mod? The way the zone charge rate is calculated is a formula that is based on "living players":

HoldoutZoneController.cs

int num = HoldoutZoneController.CountLivingPlayers(this.chargingTeam);
int num2 = HoldoutZoneController.CountPlayersInRadius(base.transform.position, this.currentRadius * this.currentRadius, this.chargingTeam);
// ...snip...
float num5 = this.baseChargeDuration;
float num6 = ((num != 0) ? ((float)num2 / (float)num) : 0f) / num5;
HoldoutZoneController.CalcChargeRateDelegate calcChargeRateDelegate = this.calcChargeRate;
if (calcChargeRateDelegate != null)
{
	calcChargeRateDelegate(ref num6);
}
this.charge = Mathf.Clamp01(this.charge + num6 * Time.fixedDeltaTime);
private static int CountLivingPlayers(TeamIndex teamIndex)
{
	int num = 0;
	ReadOnlyCollection<TeamComponent> teamMembers = TeamComponent.GetTeamMembers(teamIndex);
	for (int i = 0; i < teamMembers.Count; i++)
	{
		if (teamMembers[i].body.isPlayerControlled)
		{
			num++;
		}
	}
	return num;
}

The ally isn't player controlled, so body.isPlayerControlled would evaluate to false here (as would drones and other "allies" built into the game). It only evaluates to true if the ally has a PlayerCharacterMasterController attached to it. Via numerous testing to see if that is attached, I've found that this isn't the case. I actually tried adding it one time and it very much messed up the game, as I needed to populate the object with a ton of Unity info that I could grab at the time.

The AI is pretty dumb right now as it's using the built-in AI framework they wrote. I'll be working on a more intelligent AI in the next coming releases.

I've noticed, wonder if there's a priority system as vanilla minions tend to follow you over go after an enemy. If it could be made to follow you like that or just make its way toward the teleporter it would make it much more interesting.

Hopefully I'll have this improved on the next release. That behavior is what I'm am trending towards (without me adding too much overhead to the built-in code base).

from ror2-protectthevip.

Hanabanashii avatar Hanabanashii commented on August 28, 2024

I think somewhere in making its nameplate forced you made it also considered player controlled... I could be wrong, I'm not big on C#

from ror2-protectthevip.

JustDerb avatar JustDerb commented on August 28, 2024

The nameplate doesn't add/remove anything on the ally, so that shouldn't effect it. If you can repro the behavior I can look into it.

from ror2-protectthevip.

Hanabanashii avatar Hanabanashii commented on August 28, 2024

if (body?.isPlayerControlled == false) { Debug.LogWarning($"Forcing ally {body.GetDisplayName()} to have player nameplate."); typeof(CharacterBody) .GetProperty("isPlayerControlled", BindingFlags.Instance | BindingFlags.Public) .SetValue(body, true);
Maybe this block here? Looks like you set the value to be true if it is false.

from ror2-protectthevip.

JustDerb avatar JustDerb commented on August 28, 2024

Ah, good catch. I might need to look into making it so I don't need to set that to get the nameplate working.

from ror2-protectthevip.

JustDerb avatar JustDerb commented on August 28, 2024

I have a very rough change to the AI in the works. I should expect it to make it into the 1.0.3 release.

from ror2-protectthevip.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.