#General Mod Channel
1 messages ยท Page 2 of 1
Ahh, ok, thanks... now I only need to find out which of the puzzles is the right one as "formationPuzzleOne" doesn't really tell mich which it is :P
Like it seems that "puzzleMonthSelector" gets the value "yearMonth" which doesn't really tell me anything, considering that in the formationTendingQuestHelper it seems to have a value between 1 and 12 and I have no idea how it gets that number...
So ok, yearMonth is apparently the month of the year... which means every puzzle can appear at every location... which means I need to ask them which puzzle specifically it is they're having problems with ^^
Unless I misunderstand the code..
Fair enough
Well, found the puzzle with more information from the user, so all is fine now ^ ^
ah yeah, at the time of the quest acceptance, it grabs the month, and based on the month it dishes one of the 12 puzzles
Does the mod repo contain the game's balance sheets?
Did you do the balance work in excel or did you sim it out in some way?
I did it analytically originally
Simulated in game
If you turn on debug mode, you can run the monster balance test to see values
makes sense since you dont have a lot of effects that dont directly map to health or damage
Eh, it's a very buff heavy game
yeah i like that
So all those interactions were hard for me to model without just running a lot of stances
But since then it's been on player usage and my own vibes
doin that sort of work in excel is a very specialised task
In general, the assumption is that 1.3 damage a technique is good. So it's all about if a technique can enable more or equal to that
And that depends on the other techniques availble
Opportunity cost and all that
Is this your first game?
oh dope, I do the same
Then this ๐
I was going to say that it's impressive
(i mean it still is)
but the balance approach is pretty sophisticated
It's something that's grown for a long time
Been iterating on balance for like 10 years across different game projects
the best projects always are - i do the same kind of systems design work
Let's move to off topic
fair, sorry
If we bought it on itch, is there an itch workshop we go to like the steam workshop or
sadly no
;; its okay, that fortunate birth rite mod didnt seem super cool ;;
only one solution, get it on steam!
itll be on sale during the winter sale, if price is a concern
Done :>
is there any mod that add a technique? i would like to create one but idk how to make it appear in the game. would love to replicate it.
There isn't currently, but you can do so by adding the technique using the add technique function, then add it to a shop so the player can buy it
goddang thank you for the direction
i wonder whether fleetingShield is declare or not, or even exist in the api. or is it under different name?
should be 'forgeFleetingShield'
ahh
Any possibility of getting a source map with the electron-dist bundle? The minified code is still pretty rough even with beautification.
Was hoping to make a dev wiki so I can easily reference where items/techniques come from.
They are all in the non-minified code
Ahhh thank you, just found that channel. โค๏ธ
Is there a naming convention you would like to see so its clear in any mod logs or screenshots if a modded technique was added? I was thinking a rainbow or dashed border for the image and maybe an emoji star or something in front of the name.
There's hosue buffs and condensation enchants, too.
Ah nice, gotta play more i guess 
Kept missing festivals,

Anyone know how the pure school fights are enforced? Is it a buff that negates opposing schools?
techniques of schools not allowed just dont do shit ye
Yeah I'm thinking of a mod that would let you select a school as a background. So if the existing implementation is via buff, that would be easier to replicate than a unique property of those combat encounters.
sweet ty
Is it not possible to create local-only mods? Do I have to publish the mod on the Steam workshop to make it visible to the game?
You can copy the mod into the mods folder manually
But there's no in-game mod browser no
No, sorry, I found the problem. I was putting the mod as a directory in the mod directory of the game, but the game didn't see it. I now put the mod into the mod directory as a zip file and now the game can see it. It was the same path, both the mod directory and the zip file were put on the same folder, the mod folder of the game, but the mod directory couldn't be seen, while the zip does.
Does anybody know what would I have to change if I wanted to mod the maximum amount of times the Crystal Pressurized Pill can be taken by the same character?
Yeh modify the pill itself. Print it to the console and it should be easy to see what to change
Yeah, I'm modifying the pill already. I've changed the bonus, or at least I'm testing some changes. Some work, like buffing some of the main stats (Muscles, Meridians), some others don't at the moment, like Insight.
Also it's not clear if combat stats can be changed the same way (Max Health, Max Barrier, Crit Chance, etc.)
ah, ok. that's why it appeared as undefined on the pill. Can combat stats be changed through that pill?
Does it have a combat stats field?
Ah it has raw stats
You can use that
Note, I would recommend just checking the types
sorry, I'm not sure about some of the specifics, because I used ai to create the base mod. I can change the code, because I'm actually a programmer, but to speed up creation, I've done most of the initial work through AI. Now, inspecting the code, from what I can see, it checks if it has bombat stats and, if it hasn't, it tries to create them, which I don't even know if it's possible to do.
bombat ->combat
It is, but to make it work nicely I'd cast it to the correct type then use the typescript compiler to show what you can and can't set
Though, by 'add combat stats' there's a variety of ways it'll work and others it wont
Depends on HOW it tried to do it
it did "if (!enhancedpill.combatstats) {enhancedpill.combatstats = {};}" I guess enhancedpill is how it has named the resulting modded pill
Ah that's wrong
and then proceeded to fill its fields
Definitely add type enforcement
Then the compiler will force it to implement it right
like so
and itd tell you:
Ok, thanks! I'll try those changes. (I'm a programmer, but I program in C, C++, Rust, Python, some others, but I've never tried Javascript before, so I'm learning the language as I create this mod)
typescript should make it fairly easy
but continue to ask questions if you get stuck! If i dont answer im sure someone like @rose shard or @rotund thunder or @bronze willow can ๐
Thanks, you've been very halpful. Now I'll go check how to add typechecking. From what I can see it's just a matter of giving an option to the compiler, but I need to check that in the project settings.
if you are using the official template it should be turned on automatically in vscode
make sure you run npm i first
to install the types and everything
I modified the example-mod
I saw the ai run it, but I'll do it again, just to be sure
then the types shoudl already be enforced, you just need to narrow them properly
If I had to guess, probably the problem is that, when it creates the enhaned pill, it defines it as "const enhancedpill = {...basepill} as any" I don't know the language, but I guess that any isn't really that specific as a type, but maybe I'm misintepreting something. It certainly seem strange anyway the fact that it defines as const a variable that it then immediately proceeds to modify!
yeah, to cast the type you follow the naming convention with the interface; ex => const enhancedPill***: PILLTYPE*** = {...basepill}
Above, when it tries to import what I guess is something like a reference to the class of the original pill, it does "const basepill = window.modAPI.gameData.items['Crystal Pressurized Pill'];" Hovering over basepill, the IDE says that it has type Item. Can't I simply cast the new item to the type Item, instead of Any?
item is the generic type. you need to case to the CORRECT type depending on the item
but yeh, any is bad
ban any
Ok, I got almost everything done. The only thing is: apparently if I change the raw stats added by the pill, by default they get added as percentages. Is there a way to spercify when it has to be a percentage and when it has to be a flat increase? For example, if we're talking about Crit Chance, I guess it's intrinsicly a percentage value, but when added as a percentage bonus what does it do? Does it add a flat increase to the value, or does it actually increase it by a percentage of the already present crit percentage? Also, all the other values should be flat increases, not percentages. This is just a preference. I could still use it as a percentage, but, at this point, I'd like to do it right.
By the way, sorry if I'm taking too much of your time!
so the way it works is you can define the scaling number
power: {
value: 1,
stat: "power"
}
Means increase ti by 100% (1 * power)
power: {
value: 1,
stat: undefined
}
Means increase it by 1 (flat)
Well, in theory I had already done that then! Except that when I check the pill in-game, the bonuses listed for the values that are part of the rawstats property are listed as percentage increases.
some stats are ALWAYS percentages, such as crit, but the back end handles it additively
so if the critchance: {
value: 10,
then it just adds 10 to the existing crit chance
same with damage boost, barriermitigation, dr, etc
They were all listed as percentage increases, including Max HP, max Barrier, Armor, etc.
interesting! ๐
:o
I could check in-game and see if there's a difference between what the pill says it does and what it actually does. If I do a manual save, I can actually go back to the previous state, right? Are there any limitations on when a save isn't able to be loaded? To put it differently, if I do a manual save before using the pill, I can always use that save to go back, right? (sorry if this is a stupid question, but since the game doesn't punish you too much for dying, I've almost considered it to be an ironman-only game, meaning that I haven't really tested how manual saves work)
yes you can always go back and load a manual save
ok, I tested it and, from what I can see, there's a difference between what the pill says it does and it actually does. all the values receive a flat increase, even though the pill says it would ioncrease them by a percentage. so it's basically just an issue of the visualization on the ui. Also, the screen that shows the result of the taken pill only shows the base stats as being buffed. None ot the other values being buffed appear. I guess that overall this is simply due to the fact that there are no othr items in the game that give this kind of generalized buff.
yeh we added it without actually using it, so its never been tested
you are the first!
so feel free to make some bugs ๐
Anyways, thanks for the help!
there's a general mod channel as well...? two modding help channels...
or well posts/threads
One was more intended for assistance, and this one was mostly to talk about mods, the mods being made, etc etc
but if we get asked a question we tend to forget and just answer instead of directing people to the correct forums ๐
its why general USED to be spoiler free, but then it got overloaded with spoilers and we gave up, then off-topic conversations occurred and the conversation kept going so we only weakly try to direct that to off topic haha
Is there any other way to download updates for the Mod Uploader app, other than its autoupdate functionality? Its autoupdate has been stuck in download at 0% of advancement at this point for slightly less than an hour. I had tried to download the update 3 or 4 other times before, and the download never went past 0% of advancement.
Thanks for the link!
I ended up implementing the next part of the editor through the method I described yesterday and it worked quite well. I know it's hackish, but it's not that bad. The items are created dynamically, so there should never be any compatibility problem. The implementation using OnCreatePlayerCombatEntity had hit a wall. I would edit the relevant data once registered the hook, but the updated values were never seen by the rest of the game.
I ifgured out why using the hook didnt work
itll be fixed next release
but glad you got it working the other way ๐
That's good to know. I'll most likely switch to that implementation in a future release of the editor and keep in the background the old implementation's buffs for retrocompatibility.
By the way, I noticed that, buffing combat stats that way (as if using pills), most of the combat stats buffs and debuffs behave the same way, when the pills have the data defined as usual (value: delta, stat: undefined) and thus they get a flat increase. Except for Protection, which, when buffed the same way as the others, it doesn't get a flat buff or debuff, but it seems as if it's a percentage increase or somethig similar to that. If I'm not mistaken, in the combat window, on the statistics regarding the player that can be inspected thorugh the buttons in the upper part of the screen, close to the actual percentage of the protection, if I remember correctly, it's shown the actual number that I have to insert as a buff to reach that percentage. Is it because we're actually entering by default a percentage multiplier of a base value for that stat? (to give an example, if I remember correctly, I had to set it to 500 to be able to reach the cap of 90% protection).
Sorry, I don't follow your question?
imagine a pill that buffs stats, and imagine creating it in the way that causes the buff to be a flat increase. it works for most of the conbat stats the same way, except for protection. protection seems to be buffed/debuffed by the value inserted, but interpreted as something similar to a percentage increase/decrease.
to be able to get protection to the cap of 90% as shown in the combat log, I had to set its actual buff to something like 500.
Yes
Protection has diminishing returns
I think it's literally like 500 to hit 90% dr
Same with barrier effectiveness
Yeh its 500
4.025 * sqrt(protection)
there are certain stats that "don't" work like percentages using the full scaling object
Ok, at least now I know it wasn't an error on my side. That said though, the way it grows (as I was adding bigger buffs), it actully seems to be multiplied, not added as the rest. Is that right? I'd actually saved the progression of the percentage, based on how much I was buffing it. It started at 18, I buffed it by 100 and got 44, buffed by 100 more and got 60, buffed by 100 more and got 72, buffed by 100 more and got 82, buffed by 100 more nad finally got 90 and it caps there. Is that the intended behavior?
- At 0 protection: 0% DR
- At 100 protection: ~40% DR
- At 200 protection: ~57% DR
- At 300 protection: ~70% DR
- At 400 protection: ~80% DR
- At 500 protection: 90% DR (cap)
protection, damage boost, over crit, they are all expected to be a 'flat' value, and then the backend handles their effects, and the ui displays it as percentages, as thats what they will end up doing
thats the numbers
ok, thanks for the explanation!
are techniques and their data accessible through the modding interfaces?
yes, under gamedata
ok, thanks
how is the technique "Failsafe Protocol" referenced in the code? (its internal name)
Literally that string
For when the display string is not exactly the same as the internal name, could figure it out by just dumping the window.modAPI.gameData.techniques somewhere, and searching for "failsafe" etc
Yes, sorry for the stupid question. I had found right after asking for it.
That's fine, there's no such thing as stupid questions!
Don't tempt me to prove you wrong about this!๐
have no fear, lyeeedar has worked with me for 2 years by now, he's collected QUITE the experience ๐
Does getMetadata expects author to be an object ({ name: string }) or just string?
because the webpack config will give object (due to author in package.json)
https://github.com/Lyeeedar/AfnmExampleMod/blob/main/webpack.config.js#L66-L70
while the declaration specifies string
https://github.com/Lyeeedar/AfnmExampleMod/blob/main/src/mod.ts#L4-L10
declare const MOD_METADATA: {
name: string;
version: string;
author: string;
description: string;
gameVersion: string;
};
Just string
how has it been working with { name: string } then all along lol
another little thing, this'd be better in mod.ts
export default {
getMetadata: () => ({
...MOD_METADATA,
gameVersion: GAME_VERSION,
}),
};
Avoids having multiple MOD_METADATA objects that'll be inserted
How is this better? I mean it's 4 less lines which is nice but not sure what you mean by the other bit?
what other bit?
Avoids having multiple MOD_METADATA objects that'll be inserted
oh, MOD_METADATA gets replaced by the stringified object literal that's specified in webpack config
this bit i believe
and you had multiple of them
Multiple?
export default {
getMetadata: () => ({
name: MOD_METADATA.name,
version: MOD_METADATA.version,
author: MOD_METADATA.author,
description: MOD_METADATA.description,
gameVersion: GAME_VERSION
}),
};
Yes?
and yeah author: string; doesn't work, it has to be author: { name: string };
author name doesn't get shown with the first one
Updated
I've been getting many unicorns recently... what's going on with github? ๐
Microsoft cutting corners again
"mod loading details" (x changes made) only shows changes made (hooks registered etc) when the mod was first loaded
and doesn't take into account the current changes, whether some new hook was registered afterwards, or if initial ones were unhooked via the returned unhook callbacks
should the game even track this?
I don't really care that the UI doesn't reflect the current changes made by a mod, that's why I asked whether the game should bother with this
if you want it I could throw it in req, or you could
I don't care either way, I'll just assign it to an agent
๐
Is it useful? Maybe
Do I think it's critical? No
Is there a way I can get the default followingRemainingMonths value of 6 for party members?
oh this maybe
window.modAPI.gameData.characters[0].followInteraction?.duration
No I wanted the initial default value
for infinite follow ๐
just need to handle additionalFollowingCharacters
why is followInteraction undefined?
I didn't want to hardcode it to 6 but oh well
What do you mean?
This is undefined
window.modAPI.gameData.characters['Aei Ma'].followInteraction?.duration
Oh, the companions have it on their relationship defe
lol
Is there any followable character (one that can end up in state.characters.followingCharacter) that is not a companion?
Yes, dharma protectors
oh hmm
The hirable ones
damn all this to get follow duration for a companion character
const charData =
state.characters.characterData[state.characters.followingCharacter];
const relDef =
charData.relationshipPath === undefined
? window.modAPI.gameData.characters[state.characters.followingCharacter]
.relationship?.[charData.relationshipIndex]
: window.modAPI.gameData.characters[state.characters.followingCharacter]
.relationshipPaths?.[charData.relationshipPath][
charData.relationshipIndex
];
relDef?.followCharacter?.duration;
hmm works at least
function getFollowDuration(charName: string, state: RootState) {
// Non-companion character
const duration =
window.modAPI.gameData.characters[charName].followInteraction?.duration;
if (duration !== undefined) return duration;
// Companion character
const charData = state.characters.characterData[charName];
if (!charData) return undefined;
const relDef =
charData.relationshipPath === undefined
? window.modAPI.gameData.characters[charName]?.relationship?.[
charData.relationshipIndex
]
: window.modAPI.gameData.characters[charName]?.relationshipPaths?.[
charData.relationshipPath
][charData.relationshipIndex];
return relDef?.followCharacter?.duration;
}
I don't understand what's with this aggressive wrapping ๐
I'm only around column 60 goddamnit!!
omg... prettier has a default width of 80!!
Ah I should expose that as util
Request it and itll in the release tomorrow
is there a util like getFollowDuration used internally in game too? Could expose that too
can't mutate droppedItems etc in onCompleteCombat?
so that it'd show in the combat success UI
On complete combat triggers after combat
You probably want the drop items hook instead
Or modify the drop table in start combat
oh yeah that makes sense, but here I wanted to update the "Qi Droplets Regenerated" in UI
npm types release when?
Exposed getMaxQiDroplets to calculate capacity based on condensation arts.
I can't find it in the 0.6.57 types
oh nvm, I was still viewing the cached 0.6.56 (vscode)
what kind of hell is this ๐ญ
weird ass language
c#?
c#
it's decompiled code, so probably a long if-else-if chain got compiled to that mess
Is it possible to change stat caps (for example Barrier Effectiveness' Cap, etc.) through modding? If it is, which class has the fields that I need to mod?
Currently it is not. Feel free to add a feature request