Repository navigation
Add in-mod devtools: debug file log, debit verification, funeral.* cheats - #1
Merged
Merged
Conversation
…eats For Sam Crafts' in-game testing of menu visibility and fund debits: - funeral_mod_debug.log written beside the .ts4script (cwd/temp fallback); funeral.debug on|info|off toggles it at runtime. - Every household debit recorded with funds before->after (dbg.DebitRecord, kept in a reload-protected DEBIT_LOG) so §764/§63 charges are verifiable, not assumed. - Injection now records a per-object/per-affordance report; the new funeral.verify cheat re-scans the OBJECT manager live and lists carriers vs keyword-matched objects missing the interaction. - New cheats: funeral.verify, funeral.plan, funeral.money, funeral.attendees (picker dry-run), funeral.debug, funeral.log. funeral.status now includes the debit summary. - 21 new unit tests (36 total) for the pure helpers + log writer. - CI: macos-13 leg (setup-python 3.7) alongside the ubuntu container job; tag pushes (v*) publish the .ts4script to Releases. Version bump to 1.1.0. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Two silent-failure paths found in the audit: - attendees.py imported ui.ui_dialog_picker names at module top level; a name moved between patches would raise ImportError inside funeral_mod/__init__, disabling ALL interactions+commands with only a sims4.log whisper. Picker symbols are now imported defensively and build_picker() degrades to a private funeral (already supported). - on_load_complete() registered a callback that never fires when the OBJECT instance manager already finished loading before the script ran; the callback now runs immediately if manager.types is populated. Also: - Import failures now also land in funeral_mod_debug.log, and a 'package initialized' banner confirms the mod actually loaded. - Sim affordances are additionally injected onto phone-ish objects (PHONE_OBJECT_NAME_KEYWORDS) for phone-menu reach. - New funeral.objects [word] cheat scans tuned OBJECT names and marks carriers of Plan Funeral — answers 'is my urn covered?' in one line. - funeral.verify now reports phone injections + manager type count. - INJECTION_REPORT extended (phones, types_count); dbg.name_matches and dbg.filter_debits_for_zone extracted as pure helpers with tests. - README: funeral.objects docs, missing-menu troubleshooting steps, MCCC compatibility section (no supported third-party integration). 42 tests passing. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an in-mod debugging surface so Sam Crafts' in-game test can verify the two things that were unverifiable before: whether the Plan Funeral pie-menu entry actually registers, and whether the §764 host / §63 attendee debits actually leave the right households.
New pieces:
debug_log.py— appendsfuneral_mod_debug.lognext to the.ts4scriptin the Mods folder (cwd → tempdir fallbacks, all IO guarded). Charges, injection results, picker outcomes, summons, buffs and eulogies are logged;funeral.debug on|info|offtoggles it live.dbg.py— pure-Python helpers:DebitRecord(funds before → after per charge,verifiedwhen the drop equals the fee),summarize_debits,describe_event,format_object_check,format_funds_row. No game imports, fully unit-tested.devtools.py— game-facing collectors:verify_report()(injection report + a live re-scan of the OBJECT instance manager listing carriers and keyword-matched objects missing the interaction, fee check, mourning-buff check, active funeral + debit summary),plan_lines(),money_lines(),attendee_lines()(picker dry-run for the selected Sim),selected_sim_info().funds.charge/refundnow read the household balance before and after every debit and append aDebitRecordto a reload-protectedDEBIT_LOG(event.py), sofuneral.plan/funeral.verify/the log file can prove the money moved rather than trustingtry_remove's return.startup.pyrecords anINJECTION_REPORT(per tuned object, per affordance, present/absent in_super_affordances).funeral.verify,funeral.plan,funeral.money,funeral.attendees,funeral.debug,funeral.log(existingfuneral.prices|status|endkept;statusnow prints a debit summary).tests/test_devtools.py— 21 new tests (36 total, all passing) covering the formatters, debit math and the log writer's tail/verbosity modes.test-macosleg onmacos-13(the x64 image wheresetup-pythonstill ships 3.7.17 darwin) and areleasejob that publishes the.ts4scriptto GitHub Releases onv*tags.MOD_VERSION→1.1.0. No behavioral change to the funeral flow itself — only added logging, bookkeeping, and read-only cheat commands.Link to Devin session: https://app.devin.ai/sessions/bbdb41e8d6e0492cb7b59635711d6327
Open in Devin Desktop: https://app.devin.ai/desktop/session/bbdb41e8d6e0492cb7b59635711d6327?variant=devin
Requested by: @CommunityPoke