Messing around with stuff: QUICK QUESTION

As a modder, is it possible for me to code in some way to reduce the age of a proxy? I mean, would there be some theoretical way for me to have an event where X happens to the proxy, then POOF, they’re a year younger?

unfortunately no. I think this question has come up before, and the answer we got was that age is pretty hardcoded. even if we could change it, it would just be a number changing, and nothing else( the proxy wouldn’t actually get younger).

i know you can make time change for a character…but i’m curious what would happen if you tried to add a negative amount of hour for the character. Errors probably. But it might be worth a shot

I already tried using a negative number, as well as replacing “add” with “sub” in the code, doesn’t seem to work. Oh well.

EDIT: I forgot, I had a theory once about an event that essentially copies the proxy’s DNA (and a couple necessary flags like quest markers and such,) then creates a baby out of that, ages them up to the age you want, then deletes the original. Not sure if it’d work, but I’ve never gotten around to trying it. I know they’d be a bit off, but eh, it would be close enough.

[quote=“SRP, post:3, topic:1214”]I already tried using a negative number, as well as replacing “add” with “sub” in the code, doesn’t seem to work. Oh well.

EDIT: I forgot, I had a theory once about an event that essentially copies the proxy’s DNA (and a couple necessary flags like quest markers and such,) then creates a baby out of that, ages them up to the age you want, then deletes the original. Not sure if it’d work, but I’ve never gotten around to trying it. I know they’d be a bit off, but eh, it would be close enough.[/quote]

that should work, assuming you can figure out how to switch the proxy’s. you’d also have to worry about inventory as well though and setting personal flags and everything.

I can confirm that the copy works to an extent because of something I was testing to ‘reset’ some values on a character; however, there are some limits to the method I used, which was more for a contract test than anything.

What I did was have the character registered as a sort of temporary DNA template with the clone = CharacterFromDNA(proxy.getDNA()) command, then added them to the workers the same way some of the quest characters or special contracts would by using RegistryCharacter(clone) and clone.addToWorkers(LoacContract(contract)) in succession.
To simulate the recreation of the character, I had the system then set their name to a string with name = proxy.getName(), then use the proxy.removeFromWorkers() and proxy.die() commands (best to use something more specific like ‘activePartner’ or ‘self’ as the identifier for these, in the rare event you already had multiple proxies with the same name or somesuch) to eliminate the original. Once done, I used clone.setName(name) to set the copy’s name as the original’s.

What this didn’t do, was transfer any existing changes to a stat, such as temporary effects from any items such as lactaids, or more permanent ones from item usage or training. It also doesn’t age the character without feeding it additional commands, and will re-roll their stats if the genes themselves have any mutation percentage (Proxy body metrics and game stats usually have +/- 10 as a default).

As for the flags, it’s probably possible to map all active quest flags on a proxy to an array, then apply those flags to the clone once it’s generated.

Lastly, this method shouldn’t be used outside of a walk event that forces the end of walking, as there are probably a mess of potential problems that could arise from trying to play as a dead character. Since this only makes a copy, it is likely that the game may try to call the index number of the original proxy if this is programmed into something like a status effect or an item.

For those curious about the contract I was testing, it was supposed to apply effects under certain conditions, and seems to function as intended, but it would probably be better to relegate the effects to an effect template and just have the Contract store or alter data it references if it even needs to be involved. Having it do the calculations rather than an effect caused the management UI to constantly snap back to the window it uses for things like birth/hospital/breech of contract, but the commands that prompted this had no prompts, so it ended up being little more than distracting.

On a similar note, does anybody know how to remove a given gene from a proxy such as a game stat like Strength or Charisma, so it can be replaced with another gene from a template? I figure that part of this is possible, but it might take some fiddling around to get correct.

Eh, with changes to stats being lost it’s possible to fudge it by saying “the de-aging process isn’t quite perfected yet” or that lactaids and such are being reverted along with the age.

Okay, there’s the biological age of your body, and then there’s the number of years/months/days that you’ve lived through and experienced, aka your chronological age.

If you just want to change the biological age of the proxy, instead of creating a clone (and copying everything over and the stats and the effects and the flags and …) just to roll back the “age” number, wouldn’t it be a lot easier to just apply a stack of effects to the current proxy that mimic the effect of a younger biological age while leaving only the (chronological) “age” number unchanged?

Stuff like reducing height, lowering the stats a touch, maybe decreasing the breasts & hips, etc. All of the genes affected by age should have the rate of change and puberty age. If you can read that in a script or template at the time the “youth” effect is activated, then I think you should be able to do the math to decide what to change and by how much to achieve the amount of “youthening” you need.

Wouldn’t that just permanently de-age them? Decreasing their stats to simulate them being younger sounds like they’d just look younger forever and you could use it as a way to get around the 18 (or was it 16?) year minimum age.

The problem is that the engine doesn’t support de-aging the character using the same system it does to age them up.

H. Coder’s been on records in a lot of the FAQs here and on his blog that the function for it doesn’t work in reverse, thus you can’t use the systems that add hours to their age to remove them and the subsequent stat modifications.

If you just change the stats directly, this still doesn’t affect the character’s age. I am unsure if loading an effect onto their age that has a negative modifier to it to reduce it when it checks, but that would still have problems even if it does work. Neither method affects the RNA values, (the ones that are inherited by offspring).

There’s also the question of whether the effect reversion method would alter how the game calculates the mood decay that characters suffer after prolonged existence. A lot of players generally dislike this mechanic, but it’s hard-coded into the engine so it’s going to remain a potential issue until the next version of the main game’s engine and the source code are released, if the comments on his blog are to be believed.

You could potentially do something using effects or items. Run a script hourly that takes the hourly rate of increase for each stat and add it to a personal flag, you’d probably need to do some tricky maths to get that, I’m not sure exactly how the puberty rate stat functions, (x). Then proxy.substat(“∈stats”), y(2∈x) should age down your proxy stats included. You would end up with a heap of personal flags though and a script of that size running every hour might slow things down a little.

Deriving the Change-rate of a stat would be nigh-laughably easy; just replicate the method the abdomen organ uses to check for stretchmarks, i.e.: have a flag set as (stat)_previous for the last hour, then just compare that to the stat of the proxy in the next hour. Just make sure that both the flag setting and the comparison commands are formatted name.getCleanStat(“type.stat”) so you don’t get any effects or other variables clogging up the works. This should result in (fairly) accurate reductions of the affected stats or metrics.

Edit: Upon thinking on it, it may also be possible that the change rate is a percentage rather than a flat value. In that case, You’d do the above-mentioned flag check to get the value, and instead divide that against the current clean stat to get the percentage you’d need to reduce that stat by. Not much more difficult, but it makes the process of reduction a bit more involved, as you’d have to use that percentage for each hour you wanted to roll the stat back by. Probably in a loop like where it reiterates with an […]i++ header. A few of the effects like Daria’s blessing have something like that in their code, so you could use that for study.

The problem is still that while you can simulate the effects of reduced age, the age ‘gene’ (It’s actually a variable type of its own instead of a gene or a flag given how this game structures its checks) cannot be altered to reduce its value from what I understand. when using the name.getAge() command, a value in hours is given as a result; the game usually uses this to check for things like the ‘Proxy is too young’ lockout event (checks against the ‘psy.child’ gene as opposed to an externally set value) and probably for other things such as when characters with female reproductive organs begin menstruation or menopause. I’m unsure if H. Coder stated one cannot reduce this number as a way to keep the base game well within legal bounds, or because it might actually mess with the Mood Decay equation or some other background calculations.

I think I may have a theoretical solution. You take your idea of making a template from the proxy, use it to generate a dummy proxy (@age zero) and then age it up by your proxy’s age - the number of hours you want to age down by, then just set all your active proxies relative stats to the dummy proxie’s

some rough pseudo

CharacterFromDNA(proxy.getDNA()), Charactername=dummy //not sure how you'd pull all stats but age
target.addstat("age", proxy.getstat(age) - user_input)
setflag("dummy_stat", target.getstat("all_the_stats") //this and the line below are going to take for fucking ever to write out
proxy.setstat("all_the_stats", "dummy_stat")

This also avoids the existential terror of murdering your proxy and having it replaced by a younger version of itself, we just murder a clone of it’s younger self.

Edit: I like this better than just subtracting 2(hourly growth rate) for every hour of age down because of the weirdness of puberty. Breast/hips size would end up negative pretty quick if you aged them down too much.