Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Custom Theater

Open Belonit opened this issue 3 years ago • 11 comments

Custom Theaters

In Map:

[Map]
Theater=SomeTheaterName        ; default TEMPERATE
CustomTheater=SomeTheaterName  ; default [Map]->Theater
  • Tag CustomTheater is the same as Theater, but it has a higher priority. It's needed for more convenient work with FA2 and CNCMaps Renderer, since these tools do not yet support Custom Theaters

In <SomeTheaterName>.theater.ini:

[Theater]                     ; default values ​​for vanilla theaters are different, see table below
TerrainControl=TEMPERATMD.INI ; filename - including the .ini extension or <self>
ExtendedRules=<none>          ; filename - including the .ini extension or <self>

IsArctic=no                   ; boolean

PaletteISO=ISOTEM.PAL         ; filename - including the .pal extension
PaletteOverlay=TEMPERAT.PAL   ; filename - including the .pal extension
PaletteUnit=UNITTEM.PAL       ; filename - including the .pal extension

Extension=TEM                 ; String of 3 characters
Letter=T                      ; String of 1 characters

RadarBrightness=100%          ; floating point value, percents

[SpecificMixes]               ; list of Mix filename - including the .mix extension
1=TEMPERAT.MIX                ; default values ​​applied if the section is not found
2=TEM.MIX
3=ISOTEMMD.MIX
4=ISOTEMP.MIX
5=
...
  • ExtendedRules Allows you to specify an ini file to force rules to be included in all maps of this theater
  • The special value <self> of the TerrainControl and ExtendedRules tags is equivalent to <SomeTheaterName>.Theater.ini
  • The IsArctic=yes tag means that this is an arctic theater and should work the same as SNOW. This applies to the AlternateArcticArt tag and also to the features of light generation in the Random Map Generator, maybe something else...

Bonus

  • Tags ShorePieces, WaterSet, CliffSet, WaterCliffs, WaterBridge, BridgeSet, WoodBridgeSet have been hardcoded to -1 for the Lunar theatre, this is no longer the case

Default Values for Vanilla Theaters

TEMPERATE SNOW URBAN DESERT NEWURBAN LUNAR
TerrainControl
TEMPERATMD.INI SNOWMD.INI URBANMD.INI DESERTMD.INI URBANNMD.INI LUNARMD.INI
IsArctic
no yes no no no no
PaletteISO
ISOTEM.PAL ISOSNO.PAL ISOURB.PAL ISODES.PAL ISOUBN.PAL ISOLUN.PAL
PaletteOverlay
TEMPERAT.PAL SNOW.PAL URBAN.PAL DESERT.PAL URBANN.PAL LUNAR.PAL
PaletteUnit
UNITTEM.PAL UNITSNO.PAL UNITURB.PAL UNITDES.PAL UNITUBN.PAL UNITLUN.PAL
Extension
TEM SNO URB DES UBN LUN
Letter
T A U D N L
RadarBrightness
100% 80% 100% 100% 100% 100%
SpecificMixes
  1. TEMPERAT.MIX
  2. -
  3. TEM.MIX
  4. ISOTEMMD.MIX
  5. ISOTEMP.MIX
  1. SNOWMD.MIX
  2. SNOW.MIX
  3. SNO.MIX
  4. ISOSNOMD.MIX
  5. ISOSNOW.MIX
  1. URBAN.MIX
  2. -
  3. URB.MIX
  4. ISOURBMD.MIX
  5. ISOURB.MIX
  1. DESERT.MIX
  2. -
  3. DES.MIX
  4. ISODESMD.MIX
  5. ISODES.MIX
  1. URBANN.MIX
  2. -
  3. UBN.MIX
  4. ISOUBNMD.MIX
  5. ISOUBN.MIX
  1. LUNAR.MIX
  2. -
  3. LUN.MIX
  4. ISOLUNMD.MIX
  5. ISOLUN.MIX

Belonit avatar Jul 17 '22 08:07 Belonit

Nightly build for this pull request:

github-actions[bot] avatar Jul 17 '22 08:07 github-actions[bot]

Before the merge, I should add documentation and get feedback from the community

Belonit avatar Jul 17 '22 09:07 Belonit

would it be difficult to add a tag under the [theater] section that loads a supplementary ini with maps of the theatertype in a way similar to how the ares feature [#include] (https://ares-developers.github.io/Ares-docs/new/misc/include.html) works? incase mods want to use a specific theaters to emulate, for example, alternate timelines or outer space, without injecting ini code into each individual map.

McPwny avatar Jul 17 '22 17:07 McPwny

@McPwny I have added an ExtendedRules tag for this

Belonit avatar Jul 18 '22 07:07 Belonit

terrific work

McPwny avatar Jul 18 '22 15:07 McPwny

Hi! I don't how should I explain it but in general works as planned. Since my mod has a terrain that replaced the desert from YR game I made changes for testing it:

In Map:

[Map]
Theater=DESERT     ; I respected the one used before this test
CustomTheater=TSTemperate     ; this works

In INI file called "TSTemperate.Theater.ini":

[Theater]
TerrainControl=TSTEMPERATE.INI   ; this works, I just renamed my INI file I was using for the new terrain.
ExtendedRules=<none>      ; Not tested because I don't know how it works.

IsArctic=no     ; Not tested. what kind of test should be done with vanilla game assets?

PaletteISO=ISOTST.PAL     ; this works. Is the renamed palette I was using until now.
PaletteOverlay=DESERT.PAL   ; Not sure... this tag affects objects from [OverlayTypes] ??? then it doesn't work. I changed it with bad palettes like "DIALOGN.PAL" but I saw no changes.
PaletteUnit=UNITTEM.PAL   ; this tag works!

Extension=TST   ; this tag works!
Letter=Z   ; this tag works!

RadarBrightness=100%   ; this tag works! and not only that, I found that my mini-map terrain looks much better with value "200%" :-D

[SpecificMixes]       ; this tag works! I tried multiple files in this list and that doesn't respect the standard game names.
1=TEST_EXPANDMD08.MIX
2=TEST_EXPANDMD09.MIX
3=TEST_EXPANDMD99.MIX  

FS-21 avatar May 13 '23 14:05 FS-21

@FS-21 Thanks for the feedback. As for the IsArctic and ExtendedRules tags, it seems you missed this paragraph in the thread header

  • ExtendedRules Allows you to specify an ini file to force rules to be included in all maps of this theater
  • The special value <self> of the TerrainControl and ExtendedRules tags is equivalent to <SomeTheaterName>.theater.ini
  • The IsArctic=yes tag means that this is an arctic theater and should work the same as SNOW. This applies to the AlternateArcticArt tag and also to the features of light generation in the Random Map Generator, maybe something else...

Belonit avatar May 21 '23 07:05 Belonit

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Jul 04 '23 21:07 github-actions[bot]

  1. remove TerrainControl tag altogether and just always assume it's the same ini file for theater customisations (I just don't

Allowing custom INI name would allow using same configuration INI for multiple theaters, particularly useful if someone intends to use the feature for 'reskins' of existing theaters.

Starkku avatar Aug 15 '23 10:08 Starkku

  1. remove TerrainControl tag altogether and just always assume it's the same ini file for theater customisations (I just don't

Allowing custom INI name would allow using same configuration INI for multiple theaters, particularly useful if someone intends to use the feature for 'reskins' of existing theaters.

In my opinion it's better to do this via $include (remember the toggle between whether to write the stuff on top of current file or below that I suggested? this is it)

Metadorius avatar Aug 15 '23 10:08 Metadorius

Although I do admit that I am not fully knowledgeable on the topic so if there are some specific issues with that approach - would be good to hear them.

Metadorius avatar Aug 15 '23 10:08 Metadorius

[!IMPORTANT]

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Jan 16 '24 06:01 coderabbitai[bot]