RimWorld

RimWorld

EdB Prepare Carefully
Barik 4. feb. 2019 kl. 5.14
So I'm planning on modding this mod...
I want to modify this mod with a few tweaks.



1.) I want to make it so when you "Prepare Carefully" that traits each have unique values.

In the code EdB.PrepareCarefully.CostCalculator.CalculatePawnCost

cost.marketValue += num4 * num; if (pawn.TraitCount > Constraints.MaxVanillaTraits) { int num6 = pawn.TraitCount - Constraints.MaxVanillaTraits; double num7 = 100.0; for (int i = 0; i < num6; i++) { cost.marketValue += num7; num7 = Math.Ceiling(num7 * 2.5);

So does this mean that how many traits your pawn has effects the spending points? The points avaliable do not change when you add or remove traits unless it effects skill numbers.

But basically I want to make a new... defination?... and manually add it to each trait. So...

<TraitDef> <defName>Industriousness</defName> <commonality>2</commonality> <degreeDatas> <li> <label>industrious</label> <description>[PAWN_nameDef] has an easy time staying on-task and focused, and gets things done much faster than the average person.</description> <degree>2</degree> <statOffsets> <WorkSpeedGlobal>0.35</WorkSpeedGlobal> </statOffsets> </li>

There would be a new thing in there that would be like <TraitCost> 1000 </TriaitCost> or something which would link to a modified calcualtion from the one I linked above.



2.) This is not as important but is still something I want to do. I want to make it so "refund" anything you only get 75% +/- back from it. So if you decide to take away 10 points from a certain skill, instead of getting 100 points or w/e back you would only get 75 points. Or you decide to refund a gun worth 1000 you only get back 750, or you remove a negative health effect that gave you +400 points you lose 500 points instead of 400.



3.) Pawns skill cost becomes more expensive, the more points you put into it as well as overall points increasing the price as well. So like at level 1 shooting it costed 10 points to level up once but at level 15 it cost 150 points to level up once. And overall level being like if you have leveled 72 points on one pawn the cost for the pawn would be like 72% more. Also add same thing for traits maybe so you don't have 10 good traits and maybe same thing for bio-limbs



Thats pretty much all I would want to change. I have litterally 0 experience with writing code. I can read but just not write it lol. But mainly its really the first two I want to do. But yah dunno it doesnt seem to hard... for someone who knows how to script.... it's just writing the scripting language that is confusing as hell.
Sist redigert av Barik; 4. feb. 2019 kl. 5.21