Goz3rr / SatisfactorySaveEditor

294 stars 75 forks source link

Peaceful Mode #91

Closed supremacy2k closed 4 years ago

supremacy2k commented 5 years ago

Is it possible to add the ability to enable peaceful mode? Meaning, killing all hostiles in the game?

I checked under Game -> FactoryGame -> Character -> Creature -> Enemy and BP_CreatureSpawner, which has a "WasKilled" checkbox, but i can't find a single one that is ticked.

mircearoata commented 5 years ago

I added this in my fork a few days ago. I will make a pull request after I check the code again

supremacy2k commented 5 years ago

Awesome! Just remember not to kill Lizard Doggos and Whales :D

mircearoata commented 5 years ago

Well... unfortunately mSpawnData has the Creature property empty, so I cannot check the animal's type. But there are CreatureSpawner and EnemySpawner. Is CreatureSpawner only friendly/neutral?

supremacy2k commented 5 years ago

I honestly don't know, it consists of 1852 objects in my savegame, and it doesn't say what type of creature it is.

I has info like: Entity Name: Persistent_Exploration:PersistentLevel.BP_CreatureSpawner104 Coords, ParentObjectName/Root (Both Empty), Creature (Parent, Target, both empty), Was Killed (unchecked checkbox), KilledOnDayNr, which is all -1, and then a random seed number.

Under Game -> FactoryGame -> Character -> Creature, there is a Wildlife menu, which has tamed doggos.

mircearoata commented 5 years ago

Probably Wildlife contains all spawned peaceful animals. Can you upload a save with tamed doggo and some whales, to check what I shouldn't delete? I already deleted all my animals...

supremacy2k commented 5 years ago

Sure can, but since we can't tame whales there nothing i can do on that front.

http://www.alabit.dk/supremacy2k.rar This one contains 6 tamed doggos.

mircearoata commented 5 years ago

I still ended up creating a new save to check on, because I needed all the animals so that I don't miss enemies / kill doggos. Works now, PR #92

supremacy2k commented 5 years ago

Fantastic! Thank you. :)

Goz3rr commented 5 years ago

Thanks, I'll make a new release later today with this in it

supremacy2k commented 5 years ago

I compiled my own to test it. Went to an area where i had been at the outskirts of it, and it was mostly empty.

Found 2 boars, and TONS of bees.

mircearoata commented 5 years ago

Where exactly did you go?

supremacy2k commented 5 years ago

In upper left corner of the map (satisfactorymap.com), there is 2 geysers. In that area.

mircearoata commented 5 years ago

I saw the bees, and they are called CreatureSpawner so they don't get deleted... The only thing you can do from the save editor is to delete both creature and enemies (or check each of the CreatureSpawner locations to see if it is friendly or enemy), but as a mod you could delete enemies when they show up, and set as killed. The mSpawnData Creature property gets a value when the creature spawned (and probably in a range from the player). Also, what are "boars"?

supremacy2k commented 5 years ago

What i call boars are called Hogs in-game. https://satisfactory.gamepedia.com/Fluffy-tailed_Hog

The reason i posted about the 2 hogs, is because having this cheat becomes kinda pointless, if not most or all enemies are spawned at the beginning of the map, making a "kill all" function way less effective.

I'll do some more testing later tonight (6pm my time atm), and see if i can find an area where I'm 100% sure i have never been.

Edit: The bees are called Flying Crabs it seems.

mircearoata commented 5 years ago

I even killed everything and the crabs still spawned. I think is the game's save/load issue here. I had some crabs respawn in my save too. I will try killing them ingame, save and reload to check if they respawn

supremacy2k commented 5 years ago

I think they respawn if you don't collect what they drop. I had it happen a few times, and as long it's just the flying crabs, we have something for sniper practice :)

mircearoata commented 5 years ago

Killed ingame, reloaded, didn't respawn, used the cheat again (after killing ingame), reloaded, respawned. My guess is that is the KilledOnDayNumber Edit: I did collect the drop before saving

supremacy2k commented 5 years ago

They don't make it easy, do they? Can you set KilledOnDayNumber to.. 1 or something? It seems they use -1 various places for inf or N/A if you will.

mircearoata commented 5 years ago

I set it to current_day-1 and it worked. (Edit: 10000 worked too) Maybe it checks for the distance from the initial spawnpoint, whether or not it would have been reachable? 1 billion works too so I'll leave it that, but still, it is a CreatureSpawner...

supremacy2k commented 5 years ago

Well, as long as they stay gone, I'm happy :D

mircearoata commented 5 years ago

I mean... you can always edit more friendly animals in your save if you want to. If I bug report that enemies are marked as creatures will it get fixed?

supremacy2k commented 5 years ago

Not likely.

At least not anytime soon, i think :) But as long as only crabs remains I'm happy, and will suit most "peaceful mode" use cases i think :)

mircearoata commented 5 years ago

I don't know if only crabs remain, but I pushed a fix (delete all) to my fork anyway (in case other animals appear)

supremacy2k commented 5 years ago

Thy shall not respawn! :D I'll check the update later, thanks :)

MiiKe999 commented 5 years ago

Hi Goz3rr, after clicking delete all enemies and saving it, when I restart the game, all enemies are spawning back like Hogs and those fire throwing creatures. I don't know how this works, I mean if they respawn, what's the use of this cheat? The hostiles are so annoying in this game. Kindly reply.

mircearoata commented 5 years ago

In what area does this happen? Could you upload a save? Check the above conversation between me and supremacy2k. Tl;dr; Coffee Stain named some enemies (mostly crabs and hogs) creatures (which are friendly) probably on accident. The only "fix" is to kill all the animals.

MiiKe999 commented 5 years ago

Then how to kill all animals as I don't care of animals in this game. Please explain as I'm not that familiar with save editor.

mircearoata commented 5 years ago

The same thing you did before, but use this version (it kills all): https://github.com/mircearoata/SatisfactorySaveEditor/releases/tag/0.5.2-delete-enemies

MiiKe999 commented 5 years ago

OK. One last question, will it delete animals from areas I have never visited on the map also? Because that is also which I don't want to deal when visiting new places. I have seen animals with 0.5.3 save editor delete version when going to new places. Thanks!

mircearoata commented 5 years ago

It sets as killed everything that is spawnable (including unvisited areas), but if the devs add more enemies, you will need you to do save edit again for the added enemies.

The underlying issue (enemies being called creatures) is still there, but I can't do anything about it.

supremacy2k commented 5 years ago

I just visited an area i had never been to last night. And it was full of enemies.

It saddens me it's so darn hard to kill them off. I think what's happening, is that as long as there is no player structures, they will keep respawning, like they normally do.

No matter how many times we kill them off in the savefile. :/

mircearoata commented 5 years ago

Ok... I have another idea: move all the spawns below the map. I will try this later

supremacy2k commented 5 years ago

But if that leaves them falling to their death, won't they just respawn again?

MiiKe999 commented 5 years ago

@supremacy2k Have you used 0.5.2 or 0.5.3? Because after using 0.5.2, I haven't seen a single enemy or friendly doggos (which I don't care) upon going to a new area. Also, a simple turn OFF enemies option by dev team would be so good to have and already many people had requested them.

mircearoata commented 5 years ago

0.5.2 meaning my version

@supremacy2k only players die from falling from what I understand, anything else sits on something at around Z 0. Also I'll try to set the spawners position, meaning that it will never be in player's range so it won't spawn

I might give spawning some doggos as a consolation (optional) for losing all their spawns

supremacy2k commented 5 years ago

MiiKe999, I'm testing on 0.5.3.0 Mircearoata, There was something i didn't know. :D But i look forward to more testing. :)

More Doggos are always good, my 6 is regular slug hunters, it's amazing :D

mircearoata commented 5 years ago

Try with my version, it has the 1 billion to KilledOnDayNo, which I don't think was added in the pull request in time. If it still happens I will try to move them under the map

supremacy2k commented 5 years ago

Okey, I downloaded your version, compiled it, backup'ed my savegame, and I'm gonna try it, and cross the map.

I'll update this post, when I'm done reaching the new area.

Emm, the version im grabbing from your profile, don't include the kill all cheat :D Am i doing something wrong here?

mircearoata commented 5 years ago

Delete-animals branch. Or the already compiled one from releases

supremacy2k commented 5 years ago

Yeah i found it. :)

supremacy2k commented 5 years ago

I've been around... like a lot. Not even the flying crabs remains :D

MiiKe999 commented 5 years ago

@mircearoata The delete cheat in 0.5.2 is superb and I am really thankful for the work you put in, never had enjoyed this free roam building in satisfactory as I am enjoying right now. No animals, no bull-crap; only factories and exploration for minerals.

mircearoata commented 5 years ago

@MiiKe999 felt the same after making it. If it works, I will try to add the compensatory Lizzard Doggos and pull request the fixes

mircearoata commented 5 years ago

3 compensatory Lizzard Doggos and fix for the respawning crabs are in PR #98. Hopefully Coffee Stain adds the spawner type in some update, but until then, use the cheat more times if you want more doggos. Then we might need a building to auto-collect from doggos to automate slugs :)

supremacy2k commented 5 years ago

While looking for sulfur nodes today, i just ran into 3 hogs. I think the game respawns some of them (they are the first ones i see)

Thought I'd let you know.

Edit 1: Just found an Alpha Spitter and a spider/cat, Edit 2: Found lots of wildlife in the same area, but my game keep crashing, so ended up turning around and drove home.

At the top part of this picture, i was going for the sulfur node. (It's the southern part of the map, near the crater, east of the plains) https://imgur.com/a/cyzPLgr

mircearoata commented 5 years ago

I made an animal map (https://imgur.com/a/N4Zcf16) from your save file and the area you were in has no animal spawns saved. Some areas look too peaceful to be true (NE, around center, and your area too). Either it doesn't save the spawns in areas you didn't visit (which makes the peaceful cheat annoying to use every time you explore), or... just doesn't save some (which is even worse and unlikely). I'll do a map on a new save, maybe in each of the spawn locations I also found some hogs between the limestone and the crashed pod (https://imgur.com/tnbmWES), but I thought I forgot to use the latest update (although I did because I have the doggos)

Edit: The same locations are on all saves (yours, new in Grass Fields, Rocky Desert and Northen Forest) https://imgur.com/a/1YesKK4

supremacy2k commented 5 years ago

I uploaded my latest save, i used the cheat twice, before finding those animals. Head north-east past the crater in the south, and you'll encounter them

http://www.alabit.dk/supremacy2k-savegame.rar

Edit: I haven't been up in the north-east corner, and the coast down south from that area (pretty much the entire eastern coast). So it seem that it spawns the animals in unvisited areas.

mircearoata commented 5 years ago

I moved the spawns under the map and it looks like it worked (on the first save you uploaded). Went all around the sulfur and uncovered pretty much all the area between the factory and the sulfur (I think I went the same path you went) and found nothing. Pushed the update to delete-animals branch on my fork.

MiiKe999 commented 5 years ago

@mircearoata Moving them under the map will be useful or we will hear animal sounds from underground? If I use this update on the same save in which I had used your delete-cheat, will it spawn dead animals underground afresh or I am not getting it? Because my save is same. So, Coffee Stain is really pushing hard to make animal dominance on this factory building sim, aren't they?

mircearoata commented 5 years ago

I doubt you will hear anything from around 1000 kilometer under the map, and I doubt that's in range to spawn too. I don't think they actually did this on purpose, but rather that's the way they check if an animal should spawn and maybe there's something I'm missing between the unspawned and killed, but I can't figure what. Edit: They actually spawn (if not killed by the previous version), but under the map. Except that ↓ stinger which somehow got to the surface