User:Gaz Lloyd/alt1/construction contracts
The Construction Contracts alt1 app is used to assist with Construction Contracts. It reads the in-game interface and calculates what you need to bring, provides a map of the location, and optionally notifies you of any special notes with the contract.
Installing[edit | edit source]
Installing the app is easy. Simply visit https://chisel.weirdgloop.org/gazproj/alt1/contracts.html and click the link there. You can also open that link in the alt1 browser and click the add app button.
Adding the app and granting the permissions is required for it to work correctly:
- View screen - so that the app can detect and read the interface
- Get game state - so that the app can use OCR to read the interface reliably
- Show overlay - to show the detected area overlay and show tooltips
Without installing the app, it can only accept pasted images to calculate the materials and location. It otherwise cannot provide the other functionality.
Usage[edit | edit source]
Just opening the app should be sufficient to get it running, though you can also click the 'read contract' button. Make sure the construction contract interface is open and visible on your screen and is (mostly) unobscured.
When the interface is detected, the app will display some boxes on the screen of where it found the interface and key parts within it. Notably:
- a 153 by 231 pixel area surrounding the contract content (the main area it reads)
- the locations of the red Xs and/or checkmarks
- the locations of the furniture name
- the location of the NPC location text
If you move the minigame interface around, or the app otherwise seems to fail to find the interface, the 'reset detection' button under settings will force the app to try to find the interface again.
Under the 'show/hide settings' button you can change some settings:
- Plank - change which plank you use to change the material output and XP calculation
- Nails - change which nail you use to show your nail in the interface (nails don't affect XP)
- Autorefresh - toggle this on to have the app automatically watch the interface and update as you complete things or get a new contract. Toggle it off if the app appears to be lagging
- Show tooltip for other materials - when a material that isn't planks, nails, bolts of cloth, or white candles is required, that item is added to a tooltip near the cursor. The tooltip will vanish when you complete the furniture that requires that item, or if you toggle the checkbox off.
- Show tooltip for bench - shows a tooltip near the cursor when an outside bench is required. The tooltip will vanish when you complete the bench, or if you toggle the checkbox off.
- Reset detection - force the app to re-find the interface if you moved it.
- App information - links to here
- More apps - links to User:Gaz Lloyd/alt1
Notes and known issues[edit | edit source]
- Beds are often overestimated - the interface doesn't specify large bed or small bed, so if the NPC has both, it will assume large beds before small beds, so that you always bring enough materials.
- It should be reasonably reliable at detecting things but I can't guarantee that, so please post examples if it misreads or fails to read something (stuff may vary with graphics/renderer/etc).
- It should work in legacy skin/UI.
If you're feeling adventurous, I have a development version of the app here: https://chisel.weirdgloop.org/gazproj/alt1dev/contracts.html - you are free to use this in addition to/instead of the stable app, but be aware that if I am actively working on it, features may randomly change, break, or whatever. Let me know if you're interested in being a beta tester for this app so we can communicate when I make changes!
The app is open source at https://github.com/GazLloyd/ConstructionContractsAlt1.
Feedback[edit | edit source]
If you have feedback for me, feel free to let me know by any method:
Version history[edit | edit source]
- Completely rewritten to be much more object oriented and less laggy.
- Now saves an interface location and only reads that area for changes, unless it is required to find the interface.
- Displays rectangles onscreen marking where the detected interface is.
- Added a button to force a redetection.
- As it is much less laggy, autodetect (now autorefresh) is on by default and the setting persists.
- Settings are moved into a show/hide menu.
- Changing plank or nail settings now more cleanly updates the output
- Added optional tooltips for nonstandard materials and benches
- Added promo links
- Furniture now tracks its completion status, and will be crossed out when complete (best used with autorefresh)
- XP information has been refined down to just show total XP by default, and the breakdown is found by hovering over the total XP.
- Some minor CSS changes.
Launched with base featureset:
- Finds interface
- Calculates materials, xp, location
- Optionally change plank and nails
- Optional autodetect