#General Mod Channel

1 messages ยท Page 2 of 1

peak barn
#

Like a the file literally next to the helper

#

It's there

blazing wagon
#

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...

blazing wagon
#

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..

peak barn
#

Yep, something like that

#

You'll need to wait for grin for details though ๐Ÿ™‚

blazing wagon
#

Fair enough

blazing wagon
#

Well, found the puzzle with more information from the user, so all is fine now ^ ^

bronze willow
#

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

rugged ridge
#

Does the mod repo contain the game's balance sheets?

peak barn
#

Yes

#

Sorta

#

It contains all the game assets

#

Including techniques and stuff

rugged ridge
#

Did you do the balance work in excel or did you sim it out in some way?

peak barn
#

I did it analytically originally

#

Simulated in game

#

If you turn on debug mode, you can run the monster balance test to see values

rugged ridge
#

makes sense since you dont have a lot of effects that dont directly map to health or damage

peak barn
#

Eh, it's a very buff heavy game

rugged ridge
#

yeah i like that

peak barn
#

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

rugged ridge
#

doin that sort of work in excel is a very specialised task

peak barn
#

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

rugged ridge
#

Is this your first game?

peak barn
#

Nah

#

I worked in the industry for 5 years

#

Then made lots of little stuff

rugged ridge
#

oh dope, I do the same

peak barn
#

Then this ๐Ÿ˜‚

rugged ridge
#

I was going to say that it's impressive

#

(i mean it still is)

#

but the balance approach is pretty sophisticated

peak barn
#

It's something that's grown for a long time

#

Been iterating on balance for like 10 years across different game projects

rugged ridge
#

the best projects always are - i do the same kind of systems design work

peak barn
#

Let's move to off topic

rugged ridge
#

fair, sorry

cold citrus
#

If we bought it on itch, is there an itch workshop we go to like the steam workshop or

cold citrus
peak barn
#

only one solution, get it on steam!

#

itll be on sale during the winter sale, if price is a concern

cold citrus
#

Done :>

serene agate
#

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.

peak barn
#

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

serene agate
thorn dock
#

it has come true

#

a lot more people now

#

๐Ÿ”ฅ

serene agate
#

i wonder whether fleetingShield is declare or not, or even exist in the api. or is it under different name?

bronze willow
#

should be 'forgeFleetingShield'

peak barn
#

The buff is not exposed on its own

#

Only the technique

bronze willow
#

ahh

steady copper
#

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.

peak barn
#

They are all in the non-minified code

steady copper
#

Ahhh thank you, just found that channel. โค๏ธ

steady copper
#

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.

serene agate
#

Is speed only attachable to mount? No consumable as a buff?

#

I meant travel speed

copper niche
#

There's hosue buffs and condensation enchants, too.

serene agate
#

Kept missing festivals, pinchAndTwist pinchAndTwist pinchAndTwist

steady copper
#

Anyone know how the pure school fights are enforced? Is it a buff that negates opposing schools?

thorn dock
#

techniques of schools not allowed just dont do shit ye

steady copper
#

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.

thorn dock
#

via buff

#

look at vow talisman if you want to get an exact idea

steady copper
#

sweet ty

solid bridge
#

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?

peak barn
#

You can copy the mod into the mods folder manually

#

But there's no in-game mod browser no

solid bridge
# peak barn 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.

solid bridge
#

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?

peak barn
solid bridge
#

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.)

peak barn
#

Insight isn't a stat

#

It's called digestion

#

(legacy reasons)

solid bridge
#

ah, ok. that's why it appeared as undefined on the pill. Can combat stats be changed through that pill?

peak barn
#

Does it have a combat stats field?

#

Ah it has raw stats

#

You can use that

#

Note, I would recommend just checking the types

solid bridge
#

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

peak barn
#

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

solid bridge
#

it did "if (!enhancedpill.combatstats) {enhancedpill.combatstats = {};}" I guess enhancedpill is how it has named the resulting modded pill

peak barn
#

Ah that's wrong

solid bridge
#

and then proceeded to fill its fields

peak barn
#

Definitely add type enforcement

#

Then the compiler will force it to implement it right

#

like so

#

and itd tell you:

solid bridge
#

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)

peak barn
#

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 ๐Ÿ˜„

solid bridge
# peak barn typescript should make it fairly easy

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.

peak barn
#

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

peak barn
#

so yeh it should work out the box

#

did you run 'npm install' first?

solid bridge
#

I saw the ai run it, but I'll do it again, just to be sure

peak barn
#

then the types shoudl already be enforced, you just need to narrow them properly

solid bridge
#

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!

bronze willow
#

yeah, to cast the type you follow the naming convention with the interface; ex => const enhancedPill***: PILLTYPE*** = {...basepill}

solid bridge
#

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?

peak barn
#

item is the generic type. you need to case to the CORRECT type depending on the item

#

but yeh, any is bad

#

ban any

solid bridge
# peak barn but yeh, any is bad

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!

peak barn
#

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)

solid bridge
bronze willow
#

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

solid bridge
bronze willow
#

interesting! ๐Ÿ˜‚

peak barn
#

i blame grin

#

100%

bronze willow
#

:o

solid bridge
#

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)

peak barn
solid bridge
#

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.

peak barn
#

yeh we added it without actually using it, so its never been tested

#

you are the first!

#

so feel free to make some bugs ๐Ÿ˜„

solid bridge
rotund thunder
#

there's a general mod channel as well...? two modding help channels...

#

or well posts/threads

bronze willow
#

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

solid bridge
#

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.

peak barn
solid bridge
solid bridge
# peak barn https://github.com/Lyeeedar/ModUploader

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.

peak barn
#

itll be fixed next release

#

but glad you got it working the other way ๐Ÿ˜„

solid bridge
solid bridge
# peak barn I ifgured out why using the hook didnt work

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).

peak barn
solid bridge
#

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.

peak barn
#

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)

bronze willow
#

there are certain stats that "don't" work like percentages using the full scaling object

solid bridge
# peak barn Yes

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?

peak barn
bronze willow
#

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

peak barn
#

thats the numbers

solid bridge
#

ok, thanks for the explanation!

solid bridge
#

are techniques and their data accessible through the modding interfaces?

solid bridge
#

ok, thanks

solid bridge
rotund thunder
#

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

solid bridge
#

Yes, sorry for the stupid question. I had found right after asking for it.

peak barn
#

That's fine, there's no such thing as stupid questions!

solid bridge
bronze willow
#

have no fear, lyeeedar has worked with me for 2 years by now, he's collected QUITE the experience ๐Ÿ˜Ž

rotund thunder
peak barn
#

Just string

rotund thunder
#

how has it been working with { name: string } then all along lol

peak barn
#

Maybe the other one then

#

๐Ÿ˜‚

rotund thunder
#

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

peak barn
bronze willow
#

Avoids having multiple MOD_METADATA objects that'll be inserted

rotund thunder
#

oh, MOD_METADATA gets replaced by the stringified object literal that's specified in webpack config

bronze willow
#

this bit i believe

rotund thunder
#

and you had multiple of them

peak barn
#

Multiple?

rotund thunder
# peak barn Multiple?
export default {
  getMetadata: () => ({
    name: MOD_METADATA.name,
    version: MOD_METADATA.version,
    author: MOD_METADATA.author,
    description: MOD_METADATA.description,
    gameVersion: GAME_VERSION
  }),
};
peak barn
#

Yes?

rotund thunder
#

oh come on I didn't explain it so badly that you still don't get it ๐Ÿ˜‚

peak barn
#

Oh lol

#

Yeh that's fair

#

Changed

rotund thunder
#

and yeah author: string; doesn't work, it has to be author: { name: string };

#

author name doesn't get shown with the first one

peak barn
#

Updated

rotund thunder
#

I've been getting many unicorns recently... what's going on with github? ๐Ÿ˜‚

peak barn
#

Microsoft cutting corners again

rotund thunder
#

"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?

peak barn
#

It wouldn't be hard to add that

#

So you can sure request it

rotund thunder
#

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

peak barn
#

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

rotund thunder
#

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
peak barn
#

No the remaining is in the characters slice

#

That is the base value definition

rotund thunder
#

for infinite follow ๐Ÿ˜‚

peak barn
#

Ahhh

#

Then yes that place

rotund thunder
#

just need to handle additionalFollowingCharacters

rotund thunder
#

I didn't want to hardcode it to 6 but oh well

peak barn
#

What do you mean?

rotund thunder
peak barn
#

Oh, the companions have it on their relationship defe

rotund thunder
#

lol

#

Is there any followable character (one that can end up in state.characters.followingCharacter) that is not a companion?

peak barn
#

Yes, dharma protectors

rotund thunder
#

oh hmm

peak barn
#

The hirable ones

rotund thunder
#

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!!

rotund thunder
#

how can I get max qi droplets?

#

will have to compute it ig

peak barn
#

Request it and itll in the release tomorrow

rotund thunder
#

can't mutate droppedItems etc in onCompleteCombat?

#

so that it'd show in the combat success UI

peak barn
#

On complete combat triggers after combat

#

You probably want the drop items hook instead

#

Or modify the drop table in start combat

rotund thunder
peak barn
#

You'll need a new intercept point

#

Maybe onCombatResult

#

Or something similar

rotund thunder
#

npm types release when?

peak barn
#

oops gimme a sec

#

done

rotund thunder
#

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)

rotund thunder
#

what kind of hell is this ๐Ÿ˜ญ

peak barn
#

that is NOT my code

bronze willow
#

weird ass language

peak barn
#

c#?

rotund thunder
#

c#

#

it's decompiled code, so probably a long if-else-if chain got compiled to that mess

solid bridge
#

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?

peak barn
#

Currently it is not. Feel free to add a feature request