133
edits
(Added fishing sea land feat.) |
(Fixed fish LV calculations.) |
||
Line 7: | Line 7: | ||
<pre>fishLV = rnd(fishingLevel * 2) + 1</pre> | <pre>fishLV = rnd(fishingLevel * 2) + 1</pre> | ||
*'''fishingLevel''': Your current fishing skill level. | * '''fishingLevel''': Your current fishing skill level. | ||
*'''rnd''': A random number between '''0''' and the value passed into the function. | * '''rnd''': A random number between '''0''' and the value passed into the function. | ||
==== | ==== Adjusted Fish LV ==== | ||
The adjusted fish LV is calculated during item creation. It uses multiple calls to the '''rnd''' function and adds a hardcoded value of '''+2''' at the end. The final adjusted level becomes: | |||
<pre>rnd( | <pre>adjustedLV = fishLV + 2 + rnd(rnd(rnd(rnd(Mathf.Min(fishLV * 2, 20)) + 1) + 1) + 1)</pre> | ||
* The adjustment process involves: | |||
** Determining the base '''fishLV''' as '''rnd(fishingLevel * 2) + 1'''. | |||
** Applying multiple calls to the '''rnd''' function: | |||
*** '''rnd''' generates a random number between '''0''' and '''(max - 1)'''. | |||
*** Each call depends on the result of the previous '''rnd''', gradually narrowing down the possible range. | |||
** Adding a hardcoded '''+2''' to ensure the adjusted LV always has an offset. | |||
==== Example ==== | |||
If your fishing level is '''10''': | |||
* '''Base LV''': | |||
** '''fishLV = rnd(10 * 2) + 1 = rnd(20) + 1'''. | |||
** Example result: '''10'''. | |||
* '''Adjustments''': | |||
** First '''rnd(20)''' → Result = '''7'''. | |||
** Second '''rnd(7 + 1)''' → Result = '''3'''. | |||
** Third '''rnd(3 + 1)''' → Result = '''2'''. | |||
** Fourth '''rnd(2 + 1)''' → Result = '''0'''. | |||
* '''Final Adjusted LV''': | |||
** '''adjustedLV = 10 + 2 + 0 = 12'''. | |||
====Fish LV Range Table==== | ====Fish LV Range Table==== | ||
Line 24: | Line 46: | ||
!Fishing Level!!Minimum LV!!Maximum LV | !Fishing Level!!Minimum LV!!Maximum LV | ||
|- | |- | ||
|1|| | |1||3||5 | ||
|- | |- | ||
|2|| | |2||3||7 | ||
|- | |- | ||
|3|| | |3||3||9 | ||
|- | |- | ||
|4|| | |4||3||11 | ||
|- | |- | ||
|5|| | |5||3||13 | ||
|- | |- | ||
|6|| | |6||3||15 | ||
|- | |- | ||
|7|| | |7||3||17 | ||
|- | |- | ||
|8|| | |8||3||19 | ||
|- | |- | ||
|9|| | |9||3||21 | ||
|- | |- | ||
|10|| | |10||3||23 | ||
|- | |- | ||
|11|| | |11||3||25 | ||
|- | |- | ||
|12|| | |12||3||27 | ||
|- | |- | ||
|13|| | |13||3||29 | ||
|- | |- | ||
|14|| | |14||3||31 | ||
|- | |- | ||
|15|| | |15||3||33 | ||
|- | |- | ||
|16|| | |16||3||35 | ||
|- | |- | ||
|17|| | |17||3||37 | ||
|- | |- | ||
|18|| | |18||3||39 | ||
|- | |- | ||
|19|| | |19||3||40 | ||
|} | |} | ||
====Code (EA 23. | ====Code (EA 23.41)==== | ||
<syntaxhighlight lang="c#" line="1"> | <syntaxhighlight lang="c#" line="1"> | ||
int num3 = EClass.rnd(num * 2) + 1; | int num3 = EClass.rnd(num * 2) + 1; | ||
thing = ThingGen.Create("fish", -1, num3); | thing = ThingGen.Create("fish", -1, num3); | ||
lv = lv + 2 + EClass.rnd(EClass.rnd(EClass.rnd(EClass.rnd(Mathf.Min(lv * 2, 20)) + 1) + 1) + 1); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
edits