Skip to content

Conversation

WinterSolstice8
Copy link
Contributor

@WinterSolstice8 WinterSolstice8 commented Aug 31, 2025

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Adds spawn group/spawn slot plumbing
Only these mobs in Korroloka Tunnel are hooked up atm
image

The rest are ungrouped

Steps to test these changes

zone to Korroloka Tunnel
!gotoname Clipper 10
Kill grouped/ungrouped mobs, see them respawn correctly. In the case of grouped mobs, some should cycle in/out.

@WinterSolstice8 WinterSolstice8 force-pushed the spawn_groups branch 6 times, most recently from 7575fd7 to 6d34522 Compare August 31, 2025 16:52
@WinterSolstice8
Copy link
Contributor Author

TODO: Night/Day only spawn checks. It doesnt look like we have enough data to know how exactly that works

@UmeboshiXI
Copy link
Contributor

TODO: Night/Day only spawn checks. It doesnt look like we have enough data to know how exactly that works

Just some info. A good test case for this might be the Ceremonial Dagger drop.

Dagger drops off skeletons that only spawn at night but they share spawns with 2 goblins at the same location.

@Frankie-hz
Copy link
Contributor

Another note: when you despawn a mob because of distance it respawns in 80-90 seconds. Trying to narrow down the timer a little more but it seems to be around there. Testing a bunch of things to narrow some more things down.

It does NOT always spawn the same id. It can pick anything from the pool.

@WinterSolstice8 WinterSolstice8 force-pushed the spawn_groups branch 2 times, most recently from d6131cb to da0c011 Compare August 31, 2025 18:29
@WinterSolstice8 WinterSolstice8 marked this pull request as ready for review August 31, 2025 18:40
@WinterSolstice8
Copy link
Contributor Author

I think this is good to go, though I don't have the night/day spawn in stuff yet. That can come in a future PR. This PR won't break anything that's not in a group (and it only adds ONE group) so i don't think it's a problem

We're working on getting info on how the night/day only spawns/transitions works (unfortunately it's hard to test due to really only being able to do it once per game day on retail...)

@WinterSolstice8 WinterSolstice8 force-pushed the spawn_groups branch 5 times, most recently from 2a887f6 to 3d2f689 Compare September 1, 2025 18:47
@Frankie-hz
Copy link
Contributor

Everything seems to work. Killed all mobs several times at once, staggered, etc. always spawned with correct number of spawns and correct mob IDs.

@WinterSolstice8 WinterSolstice8 force-pushed the spawn_groups branch 3 times, most recently from a6f16ae to 8476e2b Compare September 3, 2025 20:04
Copy link
Contributor

@MowFord MowFord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks sane and very light on the manual data entry.

Have you thought at all on lua bindings to allow definitions in mob lua alongside (or instead of) the sql data?

My thought was perhaps the spawn groups being able to be the lowest mobid in the group. I think spawn_group.h defines it as uint32, but the sql table is only tinyint. This should be fine since we don't want hardcoded mobids in the sql table anyway, just sharing my thoughts on the future of the system

@Frankie-hz
Copy link
Contributor

I might not be understanding what you mean but the groups aren't always in specific ID order. There are several cases where that is not true and the groups skip IDs.

This is somewhat hardcoded anyway because groupings need to be assigned to specific mob ids.

@MowFord
Copy link
Contributor

MowFord commented Sep 8, 2025

absolutely, my point is that if we were to assign spawn groups in onMobInit functions, we'd need a clean way to not step on the toes of other existing groups:

  • one way is to loop over and get the next unused
  • another way is to just use a mobid as the spawn group unique ID

Copy link
Contributor

@zach2good zach2good left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spoke to Winter about the C++ and performance characteristics of this last week, should all be good 👍

@WinterSolstice8
Copy link
Contributor Author

Need to retest this after a conflict from rebase once I get home

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.

5 participants