Giter Site home page Giter Site logo

star-ruler-2-mod-ce's People

Contributors

dalolorn avatar skeletonxf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

star-ruler-2-mod-ce's Issues

Warning: Unreachable Code in scripts\server\map_generation.as

Upon starting Star Ruler 2 with the latest version of the Mod enabled the following Warning gets printed in the console and the log.txt (even before starting a new game). Not sure if just unused dead code or wip.

scripts\server\map_generation.as:
 Compiling void MapGeneration::generateRougeObjects()
  Warning (1140:3): Unreachable code

Optimized Loading & SR2MM Compatibility

To summarize DaloLorn/Rising-Stars#20 and the SR2MM documentation:

Most modern SR2 mods use a special file structure for two reasons:

  1. The mod editor (and possibly the rest of the game) runs through every file in your mod folder at least once. If the mod folder contains a fully-functioning Git repository, loading times will tend to increase over the lifetime of the repository as more changesets pile up. Physically separating the mod from irrelevant metadata such as Git repositories can negate this performance loss.
  2. The SR2 Mod Manager was originally developed as an installation tool for Rising Stars itself, so it'll obviously favor a certain file structure. Conveniently, Darloth's old mods and all of Soloriens' RS-derived work have turned this configuration into an unofficial standard among those modders who bother to make their mods available via Git repos in the first place. While SR2MM will understand your current repository structure, it will run more smoothly if the mod code isn't in the root directory.

The following migration guide is a mildly edited form of the Git preparation guide in the SR2MM readme (themselves a modification of Darloth's instructions at the bottom of the linked RS issue), adjusted to hopefully fit your use case a little more closely:

  1. Create a folder to keep the repository in. For example, C:\Projects\SourceControl\SR2-Colonization-Expansion
  2. Move all SR2 mod data (modinfo, logo, and the data, locales and scripts folders) into a subfolder of that folder - for example, Colonization Expansion.
  3. Move everything else (Git data, license, readme, screenshots folder) from your mod folder into the root folder. (In the example, that would be SR2-Colonization-Expansion.)
  4. Open a command prompt, preferably an admin command prompt (just in case either the source or destination folder are in Program Files). Navigate to your Star Ruler 2 mods directory. Example:
       cd "C:\Program Files (x86)\Steam\SteamApps\common\Star Ruler 2\mods"
    

Create a symbolic link (specifically, a directory junction) from the mod folder in your Git repository to your SR2 mods directory. Example:

   mklink /J "CE" "C:\Projects\SourceControl\SR2-Colonization-Expansion\Colonization Expansion"

After all of these steps have been performed, both SR2 and your Git client should see the mod exactly the way they're meant to see it, and the mod manager will be capable of cleanly downloading, installing, and updating it from GitHub.

On a tangentially related note, I can create a discussion channel for your mod in the SR2 Discord server, if you'd like one - and help you set up a webhook like the one used in #rs-dev-feed. (I can also list your repo in #mods-and-tools whenever you feel it's ready for people to play around with it.)

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.