RaidPoint calculation

Started by SteelDog, September 10, 2021, 06:03:39 AM

Previous topic - Next topic

SteelDog

Is there any idea how to add random factor to calculation of this value?
1) direct change this formula in game file.
2) change of "Wealth Independant" "StorytellerWealth" curve to chaotic one.
i haven't found files neither with formula or curve.
does someone have idea where are they?

or maybe there is some mod already doing it?

thanks


SteelDog

no it doesn't. at this article i see no tech information.
i mean ok i understand how it works.
but how to change it? this is the question.

RawCode

because logic implemented as code and you need to decompile game to get formula.


SteelDog

understand. but i'm not familliar with C#. can you say me how to do it easiest way?
i mean
1) what program do i need for decompilation
2) which dll need to be decompile
3) and how to compile it back with changes.

I saw some instruction in wiki, but it looks like totorial of C#. I understand little bit in programming, but do i need to setup of big C# infrastructure on my PC for doing that small change?

thank you.

RawCode

read wiki, after that ask specific questions if any.


Canute

Rim of Magic need Jecstools, at the mod description (workshop) of jecstools is a link to a wiki/guide.
https://github.com/roxxploxx/RimWorldModGuide/wiki
I can't saw how useful that is at all, but it is a start.

But when you understood only little from programming at all, and you want to learn more, you should start with smaller/easier projects rather then to create new abilities.
From what i hear, the plaque gun guide from the wiki
https://rimworldwiki.com/wiki/Plague_Gun/Introduction
is a good start to learn the basic.

And you need to differ between XML mods, which basicly just modify existing things (new animals,faction are just modified existing things) and C# mods which create something new or modify existing mechanics.

SteelDog

#7
Quote from: Canute on September 11, 2021, 11:39:05 AM
But when you understood only little from programming at all, and you want to learn more, you should start with smaller/easier projects rather then to create new abilities.

Ok, i wasn't sincere. I'm programmer with 10 year experience, but i still know nothing about C# infrastructure. So, I understand the code, because it simmilar as java... but... ok... i will read tutorials if i want to change one formula so much.
{Actually i won't XD.
there is a plenty of interesting games and i of course wont spend a lot of time learning C# for doing one of it acceptable for my preferences}

but thank you anyway for your answers.

SteelDog

Actually i have done it.
if some one will be interesting in, my steps:
1) install dnSpy (link in Wiki)
2) secompile Asembly-CSharp.dll file
3) formula is in StorytellerUtility class. method DefaultThreatPointsNow.
(actually it contains random factor, but looks like it's 1 per any incedent except Caravan)
4) right click on Method (it's important because my dnSpy can't decompile whole class right way) -> change method(C#)
5) do you changes in new window and click compile
6) save module in left top corner.
done.