Code Monkey home page Code Monkey logo

itl_houses's People

Contributors

2talltyler avatar adpro avatar arikover avatar fmang avatar jcranendonk avatar jjyao88 avatar jrook1445 avatar supercirno avatar woelfivw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

itl_houses's Issues

Reformat NML code

Fix tabbing and colon placement (why did I format this like a lang file?)

Improve: README gameplay guide

In OpenTTD, the NewGRF description says to see the website for more information. This links to the README here on GitHub, which needs more screenshots and a rewrite to better communicate the ideas of Improved Town Layouts rather than simply listing detailed rules.

This should be completed before releasing 1.2.0.

Removing post-war houses from appearing before their time in temperate climate (Culprit inside!)

image

Here is a town created without ITL in 1860. There appear to be six housing sprites in total...

  • Small cottage
  • Medium cottage
  • Large cottage
  • Double thatched roof house A
  • Double thatched roof house B (w/ pond)
  • Townhouse triplets A ("two-up, two-down")
  • Townhouse triplets B

image

Here is a town created with ITL in 1860. There are four housing sprites that better fit in a post-war timeperiod. They are...

  • South-facing doubles w/ garages
  • South-facing single bungalow w/ garage
  • East-facing 2-story doubles
  • East-facing 1-story doubles

The good news is that the previously listed historical houses (cottages and townhouses) still spawn, but in far fewer number than the aforementioned homes which seem to be the primary type of house that spawns. There's also a single sub-arctic housing sprite that appears in these towns. Maybe intentional?

image

Upon digging and experimenting in the scenario editor, I believe I have found the 'culprit'...

image

All of the circled houses are 'dynamic', with the red/orange set cycling between those 4 sprites previously listed, and the blue/green set cycling between two townhouse triplets. It seems the red and blue houses were added with fractional cargo requirements to support the early game, but with the perhaps unintentional issue of introducing housing sprites designed to be post-automobile into the 19th century.

In the vanilla game, the red/orange set are coded to appear in 1931 (the orange set in ITL appears in 1945. suggesting how the red set was added later and thus 'broke' the timeline). The blue/green set (the two-up/two-downs as they're actually called) appear from the year 0 in vanilla game, but 1945 in ITL. I would concur with the vanilla game's interpretation; the two-up/two-downs were built well before the 20th century. They would be most appropriate in the inner city/town area, rather than suburb.

Really want to do a historical run with ITL temperate, so hopefully this can get fixed! :D

Refactor switches

  • Use ternary operators when possible to eliminate switches
  • Replace strings of deny/continue switches with a single switch checking multiple things (yes, &&)
  • Use better names!

Add: Greenbelt / Large Park

Graphics

  • Random tree sprites on ground tile
    • May need sub-randomizers to avoid identical x/y coordinates when placed in a straight line
  • Ground tile depends on terrain - use example code on spritelayout wiki page

Placement

  • May only build 1 tile from another park tile (unless no other park tiles exist in town) OR a river tile
  • Protected if 1 tile from another park tile (2 adjacent tiles are permanent)
  • Don't build in TOWNZONE_CENTRE

Lifespan

  • Experiment with lifespan and probability to determine optimal values. How long should it take for two tiles to spawn adjacent to each other and become protected?

Commercial building era change is too abrupt in 1945

Version

1.1.1

Expected result

Commercial buildings transition smoothly from brick buildings to skyscrapers

Actual result

Brick commercial buildings all cease being available in 1945 and only a few skyscrapers become available

Steps to reproduce

Start a game in 1940, build a bus network to grow the city, and fast-forward

Suggested fix:

Stagger the ending dates of brick buildings and create new historic preservation switches using each end date

Buildings share switch blocks and file grouping is too complex

This completes what PR #5 began.

Version

1.1.1

Expected result

  • Each building has its own set of switch blocks, following an easy-to-understand naming convention
  • Each building, plus its spritelayouts, switches, etc., live in their own file

Actual result

  • Switch blocks are shared by many different buildings, with an inconsistent naming scheme
  • Buildings are merged by type of building, with sprites and switches in their own files

Steps to reproduce

Look at the repository

Suggested fix

  • Copy each building to its own file
  • Copy switches and spritelayouts to the new file and rename them to match the building
  • Update Python and Batch makefiles

Can't lower land under parks/statues/fountains

Version

1.1.0

Expected result

Attempting to lower the land underneath a park, statue, or fountain follows the behavior of lowering land underneath other town buildings.

Actual result

The land is not lowered and an error is produced.

Steps to reproduce

Attempt to lower the land underneath a park, statue, or fountain.

Suggested fix:

Parks, statues, and fountains currently have the HOUSE_FLAG_NOT_SLOPED flag. This was intended to keep them from building on sloped tiles, but not to prevent the player from modifying the terrain. Suggest adding this logic to the construction_check instead. Yes, I'm talking to you, future me.

Change: Goods/Food service protection should check both this month and last

Many landmarks and commercial buildings are protected if they are within the catchment area of a station which received Goods, Food, or Passengers last month.

One month isn't quite long enough for many delivery chains, particularly when using trains. Checking whether said cargo was delivered either last month or this month would make the check more reliable, on average extending the period by 15 days.

Use:
cargo_accepted_nearby_last_month(FOOD) == 1 || cargo_accepted_this_month(FOOD) == 1

Remove unnecessary and broken parameters

Two parameters were broken by the move to the cargo_production loop in the Waste & Recycling update. They are unnecessary as I intend for them to always be used, and should be removed.

  • Improved Mail
  • Improved Early Population

Note: This will also require removing ternary operators on individual houses.

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.