Coder Social home page Coder Social logo

spiremapoverhaul's Introduction

MtS Modding Anniversary 6: Spire Map overhaul

Preamble

A group project for the sixth anniversary of Mod the Spire. Zones will spawn on the map of each act where they will affect the map nodes within. This includes custom events, encouters, campfire actions, nodes, etc.
For a full write-up, please see https://docs.google.com/document/d/1ecUm3TWngPBoLVC278x7AfpXj_ImJMJkSWnZAyGLpYg/edit?usp=sharing

Contribution

The scope of a contribution will commonly be a Zone with its various changes. For guidelines regarding what kind of content is allowed/accounted for and about the minimum content required, please see the google doc linked above.

Either modargo or I (erasels) will be reviewing your pull request and suggest changes to code and/or design and balance if needed to keep the project cohesive. Since the start of this project is during the christmas holidays, we may be slow to respond but don't worry, we will.

Technical Guidelines

Create a package within the zones package; this is where you will put all your code. This allows all zone content to be grouped together, so you're not supposed to put your patches/monsters/etc in the top-level packages anymore (which is a change from previous anniversary projects that we think will help with organization). You are free to define subpackages within your zone package.

Zone

You will need a Zone class which extends AbstractZone and implements the various interfaces for modifying aspects of the game (found in the zoneInterfaces package). Within it you will have most of the code which controls what your zone does, from adding new encouters to deciding what nodes spawn in your zone. It's okay to do things those interfaces don't support yet by writing patches, though if there's something that multiple people want to do, it may be worth adding to one of the interfaces.

AbstractZone's constructor requires an unprefixed ID (so do not call makeID on your ID when creating it) and any of the Icons enums which will used to signify what type of content your zone modifies in its tooltip. Available icons are: MONSTER, CHEST, EVENT, REST and SHOP.

Strings will be handled in the same way as they were for Packmaster: create a directory with the same ID as your zone under resources/anniv6Resources/localization/eng and put all your localization jsons into that.

Images (for cards, powers, monsters, etc.) should go in resources/anniv6Resources/images, then the appropriate directory for the type of image (e.g. cards), then create a directory with the same ID as your zone. There are constructors for AbstractSMOCard and AbstractSMOPower that take in a zoneID, which you will need to use to load the correct image. If you're making a number of cards/powers for your zone, you may want to create your own abstract class to make things a bit easier (see AbstractInvasionCard/AbstractInvasionPower for an example of this).

In case your zone replaces or changes nodes, be sure to look at the following methods within AbstractZone:

  • canIncludeEarlyRows()
  • canIncludeTreasureRow()
  • canIncludeFinalCampfireRow()

If your zone includes manual node replacement logic, you need to either check for the last campfire before the boss node and the mid-act chest as these should not be overridden, or have those methods return false so that your zone never includes those rows.

To test your zone, you can add the console command addzone ID which will make ti spawn in the next act. Zones are also toggleable in the mod config menu.

Your zone's icon should be a 512x512 png file located in resources/anniv6Resources/images/ui/zoneIcons and fit the template provided in that same folder. It should entirely black, optionally with some white. Ideally it should be pretty simple and easily recognizable.

Cards, relics, monsters, powers, etc.

Cards, relics, monsters, powers, patches, and everything else should go in the package you created for your zone.

There are abstract classes that you should extend in the abstracts package: AbstractSMOCard, AbstractSMORelic, AbstractSMOMonster, and AbstractSMOPower.

Events

Any event classes within the same package as a zone will automatically be registered with the requirement of being within that zone. If there is a public static boolean bonusCondition() method within the class, that will also be used as a condition for the event to spawn. If you require something else, or don't want the event to be registered, use @AutoAdd.Ignore on the class and register it manually.

Bestiary

If you add new monsters, consider adding Bestiary entries for them, so that players have an easy way to understand and analyze what the monsters do. This also helps document the logic for your new monsters. See the existing bestiary.json files for examples.

How to make PRs

To make a contribution, you must have a GitHub account. For the specifics of how to fork this repo and then make a pull request, please look at this guide:
https://docs.github.com/en/get-started/quickstart/contributing-to-projects

I recommend using the GitHub desktop client for this if you have no experience with Github
https://desktop.github.com/

spiremapoverhaul's People

Contributors

actuallyenbeon avatar alchyr avatar bkerns724 avatar cany0udance avatar celicath avatar darkglade1 avatar dayvig avatar erasels avatar ericbartusch avatar graysonng avatar iryan0702 avatar jackrenoson avatar kelzon212 avatar kiooeht avatar kobting avatar laugic avatar lobbienjonsji avatar lsgnaix avatar mindbomber2 avatar mistressalison avatar modargo avatar moviejw avatar nellydevo avatar pandemonium14 avatar paopaochahucn avatar sevendaycandle avatar shammysham avatar shortcake-sts avatar smearsoul avatar tetraminus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

spiremapoverhaul's Issues

Zones sometimes change on save and load

Sometimes when saving and loading the zones on the map change. This likely has something to do with map RNG being modified at an inopportune time.

Might make snese to look at which zones use map rng in them and see if those are the culprits.

Incompatibility with Dome Visualized mod

Got the following crash report:

Exception in thread "LWJGL Application" java.lang.NullPointerException
at domemod.moves.MoveInfo.calculateDamage(MoveInfo.kt:264)
at domemod.moves.MoveInfo.updateIntent(MoveInfo.kt:221)
at domemod.moves.AscensionMoveSet.updateIntents(AscensionMoveSet.kt:37)
at domemod.patches.MonsterConstructorPatch$Companion.initialiseMoveSet(MonsterConstructorPatch.kt:28)
at domemod.patches.MonsterConstructorPatch.initialiseMoveSet(MonsterConstructorPatch.kt)
at com.megacrit.cardcrawl.monsters.AbstractMonster.<init>(AbstractMonster.java:197)
at com.megacrit.cardcrawl.monsters.AbstractMonster.<init>(AbstractMonster.java:145)
at com.megacrit.cardcrawl.monsters.city.Taskmaster.<init>(Taskmaster.java:36)
at spireMapOverhaul.zones.thieveshideout.ThievesHideoutZone.lambda$registerEncounters$8(ThievesHideoutZone.java:128)
at basemod.BaseMod.autoCalculateMonsterName(BaseMod.java:1397)
at basemod.BaseMod.addMonster(BaseMod.java:1419)
at spireMapOverhaul.zones.thieveshideout.ThievesHideoutZone.registerEncounters(ThievesHideoutZone.java:128)
at spireMapOverhaul.SpireAnniversary6Mod.addMonsters(SpireAnniversary6Mod.java:289)
at spireMapOverhaul.SpireAnniversary6Mod.receivePostInitialize(SpireAnniversary6Mod.java:266)
at basemod.BaseMod.publishPostInitialize(BaseMod.java:2306)

It seems obvious. but still, here's the mods:
-Basemod
-StSLib
-Minty Spire
-Relic Stats
-Bestiary
-easel
-map marks
-ojb's Info Mod

  • Fast Talk Cultists
  • Colored Map
  • Dome visualized
  • And obviously Spire Biomes

Save/quit deletes rewards in biomes that modify combat rewards

As the title suggests, there is a bug where if you beat a combat that can grant additional rewards such as in biomes like Invasion or Smith's Folly, quitting and re-entering the run tends to delete rewards. Example below in the Invasion biome (before exiting/after exiting)

image
image

Edit: seems the problem is with HugYouRelics, not Spire Biomes. My bad

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.