Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Gambling for multistat items  (Read 120 times)

0 Members and 1 Guest are viewing this topic.

Dolfo

« on: 10, October 2024, 21:22:18 »
I tried a new logic to generate multistat items. It's mainly we use a base item and roll additionally stats on this.

The npc can be found in Stonehaven right side, where most npc shops are. Atm the gamble is limited to amulets, rings and leather pants. Players can buy up to 3 rolls and a max dice in relation to their main level.

Gambling with 3 rolls and a dice (1-110) is 99g. So watch your clicks if you gamble with bankcards.

The logic is very simple and basic. Items can be gambled up to +7 stats.

Here is table with current chances.

Code: [Select]
-- chance is the % chance in relation to the sum of all chances from this list
-- name is the lua name of the object attribute
-- lvl is the required lvl for each index (1, 2, ...)
-- factor is a factor for the value, no factor is same than factor 1
list_stats =
{
    {chance = 5, name = "strength", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "dexterity", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "constitution", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "wisdom", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "charisma", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "intelligence", lvl = { 4, 8, 16, 28, 44, 64, 88 } },
    {chance = 5, name = "power", lvl = { 4, 8, 16, 28, 44, 64, 88 } },

    {chance = 5, name = "armour_class", lvl = { 2,4,6,8,12,16,22,28,36,44,54,64,76,88 } },
    {chance = 5, name = "weapon_class", lvl = { 2,4,6,8,12,16,22,28,36,44,54,64,76,88 } },

     {chance = 5, name = "damage", factor = 0.3}, -- 110 roll would be 3.3 dps

    {chance = 5, name = "max_hitpoints", factor = 2}, -- 110 roll would be +220 hp
    {chance = 5, name = "hitpoints", factor = 1}, -- 110 roll would be +hp regen 110(11.0)
    {chance = 5, name = "max_spellpoints", factor = 2},
    {chance = 5, name = "spellpoints", factor = 1},
    {chance = 5, name = "max_grace", factor = 2},
    {chance = 5, name = "grace", factor = 1},

    -- resists 110 roll would be 33 resists.
    {chance = 1, name = "resist_impact", factor = 0.3},
    {chance = 1, name = "resist_cleave", factor = 0.3},
    {chance = 1, name = "resist_slash", factor = 0.3},
    {chance = 1, name = "resist_pierce", factor = 0.3},
    {chance = 1, name = "resist_cold", factor = 0.3},
    {chance = 1, name = "resist_fire", factor = 0.3},
    {chance = 1, name = "resist_electricity", factor = 0.3},
    {chance = 1, name = "resist_poison", factor = 0.3},
    {chance = 1, name = "resist_acid", factor = 0.3},
    {chance = 1, name = "resist_sonic", factor = 0.3},
    {chance = 1, name = "resist_channelling", factor = 0.3},
    {chance = 1, name = "resist_corruption", factor = 0.3},
    {chance = 1, name = "resist_psionic", factor = 0.3},
    {chance = 1, name = "resist_light", factor = 0.3},
    {chance = 1, name = "resist_shadow", factor = 0.3},
    {chance = 1, name = "resist_lifesteal", factor = 0.3},
    {chance = 1, name = "resist_aether", factor = 0.3},
    {chance = 1, name = "resist_nether", factor = 0.3},
    {chance = 1, name = "resist_chaos", factor = 0.3},
    {chance = 1, name = "resist_death", factor = 0.3},
    {chance = 1, name = "resist_weaponmagic", factor = 0.3},
    {chance = 1, name = "resist_godpower", factor = 0.3},
    {chance = 1, name = "resist_drain", factor = 0.3},
    {chance = 1, name = "resist_depletion", factor = 0.3},
    {chance = 1, name = "resist_countermagic", factor = 0.3},
    {chance = 1, name = "resist_cancellation", factor = 0.3},
    {chance = 1, name = "resist_confusion", factor = 0.3},
    {chance = 1, name = "resist_fear", factor = 0.3},
    {chance = 1, name = "resist_slow", factor = 0.3},
    {chance = 1, name = "resist_paralyze", factor = 0.3},
    {chance = 1, name = "resist_snare", factor = 0.3},

    -- attack 110 roll would +11% attack
    {chance = 1, name = "attack_impact", factor = 0.1},
    {chance = 1, name = "attack_cleave", factor = 0.1},
    {chance = 1, name = "attack_slash", factor = 0.1},
    {chance = 1, name = "attack_pierce", factor = 0.1},
    {chance = 1, name = "attack_cold", factor = 0.1},
    {chance = 1, name = "attack_fire", factor = 0.1},
    {chance = 1, name = "attack_electricity", factor = 0.1},
    {chance = 1, name = "attack_poison", factor = 0.1},
    {chance = 1, name = "attack_acid", factor = 0.1},
    {chance = 1, name = "attack_sonic", factor = 0.1},
    {chance = 1, name = "attack_channelling", factor = 0.1},
    {chance = 1, name = "attack_corruption", factor = 0.1},
    {chance = 1, name = "attack_psionic", factor = 0.1},
    {chance = 1, name = "attack_light", factor = 0.1},
    {chance = 1, name = "attack_shadow", factor = 0.1},
    {chance = 1, name = "attack_lifesteal", factor = 0.1},
    {chance = 1, name = "attack_aether", factor = 0.1},
    {chance = 1, name = "attack_nether", factor = 0.1},
    {chance = 1, name = "attack_chaos", factor = 0.1},
    {chance = 1, name = "attack_death", factor = 0.1},
    {chance = 1, name = "attack_weaponmagic", factor = 0.1},
    {chance = 1, name = "attack_godpower", factor = 0.1},
    {chance = 1, name = "attack_drain", factor = 0.1},
    {chance = 1, name = "attack_depletion", factor = 0.1},
    {chance = 1, name = "attack_countermagic", factor = 0.1},
    {chance = 1, name = "attack_cancellation", factor = 0.1},
    {chance = 1, name = "attack_confusion", factor = 0.1},
    {chance = 1, name = "attack_fear", factor = 0.1},
    {chance = 1, name = "attack_slow", factor = 0.1},
    {chance = 1, name = "attack_paralyze", factor = 0.1},
    {chance = 1, name = "attack_snare", factor = 0.1}

}

When a roll is to low, this leads to a fail. Same if it rolls an existing attribute and new roll would be a lower result. When we have 2 rolls on same attribute, logic takes the higher one.

This can be for sure improved. Also from codeside its possible to roll 10 times and we can also roll with dices>110 to increase chances for high level gear.

But adding multistat items will change the game balance for sure, so thats reason its atm limited to amulett, ring and a leather pant.

Command to roll an item is

Code: [Select]
roll_item(item, dice, rolls)

where item need to be an existing object and dice can max generate lvl 110 results and rolls is capped to 10.

Script is stats.lua and need to be implemented non modular like smith script. Perhaps later its better to change this to a modular implementation.
« Last Edit: 10, October 2024, 21:33:41 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Tags:
 

Related Topics

  Subject / Started by Replies Last post
4 Replies
2244 Views
Last post 27, February 2006, 13:52:23
by Zucca
6 Replies
3006 Views
Last post 11, September 2006, 21:33:47
by swords_kid
0 Replies
697 Views
Last post 01, July 2007, 10:10:11
by pit_fighter
15 Replies
2831 Views
Last post 13, October 2008, 12:13:00
by zaurbock
0 Replies
49 Views
Last post 26, August 2023, 19:53:50
by Dolfo