Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Fungal Monsters mod #12798

Merged
merged 7 commits into from Jul 4, 2015

Conversation

Projects
None yet
8 participants
@chaosvolt
Copy link
Contributor

commented Jun 28, 2015

A blacklist mod that I've occasionally used, in one form or another, for
quite a while.

  1. As the name implies, blacklists all the various fungal monsters
    currently present.
  2. Additionally uses the option to blacklist monster groups for the sake
    of redundancy, AND to make things more likely to keep working if
    additional fungal monsters are ever added in.

Now if only I could find where I found out about that "blacklist by
monstergroup" option...

chaosvolt
No Fungal Monsters mod
A blacklist mod that I've occasionally used, in one form or another, for
quite a while.

1. As the name implies, blacklists all the various fungal monsters
currently present.
2. Additionally uses the option to blacklist monster groups for the sake
of redundancy, AND to make things more likely to keep working if
additional fungal monsters are ever added in.

Now if only I could find where I found out about that "blacklist by
monstergroup" option...
@kevingranade

This comment has been minimized.

Copy link
Member

commented Jun 28, 2015

This is still going to have fungal tower terrain, but it won't have any monsters in it, right?
For that specific case I think we can check if the fungal tower monster is blacklisted, and if so refuse to spawn the terrain type.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

Would it be too much work to enable the ability to blacklist terrain?

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Ah, hmm. Is there any way to blacklist terrain? I could've sworn when I poked around on the wiki, something claimed that removing the relevant monsters and/or monster groups would affect what terrain spawns. O.o

EDIT: A clunkier way around this would be to add an overriding overmap_terrain and overmap_special file that replaces the fungal regions with fields, though I'd need to check whether fungal towers and similar are defined in the specials file.

EDIT 2: Working on it and testing it. Mein Gott this terrain keeps spawning no matter how hard I try to break something. :V

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Well this is annoying. I've tried overriding with overmap_specials. I've tried overriding with overmap_terrain. I've tried overriding the MAPGEN files to place faked fields.

Not sure if I can find any other workarounds using nothing but .json files, it seems.

EDIT: Yeah, seems to be a source thing. ._.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

The fungal terrain has been in since Whales I think, so it's very likely hardcoded.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

You'd think my talent for breaking things would wreck something, but Whales seems to have made it fairly bulletproof. ;w;

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

You can't blacklist terrain because there is no such thing as "lack of terrain".
You could stop terrain replacements when the terrain is blacklisted, but then all mapgen sections would need to reset the terrain to dirt/grass first.

A better way would probably be to make a replacement table for terrain, so that when something tries to place the wrong type, you overwrite it.
For now you could just overwrite the terrain stats to make it different. Say, just make it moss or sludge and leave it as a weird anomaly for people to be puzzled by.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Hmm. Possible. Overwriting terrain would work, but it could only be functionally disguised as dirt, grass, or mundane equivalents in ASCII mode. In tiles mode it would still look fungal.

Removing the "FUNGUS" flag from the respective terrain items is a good step though. Or...hmm. a replacement table? O.o

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

Now that I think about it, replacement table would probably be an overkill: you'd have to define a json for terrain replacement, load it and implement it where relevant (map::ter_set).
For someone who understands the DDA json system (its internals) it could be as little as 5 minutes of work, but learning the json system could well be 1-2 hours otherwise.

You could leave the weird fungal terrain for now. It would be a good idea to override fungal fruits, though.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

why not simply add an if statement in mapgen, and delegate fungal to dirt? it's a hack, sure, but it would still work.

besides, doesn't Lua support mapgen now? you could use Lua code if so.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

And back, was dragged out so I'm on the laptop.

Might remove the fungal effect from fungal terrain, and the ability to harvest marloss berries, as a good stopgap measure.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

Don't hack stuff up, please. Mapgen is quite ugly already.

If fungal terrain is that evil, it would be better to rewrite the fungal sections of mapgen with jsons.

Oh and another thing to override: fungal infestation effect. Not sure how to fix that one, though. It is hardcoded, but maybe there is a way to have it auto-remove with jsons alone. Even in the absence of real fungi, it can be caused by teleglow.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

fair enough, mapgen is an ugly son of a bitch, I can respect that statement.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Hmm. I did try mapgen overwrites and it didn't really work. :V

EDIT: If there was an option in terrain.json to allow terrain changing over time, we could have the modded fungal terrain immediately convert into mundane equivalents.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

That's because you can't always overwrite C++ sections of mapgen, only the json ones.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

As I figured from the fungal mapgen entries not being in the mapgen folder. 'w'

EDIT: Gonna test a stupid idea involving bastardizing the "transforms_into": "t_underbrush", property.

EDIT 2: Nope. Still doesn't work.

Chaosvolt
Update 2
1. For now, just a stopgap measure that removes the fungal hazard fungal
terrain presents. Also removes ability to harvest the marloss.
@tyrael93

This comment has been minimized.

Copy link

commented Jun 28, 2015

The way I did it I just removed any mentions of fungaloids from monster species, map specials and monstergroups, takes me thirty seconds. I mean, I have no idea how coding a removal works but couldn't you just do that

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Already got the monsters on a blacklist that makes them not exist, I'm mostly trying to figure out how to dummy out the mapgen effect. It's really just cosmetic, but still.

@tyrael93

This comment has been minimized.

Copy link

commented Jun 28, 2015

removing the mapgen should be a must, it'd just make getting mycus easymode.
Not that mycus is strong or a good mutation tree anyway, it's just that it'd be fairly easy to get free water/food out of mycus fruit.
Unless marloss jelly doesn't spawn if you don't kill the spire.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Heh. Already accounted for that, added an edit to terrain.json that makes marloss plants unharvestable, and makes all fungal terrain harmless.

So while I've yet to figure out how to purge what little's left with modding, I can at least neutralize it.

@tyrael93

This comment has been minimized.

Copy link

commented Jun 28, 2015

Well, that looks good then. Hope you find a way around this.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

I could even add a overmap_terrain file that makes the now-harmless fungal zones show up as fields, and simply hope players don't stumble upon them to witness my fails. :V

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

Why did you remove the fungal flag from the terrain? Does it spawn spores through the blacklist?

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2015

Hmm. It potentially could, though I'll need to test whether it will in spite of this. Mostly a precaution. Now if I could instead figure out how to get the fungal zones removed entirely...

EDIT: I am a derp. No spores spawn, so I can add the flag back. Also need to remove the ability to gather marloss seeds.

chaosvolt
Update 3
1. Undone the removal of the "FUNGUS" flag for terrain, as it seems
spores won't spawn from them. Yay for pointless idiotproofing.
2. Did, however, remember to remove the ability to harvest marloss
seeds.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

Now, the question remains...to keep trying to find a way to get around the hardcoded fungify functions that create fungal regions, or to simply add an overmap_terrain that disguises the modded fungal zones as fields?

EDIT: Oi, who told the marloss bush it was allowed to still give fruit? D:

EDIT 2: Yeah...crap. Seems that I CAN'T stop the marloss terrain from bearing fruit, either.

EDIT 3: Yeah, at this point I'm trying to figure out ter_set. Anyone posted an example I can stare at? :V

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

Wait. Wait. WHAT.

I think I might've fucked something up entirely. Einen Moment.

Path...modinfo.json. Heh. Heheheh. Crap.

chaosvolt
Update 4
1. Repeat after me: Chaosvolt is a derpdragon. Told the modinfo to check
the whole folder, not JUST modinfo.json. Marloss should now correctly
not be obtainable.
2. Also added something on the off chance that a player gets
marloss/mycus items in spite of the mod's effects.

I still can't get the game to refuse to spawn fungal zones, but...eh.
=w=
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

What would be the best way to hide it then? ;A;

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

Best would be to move the mapgen functions that generate those areas from c++ to jsons and then blacklisting those.

Having some weird terrain is acceptable - better than having hacks in mapgen.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

If we had that option... :V

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

It's always an option, it's just that it takes some work.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

True. Might be beyond the scope of this PR, or at least beyond the scope of my ability to not break things.

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

Porting to json would def be in it's own PR. I wouldn't mind tackling it, but I seriously have to get that item rework in.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

Ah. For now this mod has the fungal terrain not harvestable for marloss, so that's a start. Still, it's weird that I can't simply use overmap_specials to blacklist the mapgen. O.o

@DavidKeaton

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

It could very well be hardcoded, hence why you can't

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

Possibly. It does have entries in the overmap file though. The more likely cause is that none of the properties overmap_specials lets you play with can be used to dell it to not generate a per-defined area. Occurrences, for example, doesn't seem to accept "0" as a maximum.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2015

What happens when you change the "overmaps" field in overmap_specials.json?

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2015

Nothing, sadly. Replacing with a field or crater has no effect, nor does trying to move the fungal terrain underground.

I can't tell if that's a failure of overmap_specials or because the functions in the source create the terrain on the spot.

@vache

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2015

Are you sure you created a completely new overmap after making the changes? Best way to check would be to delete world and make a new one.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jun 30, 2015

Had actually just copied the overmap entries for the three fungal zones. Which...didn't work. ._.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2015

Well. After more thorough testing involving screwing with overmap_specials.json and using a fresh world in each test, I have officially proven that fungal regions give zero fucks about what the overmap file says.

Tell it to use 0/0 occurances? No. Tell it to spawn below ground level? Nein. Tell it that it has to be a minimum of 9001 map tiles from a city? Nyet. Give it the unique flag? Nej. Tell it to connect to a ROAD? Nachi.

EDIT: I also tried to screw with it by telling the overmap section of each entry to use something absurd like a lab. Also no dice.

EDIT 2: Editing overmap_terrain.json gave me a partial success. Changing the "extras" section does nothing, but I CAN mess with some cosmetic things like the display name.

a small victory

chaosvolt
Update 5
1. Cosmetic addition of overmap_terrain.json to disguise the defunct
fungal zones as mere fields.
@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2015

Well, turns out, you can't overwrite the "type": "overmap_special" entries in JSON because they are put into a vector, each new entry is appended, its ID is essentially ignored.

That means if you make a new "overmap_special" with the same ID as an existing one, it will simply add the new the one, but the existing entry will be still be used. The fungal spawns you see on the overmap come from the original special definition. Your own special definition (in the mod) is loaded and considered, but does not spawn, which is essentially what you want.

I'll look into a solution for this.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2015

As I suspected.

One additional curious anomaly is that the "id" section in the overmap special entries is written in name format instead of id format. That is, it uses capitalization instead of all lowercase, and uses spaces instead of underscores. May or may not be relevant. Probably not.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2015

BevapDin's update for overmap specials landed. They can be overridden in mods now.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2015

Ooh, neat. Will test it out real quick. ^^

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2015

Fuck. Are you sure if it's in the latest compiled version (3368, cf3ca08)? Because well...still not working. ._.

EDIT: Nevermind. I just had to break the overmap specials harder. Looks good, no sign of fungus now.

@BevapDin

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2015

How did you test it? I tested this by adding a simple copy of a definition taken from overmap_specials.json to mod, I only changed "location" to ["never"].

chaosvolt
Revert "Update 5"
This reverts commit 3bdde34.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 2, 2015

Ah. I started with simply changing occurrences to 0/0. It seems that removing the overmap and location entries also worked. ^^"

EDIT: Huh, also had an unsynced update from before this fix, so getting rid of it before I add the new overmap_specials. Just to be sure, I'll use the method you used.

chaosvolt
Update 5.5
Forgot that net outage ate an earlier update 5 in mid-sync, so had to
scrap it. That was before Devapdin's tweaks to how overmap specials are
handled, so...

1. Overmap special file included, should now remove the fungal regions.
2. Modinfo description updated to reflect this.
@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2015

VERY glad to see this!

@kevingranade kevingranade merged commit b472bb2 into CleverRaven:master Jul 4, 2015

1 check passed

default
Details
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2015

Meep. Bloody thing didn't update to show that this did a thing. Thank you for the merge.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jul 5, 2015

Possibly the terrain adjustments are redundant since the overmap features don't spawn anymore, but that's not really a problem.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2015

They will appear for those portals that spawn fungi around them, though. Other than that, don't think they'd appear anywhere else.

@chaosvolt chaosvolt deleted the chaosvolt:no-fungi-mod branch Jul 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.