Rise to Ruins

Rise to Ruins

View Stats:
RedShirt Apr 15, 2021 @ 10:47pm
How is the monster level calculated?
I would like to know how the monster level for each day is calculated. It looks like something like day * threat modifier (plus a chance to be boosted of course).

Is there more to it? I would like to keep it as low as possible as long as possible while monster spawn rates are much less of a problem.
< >
Showing 1-10 of 10 comments
ZeroGravitas Apr 16, 2021 @ 12:00am 
So, I've been investigating this and got some insights from some of the most knowledgable players and in-game testing.

Yes, day number and threat are the two variables that scale monster level (and hence stats). And spawn numbers.

So, firstly, if threat stays at zero (letting the corruption have whatever it wants), then monster level scales by day alone. Up to a fixed cap that's different per monster. At least, that's what this table of figures mean (taken from the code, posted to the official Discord): https://discord.com/channels/326865360475127809/326865360475127809/829978162430476288

E.g. at the lower end, Small Slime's day scaling is limited to 12. While at the upper end, Spectres and Fire Elementals are capped at 30.


Then there's scaling from the corruption threat. That's capped at 166. In *addition* to the 30 from the day scaling, that totals 196. So max for a boosted monster is 392.

I've not seen anyone state exactly what the mathematical relationship is between threat level and its scaling of monster level, though. It doesn't seem to be *just* based on the threat bar's percentage. In a sandbox mode test, 100% threat gives me level ~100 monsters (at day 43). But in campaign, on a map that just hit 100% threat (at day 85), the same top monsters are only ~level 70%.


Threat itself scales as follows (I've confirmed this, roughly, in game):

threat = ((desiredTiles - corruptTiles) / 2000)^2

In survival difficulty, the corruption wants 1024 more tiles per day (plus 128 per building). And a map has about 60'000 tiles. So threat will only start rising at day 30, if its been constrained to (just over) half the map (around 30k tiles).

At most, I've seen players successfully give up 3/4 of the map to mitigate threat a lot. Personally, I enjoyed the building space of having at least half. Which has meant manual use of spells to control some of the flood of monsters. (But you could crush the corruption entirely early on instead...)

It wants a little over 1500 more per day on Nightmare difficulty, so quicker + a lot more chance of boosted.
RedShirt Apr 16, 2021 @ 1:16am 
That was in depth and makes sense.
Thank you very much.

Edit: I found the code specifying the monster spawn level. Its basically day/2 then adjusted by min/max for the monster. Then further boosted by the threat level.

Since I really don't like the mechanic regarding the level at all I changed the class file to my liking but failed to recompile it in a way the original .jar takes. Wasted about two hours and might not find more motivation to try again. Java sucks just that little bit to much.
Last edited by RedShirt; Apr 16, 2021 @ 3:40am
ZeroGravitas Apr 16, 2021 @ 8:13am 
Originally posted by RedShirt:
day/2
Hah! I was doing some more testing in sandbox mode, after replying to you, and I was starting to guess it wasn't just day. Closer to half that, but hard to be sure with the randomisation element, there too.

What was the equation for threat level boosting, if you're able to reference it fairly easily? I'm looking in the "rtr\spawning\SpawnModule.class" of the core.jar and I don't see it... Wrong place or my brain just being crap?

Thanks for inspiring me to take a proper look through the code, though; I found where all the "flags" are for monsters and towers, which I've also been researching.
RedShirt Apr 17, 2021 @ 3:01am 
Originally posted by ZeroGravitas:
Originally posted by RedShirt:
day/2
Hah! I was doing some more testing in sandbox mode, after replying to you, and I was starting to guess it wasn't just day. Closer to half that, but hard to be sure with the randomisation element, there too.

What was the equation for threat level boosting, if you're able to reference it fairly easily? I'm looking in the "rtr\spawning\SpawnModule.class" of the core.jar and I don't see it... Wrong place or my brain just being crap?

Thanks for inspiring me to take a proper look through the code, though; I found where all the "flags" are for monsters and towers, which I've also been researching.

No its directly in the "setMonsterSpawnLevel" method(out of memory but its called something like that) of the MobBase class.
The whole calculation for the monster level is done there, including the boosting.
ZeroGravitas Apr 17, 2021 @ 1:48pm 
Originally posted by RedShirt:
No its directly in the "setMonsterSpawnLevel" method(out of memory but its called something like that) of the MobBase class.
The whole calculation for the monster level is done there, including the boosting.
Ah, brilliant, thanks! I'd not managed to find that.

It actually looks to me like it starts by randomising level *between* day/2 and day.

Then capping the result at the fixed low and high limits per monster (e.g. 30 at most for all).

Then, if there's less than 1024 corruption tiles (in survival mode), it adds ThreatPercentage / 6.

Or for all the rest of the time it's ThreatPercentage / 12.

(But I don't think that's a 1-100 actual percentage, from the level numbers I see.)

Then it works out if it should double the level with a Boost calculation (and reference to the Boost chance multiplier specified by the game mode/customisation).
Last edited by ZeroGravitas; Apr 18, 2021 @ 1:15am
RedShirt Apr 18, 2021 @ 12:04am 
Yeah that sounds right.

I would absolutely love the option to cap it at 40 and alter the spawn level of golems to something at least similar(maybe the same but without boost). But I have yet to find a way to recompile the class in a way the game loads. I avoided Java up until now so I have no idea what I'm doing.
ZeroGravitas Apr 18, 2021 @ 1:58am 
Originally posted by RedShirt:
I would absolutely love the option to cap it at 40 and alter the spawn level of golems to something at least similar[...]
If you give the corruption just half the map then corruption threat caps out around day 65 with monsters at level 54 to 55 (from my sandbox test just now).

You can reduce it a little further by giving more map and just turtling in one corner. As Tiberiumkyle does. Using mostly banish towers to shovel the monsters out all night (defences to kill the few who get through).

Personally, I'm on day 87 and the threat's only slowly rising because I'm slowing retaking the map. Monsters at just over level 70.

The second way to deal with them is to spam cold aura on a maze all night, to hold most of the monster in there. I split off (unstoppable) spectres and kill them all with electric/magic damage. Fire elementals are moated out for 3/4 seasons and banished (mostly with the spell) for the winter freezes.

So there's at least 2 strategies to survive indefinitely, as things are.
RedShirt Apr 18, 2021 @ 5:37am 
That sounds managable.

Do you know if the corruption counts water/mountain tiles as owned or will it strictly need land tiles?
ZeroGravitas Apr 18, 2021 @ 10:03am 
Originally posted by RedShirt:
Do you know if the corruption counts water/mountain tiles as owned[...]
It certainly spreads under both. If you hover your mouse around the map you can see where the pointer changes from a blue to a grey hand, meaning the tile underneath is corrupted and you can't cast spells there.

'm fairly sure that those tiles are counted, as will be in the corrupted tiles array.
RedShirt Apr 20, 2021 @ 9:24am 
I'm actually testing a more passive approach now, using about 40% - 50% of the map and a moat to trivialize at least three seasons.
Lets see how far I can go that way.
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Apr 15, 2021 @ 10:47pm
Posts: 10