New account registration is temporarily disabled.

ARGOL228'S PROFILE

Search

Filter

Best way to handle random loot in chests

So I am making a dungeon crawler and as such random loot will play a big part. I was trying to set up a test but I can;t quiet think of how I will go about this.

My initial thought is to set up a common event with a list of items (probably have a few of these common events with different lists to better optimize what loot would be found at that particular part of the dungeon) but then I realize I would have to create an item for every possible enchantment or bonus I will be using.

Here is an example of the set up I am using
Enchantments
Elemental damage
Stat boost
HP regen
Bonus damage
ect

Curses
Life drain
Stat drain
Monster Bait
ect

Weapons (with Iron, Mythil, Adamantite, Dragon forged versions)
short sword
Long sword
Axe
Bow
Spear
Staff
Mace

Just from my example enchantments and curses there are a fair ammount of items I would have to create and there is still my armour and accessory list.

RPGMXP Question regarding stats

# * Get Attack Power
#--------------------------------------------------------------------------
def atk
n = base_atk
for i in @states
n *= $data_states.atk_rate / 100.0
end
return Integer(n)
end

The only instance of def atk

As I said earlier. I will just keep the unexplained base atk for unarmed purposes and balance my game with that in mind.

RPGMXP Question regarding stats

Actually the creator is a nice guy and has helped me before. he even scripted some features into his ABS for me. but still I found nothing that would cause the base atk. I might just have the base stats of every actor and enemy be 10, and build from there.

RPGMXP Question regarding stats

author=Crystalgate
To start with, under "# calculate basic damage," the code should say following:

self.damage = [attacker.atk + attacker.str - self.pdef, 0].max


Note, the game should not give PCs a base ATK of 10. Go to Game_Actor and check what line 267 to 270 says. It should say following:

def base_atk
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.atk : 0
end

If these lines says something else, someone has tinkered with the script.


My damage calculation does look like that, I had removed that first line. and Yeah My Game_Actor lines are the same. which is now making me think that the base atk may be a result of the ABS I am using.

After a search though the plausible sections of the ABS scripts I couldn't find anything, I have sent a message to the creator.

RPGMXP Question regarding stats

that stuff was already there. I just changed what was in the brackets.
What I am trying to do is as I said. Attack + str-10 - Defense = Damage

So my iron sword is atk 7. strength 11
Enemy Pdef 6 Should result in 2 damage.

7+1-6=2

Weather or not the first line does anything or not is beside the point. Now I am trying to figure out why the PC has a base attack of 10.

RPGMXP Question regarding stats

It appears that the base atk of the PC is 10. the sword adds 7 which is correct.
Changing the formula to
atk = (attacker.atk - self.pdef).max
self.damage = (attacker.atk - self.pdef)

Results in the mob doing 1 damage per hit. again showing the formula is accurate. It just seems for some reason the base atk of the PC is 10. and since that is not one of the stats represented on the actor screen I have no idea how to change it.

As for Str. it is going to be used as a factor in certain events and situations. such as equiping gear, lifting certain objects. and I might add something like atk = (attacker.atk + attacker.str - 10) which by my understanding would result in every point over 10 str adds 1 point to atk in other words more of a DnD style use of it.

RPGMXP Question regarding stats

author=LockeZ
OK, found the actual functions you need to change.

Go into the script editor and go down to the Game_Battler 3 page of scripts on the left side. Click that script page title, and you'll see some scripts on the right.

The first function defined in Game_Battler 3 is skill_can_use?. You can leave this one alone. Below it are the two you care about: attack_effect and skill_effect. You can see in the code how it takes the attacker's stat's and the stats of an object called "self". In this case "self" is the target of the skill, the one taking damage (or being healed). You can adjust these formulas as needed. For an extremely simple formula, for example, you can replace most of the attack_effect function with self.damage = (attacker.atk+10) / (self.pdef+10) - This will make it so damage is simply attack power + 10 / defense power + 10. A very simple formula. (The +10 helps make the the player not take insane damage when armorless or deal 0 damage when weaponless. It also ensures you're not dividing by zero when the player is armorless, which would cause an error.)
This is the test formula I made
# Calculate basic damage
atk = (attacker.atk + attacker.str - self.pdef).max
self.damage = (attacker.atk + attacker.str - self.pdef)

The stats of the PC and the test mob are

PC atk 7 Str 5 Pdef 6
Mob atk 7 str 10 pdef 6

The results are
PC deals between 17-19 damage
Mob deals between 11-13

according to the formula It should be
PC damage 6
Mob damage 11
So as you can see the mob damage is accurate with the formula but PC isn't so am I misreading the script or is there another factor I have missed?

RPGMXP Question regarding stats

author=LockeZ
I'm not sure what your question is. Obviously yes it is possible to edit the scripts in any way you want. Changing the damage formula is a nice, fairly easy way of being introduced to scripting. You should be able to find the damage-calculation function in the game_battler scripts and edit it however you want.


Well yeah that what I was kind of implying. I wouldn't really know where I need to change the formula or what I have to do. I am new to scripting.

RPGMXP Question regarding stats

author=Marrend
Aren't the four "main" stats of RPGM-XP Strength, Intelligence, Dexterity, and Agility? I mean, if you've already overwritten how DEX works, then I would imagine that overwriting how the damage formula works shouldn't be a huge stretch.


No, thats what I hope to achieve. I haven't done any changes yet. but yes that would include changing what Dex does.

RPGMXP Question regarding stats

I have been trying to figure out how exactly the default stats work but I have decided it would be better if I used my own formula. is it possible to do so? a run down of what I hope to achieve

Main stats
STR
MAG
END (affects carry weight and stamina)
AGI

Gear stats
DR (Damage rating)
AR (armour rating)
RES (Resistence to Magic)

The damage formula I have in mind is
Damage + STR/MAG - AR/RES = True damage

I am trying to focus the character progression on gear instead of Player stats.
Pages: first prev 123 next last