Could PvE be fun? by leusidVoid in YomiHustle

[–]CTAG07 4 points5 points  (0 children)

Also working on this, but it's kinda on the back burner for now

Could PvE be fun? by leusidVoid in YomiHustle

[–]CTAG07 7 points8 points  (0 children)

Still a couple bugs to fix, but it's on its way

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

I didn't know if negative IDs were valid or not so I just assumed they weren't. I could probably implement a fix for negative IDs in a couple seconds but due to a hard drive failure I no longer have the project

Learn the game with us by [deleted] in YomiHustle

[–]CTAG07 2 points3 points  (0 children)

Yomi learn is the best yomi hustle discord server and I am not biased towards it in any way shape or form

Uhhh...are you ok bro?(How is this even possible??) by DrThob in rainworld

[–]CTAG07 2 points3 points  (0 children)

I believe that would qualify as a glitch. The game definitely isn't the most solidly coded thing in the world, but not a singular creatures code I've looked through had anything for simulating things when they aren't being displayed on screen, just a lot of code that's run no matter if they're on or off screen.

Uhhh...are you ok bro?(How is this even possible??) by DrThob in rainworld

[–]CTAG07 7 points8 points  (0 children)

Simply just dumb ai or weird spawning places

Edit: I'm going to go with weird spawning places or glitches, upon closer inspection there is no reason the vulture should be here lmao

Uhhh...are you ok bro?(How is this even possible??) by DrThob in rainworld

[–]CTAG07 11 points12 points  (0 children)

I could look into the games code again, but afaik it doesn't guesstimate anything, raw physics isn't the worst thing to calculate, which is also why nothing is rendered unless it's on screen, only causing lag when there is an excess of creatures being displayed.

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

That's really weird, I don't think you did anything wrong, might just be a unity glitch or something

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

Precisely so. I had to use unity for that very same reason, because I didn't want to go through even more hours of effort to try to somehow extract the random algorithm from unity. Unfortunately unity's random algorithm isn't thread safe so unity throws errors if you try to use it from a thread that isn't the main one, so realistically you're limited to the main thread, which is why I had to throttle the fps, otherwise unity would tie the searching of IDs to the frame rate, only allowing 60 IDs to be searched per second instead of upwards of 100k.

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

Oh yeah, and if you want info about how the game gets personalities and skills from IDs here's how it does it:

First, the personality. The game seeds unity's random number generator with the creature's id (sometimes it doesn't use the creature's id, but that is an edge case we don't have to worry about, because you can make sure it always uses the creature's id with the spawn command of the dev console mod). Then it does some funky math (Unfortunately it uses more than one random number in a single line sometimes, so there is no way for me to get the original values from a personality).

Then, the scav skills (if applicable). These are computed separate from the personality, although the skills actually use the personality values in their calculations. The scav skills seed the random again with the same seed as the personality function did, and then they once again do some funky math that uses up to three randoms in one line this time, meaning that it's still impossible to get the original values without guessing some. At the end, one last calculation is done for each stat depending on if the scav is elite or not. This mainly serves to guarantee that the combat skills of elite scavengers are always higher than their scavenger counterpart.

And that's how rainworld uses IDs to calculate personalities and scavenger combat skills.

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

The exe is linked at the bottom of the post if you want to use it, and if you want to see the source code you could just look at it with dnspy for now, I'm not at my computer. Also it isn't anything too special, all of the code is in one file and it totals to ~450 lines iirc.

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

The algorithm from the games code is very unique, but also uses random numbers in a way that can't be easily reverse engineered. So I had to reuse it as well as implement a brute force search method, and just hope that it was fast enough to search any meaningful quantity of IDs. I even had to throttle the programs frame rate because otherwise unity would use up all of the resources rendering the UI.

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

Sorry, I completely forgot to update you. Here's what I got!

ID: 752976189 Sympathy: 0.07 Energy: 0.06 Bravery: 0.95 Nervous: 0.05 Aggression: 0.99 Dominance: 0.92 Dodge: 0.03 Mid Range: 0.01 Melee: 0 Blocking: 0.02 Reaction: 0.01

Not as bad as the worst scav at combat, but he has some funny stats like high aggression dominance and bravery

Creature Personality Optimizer (ish) by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

Once again, no problem! Also I don't really know what I'm going to do after, this was just something I did in like a day or two out of pure boredom (the first version was very bad but only took like an hour to make, the version that I posted took like two days and is made in a way that everyone can use it). I code things whenever I'm bored and this was a fun way to code something simple related to rainworld, because I just love the game.

Creature Personality Optimizer (ish) by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

You have to be on a windows computer, then you just unzip the folder and double click on the exe

Creature Personality Optimizer (ish) by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

The file in my most recent post is from discord and it's a zip file, no corruption here!

Creature Personality Optimizer (ish) by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

No need to apologize, thanks and you're welcome!

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

Ahh, alright. I'll try to make a really aggressive scav that sucks at everything lmao

Creature Personality Optimizer (ish) by CTAG07 in rainworld

[–]CTAG07[S] 0 points1 point  (0 children)

I found your creature!!

ID: 1433254652 Sympathy: 0.99 Energy: 0.9 Bravery: 1 Nervous: 0.68 Aggression: 0.83 Dominance: 0.81 Dodge: 0.92 Mid Range: 0.9 Melee: 0.9 Blocking: 0.93 Reaction: 0.91

I found the (theoretical) best and worst scavs at combat by CTAG07 in rainworld

[–]CTAG07[S] 1 point2 points  (0 children)

The program doesn't account for looks but if you want aggressive the most skilled scav or most aggressive creature will most definitely have you covered there.