VedalAI / neuro-amongus

Among Us Plugin for Neuro-sama
GNU General Public License v3.0
540 stars 49 forks source link

Add support for Airship #6

Closed Vedal987 closed 1 year ago

Vedal987 commented 1 year ago
tokidokitoky commented 1 year ago

I figured out how to use the game's own room definitions, and wrote a new "universal" implementation of GetLocationFromPosition() in PR #7 that should address your first point and work with any map.

Alexejhero commented 1 year ago

In #13 the grid size was increased from 200 to 500 which should allow this to work for any map in theory. I will test to make sure that that's the case.

Vedal987 commented 1 year ago

There are still some issues on other maps that need addressing.

ScrubN commented 1 year ago

Mira needs to have the decontamination doors added to the exclusion list, along with the ability to press the buttons to open the doors. There are also some other rooms that seem to lack node points.

note, this has been fixed note, this has not
image image

Edit: it seems the decontam doors are named "Collider", hence why they were not being excluded...

ScrubN commented 1 year ago

On Mira, hallways seem to have null colliders as well, causing an NRE when calling GetLocationFromPosition().

ScrubN commented 1 year ago

Doors anyone?

https://user-images.githubusercontent.com/72096833/228434617-2086cb5b-5c0b-4f00-86e0-da0e5aabc8d4.mp4

Morgul commented 1 year ago

Doors anyone?

That's awesome!

ScrubN commented 1 year ago

I believe I have found all of the remaining issue spots on Polus. The solution for most seems to be increasing the node grid resolution or loading the nodes from a precomputed file that has been hand-altered.

Edit: I increase the grid density by 25% and it fixed every single issue on Polus, seemingly without impacting continuity/flood filling though CPU usage on my system increased by about the same amount (8-10% -> 10-12%).

Click for images Lab | ![image](https://user-images.githubusercontent.com/72096833/228766929-5fc817a1-a6f4-4017-a7e7-0df7cf13198c.png) | ![image](https://user-images.githubusercontent.com/72096833/228767238-0496a818-4ec0-4ccc-aadb-3e1f9d98a5d4.png) | |--------|--------| Lab | ![image](https://user-images.githubusercontent.com/72096833/228766981-6139d229-e8eb-4539-bb22-d9830398d157.png) | ![image](https://user-images.githubusercontent.com/72096833/228767007-362d2bff-3050-4a61-818f-2bafde47d269.png) | |--------|--------| Lab | ![image](https://user-images.githubusercontent.com/72096833/228771073-49bd15dc-8087-42b8-9f79-aba7c03339e1.png) | |--------| Specimen | ![image](https://user-images.githubusercontent.com/72096833/228768452-8be6d2a4-7f76-4dae-a15f-7049cd8161ab.png) | |--------| Outside below electrical - it seems sometimes pathfinding tries to go to a node through a fence, however it also seems to correct itself on the next update. | ![image](https://user-images.githubusercontent.com/72096833/228769359-d01b6085-e152-478c-96a3-cb3a57d6ab2e.png) | ![image](https://user-images.githubusercontent.com/72096833/228769696-03df04c3-73ef-4f10-b4d3-ccfd8cc1ecf3.png) | |--------|--------| Outside above electrical/security | ![image](https://user-images.githubusercontent.com/72096833/228770345-d1d8bdbe-68b8-4678-aa9e-f6616163e58f.png) | |--------| Immediately outside of lab | ![image](https://user-images.githubusercontent.com/72096833/228770705-430434ba-b9e1-4cf8-9149-09afe872ec3b.png) | |--------|
Alexejhero commented 1 year ago

@ScrubN Will you make a PR to fix this?

ScrubN commented 1 year ago

@ScrubN Will you make a PR to fix this?

As in to increase the node density? I plan on it. #27

Alexejhero commented 1 year ago

Following #27, here are some other potentially problematic spots I found

MIRA HQ, Greenhouse, weird path will be taken to Divert Power ![image](https://user-images.githubusercontent.com/32238504/229325355-a19c363b-9cb6-4e2d-ad81-f8b43bea21c0.png)
Polus, Office, cannot path above meeting table (does this matter?) ![image](https://user-images.githubusercontent.com/32238504/229325438-a80cb560-f07a-444a-add3-6554a50aa6b1.png)
Airship, Electrical, grid is probably generated before doors are randomized ![image](https://user-images.githubusercontent.com/32238504/229325543-5b5e8a5d-dd54-4fcc-9824-ffd566df7787.png)
Airship, ladders aren't connected (I know this was already a TODO) ![image](https://user-images.githubusercontent.com/32238504/229325599-180d540e-3ccd-4abc-b95d-6dbfd83bf9bd.png)
ScrubN commented 1 year ago

MIRA HQ, Greenhouse, weird path will be taken to Divert Power

I thought that power terminal was completely inaccessible, I guess that means MIRA works now. I know the path is unconventional, but the other option is manually tweaking offset values per-map.

Polus, Office, cannot path above meeting table (does this matter?)

I promise this worked when I tested initially. Yes it does matter, I have noticed the pathfinding permanently breaks when leaving the node grid for more than 0.5 seconds. I guess we really do have to manually tweak offset/density values

Airship, Electrical, grid is probably generated before doors are randomized

I noticed that too. Not entirely sure about it but we'll figure it out

Airship, ladders aren't connected (I know this was already a TODO)

Ladders are a tough subject. I have a local stash that works with ladders except for some stupid reason the meeting room does not get flood filled and I don't know why.

Alexejhero commented 1 year ago

All maps are ok now except airship, #35 will be merged soon as well.