
She's the best girlfriend ever help 😭😭😭😭 I love her so much

She's the best girlfriend ever help 😭😭😭😭 I love her so much
There's also a pet nightopian i forgot to include here, I'll be posting my yugioh and zelda miis soon😛
I'll post the guide along with pictures in the comments.
Its kinda tradition for me to draw NiGHTS as a test for any new sketchbook or graphics tablet I get, And this is no different!
Please dont mind the roughness, I haven't used pen pressure in half a year.
I've always been the sort of collector who gets 2 of things I really like, so I can have one mint in the package and one open to be displayed. I've known for a while that one of these guys would have to go on the chopping block eventually, but I feel so torn, it's like Sophie's Choice. T_T What would you guys do? Keep the one that's open so it can be out and seen all the time, or the one in perfect condition but almost impossible to display??
I've been working on reverse engeneering the code of Nights Journey of Dreams recently, mostly the myDream/ALife part of the game. My goal is it to finally understand what is going on there, and to understand why nobody seems to be able to properly grow the mountain in myDream (required to get the mountain medal).
That is not what I found out, though (for now), but I already have a much better understanding on how the ALife functions. I'll start with the hottest stuff:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
How to ACTUALLY get a Super Pian:
The super pian is probably one of the most enigmatic parts of the game. There exist some therories on how to get them, involwing long and complex genetic chains. I'm happy to say that the reality seems MUCH more easy (pseudo code alarm, and reddit hates the formating here):
new_pian = aLifeBreedInit(parent_1,parent_2);
if (new_pian->generation_count < 20) {
king_pian_born = false;
}
else {
c_1 = superPianCheck(new_pian);
c_2 = superPianCheck(parent_1);
c_3 = superPianCheck(parent_2);
if (((c_1 == 0) && (c_2 == 1) && (c_3 == 1)) {
/* if intel higher than 103 */
if (new_pian->stats->intel >= 103) { //or 102, im not sure weird number either way, intel = intelligence
uVar3 = createKingPian(gAlifeCommandInitHelp); //special object for king pian, probably menages building the castle
king_pian_born = 1;
}
else {
king_pian_born = 0;
}
}
else {
king_pian_born = 0;
}
// the most important part
int superPianCheck(aLife_record *pian)
{
int id;
int i;
id = pian->id;
if (id != 0) {
if ((0 < id) && (id < 0xb)) {
return 2;
}
return 3;
} int s = 0;
for (int i = 0; i < 4; i++) {
if (pian->stats->traits != 0) {
return 1;
}
}
return 0;
}
generation_count is derived during inheritence. The child inherits the highest generation_count among the two parents and the increments it by one.
So basically:
4 (IMPORTANT!!) the child has an intelligence greater than 103/102
So it isn't really THAT complicated!
By the way the maker of this guide https://gamefaqs.gamespot.com/wii/938874-nights-journey-of-dreams/faqs/81703 identified that King Pians usually have green coloured flowers upon dying duo to there high intelligence stat, so hats off for that, that actually helped in codifying this part of code.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
What these things are made of:
Unlike Sonic Adventures Chao, the pians are rather simple creatures (actually in the Dreamcast original they were even simpler, but I disgress…). They do not have complex personality traits. I won't write what I'm not 90% sure of. It works just like youd expect:
A pian has 8 stat categories: intel (intelligence, as seen above), power, skill, speed, fly, sense, curio (curiosity), socia (social) It has them as base stats AND as active stats that can be changed (more on hat later). The minumum is 0 and 200 is probably the maximum. These stat seem to be used quite a lot for gating different kinds of action, movement speed, fly time etc...
A pian also holds 5 trait bytes, which are more than likely for the different body parts. It holds 5 genes in 2 Slots.
A pian has a ticking life span that is refurbished by feeding them blue Chips. Super Pians start at 50.0 and all else at 30.0. The game Counts it down an unknown delta, but knowing the base this can probably be calculated. It is "knocked out" when it reaches 0, and a knocked out pian is removed from the game upon saving the game.
They also use a fuzzy logic System in order to calculate "Attention" (what the pian will do, like going to the Player, running from a Nightmaren), but they dont hold those Parameters in of themseselves.
Interestingly there exists a smaller version of the entity form, which inherits from the same bigger struct. These hold the same data, minus the stats. Who are these entities? I can't be sure, but do you know of all these funny objects that seem to randomly spawn in myDream? Well I believe they use the same blueprint as the Pians and that they are generated in a similar way to pian breeding, the game seems to spawn them similarily to the Nightopians on stage load, but they dont use the pian AI. They do have a lifespan that counts UP. Would be a pretty clever way to handle these objects!
But thats just a theory, a-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Inheritence:
Here it gets fun. Stat inheritence is pretty easy:
The game takes the base stats of the parants, then decides which one has the higher targeted stat. (parant_2 > parant_1) On a tie parant_1 wins. The game then does a random roll, with a 0.75 chance the winner gets passed on.
The appearance of the child is inherited from the parents appearance, we do it for the winner of the first 5 inherited stat (Intel, power, skill, speed, fly), and then the losing gene is written into the second gene slot while the current second moves up. It is not known what stat maps to which Body part, but I did find a few strings ABOVE the place I found the names of the stats: Body, Chest, Arm, Head, Waist, Leg, Wing, Ring (probably the hallow) In that order. Make of that what you will
Then the game rolls for the two sets of aleels, which are passed on depents on a domination matrix of stats!
Onto the dominamce Matrix[parant_1][parant_2]:
(0, 1, 1, 2, 0), if 0: no one wins, so it falls back on which parant has the higher stat
(2, 0, 1, 1, 0),
(2, 2, 0, 1, 0), if 1: Parant 1 wins
(1, 2, 2, 0, 0),
(0, 0, 0, 0, 0), if 2: Parant 2 wins
The game runs two loops for the two sets, the loser gene of the first round is saved as a backup if in the second round winner is 0 it gets written into that slot.
At last the game Looks into every the newly created 2 gene slots. If they are identical, the game sets the first slot 0.
The name of the pian is then generated based on the genes...
… Wait… Oh...
Did you notice whats off? On a passing glance the game seems to implement a simplified mendele inheritence system, with dominating and resessive genes... but it does not! The game just checks the parants ACTIVE appearance, not the genes when determaning body parts. The game would have to calculate if the active appearance or one of the genes should be passed down, for this to be a true implementation… Either someone should be fired for that blunder, or this system is SUPPOSED to behave like that. Perhaps these "unused" slots determin the Nightmaren abilities the pian (like sleeping, flying in a bubble). This would allow for up to 10 different abilities, which could make sense. Theories, theories… But no evidence!
There exists also a variation that simplifies the process for when parent 2 is not id 0 (non pian/mepian) entities. Probably one for pian Nightmaren collision? That code heavily favours parant 1.
!!UPDATE!!
I looked at how what I still assume to be the nightmaren collision part, and it made me even more sure of it. I actually took a look at it:
Stat inheritence works the same as in normal breeding. (nightmarens do have stats)
The genetic traits, saved into the Slot are also used here, but it works differntly. If the pian wins it reklessly writes both its slots down and the nightmarens is ignored. Even if the nightmaren wins the stat check, the pian enters their first Slot into the childs new Slot and the nightmaren is moved to the second. If the pian already has two traits there the nightmaren writes it into the FIRST slt and the pian takes the second. That is why abilities seem dependent on body parts, because they are.
According to this logic, and the base stats below, certain Nightmaren SHOULD be much more likely to pass down certain Body parts and in turn their Special abilities. This MUST be how it works, this isnt mendel in anyway, genes are just supposed to give a Pian nightarens abilities.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
How to "train" your pian:
It's pretty clear that you can optimise a pians base stats through breeding. But other then that, you can increase ist current stats, through what I would call "Training".
A pian likes to move around, it does so by selecting a valid target position in ist range. It uses the pians speed to determine how quick it gets there. Then the game does an interesting thing:
if (state == 2) {
time -= delta_time;
if (timer <= 0.0) {
increaseSpeed(0.5, stats, 3);
timer = 10.0f;
}
}
if the current world state is 2 (I think if your playing one of the humans, but I'm really not sure), and a countdown is 0.0, speed is permanently increased by 0.5 and the timer is reset.
I don't know if this works for other stats in a similar way, as xref hasen't let me to somthing similar yet, BUT if you could raise the fly stat in that manner, this could be useful for raising the required fly stats for the mountain achievment (still haven't found that logic, sadly)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
pian and Nightmaren base stat weights:
When the game populates the world with pians and Nightmaren/mepians (the pians probably in the stages, but I'm not sure), they need stats without any parents the game can fall back to. For the stats, a pian and every nightmaren type have a average stat weigth determaind by the lowest and highest it's clamped at.
Example: min_stats 0.5, max_stats 0,8
aLife_type_info info = aLifeTypeInfoGet(base->id);
stat_range = info->base_stat_range;
if (stat_range == NULL) {
for (int i = 0; i<8; i++) {
base->stats[i] = 0;
base->base_stats[i] = 0;
}
}
else {
for (int i = 0; i<8; i++) {
value = (short)(int)(128.0f * random(stat_range.min, stat_range.max));
base->stats[i] = value;
base->base_stats[i] = value;
}
}
we roll 0,65 between min and max. So we get a base stat of 83.2, rounded down to 83.
How one know these base values? I have them, straight converted from the Assembly:
pian_gen_stats -> pian/Nightopian
intel_min 0.1
intel_max 1.0
power_min 0.1
power_max 1.0
skill_min 0.1
skill_max 1.0
speed_min 0.1
speed_max 1.0
fly_min 0.1
fly_max 1.0
sense_min 0.1
sense_max 1.0
curio_min 0.1
curio_max 1.0
socia_min 0.1
socia_max 1.0
bee_gen_stats -> Beezee
intel_min 0.5
intel_max 0.8
power_min 0.1
power_max 0.4
skill_min 0.3
skill_max 0.6
speed_min 0.6
speed_max 0.9
fly_min 0.7
fly_max 1.0
sense_min 0.4
sense_max 0.7
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
seahorse_gen_stats -> Seapo
intel_min 0.6
intel_max 0.9
power_min 0.5
power_max 0.8
skill_min 0.0
skill_max 0.3
speed_min 0.2
speed_max 0.5
fly_min 0.4
fly_max 0.7
sense_min 0.6
sense_max 0.9
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
ell_gen_stats -> Eelon
intel_min 0.6
intel_max 0.9
power_min 0.7
power_max 1.0
skill_min 0.1
skill_max 0.4
speed_min 0.0
speed_max 0.3
fly_min 0.0
fly_max 0.3
sense_min 0.7
sense_max 1.0
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
gull_gen_stats -> Meewy
intel_min 0.1
intel_max 0.4
power_min 0.5
power_max 0.8
skill_min 0.4
skill_max 0.7
speed_min 0.6
speed_max 0.9
fly_min 0.7
fly_max 1.0
sense_min 0.0
sense_max 0.3
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
shleep_gen_stats -> Its the only returning 3rd Level Nightmaren,so ist the only one that had an established name in early development
intel_min 0.2
intel_max 0.5
power_min 0.5
power_max 0.8
skill_min 0.7
skill_max 1.0
speed_min 0.1
speed_max 0.4
fly_min 0.4
fly_max 0.7
sense_min 0.6
sense_max 0.9
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
scorpion_gen_stats -> Scaropion
intel_min 0.4
intel_max 0.7
power_min 0.3
power_max 0.6
skill_min 0.6
skill_max 0.9
speed_min 0.1
speed_max 0.4
fly_min 0.0
fly_max 0.3
sense_min 0.6
sense_max 0.9
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
bat_gen_stats -> Mothpill, yes you read that right. Iternally they are known as "bat"
intel_min 0.5
intel_max 0.8
power_min 0.1
power_max 0.4
skill_min 0.6
skill_max 0.9
speed_min 0.4
speed_max 0.7
fly_min 0.5
fly_max 0.8
sense_min 0.4
sense_max 0.7
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
baloonFi_gen_stats -> Balloga
intel_min 0.3
intel_max 0.6
power_min 0.5
power_max 0.8
skill_min 0.4
skill_max 0.7
speed_min 0.1
speed_max 0.4
fly_min 0.6
fly_max 0.9
sense_min 0.7
sense_max 1.0
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
turtle_gen_stats -> Murtle
intel_min 0.7
intel_max 1.0
power_min 0.3
power_max 0.6
skill_min 0.2
skill_max 0.5
speed_min 0.1
speed_max 0.4
fly_min 0.4
fly_max 0.7
sense_min 0.6
sense_max 0.9
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
caterpillar_gen_stats -> Deworm
intel_min 0.6
intel_max 0.9
power_min 0.5
power_max 0.8
skill_min 0.7
skill_max 1.0
speed_min 0.4
speed_max 0.7
fly_min 0.3
fly_max 0.6
sense_min 0.1
sense_max 0.4
curio_min 0.1
curio_max 0.9
socia_min 0.1
socia_max 0.9
According to this, Turtle Mepians are the best for increasing intelligence and Meewy best for flying. But this caps you at 128 in these stats.
Then if thats the max, how does a King Pian generally have a high intelligence stat, if it has been breed with so many different pian, and not a high fly? I dunno, I'm still working on that part-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Dynamic Music System:
As you know, there exist 4 different version of the myDream theme, al-di-la. These arent played randomly, the game choses one of based on a threashould system. Then it creates a random playlist of the segments.
It checks all creaters in an radius, then it does this:
addEntityToMyDreamStateCheck((proximity_carry *)¶m_1->all_entitie_stats,entity_ptr);
if (entity_ptr->entity_type_id == 0) {
addEntityToMyDreamStateCheck(¶m_1->stats_pian,entity_ptr);
}
else {
addEntityToMyDreamStateCheck(¶m_1->stats_others,entity_ptr);
}
void addEntityToMyDreamStateCheck(proximity_carry acc, aLife_entity entity) {
if (entity->life < 0) {
acc->counted_entities++;
}
for (int i = 0; i<5; i++) {
if (entity->trait.trait[i] == 0) {
acc->empty_trait_slot++;
}
else {
acc->filled_trait_slot++;
}
for (int i = 0; i < 2; i++) {
uint16_t val = entity->unknown[i];
acc->unknown_count[i] += (float)val / 32768.0;
}
for (int i = 0; i<8; i++) {
uint16_t val = entity->stats[i]*0.0078125f; //you can also read this as dividing by 128.0
acc->entity_stats[i] += val;
}
}
It adds the Entity into two buckets: a bucket for all entities and then a counter for id 0 ALife or non id 0 ALife.
In that bucket, it counts the number of entities with live SMALLER then an unknown thraeshold, counts both the amount of active trait slots that are 0 and non zero, goes two times over a (4 bytes) block and counts stat groups together.
Then, after going through all entities in the radius, it normalises each of the stats and the unknown value based on the amount of counted entities.
The formula is: sum* 1/n, n is entity_count
With THAT calculated the game can determin which tier of music should play, better averages lead to "better" music.
This logic seems to be used in a lot of different places, so it will be interesting to see what kind of affect it has on gameplay.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm open to any questions!
Just keep in mind I have only just started uncovering logic. So I can only speculate on most things. Yes I'm actively working on it, and I will not stop in the forseeable future. Also, don't count on everything I wrote here being 100% true, especially the data structor of the aLife, since my understanding on that data is still very hazy right know.
In the end, I hope some of you will have fun with this Information! EDIT: I added somthing important to the inheritence logic, how it works with Nightmaren. And Im 100% sure that that must be it.
Since I don’t own any official NiGHTS merch, I decided to make my own.
So far I’ve made a pen holder, notepad holder, trinket box, and two coasters.
I’ve already got plenty of Sonic stuff on my desk, so it felt like NiGHTS deserved some spotlight too.
Everything was made using a 3D printer and UV printer.
Let me know what your favourite item is?, or if there is something else I should try make next?
First garden is the save I used *after* knowing more about pians and their hidden attributes, where I was more intentional about collecting ones with good stats and breeding them, 163~ hours played. Second garden is the one I had before knowing as much as I do about them now, 106~ hours played.
NiGHTS probably uses lavender and reala uses cherry or strawberries but what do you think?
I also figured out how terrain growth and the mountain achievment works.
Explanation in comments.
This will be the last technical deep dive for quite a while, as I don't want to spam this subreddit every few days with the neat tibbits I find.
I just thought this one was interesting enough!
Honestly, these two should meet at some point; their existence together makes more sense than Sonic and Crash Bandicoot.
My saturn hasn't arrived yet, but this as my first saturn game i never realised how absolutely GORGEOUS the case is on Saturn games, im so glad I didn't buy the jewel case version!!! Im so glad ive started collecting Sega stuft
more silly images of nights in miitopia :D
The chicken superhero and the dream jester are having fun on the beach together. Are we not missing a certain blue hedgehog that can move faster than the speed of sound?
Art by: JoeDoughBoi