ChibiParent

I actually like that alternate way. I've gone ahead and implemented it using 'priorities'.

How this will work is say you have [a1, a2, b1, b2] then have priorities in increasing order for [a, b]:
  1. [3, 7]
  2. [>=5, <=5]
  3. [2, 8]
  4. [1, 9]
(so from your example [3, 3, 5, 7] -- b1=5 has a priority of 2 which is larger than all the other a's & b's which have a priority of 1)


The highest priority is used to determine which stat to adventure for, and priorities are only used in adventuring when allowed to balance. Otherwise adventuring will fix for the stat furthest from 5.

I'm also using the highest priority and spread to determine if balancing (if allowed) is a good idea. The max highest priority starts at 4 and will be reduced if dynamic bounds are enabled. The spread checks for at least two stats above and below 5 including 5 both ways.
As always balancing will use a1 & b2 unless they are optimal, in which case a2 & b1.

This replaces the min/max stat level variables along with the max total distance variable.
The ability to set custom optimal levels has also been removed. If balancing is allowed the optimum is [4, 4, 6, 6] otherwise [5, 5, 5, 5].

EDIT: removed attachment since latest version includes all these changes

So my wife who is very mathy was looking at the choices here, and she thinks the priority should be changed to be this:

1. [3,7]
2. [2,8]
3. [>5, <5]
4. [1,9]

The reason for this is a scenario like
2,5,8,8

In this case it will be trying to balance a 2 and an 8, but then due to random events the 5 could become a 6 which is a lot harder to recover from than a 1 or a 9. She says that 5's are very dangerous when balancing.


== on an unrelated topic ==

I have an optimization idea as well, that involves taking substats into account a little bit. Let's say you have this scenario,

2,4,7,8 and you try to balance 2 and 8, and eventually you have 2,4,7,7. I would suggest balancing the other 7 now, because since the last 7 has recently flipped from 8, it takes longer to work it down to 7, and you might get more random events trying to do that, whereas if you work the other 7 down, you might get it to 6 faster, and then that might mean the tougher 7 would be handled by adventures rather than balancing.

Maybe what I'm talking about is a rough way to estimate substats. Let's say you work a stat via balancing up or down, you could say it has +1. Then you could examine the random events that happen to each stat, and when they happen, you could say that something -5 has happened to the stat. So if you had two stats of equal value a 7 and a 7, you could look at which stat has the highest value in your substat tracker and use that to choose which stat to modify. If a stat flips in value due to working it up or down by balancing, you'd reset the substat tracker to something really high like -10 because that stat is very far away from flipping again. If the stat flips due to random events it's not equal to the other stat anymore so it should be worked on -- but the tracker should be zeroed out because once it flips down or up which should happen pretty quickly, it will then be hard to flip again and so the -10 thing would happen to it. My + and - numbers here are just very rough guesses based on my gut. Observing what happens might lead to better optimization on what the numbers really should be. Oh, and the substat tracker would not carry on between rollovers because of the checklist.
 
Last edited:
So my wife who is very mathy was looking at the choices here, and she thinks the priority should be changed to be this:

1. [3,7]
2. [2,8]
3. [>5, <5]
4. [1,9]

The reason for this is a scenario like
2,5,8,8

In this case it will be trying to balance a 2 and an 8, but then due to random events the 5 could become a 6 which is a lot harder to recover from than a 1 or a 9. She says that 5's are very dangerous when balancing.

5 is dangerous when balancing, but it's only risking that random events will make further balancing more difficult (~~ wil require spending your daily 5 adventures to get anywhere safe-ish) [BTW, a 1 or 9 has a $randomEvent % chance of immediate death, which I think is, I think, more dangerous than just being hard to balance]
2 or 8 are dangerous because they can kill your chibi if you leave them like that overnight.
Hmm... that would mean you would want to give higher priority to [>=5,<=5] if you have chibiadventures left, but to [2,8] if not. # <- the important part
And you don't need to split it into [5,5], [>5,<5], because if you have, say, [5,6,7,7], lowering the 6 (where random events go always up) will be chosen over lowering the 5 (where random events are 50:50) anyway, because lowering always choses the highest (most dangerous) candidate first.
 
@Captain Kirk: While those 'priority' levels are being used, they are only being used for adventuring and for determining when to adventure.

So while in your example of [2, 5, 8, 8] the 2 & 8 will be balanced, it is not because of the levels. It is because they are at the extremes of the numbers and they are both not already optimal.
Would you propose that 2 & 5 be balanced instead? Alternatively are you saying that for adventuring the 5 should be lowered instead of increasing 2 or decreasing 8?

But as xKiv said, 5 is bad for future balancing but 2&8 are worse for overnight survival.
I do like the substat guessing idea. I'll look into implementing that tomorrow/this weekend.
 
So.. I don't know anything about my chibibuddy, will this script keep him alive indefinatly (if i run it daily)? Or just as long as possible until the magic of the RNG kills it?
 
@Captain Kirk: While those 'priority' levels are being used, they are only being used for adventuring and for determining when to adventure.

So while in your example of [2, 5, 8, 8] the 2 & 8 will be balanced, it is not because of the levels. It is because they are at the extremes of the numbers and they are both not already optimal.
Would you propose that 2 & 5 be balanced instead? Alternatively are you saying that for adventuring the 5 should be lowered instead of increasing 2 or decreasing 8?

But as xKiv said, 5 is bad for future balancing but 2&8 are worse for overnight survival.
I do like the substat guessing idea. I'll look into implementing that tomorrow/this weekend.

Ok, so my wife says.. remember this prioritization change idea is hers. That if a 5 becomes a 7 overnight (and the stat should have been low) that you would then be spending too many adventures
trying to lower it back down below 5, and then you have nothing left to fix the other problems. So if you have 3 low stats, or 3 high stats that's pretty much a death sentence as well. At least
she's never recovered from such a situation.

In my opinion it's a different kind of risk than the immediate death possibility of a 2 or an 8. Yes, 2 or 8 can kill you but it's a chance. Her argument is 3 low or 3 high WILL kill you. I think this
sort of change should be an option that the user can set. That way, if you are just going for the trophy and all you need is another day or two, you might want to risk a 5 going in the wrong direction.
However if you already have the trophy and just want to keep the chibi going as long as possible you might want to risk a 2 or 8 and in fact if you are "irresponsible" you might be able to fix those
numbers anyway, but being irresponsible would not fix a 5, in fact the 5 would most likely get worse.
 
Last edited:
Ok, so my wife says.. remember this prioritization change idea is hers. That if a 5 becomes a 7 overnight (and the stat should have been low) that you would then be spending too many adventures
The probability of 2 becoming "dead" is higher (double?) than the probability of 5 becoming 7 *and* the consequence (of 2 becoming 0) is worse.
(doesn't matter if overnight or during balancing).
If you had the adventures to fix both the 2/8 and the 5, you had the adventures to fix them in any order.
If you had to choose .. you should have probably chosen to spend adventure(s) on the 5 and non-adventures to balance the 2-8 pair?
(and probably even in that order, to minimize the risk of random event hitting the 5 in the wrong direction).
If you don't have adventures left at all ...
- if random event hits (one of the) "8" stat(s): I have to balance that stat either now that it's 9, or by dropping it to 7 before it got hit, so it doesn't matter if I preffered 2-8 or 2-5
- if random event hits the "5" stat: if I was balancing 2-5 and got it to 2/3-4, I now have 2/3-3-8-8 (if I didn't manage to drop the 5, I have 2/3-4-8-8 or 2/3-6-8-8); if I was balancing 2-8, I have equal chances of 2/3-4-7/8-8 and 2/3-6-7/8-8; all of those have at least one 8, but only some of those aren't [>=5,<=5], and it looks like balancing 2-5 "wins" on that part
- if random event hits the "2" stat: no change, I need to raise that one no matter what

I also think that the substat idea should help - with avoiding a 5 (if both your low stats are 4, and you need to balance out a high stat, chose the "4" that is "lower" by substats).
 
So how about this scenario 4,4,8,8 ... Right now the script would try to balance 4's and 8's, possibly creating a 5. So my wife says a better strategy would be to use adventures to lower the 8's to 7's, and leave it at that because at least you are balanced in the correct direction.

I can't help but wonder if we implement the substat tracker if we could more intelligently guess when to stop trying to balance the 4's. Or if not enough information is known, to decide not to balance them.
 
Fortunately, that adventuring would already happen by default because of chibiParent_distanceTillAdventure. Unfortunately, I have not had any time to add more changes so I'll see if I get a chance this week.

Does it if you have already spent a couple of adventures moving 1's to 2's or 9's to 8's?
 
Does it if you have already spent a couple of adventures moving 1's to 2's or 9's to 8's?
I was mistaken. Adventures will only be used, if there are 3 remaining, otherwise the script will chance it with balancing. I will need to work in some better choices for these situations.

I have been very busy and not had time to work further on the script, but I did do some thinking about the substat guessing. I think the adding of substat tracking should be delayed for now.

If two stats are the same level at the start of the day, either is a good candidate for balancing/adventuring.
If two stats are the same level during the day, then the stat at the extreme would still need to be balanced/adventured.
(e.g. [2, 4, 7, 8] could be [2, 4, 7.5, 8.1] then after balancing [2, 4, 7.5, 7.9]. The extreme 7 would still need to be balanced/adventured. Otherwise the script could have just balanced 7 instead of 8 to begin with.)

Until we know how the substats work and are affected by balancing/adventuring, and how the random events affect these substats (through tracking), the current script should be work well enough.

I hope improve the mentioned choices soon. Reminder to self:
[4, 4, 8, 8] should only adventure EDIT: today started on that exact sequence and ended on [4, 4, 6, 6] > Adventured: 2, Balanced: 29
[2, 5, 8, 8] should balance 2/5 or adventure 5
 
Last edited:
What's going on?

--- Current Stats ---
Alignment: 1
Socialization: 3
Intelligence: 4
Fitness: 9
--- [1, 3, 4, 9] ---

AND NO BALANCING HAPPENS.

These are my settings:

zlib chibiParent_allowAdventuring = false
zlib chibiParent_allowBalancing = true
zlib chibiParent_allowDynamicBounds = true
zlib chibiParent_distanceTillAdventure = 1
zlib chibiParent_haveChat = true
zlib chibiParent_irresponsible = false
zlib chibiParent_pause = 5

---

What have I done wrong?
 
allowAdventure=false means that you can't do good-chance balancing.
irresponsible=false means you can't do bad-chance balancing.
 
Can we change that, though, to try to balance unless it gets near death? That would be nice if it at least tried... also, it says that adventures have been used elsewhere on it if you have <5 adventures. This will set adventures used at 5 and then you can't run the script again. Can you fix that?
 
I got this. I put my "off" ones into my DC and just have the one "on" buddy in my inventory. Any help is appreciated :)



Changing "ChibiBuddy (on)" to "ChibiBuddy™ (on)" would get rid of this message (ChibiParent.ash, line 97)
Sending kmail to eegee...
Checking for updates (running ChibiParent ver. 0.77)...
Running ChibiParent version: 0.77 (current)
Updating ChibiBuddy.txt to '2013-04-02T09:27:08-05:00'...
...ChibiBuddy.txt updated.
ChibiBuddyô (on) is not available. If you have one, please turn it on.
Encounter: ChibiBuddy™
Encounter: ChibiBuddy™

> call scripts/ChibiParent.ash

ChibiBuddyô (on) is not available. If you have one, please turn it on.

> call scripts/ChibiParent.ash

ChibiBuddyô (on) is not available. If you have one, please turn it on.

> call scripts/ChibiParent.ash

ChibiBuddyô (on) is not available. If you have one, please turn it on.

> call scripts/ChibiParent.ash

ChibiBuddyô (on) is not available. If you have one, please turn it on.

> call scripts/ChibiParent.ash

ChibiBuddyô (on) is not available. If you have one, please turn it on.
 
Did you turn the chibibuddy on in the relay browser and then ran the script directly afterwards?
It appears that Mafia does not update your inventory when you turn it on and so you need to refresh in the inventory for Mafia to realise that you have a (on) one now instead of the gone (off) one.
At least when I just turned mine on Mafia correctly removed the (off) one from inventory but did not add the (on) one until I did a "refresh inv".
 
Back
Top