Starbound

Starbound

76 ratings
Better Crew
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
187.176 KB
5 Sep, 2023 @ 8:49pm
5 Dec, 2023 @ 9:40pm
3 Change Notes ( view )

Subscribe to download
Better Crew

In 4 collections by Vix
Viksh&frens Collection
175 items
Viksh&frens Collection -sfw *BONK*
170 items
All Vix Mods
24 items
BetterCrew and BetterCrew Patches
5 items
Description
Originally posted by Vix:
I'm solely the uploader.Actually now we're on my fork, since some stuff needed patching in the base mod.
rl_starbound
is the original author of rl_bettercrew[github.com] .
Since it wasn't on the Steam workshop and the license allows it, I took on myself to summarize slightly the description (character limits) and I'm trying to provide basic support from my understanding and usage experience of the mod.
Very important patches for Custom Races:
This is the most recent more-better version of the mod!
While being more advanced, it also makes more modifications to lua files, and might introduce conflicts.
To find the last version of the mod before that milestone of functionality, go for the diet version!
(diet Better Crew won't receive any more update)

DO NOT use both versions at once.

Summary
You recruit twelve NPCs to become your ship's crew, and then what happens onboard? They all mob the teleporter and ignore the rest of your ship.

NPC behaviors in Starbound are quite simplistic, and this becomes most obvious in crew behavior onboard the player's ship.

Better Crew upgrades your Crew from brainless beefcakes to the average chihuahua.

How work:
The ADHD issue
The idea behind this mod is based on the mod "Smart Crew" by metamorphexx. In that mod, each crew type has a hard-coded list of objects that attracts that crew type, and on each behavior tick, each crew member searches the player's ship for each object on their type's list and moves to one such object, if found.

Issue with that is that this search would happen on each behavior tick, for each crew member, for each object in the crew type's list.

In Better Crew, as each object placed into the ship world that contains crew anchors registers itself and its location with the ship's TechStation (S.A.I.L. panel). Be sure to have the patches mentioned above for modded races/ships/furniture!

The need to rest instead of loitering
Normally, no NPC will attempt to sleep in a bed further than 50 blocks or sit in a chair further than 80 blocks from their spawn location, which on the ship is the teleporter.

In Better Crew, the search radius for beds and chairs is 250 blocks for crew members onboard player ships, which should sufficiently cover all vanilla ship classes.

Shipboard Duty Stations and Patrols
While onboard the player's ship, each of the twelve crew types will now be attracted to certain objects, if present. These objects will pull the crew away from their spawn location (i.e., the teleporter). If you have done a good job designing your ship's spaces, this should result in the crew spreading out throughout the ship and moving around in a way that feels natural.
In general, crew are attracted to objects that are related to their occupations.

In Better Crew, it patches over 100 vanilla objects with crew anchor tags.

The bug of having too much determination
Starbound's simplistic behavior logic also hides a significant bug, which is why on some other mods and vanilla, your crew seem to lack brain functions and just derp out for half an hour or more.
A few of the vanilla uses of moveToPosition function are wrapped inside of a timeout behavior, but the vast majority were not. An NPC stuck waiting for a path to open to its targeted object will continue to wait indefinitely, or until a higher priority behavior is triggered (e.g., combat, or the player interacting with them).
Resulting in NPC Freezing.

In Better Crew, this has been fixed.

Doors.
Issue is that, you might like your racial ship doors. But moving around your ship, manually opening and closing doors is annoying, so you wire proximity sensors on either side of each door.
Which to the game's path finding, counts as a closed and locked door, because something is wired to the input node, even with a proximity sensor. So NPCs would only go through doors if they happened to wander close enough to open then, then the game would see the door as an opened locked door, and consider pathfinding through it, and stop doing so as soon as the door closes again.

In Better Crew, the solution chosen was to make all racial ship doors to open automatically. You should be mindful of this issue for all non-automatically opening doors still though. Note that the game's path-finding logic is in its C++ code, so modders cannot fix this directly, and have to work around it.

Admin Heathens
Starbound's stealing mechanic penalizes players for breaking blocks or objects in villages, which is fair!
But then, when an Admin wants to maintain/tweak the area, it will trigger a literal riot... an utterly useless one, against an Admin. Even if you wanted to clean up the aftermath loose silt blocks of a sandstorm or something.

In Better Crew, NPCs don't try to oppose their universe's godly beings. Smart!

Compatibility Notes
  • Do not try to use this mod with Corbent's interactive crew or Smart Crew installed. They are mutually exclusive as they serve similar purpose.
  • Meanwhile, it seems to trade nicely with some other crew customization, like Crew Customization +, since they don't really touch on the same functions, and with Interaction Control too.
  • Reported incompatible with Borderlands 2 Random and Unique Shields.
Modified Lua
This mod makes significant structural changes to the following behavior files:
  • /behaviors/npc/crew/combat.behavior
  • /behaviors/npc/crew/notifications.behavior
  • /behaviors/npc/inspect.behavior
  • /behaviors/npc/npcblink.behavior
  • /behaviors/npc/patrol.behavior
  • /behaviors/npc/play.behavior
  • /behaviors/npc/reactions/comfort.behavior
  • /behaviors/npc/reactions/flirtwithplayer.behavior
  • /behaviors/npc/reactions/pianoparty.behavior
  • /behaviors/npc/reactions/playairhockey.behavior
  • /behaviors/npc/reactions/watchsleeping.behavior
  • /behaviors/npc/sit.behavior
  • /behaviors/npc/sleep.behavior
  • /behaviors/npc/wander.behavior
  • /behaviors/tenant/returnhome.behavior
If this mod is combined with any other mod that modifies any of those behavior files, broken NPC behaviors and/or instantly-dying NPCs are likely.

This mod replaces the following Lua functions with improved versions:
  • /npcs/bmain.lua: setNpcItemSlot
  • /scripts/actions/npc.lua: swapItemSlots
  • /scripts/actions/query.lua: findLoungable
  • /scripts/actions/reaction.lua: playBehaviorReaction
If it is combined with any other mod that modifies any of these functions, conflicts will happen.

Miscellaneous Bug Fixes and Tweaks
And cues for other mod authors if they want to patch stuff for compatibility
Running out of space, check Change Notes!
Uninstallation
This mod make no modifications to any game state. You should be able to add or remove it at any time.
61 Comments
Erelae 18 Feb @ 10:24am 
Current playthrough, I had fired my near-complete crew because they were annoying me so much. Finally bit the bullet and got this mod today. It is already working beautifully with only two crewmembers. I have an engineer and a chemist, and they are doing what they do, as far as they are able since I am not through setting up my ship. Faaaantastic. I got so *tilted* at these buggers' tendency to cluster around the teleporter. Now here's hoping I don't hire someone who constantly follows me around doing the hearts emote. -_-
Vix  [author] 21 Jan @ 12:01pm 
@BlueDragonKnight
It would basically need to remake the whole anchor&job system to basically dynamically create persistent tags and add them to specific object... an absolute nightmare. Possible, but like, BIG endeavor.

@Mabra
Both make big modifications to AI and pathing and a bunch other things, and unlike json files that can be patched (like for items, objects, status effects, etc), lua scripts can't be patched. If one wanted to do such thing as a BC+CIC compatibility patch, it would probably be itself as script-rich as either mod is, and you'd be better off just making a new mod from scratch.
Mabra 20 Jan @ 4:44am 
In what way is Corbent's interactive crew incompatible ?
It doesn't seem to serve similar purpose.

Oh, and does this include the fix for beds disarming NPCs ?
BlueDragonKnight 6 Jan @ 9:52pm 
Out of curiosity, would it be possible to assign anchors to specific crew members, unrelated to their task? As i gather, this mod lets you at least somewhat assign rooms to crewmates by putting an anchor object into said rooms, but let's say you have 2 mechanics for example, they would also share those anchors.

So basically, could one make an anchor item (like the spawn thingy from settles for example) with which you interact and set a specific crew member to practically assign them their own rooms?
=Longhooter= 6 Jan @ 6:35pm 
i searched my mods by "dungeons" tag only to find these three under it
"Galactic Dungeons"
"Starbound Patch Project"
"Betabound!"

the "Betabound!" mod i had for a while now before the issue showed up though it doesn't hurt to check it just in case it brakes something
=Longhooter= 6 Jan @ 6:29pm 
i see, well two mod that add or edit npc structures is "Galactic Dungeons" i have been called a thief when editing in them though im unsure if that mods incompatible with your one or not
Vix  [author] 5 Jan @ 9:06pm 
Well, you're not the only one confused, I have been unable to reproduce the issue on my end.

The only reason I can think of that the patch would error out there would be because an other mod was removing a key before BetterCrew did, but I don't know what mod would cause that.
Without knowing what mod did that, I can't exactly tweak/do something on my end to ensure compatibility.
=Longhooter= 29 Dec, 2024 @ 2:57pm 
Update 29/12/24: Found a fix for it though still confused to why it worked. Solution: Teleport to my ship, save and quit, remove this mod and the two MegaPatche's, launch the game, spawn in the ship, save and quit, reinstall mod's, reload the game.

I did all that just to un-op and re-op myself as admin only for the ai to ignore me when i brake something. seems the game thought i wasn't in admin mode when i was
=Longhooter= 27 Dec, 2024 @ 7:38am 
Clip from starbound.log
[Error] Could not apply patch from file /player.config.patch in source: D:\SteamLibrary\steamapps\workshop\content\211820\3031599475\contents.pak. Caused by: (JsonPatchException) Could not apply patch to base. (JsonPatchException) Could not apply operation to base. (TraversalException) Could not find "stealing" to remove
Im unsure how to fix this as i have no mods that alter NPC ai
=Longhooter= 27 Dec, 2024 @ 6:56am 
what file dictates whether ai ignore players in admin again?