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

Added ability for NPCs to be spawned in a way that they can be seen in the RA #157

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

TtroubleTT
Copy link

@TtroubleTT TtroubleTT commented Oct 26, 2024

…mode

Description

Describe the changes
Dummies that declare their userID as PlayerAuthenticationManager.Host will use ClientInstanceMode.Host. This will make it so those dumbies can be seen in the RA making it easier to test.

What is the current behavior? (You can also link to an open issue here)
Current behavior is no matter what setup you use in NPC.Spawn() the dummies won't be seen in the RA.

What is the new behavior? (if this is a feature change)
New Behavior makes it so if you set the userId to PlayerAuthenticationManage.Host then it will spawn a dummy with ClientInstanceMode.Host and you will be able to see them in the RA.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Shouldn't break anything as you would have to specifically set the userID to PlayerAuthenticationManager.Host.

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@VALERA771
Copy link

Can you also change this in another spawn method?

@TtroubleTT
Copy link
Author

Can you also change this in another spawn method?

Like make another spawn method. What about just making Host be an option you put in as a string?

@Tamago4a
Copy link

You don't need to do this. Why should I see NPCs in the player list? If I need to get NPCs, I use Npc.List. We've been making it possible for NPCs to work normally on the server for a long time, and now someone wants to break everything again.

@TtroubleTT
Copy link
Author

You don't need to do this. Why should I see NPCs in the player list? If I need to get NPCs, I use Npc.List. We've been making it possible for NPCs to work normally on the server for a long time, and now someone wants to break everything again.

Current way it works makes it hard to test things with NPCs as they don't show up in the RA. If I make it an override wouldn't all of your stuff keep working as youd have to specify host specifically.

@TtroubleTT TtroubleTT changed the title Fix NPC's not being seen in the RA if you don't use dedicated server option Added ability for NPCs to be spawned in a way that they can be seen in the RA Oct 26, 2024
@TtroubleTT
Copy link
Author

Ok iv now changed it so where it shouldn't mess with any current functionality but lets ppl choose if they want to use the mode that lets them show up in the RA.

@Tamago4a
Copy link

Ok iv now changed it so where it shouldn't mess with any current functionality but lets ppl choose if they want to use the mode that lets them show up in the RA.

This option is more acceptable. However, I still don't fully understand how it will work in practice.

@TtroubleTT
Copy link
Author

Ok iv now changed it so where it shouldn't mess with any current functionality but lets ppl choose if they want to use the mode that lets them show up in the RA.

This option is more acceptable. However, I still don't fully understand how it will work in practice.

The orginially use for NPCs wasnt like for gameplay plugins. It was for testing other plugins using them as sometimes its hard to find other people to get on and test with you. If you dont spawn them as Host they won't show up in the RA and it makes it really hard to set their class or all the other commands.

@github-actions github-actions bot removed the Events label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants