Coder Social home page Coder Social logo

openzt's Introduction

OpenZT

A DLL for injection into Zoo Tycoon (2001). Details on what classes and functions are currently patched are below.

Overview

Legend

✅ = Reimplemented ✅/⏳ = Partially reimplemented ⏳ = In progress

BFRegistry ✅

This class appears to function as a mapping to constructors, potentially allowing the [mgr] section of zoo.ini to set which constructors are used at runtime. However only the terrainmgr field is loaded from the ini and only one option is loaded into the BFRegistry, making the class appear redundant.

Load INI ✅/⏳

Loads settings from the [debug] section of zoo.ini and saves them into static memory addresses. Patching other ini section loading causes crashes as it was done before any OO patterns were uncovered.

ZTUI::expansionselect::setup ✅/⏳

Loads existing expansions and supports adding new expansions via code, only outstanding feature is updating the UI dropdown to fit any new expansions.

Contributing

OpenZT welcomes contribution from everyone. See CONTRIBUTING.md for help getting started.

openzt's People

Contributors

finnhartshorn avatar goosiferio avatar

Stargazers

Kevin Rudissaar avatar David Karagory avatar Lastorder avatar Alex Bates avatar Aaron van Geffen avatar Ted John avatar Duncan avatar  avatar Emily avatar  avatar

Watchers

 avatar  avatar

openzt's Issues

Enhancement: BFOverlayType Implementation

The BFOverlayType struct should extend the BFEntityType structure and defines properties for actors on the map that supersede all others on the map in visibility. Only one type of actor takes advantage of these properties, however, and that is the ZTAmbientType.

Feature: BFEntity Implementation

The BFEntity structure and its substructures represent the actual instances of placed actors (rather, entities) on the map. When a zoo is loaded, all instances pull from the stored *Types in memory, which in turn are values defined in configuration. These unique entity instances, however, offer properties for individual actors rather than groups.

This structure should have properties such as world coordinates, visibility, type pointers, current actions, and more.

Custom terrain

Custom terrain OpenZT mods, this will need some way to handle displaying an error if a user tries to load a map with custom terrain, without the custom terrain mod installed. Will also need some way to store what mods are used in a save game.

Combined OpenZT and vanilla mods

Use the .ztd extension for all mods, OpenZT will load anything with a meta.toml file in it. Zoo Tycoon should just ignore any files archives without .cfg files.

OpenZT vanilla mod parsing should also be updated to use .cfg files to figure out what files to cache. Would allow us to remove these hacks

Investigate Arena Allocators for Resource/Entity storage

Currently resources are stored in a hashmap which is likely quite slow to iterate through. We should investigate Arena Allocators as an alternative to ECS (unsure if they could be used together). Arena Allocators would allow better iteration through entities/resources whilst still providing stable pointers (having them in all in a vec would mean the pointers move whenever the vec grows). Will need to do some memory profiling to figure out how/if we need to segment the resources/entities.

Enhancement: ZTAmbientType Implementation

The ZTAmbientType structure should extend the BFOverlayType structure. It should implement all configuration properties unique to ambients, or actors that spawn and span the screen in pre-defined intervals. Examples include the red blimp, the Halloween witch, Santa Clause, and several birds.

Unload Lazily loaded resources on load/exit or high memory usage.

As part of #46 resources are lazily loaded as they are used. To prevent running out of memory resources should unloaded when a new save is loaded or the user exits to the main menu. We should also unload resources via some LRU mechanism if the resource usage approaches some predefined limit (sane default but user can override up to ~3gb)

'Patch' mods

Add a type of OpenZT mod def that patches another mod or entity

  • Initial implementation should work for and validate patching Vanilla or modded animals to use Vanilla or OpenZT locations/habitats
  • Rough implementation of patching other fields but little to no validation

Enhancement: ZTAnimalType Structure Implementation

The ZTAnimalType structure should extend the ZTUnitType structure already in the codebase. Its purpose is to provide class-level properties to animals in the game. Generally all types contain the data loaded from the animal's configuration into memory.

Feature: OpenZT Scripting Manager

The scripting manager should allow users to extend Zoo Tycoon 1 with Lua scripts to create new features or cheats. Other open implementations like OpenRCT2 call these 'plugins'. It should support the following features:

  • Read all scripts from a scripts folder inside of the install directory
  • Execute certain types of scripts on a loop
  • Execute certain types of scripts once per zoo load

Considerations, but not necessary for this first iteration:

  • Required frontmatter per script file to 'register' script.

Feature: PANDA Loader integration

Have a working version of PANDA Loader in time for OpenZT. PANDA Loader is a Zoo Tycoon launcher with planned mod management features. A version by release should have the following working:

  • Launches OpenZT successfully in place of the original Zoo Tycoon launcher
  • Lists all installed ZT1 mods
  • Allows simple mod management such as deletion, priority order, favorites for quick access
  • zoo.ini UI editor

Project page: https://github.com/GoosiferIO/PANDA-Loader

Feature: Website landing page for OpenZT

The website landing page should have the following information:

  • Main page with information about the project, what it is, the team, socials.
  • A prominent link to the Github
  • A link to documentation
  • A page with download and install directions

Handle failed utf-8 loading

Currently resources are ignored if they are not valid utf-8. We should investigate handling the invalid utf-8 characters or stripping them out for better legacy support.

EntityType bug fixes, optimizations, clean up

This cleanup should focus on improvements and bug fixes introduced over the course of the EntityType API implementation.

Meet the following targets:

  • Stress test all Deref implementations of all structs
  • Guarantee offsets for properties on all structs
  • Implement missing string properties with ZTString
  • Implement any missing properties
  • Optimize print_config_for_type for better readability
  • Redesign sel_type to allow users to identity entity types by ID rather than just by selection
  • Improve presentation of printed configuration to the console
  • Add error handling for incorrect input in console

In addition to improvements to helper function in the ztworldmgr module:

  • Rewrite get_entity_type_by_id to support dynamic checking of entity type. Currently it only looks for cNameID located in a ZTSceneryType, but needs support for ZTUnitType and BFOverlayType.

Enhancement: ZTKeeperType Implementation

The ZTKeeperType structure should extend the ZTStaffType structure already in the codebase. Its purpose is to provide class-level properties to hireable zookeepers in the game. Generally all structures that end in *Type contain the data loaded from the entity's configuration into memory.

Enhancement: ZTStaffType Structure Implementation

The ZTStaffType structure should extend the ZTUnitType structure already in the codebase. Its purpose is to provide class-level properties to all staff in the game. All staff sub-structure extend from this one, including: ZTZookeeperType, ZTMaintType, ZTHelicopterType, and ZTGuideType. Generally all structures that end in *Type contain the data loaded from the entity's configuration into memory.

Enhancement: ZTHelicopterType Structure Implementation

The ZTHelicopterType structure should extend the ZTUnitType structure already in the codebase. Its purpose is to provide class-level properties to DRT helicopters in the game. Generally all structures that end in *type contain the data loaded from the entity's configuration into memory.

Enhancement: ZTGuideType Implementation

The ZTGuideType structure should extend the ZTStaffType structure already in the codebase. Its purpose is to provide class-level properties to hireable guides in the game. Generally all structures that end in *Type contain the data loaded from the entity's configuration into memory.

Enhancement: ZTMaintType Implementation

The ZTMaintType structure should extend the ZTUnitType structure already in the codebase. Its purpose is to provide class-level properties to maintenance workers in the game. Generally all structures that end in *type contain the data loaded from the entity's configuration into memory.

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.