Schall Alien Loot


Dead aliens are now good aliens! Aliens will pay for your base defense! On their death, they bring back the 0.14 alien artifact. They also drop alien ores as loots, which can be morphed into ordinary ores like iron ore. Also adds alien science pack that can be used for research in other tech mods. Well-suited for combat-heavy, no-mining scenarios. (Locale: English, Deutsch, 正體中文, 简体中文, Русский, Português Brasileiro, Español, and 26 Partial)

Content
3 days ago
0.16 - 2.0
22.1K
Enemies

g [Responded] Rampant mod compatibility

4 years ago

Hello!
Is there any way to add compatibility with Rampant to get alien ore and artifacts from its 'new enemies'? I tried to patch the way described in FAQ, but it didn't work (I also tried to add some units/worms/spawners detection into this Alien Loot mod - also no effect). Is it caused by the fact that Rampant determines it's own loot table depending on other mods installed (it supports NE and bob enemies only)? Can anyone give me a hint? Schall mods are really nice and powerful to counter mobs spawning and swarming of Rampant.

4 years ago
(updated 4 years ago)

I checked, that with usual vanilla enemies (Rampant optionally allows its enemies to co-exist with vanilla ones) loot generation works well - for biters, worms, nests. So it seems to me that loot tables are ok.

Internal names for everything are the following ('faction' - one of 15 factions single-word names, 'tN' - tier from 1 to 10, like 't1', 't2', etc.):

Spawners:
faction-biter-spawner-v1-tN-rampant
faction-spitter-spawner-v1-tN-rampant
faction-hive-v1-tN-rampant

Worms:
faction-worm-v1-tN-rampant

Moving units:
faction-spitter-v1-tN-rampant
faction-biter-v1-tN-rampant

Moving units of Armoured biters - that's another enemy-generating mod, which goes often together with Rampant:
small-armoured-biter
medium-armoured-biter
big-armoured-biter
behemoth-armoured-biter

Unlike for Rampant enemies, for armoured ones +1 tier should be good: big-armoured-biter gives tier-4 loot, behemoth-armoured gives tier-5 loot.

4 years ago

Instructions are posted in FAQ "Assigning Loot Tiers" section. If your customized loot tables get overridden, try to do that in data-final-fixes.lua phase. The commands of remote interface provided by this mod should add the alien ores and artifacts to loot tables, while co-exist with (any) existing loot tables.

I am not sure how tier scaling in Rampant fits with vanilla scale, so you have to adjust by yourself.
In my mod set (both this mod and Schall Endgame Evolution, each tier higher is defined as double of previous tier. Say, tier 10 is 2^(10-4) = 64 times more powerful of tier 4 (behemoth). You may read from this page "Category Scale" section table "Relative Strength" column for lookup.
You may need to fit two (or multiple) enemy tiers with the same loot tier, if the difference in relative strength is not really as much as double. Too much loot for an easy killing may actually ruin your gaming experience.

Some examples would be:
If assigning loot tier 4 (equivalent to vanilla behemoth) to faction-biter-v1-tN-rampant tier 5 & 6, the lines would be:

SchallAlienLoot_add_mover("faction-biter-v1-t5-rampant", 4)
SchallAlienLoot_add_mover("faction-biter-v1-t6-rampant", 4)

Worms can be treated similarly:

SchallAlienLoot_add_worm("faction-worm-v1-t5-rampant", 4)
SchallAlienLoot_add_worm("faction-worm-v1-t6-rampant", 4)

Spawners have no "tier" in sense (as from vanilla game), so there are NO tier parameters at all:

SchallAlienLoot_add_spawner("faction-hive-v1-t1-rampant")

I am not sure if small-armoured-biter is really comparable with vanilla medium biter (tier 2) in combat capability (health, attack power, resistance, threat, etc). If you feel so, just use the line:

SchallAlienLoot_add_mover("small-armoured-biter", 2)

You can easily create (and publish) a compatibility mod using the above syntax. Let me know if you have other queries, or have such mod ready. Happy modding!

4 years ago

Thanks a lot! The problem was in proper placement in data-final-fixes.lua - must be after new enemies generation function call.

Yes, I see the difference in loot generation. I selected {2,3,3,5} loot tier for Armoured, {1, 2, 3, 3, 4, 4, 4, 5, 5, 6} for Rampant biters and exponential loot tier for Rampant worms. It's a pity, that spawners tiers are not supported in your loot mod, because Rampant unlike many others (except probably NE) generates much stronger nests with evolution - not to be destroyed by 1 common rocket. And here comes your Schall Tank Platoon mod...

Rampant has more options (like variations and coefficients for different factions), thus my balance of loot won't be good for other players I suppose. I'll share my example after some tests.

4 years ago

Great it works for you.
BTW, putting to data-final-fixes phase AND/OR adding optional dependency (of your tiny compatibility mod) on Rampant can also work to ensure load order. The latter solution is especially helpful, since some lazy (bad) modders may place lots of their code to data-final-fixes phase, to ensure their mods win "the war of final edit". Then optional dependency is the only reliable way to ensure yours is loaded after them.

Unfortunately, I don't have (yet) a good idea that can work for both vanilla spawners and modded tiered spawners.
Currently, I defaulted each spawner to give 2 alien artifacts, which is great for early game (where it is hard to kill spawners), but still less than behemoths (where spawner is easily crushed in late-game). It is hard to balance them with different systems.

Argh, okay. If there are mod options allowing users to make units stronger/weaker, it can be tricky to determine tier.
You may need to read option values and/or unit stats (e.g., health) to calculate and determine the equivalent tier.
The other way could be to provide your mod options for users to choose (just like how I did with this mod).
Anyway, there are countless ways to achieve what you desired, as a modder. ;-)

4 years ago

Thanks a lot for the hint about mod dependencies and mod load order (order of data-final-fixes of different mods) - it helped me to add compatibility of other mods with Rampant, to overcome the problem of unique enemies generating in that final phase only. Thank you!

4 years ago

Could you by any chance be able to provide the files needed to add compatibility of this mod to Rampant?

4 years ago
(updated 4 years ago)

Sorry for a delay and you have to read so late in new crazy designed factorio website. I don't have files for actual mods' versions.
What I did - two things in Rampant (you'll have to do it every Rampant mod update) as Schallfalke advised:
1) Added SchallAlienLoot in dependencies - it's info.json of Rampant mod. This line, the last one listed:
"dependencies" : ["base >= 0.18.12", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal", "? RampantResources", "? ArmouredBiters", "? SchallAlienLoot >= 0.17.6"]

2) I added these few lines


SchallAlienLoot_add_mover("small-armoured-biter", 2)
SchallAlienLoot_add_mover("medium-armoured-biter", 3)
SchallAlienLoot_add_mover("big-armoured-biter", 3)
SchallAlienLoot_add_mover("behemoth-armoured-biter", 5)

local factionsRampant = {"neutral", "acid", "physical", "electric", "suicide", "nuclear", "fire", "inferno", "troll", "fast", "laser", "wasp", "spawner", "energy-thief", "poison"}
local SizeLootRampant = {1, 2, 3, 3, 4, 4, 4, 5, 5, 6}
for factionN = 1, 15 do
for factionSize = 1 , 10 do
SchallAlienLoot_add_spawner(factionsRampant[factionN].."-hive-v1-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(factionsRampant[factionN].."-spitter-spawner-v1-t"..factionSize.."-rampant")
SchallAlienLoot_add_spawner(factionsRampant[factionN].."-biter-spawner-v1-t"..factionSize.."-rampant")
SchallAlienLoot_add_worm(factionsRampant[factionN].."-worm-v1-t"..factionSize.."-rampant", factionSize)
SchallAlienLoot_add_mover(factionsRampant[factionN].."-spitter-v1-t"..factionSize.."-rampant", SizeLootRampant[factionSize])
SchallAlienLoot_add_mover(factionsRampant[factionN].."-biter-v1-t"..factionSize.."-rampant", SizeLootRampant[factionSize])
end
end


immediately after these lines of those new enemies processing:


if settings.startup["rampant-newEnemies"].value then
swarmUtils.processFactions()
end


in the data-final-fixes.lua file of Rampant mod.

As you can see it only works if player selects only one Tier in New Enemies options of Rampant. If you play with many tiers you need to insert one more variable in cycled processing. If you don't play with Armoured biters, you should remove lines for it (first 4 lines quoted).

4 years ago

Hmm... The new design has goods and bads. The worst thing is the quote block syntax no longer works, making all the code just like normal text. :-(

Actually I have advised you to put these lines into a new mod (instead of adding to Rampant mod every update...), so you can make it once for all, and can publish the new mod to share with others.
Note that you have use syntax if mods["ArmouredBiters"] then ... else ... end to run specific lines that should be run if and only if that mod is enabled.

3 years ago

I checked, that with usual vanilla enemies (Rampant optionally allows its enemies to co-exist with vanilla ones) loot generation works well - for biters, worms, nests. So it seems to me that loot tables are ok.

How do i set that up?

3 years ago

I checked, that with usual vanilla enemies (Rampant optionally allows its enemies to co-exist with vanilla ones) loot generation works well - for biters, worms, nests. So it seems to me that loot tables are ok.

How do i set that up?

i was wondering how to do it as well, been getting inconsistent results myself...

New response