Skip to content

feat(Chobby): add declarative sharing modes system#23

Open
keithharvey wants to merge 1190 commits into
combined_mod_optionsfrom
sharing_tab
Open

feat(Chobby): add declarative sharing modes system#23
keithharvey wants to merge 1190 commits into
combined_mod_optionsfrom
sharing_tab

Conversation

@keithharvey
Copy link
Copy Markdown
Owner

@keithharvey keithharvey commented Aug 23, 2025

My own copy of the BAR PR #23, which thanks to having cherry-picked mod options in it is noisy. This targets the modoptions branch.

@keithharvey keithharvey force-pushed the sharing_tab branch 3 times, most recently from 8400bc2 to f3fbabc Compare October 27, 2025 20:07
@keithharvey keithharvey force-pushed the sharing_tab branch 12 times, most recently from 22cbe19 to 3660660 Compare November 11, 2025 01:22
@keithharvey keithharvey force-pushed the sharing_tab branch 12 times, most recently from 3b1c0f4 to 0e8daa6 Compare November 20, 2025 19:35
@keithharvey keithharvey force-pushed the sharing_tab branch 2 times, most recently from 9c3b18a to 17e9892 Compare November 25, 2025 23:14
Ruwetuin and others added 28 commits April 5, 2026 01:49
### Work done
Changes to easy tax in this release:
- Resurrecting partly reclaimed wrecks now works, but you are taxed when
inserting metal into the wreck.
- Assisting ally build now works, but you are taxed when doing so.
- New debuff when sharing mobile builder units. They no longer get
stunned, but their buildspeed is 0 for 30 secs. They can still move
around and start builds, just can't unassisted make progress on them
until the debuff runs out.
- Commanders can now be shared.

Complete new ruleset:
- You get taxed 30 % of resources spent when you:
  - Send resources to ally.
  - Overflow resources to ally.
  - Assist ally construction.
  - Insert metal into partly reclaimed wrecks to resurrect them.
- Giving combat units to ally is free and works like normal.
- Giving economy buildings or factories to an ally works, but the
building/unit will be stunned for 30 seconds. This also happens when
taking control of a dead ally's economy.
- Giving builder units (including rezbot and commander) to an ally
works, but the unit's buildspeed is set to 0 for 30 seconds. Unit can
still move around and start builds, just can't unassisted make progress
on them until the debuff runs out.
- Partially built units can't be given (except when upgrading mexes/geos
or taking dead allies).

#### Setup
Enable Easy Sharing Tax modoption.

#### Test steps
- [ ] Write the steps needed to test out the changes. Include the
expected result.

### Screenshot of new debuff gui:

<img width="182" height="162" alt="easytax_icon"
src="https://github.com/user-attachments/assets/a77a9764-29b8-4e0b-8ce6-a8fdbdb43522"
/>

### AI / LLM usage statement:
Claude was heavily used.

---------

Co-authored-by: efrec <ecfrechette@gmail.com>
### Current behavior:
Using `/luaui reload` mid-game turns off LOS shading (fog of war terrain
appears fully lit). `/togglelos` restores LOS shading.

In the "LOS View" widget’s `Initialize()`, LOS is turned off before game
start, otherwise uses the saved `lastMapDrawMode`.

**Reason for no LOS after reload:**
After using `/luaui reload`, the `lastMapDrawMode` value is "normal"
instead of "los", so on initialize LOS is turned off.

### Work done
`Initialize()` now turns LOS off for full view spectating and turns LOS
on for players / player view spectating. Pre game LOS stays off as
before.

**Cleanup:**
`lastMapDrawMode` is no longer needed during initialize, so its config
saving and loading was removed. All LOS changing behavior remains the
same

#### Test steps
- [ ] Test pregame, midgame, and spectating LOS changes during normal
play, and with `/luaui reload`

#### BEFORE:
<img width="235" height="168" alt="los1"
src="https://github.com/user-attachments/assets/69f7f10f-8a8a-4dca-b277-5ff655ce786a"
/>
<img width="235" height="171" alt="los2"
src="https://github.com/user-attachments/assets/83ad9e58-a075-439e-a6f6-019ce4227a4c"
/>

### AI / LLM usage statement:
Gpt used to find the source of the issue and iterate on the solution
…son#7350)

When joining a new match the camera should remember the old camera
state. For spring camera if the cardinal lock direction setting is
turned on, then the camera yaw can be rotated from the last state. This
PR computes the engine applied cardinal lock rotation and accounts for
it before clamping the rotation back near 0. An LLM was used to write
the reversal logic to the engine side code.

Test by rotating the camera >360 degrees and then reloading the widget,
especially to cardinal locked values. The camera should not move.
Added utliity function string.facingToHeading
Another quick fix for the home grid priority. Also moved the loop so it
works for: fully defined grids (from base game), undefined buildoptions,
and modded grids with both incomplete definitions, and superfluous
non-buildable definitions.

#### Addresses Issue(s)
- [Issue
URL](https://discord.com/channels/549281623154229250/1018861299939168288/1490066963328667840)

#### AFTER:
<img width="1309" height="607" alt="image"
src="https://github.com/user-attachments/assets/533173df-b1e1-4993-babc-7d62138880d9"
/>


### AI / LLM usage statement:
Only argued with copilot for a bit but it couldn't understand these
loops either.
- Fixed missing spectator notifs for Razkharn and Winter.
- Filled some missing notif sounds with usable placeholders.
…reason#7239)

### Work done

- Groups unit weapons based on whether they can be used together (e.g. weapons that can fire only above and only under water) so we can separate their DPS totals (and etc).
- Adds the "secondary" weapon role for filtering some weapons.
- Applies some missing `bogus = 1` customparams on fake weapons.
- Adds `table.sortStable` for in-place sorting with stable ordering.

Co-authored-by: efrec <quantumscrewdriver@gmail.com>
The `RecvLuaMsg` filter uses `and` instead of `or` between two negative
checks, so messages from other gadgets can pass through if the first two
characters match the validation prefix.

Triggers in the rare instance of the random 2-char prefix matching the
start of another LuaMsg (`"jo"` matching `"joined_game"`, `"vo"`
matching `"vote_skip_turn"`), causing `numActivePlayers` to stay at 0
and blocking sharing to that team. Some players recover when a later
`idleplayers` message overwrites the bad state.

Confirmed by parsing `NETMSG_LUAMSG` from 3 bugged replays:
- [6/16 players
stuck](https://discord.com/channels/549281623154229250/1453276831569547435)
— validation `jo`, collision with `joined_game`
- [2/16 players
stuck](beyond-all-reason#5969)
— validation `jo`, collision with `joined_game`
- [8/8 players
stuck](https://www.beyondallreason.info/replays?gameId=ffa6d269c17cc2f62e9ff2720ad441d9)
— validation `vo`, collision with `vote_skip_turn`

Fixes beyond-all-reason#5969

 AI / LLM usage statement
Claude used to create a replay parser and analyze bugged replays
We can now send many named variables to interpolation and as long as we're using the named parameter pattern instead of the string interpolation pattern we're fine to send too many.
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.