FortressCraft Evolved

FortressCraft Evolved

No Mynocks In Rooms
58 条留言
Wariat117  [作者] 2020 年 3 月 17 日 下午 3:55 
BeanSlinger419 2020 年 2 月 17 日 上午 7:17 
Well, this gives me more of a reason to use Rooms. I now just wonder if there is a limit to room size, mainly just height.
Wariat117  [作者] 2019 年 12 月 28 日 上午 5:27 
as of right now i'm on break from making mods, i'm catching up anime :D

but such mod wouldn't be a big trouble
it would just require searching for specific code
as of right now game constantly spawns tunnel nukers (that's how bombers are called in game) if there is less than X number of them (X aka idk how much exactly)

so if mod was constantly killing nukers and game was constantly spawning them then it would hit performance
person creating such mod would first have to remove the code which spams those tunnel nukers and then make code to kill them


You can use "mob controller" mod tho
it has mob despawner mode, you will just choose it to constantly despawn all nukers that spawn
Octalgenesis 2019 年 12 月 28 日 上午 5:21 
in a seperate mod of course
Octalgenesis 2019 年 12 月 28 日 上午 5:21 
would be nice if you could also remove those bombers
Octalgenesis 2019 年 12 月 28 日 上午 5:21 
ok thank you for a quick response
Wariat117  [作者] 2019 年 12 月 28 日 上午 5:19 
it was always working and removing mynocks which were spawning inside of room

Stinosko was just talking about situations where someone builds room over mynocked conveyors or about situation where someone breaks their own room, mynocks spawn, someone repairs room

mod wasn't removing the mynocks that spawned outside of room because in those situations the person responsible for this stuff could simply... kill mynocks or break conveyors and rebuild them

I have added the code which Stinosko proposed since it doesn't change the effect of mod.
if it removes those mynocks which spawned outside of room and were roomed later then it's just a bonus
Octalgenesis 2019 年 12 月 28 日 上午 4:53 
so, is it working?
Stinosko 2019 年 12 月 21 日 下午 2:52 
My mod gonna go with if room is heated/cooled correctly, mynock wont spawn on normal/trivial mode but on hard mobs they still spawn but the normal delay :-)
Stinosko 2019 年 12 月 21 日 下午 2:49 
¯\_(ツ)_/¯
Wariat117  [作者] 2019 年 12 月 21 日 下午 2:32 
I totally don't get it o-o
This code shouldn't have any effect different than the original code
Even if there was code I didn't see for hp or dead state or cached check segment it would trigger my code anyway

but well... if it works... then it works, screw the logic :D
Stinosko 2019 年 12 月 21 日 下午 2:04 
I tested it on the skyisland mutator, placed a unfinished room at first island waited to at least 2 mynock on the belts than finished the room and see what happened => original code they just continued eating from belt,my adjustment and they both died "instantly" with no more eating :-)
Stinosko 2019 年 12 月 21 日 下午 1:56 
[HarmonyPatch(typeof(HiveMob), "MobUpdate")]
internal class NoMynockInRoom
{

private static void Prefix(ref HiveMob __instance)
{
while (__instance.CachedCheckSegment == null)
{
Segment segment = WorldScript.instance.GetSegment(__instance.mnX - (long)((int)__instance.mUp.x), __instance.mnY - (long)((int)__instance.mUp.y), __instance.mnZ - (long)((int)__instance.mUp.z));
__instance.CachedCheckSegment = segment;
if (__instance.CachedCheckSegment != null && __instance.mUp != Vector3.zero && __instance.CachedCheckSegment.SearchEntity(__instance.mnX - (long)((int)__instance.mUp.x), __instance.mnY - (long)((int)__instance.mUp.y), __instance.mnZ - (long)((int)__instance.mUp.z)).mnRoomID != -1)
{
__instance.mrSleep = 30f;
__instance.mnHealth = -1;
MobManager.instance.DestroyMob(__instance);
}
}
}
}
Wariat117  [作者] 2019 年 12 月 21 日 下午 12:41 
also how do you test it?
waiting for mynock to spawn is huge pain in the butt ;-;
and on top of that he is supposed to spawn in this one specific room

this mod doesn't remove mynocks spawned by mob controller saying just in case (compatibility between mods)
Wariat117  [作者] 2019 年 12 月 21 日 下午 12:37 
could you copy paste your whole code :D?
since I can't believe I would like to see it myself
Wariat117  [作者] 2019 年 12 月 21 日 下午 12:32 
from the code side it's literally impossible
there had to be other change too
or maybe you placed the -1 code in other place than the destroy code

anyway... could you check if your code kills normal mynocks? those outside or rooms?


I will add the -1 code next to destroy code, but I really don't believe it will make any change
Stinosko 2019 年 12 月 21 日 上午 11:47 
In my test MobManager.instance.DestroyMob(__instance); doesn't kill a mynock that already existed on belt that gets roomed but set the health to -1 worked ...
Wariat117  [作者] 2019 年 12 月 21 日 上午 8:37 
welp -> that's actually how it is supposed to work
since someone breaks their own room they can break the conveyor with mynocks too

if you feel like you need something for that break your own room thingie then feel free to make mod for that



also the
__istance.mbhealth = -1
wouldn't kill the mynock in such situation (not to mention I have used this one in the past but removed it due the fact that mynocks are able to eat resources before they die if this is used)

you have probably removed the
while (__instance.CachedCheckSegment == null)
or some other if
Stinosko 2019 年 12 月 21 日 上午 4:53 
Once you break a room, mynock spawn, room gets rebuild, mynock spawned doesn't get killed with the current version 😊
Wariat117  [作者] 2019 年 12 月 21 日 上午 1:17 
You talk about situation where belt walks into a room o-o?

Also mod is supposed to kill on first mod update because of the
while (__instance.CachedCheckSegment == null)
once you remove that the mod will check all mynocks constantly to see if they are in room
theoretically if there were maany mynocks spamming that code it could hit a performance a little

if the "while" is there then in checks once, at the spawn
Stinosko 2019 年 12 月 20 日 下午 2:28 
If mynock is on a belt, the belt gets ibsude a room, the mynock doesn't get killed on next mobupdate.
I changed the statement from
MobManager.instance.DestroyMob(__instance)
Into:
__istance.mbhealth = -1

And the mob get killed once the belt with mynock gets insode a room 😊
Wariat117  [作者] 2019 年 12 月 20 日 上午 11:52 
it wouldn't change anything tho o-o

In the original code there is:
if (this.mnHealth <= 0)
{
MobManager.instance.DestroyMob(this);
this.SetNewState(HiveMob.State.Dead);
return;
}

Basically it will do the same as my
mobcontroller.istance.DestroyMob(__instance)
the only difference is that this.SetNewState(HiveMob.State.Dead); it is added to the code


Also you talk about fix... is there anything wrong in mod rn?
Stinosko 2019 年 12 月 20 日 上午 7:46 
I started modding too and found how to kill all mynock in new created room => set their healt to -1
__istance.mbhealth = -1
Add that before the mobcontroller.istance.DestroyMob(__instance)

I'm gonna try to make a more advanced mynock room mod but think this fix is also relevant to you :-)
Wariat117  [作者] 2019 年 5 月 16 日 下午 12:02 
Oki, no more tests needed.
It seems I have forgot to set no bodies mod into "server-only"
And for super beacon I have found multiplayer code :D

Soon I will upload it.
Wariat117  [作者] 2019 年 5 月 15 日 下午 1:32 
oki, in case of worms the assumption might be right
in case of super beacon, the mod isn't server-only, but I haven't seen any code for despawning items on multi, I wonder if singleplayer code will do
Stinosko 2019 年 5 月 15 日 下午 12:25 
I tested the mynock in room => yes it neede to be running on both sides...

Others i need to test later but i assume it will be the same
Wariat117  [作者] 2019 年 5 月 11 日 下午 2:15 
oki, now I wonder if other mods got the same problem now ;-;

tomorrow once you start test, could you try those 2 mods too?
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1736690787
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1726867359

no bodies mod -> check if player bodies dissapear after death (jet turbine doesn't drop bodies so it's better to die from fall dmg) and if worm bodies (and their dirt) stays after their death, "mob controller" should help with this one (spawn worms -> let turrets do the job)
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1655118516

super beacon -> set it's delay to 30+ and when it starts waiting destroy random blocks/plants in as many segments as you can and once machine collects them check if blocks dissapeared from the ground or if they actually stayed but they are frozen and you can't pick up them (normal blocks move around when they lay on the ground)
Stinosko 2019 年 5 月 11 日 下午 2:09 
Will be for tomorrow ;-)
Wariat117  [作者] 2019 年 5 月 11 日 下午 2:02 
it's 1 of the possibilities, when I checked the code I have found out that I have used general code which affects both MP and SP

digging deeper in the function I have used there is this:
if (NetworkManager.mbHostingServer)
{
NetworkManager.instance.mServerThread.mMobDeletions.Enqueue(mob);
}

but because mod is server-only... the client doesn't load the code, unless dedicated server for whatever reason doesn't mark itself as "hosting" o_O


Could you try to mark mod as non server-only (both on client and dedicated) and then see what happens?
Stinosko 2019 年 5 月 11 日 下午 1:56 
Ooooh server-only might be the issue ;-)
Wariat117  [作者] 2019 年 5 月 11 日 下午 1:41 
hmmm
probably there is separate class to despawn something on multi and separate to despawn on single, I have seen sometimes network queue in random locations, maybe that's it ;D?
or the fact that mod is server-only
Stinosko 2019 年 5 月 11 日 下午 1:26 
Visual glitch on the server => you still see mynock spawn on the belts in room but they don't eat anything and rejoining the server removes them => probably a desync from server and client.

I think this is not easy fixable and not worth the time. Just letting you know :-)
Stinosko 2019 年 5 月 7 日 下午 12:35 
Hahahhahahaha nice video :-D
Wariat117  [作者] 2019 年 5 月 7 日 下午 12:32 
probably dev tried some performance stuff or something?
the spiderbot bug started in the P24, probably tunnel nukers too

I have messed with tunnel nukers on normal world... and on normal worlds there is over 2x less tunnel nukers o-O
and the tunnel nukers on normal worlds don't despawn because of null segments ;d
Now I wonder what causes nulling of segment for tunnel nukers... in case of robot it's the fact that he can't keep segments loaded and when player moves away (or anything that provides segments) then he flies up





and... for whatever reason while trying to find out why tunnel nukers don't work I have had feeling that I should listen to this
https://www.youtube.com/watch?v=xUlJ_6WHfh8
Wariat117  [作者] 2019 年 5 月 7 日 上午 11:52 
overminds don't spawn instantly ;d they are just decorations , their existence isn't needed for anything (wasps and tunnel nukers spawn if there is no overmind too) in order to keep performance, they spawn later in the game, the worse your performance the later they spawn

I'm testing on P24
it seems that tunnel nukers die of the same as spiderbot is flying away... they hit null segments
Stinosko 2019 年 5 月 7 日 上午 11:50 
Never mind the overminds spawned after 2h :D
Stinosko 2019 年 5 月 7 日 上午 11:47 
i had folow topic enabled for p25 => i thought there would be more drama in the comments ;-)
Stinosko 2019 年 5 月 7 日 上午 11:46 
Hmmmm on p24 i had overminds or do you mean on p25 they don't spawn? :/
Wariat117  [作者] 2019 年 5 月 7 日 上午 11:35 
erm... exactly the same thing happens for me in the unmodded sky islands o-o
tunnel nukers just spawn and die instantly
Wariat117  [作者] 2019 年 5 月 7 日 上午 11:25 
they just blow in the middle of air o-O wtf
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:52 
I'm downloading back the P24 ;D
I'm also going to watch one anime, after I end I will visit overminds on my world to see what happens to them
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:48 
'I meant thet the game could be played in linux"
Well that was always the thing :D dev just refused to release any betas for it

I have posted the info about mynocks, we will see if he ignores it :V
https://psteamcommunity.yuanyoumao.com/app/254200/discussions/0/1648791520838868812/#c1648791520854939208

"I think i got a issue with extend skyblock mod => overloard are not able to spawn ingame they release infinte amount of tnnulnukes that die on spawn...."
The sky islands rework could cause this (it spawns large rocks and glowtubes and those are able to block nukers)
No idea how expand mod could cause this o-O
Unless overminds spawned somewhere underground and they try to blow their way throught rocks
Stinosko 2019 年 5 月 7 日 上午 10:40 
I meant thet the game could be played in linux, support for beta's in lunix, i have no clue when that started...
I think i got a issue with extend skyblock mod => overloard are not able to spawn ingame they release infinte amount of tnnulnukes that die on spawn....
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:33 
nvm... didn't notice single " } " (it marks where code ends)
The code for "-2147483648" is on all modes, not sky islands, sky islands has only 10k+
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:30 
1. You mean linux supports betas since you play? or that the game works on linux since you play? (I'm talking about the first one, dev refused to add betas to linux/mac, the mainline version had linux/mac releases tho)

2. just downloaded p25... and the code says "if sky islands and Y coord is more than 10k or less than -2147483648, then don't spawn mynocks"
he fucked up something rly bad o-O How is -2147483648 even close to 32?
Stinosko 2019 年 5 月 7 日 上午 10:27 
Linux got support for at least scince i started to play (6 months) ;-)
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:25 
woah, surprise, he finally noticed linux players :D
now it's time for mac too
Stinosko 2019 年 5 月 7 日 上午 10:22 
He made the build for linux on purpose, you can find all possible betas of the headles server here: https://steamdb.info/app/443600/depots/
I can join the game :-D
Wariat117  [作者] 2019 年 5 月 7 日 上午 10:16 
Dev opened the way or someone found out the hole?
I wonder if it's even compatible :D
Stinosko 2019 年 5 月 7 日 上午 10:06 
You can play p25 on headless server ;-)
steamcmd.sh +login anonymous +force_install_dir INSTALLPATH +app_update 443600 -beta linux-staging validate +quit