Giter Site home page Giter Site logo

suhrmann / anno-1800-calculator Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 38.38 MB

A production chain calculator for Anno 1800

Home Page: https://suhrmann.github.io/Anno-1800-Calculator/

License: MIT License

JavaScript 28.16% HTML 0.63% Vue 71.21%
calculator vue desktop anno 1800 vuetify

anno-1800-calculator's Introduction

Anno 1800 Calculator

Build Status


There are two versions of the calculator: An online version and a Desktop App.

Online Calculator

No download, no install. Just calculate: Anno 1800 Calculator

Download App

The Desktop App (for Windows, MacOS and Linux) does not require a Internet connection once downloaded.

Download here


Changelog:

  • 2022-11-11 v0.4.13 Bump electron from 15.5.5 to 18.3.7 PR #71
  • 2022-10-24 v0.4.12 Update dependencies from dependabot (inter alia bump electron to 15.5.5)
  • 2022-03-19 v0.4.11 Update dependencies using yarn
  • 2022-03-10 v0.4.10 Show version info in About view
  • 2022-03-10 v0.4.9 Bug fixes and performance improvements...
  • 2022-03-09 v0.4.8 Switch ordering in sidebar: first Demands second Chains
  • 2020-01-02 v0.4.7 Fix layout of production chains
  • 2020-01-02 v0.4.6 Refactored Vuex - thx to Cahllagerfeld
  • 2020-01-01 v0.4.5 Replace greedy Travis-CI with GitHub Actions! ๐Ÿš€ Fix some smaller issues
  • 2020-11-06 v0.4.4 Fix builds for Windows, Linux and MacOS
  • 2020-11-04 v0.4.4 Hot fix demands calculation (population, not residence) and correct "productionTime" of "Coal Mine"
  • 2020-11-03 v0.4.3 Finally add all production chains (by now)
  • 2020-11-03 v0.4.2 Add population demands for population of all DLCs, by now
  • 2020-11-02 v0.4.1 Working options in production chains & lots of fixed bugs
  • 2020-11-02 v0.4.0 Update dependencies to latest version - i.a. Vuetify 2, giving full facelift, bug fixes, ...
  • 2020-10-20 v0.3.0 Merge pull request #24 dependabot, fixing critical issue in electron
  • 2020-05-11 v0.3.0 Load production layouts from Anno 1800 Wiki
  • 2020-05-11 v0.2.0 Smaller changes (meta info, UI enhancements, ...)
  • 2019-02-08 v0.1.0 Basic features working ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

Developers

Documentation [Wiki]

We developed this project completely in our free time so please dont expect too much from the documentation. If you have questions, feel free to contact us via mail, issue (especially bugs and errors), PR etc.

The technical documenation is done in the Wiki of this repo. Among others there is CI/CD via Travis-CI and the data structure described.

Project setup for developers

# Get Project
git clone https://github.com/suhrmann/Anno-1800-Calculator.git
cd Anno-1800-Calculator

# Install dependencies
npm install

# Compile and hot-reload for development
npm run serve

# Build desktop application with electron-buiilder.
npm run electron:build

CI / CD

Continuous Integration (CI) and Continuous Delivery (CD) use GitHub Actions. The workflow scripts are located in .github/workflows.

  • The CI script build.yml builds the website on ALL pushs and pull requests
  • The publish (CD) scripts release-electron.yml to publish Electron on GitHub Releases and release-gh-pages.yml for Web on GitHub pages react to Git tags "v*".

Publish a release:

  1. Update version in package.json e.g. "version": "0.4.5"
  2. The publish scripts react to Git tags "v*", so to publish a release, tag your commit and push both e.g.:
    1. git tag -a v0.4.5 -m "New version v0.4.5" - commit and tag (note the version is prefixed v )
    2. git push && git push --tags and push (don't forget the tags!)

Used Technologies

Core Technologies:

  • Electron - Build cross platform desktop apps
  • Vue.js - Progressive JavaScript Framework, really helpful for single-page applications
  • Vuetify - Material Design Component Framework for Vue.js

Dependencies

  • vuex - state management pattern + library for Vue.js
  • vue-tree-chart - Vue.js component to display tree chart, really awesome โญ
  • v-tooltip - highly customizable tooltips
  • vue-router - Official Router for SPAs created with Vue

Legal

This project is licensed under MIT License.

anno-1800-calculator's People

Contributors

cahllagerfeld avatar dependabot[bot] avatar suhrmann avatar tbfuerst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

svelhinh tbfuerst

anno-1800-calculator's Issues

Suggestion: houses instead of amount of people

The calculator is easy to read (I'm pretty new to the game) and very complete, BUT, I see the same flaw I saw in almost all Anno xxxx calculators I used. In all of them you must enter the amount of population and in my opinion is the incorrect approach. I don't build people, I build houses, I want to know how many houses of each type I need,
It's not very usefull to have a calculator if then I have to calculate by myself how many houses of each type I need to house that amount of farmers-workers, etc.
How about we enter the amount of houses of each type and the calculator multiplies the houses by the max occupancy and then calculates the resources?

Best of whishes!

User-individual-Settings on Settingspage

Some 'suggestions' for the settingspags

  • The Application should only use the DLCs which are selected on the Settingspage.

Feel free to add functionalities which are needed as user-individual settings.

Greets Cahllagerfeld

Option to display consumption as one / two entries

Separate occurrences for luxury and basic cigars are completely fine in consumption column, if anyone need it, adding those two values will be super easy, everybody can do it in their head. Good idea with pop-up message.

However there is a problem when it comes chains efficiency. We see that we need X% efficiency on x cigars chains and Y% efficiency on y cigar chains. X% and Y% cannot be easily added, and we have to choose efficiency for whole island, so separate values here meaningless. Unless of course we have separate cigar production chains on two islands. I don't use those values, but I guess many people would.

Conclusion: the best would be to somehow combine appearance of cigars in table when consumable are not filtered. I doubt it will be as easy fix though.

#13 (comment) by GrumpyCatastrophe

Settings for production/residents modifiers

Despite the numbers are good I think what matters is knowing how many of each buildings you need and not the actual production value, many times people focus on the numbers but forget the "customer" needs to know how many grain farms they need instead of checking the production and calculating how many they should build. It would be interesting if it shows the different possibilities (2 farms / 1 farm +tractor, and such).
See #32 by Joe78man

Read population directly from the game

Read the population automatically from Anno 1800

1. OCR read population values from screenshot (e.g. of statistic building)

@NiHoel implements this feature in his awesome @NiHoel / Anno1800Calculator, using his @NiHoel / Anno1800UXEnhancer - both MIT licensed

Reader functionality of the calculator website is implemented in class PopulationReader

UPDATE: Proof of concept works like charm!


2. Read population from memory

Directly read the population values from memory.

JulesRenz / Anno1800MemoryReader
Update: Anno1800MemoryReader does not seem to work (all population = 0)


3. Query population with API

Anno 1800 seems to have a python API

Nick11 / anno1800_python_api_prober

Multilanguage support

Hey Guys,
I really appreciate the effort you already put into the project.
When reading the code, I saw your texts in the template sections are hardcoded.
Is multilanguage-support (via i18n for example) planned?

Greets
Cahllagerfeld

add building planner / building stack

Add functionality to plan out a city.
User should be able to add buildings or production chains to a stack.
A demands calculation should be possible for this building stack
In addition, the user should be able to add population on top manually

Vulerability in Dependencies

I got a Notification in my Fork from Dependency which says there are 2 vulerabilities in the following two dependencies:

  • electron
  • highlight.js

Maybe a version bump has to be made for these dependencies.

implement navigation guards

before routing to a specific component, a navigation guard should check if default values should be loaded or if these values are already provided

example 1:
have a number of residents -> link to demands which calculates demands for that specific number

example 2:
have a certain demand calculated -> link to the corresponding production chain calculator UI to calculate the needed buildings

Production Chains - Workforce demand - Engineers

Fail to count workforce demand : Engineers ONLY
In production chains tools, engineers count is false

  • 2 Test exemple (Light Bulb Factory & Cab Assembly Line)
  • I've check your producers.json, is correct

Test 1 : Light Bulb Factory
ampoule

Light Bulb Factory at 150 Engineers => 2x => 300 Engineers
Filament Factory at 150 Engineers => 2x => 300 Engineers

we need 600 engineer instead of the 550 give by the tool

ampoueUsine
filamentUsine



Test 2 : Cab Assembly Line
voiture

Cab Assembly Line at 500 Engineers => 4x => 2000 Engineers
Motor Assembly Line at 250 Engineers =>6x => 1500 Engineers
Coachmakers at 150 Engineers => 8x => 1200 Engineers

we need 4700 engineer instead of the 4900 give by the tool

screenshot_2019-08-25-08-54-26
screenshot_2019-08-25-08-54-30
screenshot_2019-08-25-08-54-28


Thx for your work !!

Bug in Group-Function at Resident Demands Data Table

When using the Group Function, one value gets displayed 'next-to'-the Table. When removing the group, everything looks fine again.
Steps for reproduction:

  1. Click on Group in table header => Table looks kind of 'messy'
  2. Click on X to remove Grouping again => Everything looks fine again

Investors do not increase consumption of cigars

In game cigars are used by investors and obreros. In calculator, investors do not increase consumption of cigars, while obreros do. Most likely connected to the fact that cigars are both basic and luxury items.
cigars

Ability to change number of residents per house

I've modded my game to have different residents per house than the native game. Is there a way I could tweak your calculator to account for this? If there's somewhere that I can change in the source code, and rebuild (using the desktop app), that would be great, but I don't know how or if that's possible.

Thanks!

[Add to demands] button: String concat instead of sum

Using the button multiple times, the value of population is calculated using string concatenation instead of summing up the values.

E.g.:

  1. 1x Production Chain: Wood (15 Farmers)
  2. [Add to demands]
  3. Demands Calculation: 15 Farmers
  4. Doing 1 & 2 again results in 1515 Farmers

#javascriptisfun #typesafetysucks

Gramophone Factory : productionTime

 "Gramophone Factory": {
            "product": "Gramophones",
            "building": "Gramophone Factory",
            "img": "investors/gramophones.webp",
            "worldID": 1,
            "productionTime": 120,

productionTime -> 60

gramophone

Input cells to small, Resident Demand

Hello dear creators of the calculator,

I noticed that the input cells you use on the Resident Demands (for inhabitants only) only show 4 digits, while there are a lot of players that need 5 or 6 digits
For the houses input 4 should be good, but 5 would better i think

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.