Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Request] - More descrptive / random battle messages

Started by foadbot, July 31, 2008, 02:18:56 AM

0 Members and 1 Guest are viewing this topic.

foadbot

descriptive battle messages
7/30/08




Summary
A script that enables more descriptive damage messages based on the amount of damage an actor or enemy has taken
Looking for something more descriptive than "ActorDamage     = "%s took %s damage!"" and have the ability to add more than one description when someone / something takes damage

A script that can randomly pick from several options like the examples below
"%s took %s damage!"
"%s was stabbed for %s damage!"
"%s was bludgeoned for %s damage!"
"%s face was smashed in for %s damage!"
"%s screams in horror as they are pulverized for %s damage!"

edit - descriptions would be based on the weapon type being used

knife - stab / cut
hammer - crushed / bludgeoned
axe - chopped / cleaved

and so on...


Features Desired

    See summary

Mockups
none

Games its been in

    Wasteland




Did you search?
Yes

Where did you search?

    crankeye.com
    rpgmakervx.net
    rpgrevolution.com

What did you search for?

    descriptive battle
    descriptive damage
    damage description

If anyone can help with this or provide any hints about how to accomplish this, it would be appreciated!

modern algebra

Would you really want it to be randomly picked? It'd be weird to swing an axe or something and have it say bludgeoned.

Leventhan

Would be useful for roguelikes and text-based games.

Be kind, everyone you meet is fighting a hard battle.

Arclight

#3
About

     This is my first script edit so its not a complete copy/paste type script.  (yet)  Right now its more of a
     mini-tutorial.

     What game variables does this works on? Basicly you can use the method below for any regular combat
     message plus some non-combat messages. It does not work on skill or item messages yet. I'll find an edit
     for that too but probably several days down the road.

     Thanks for the idea though... i was wanting something like this to hack on for awhile. :)

How to edit the script

     So here is what you do:

1. Goto Tools Menu > Script Editor > Vocab > Line 29. Looks like this:

     Emerge          = "%s emerged!

2. Change that line to:

     Emerge = ["%s emerged!",
                      "%s appeared!",
                      "%s is in your face!"]

3. Remember the number of items in the list. in this example there are 3.

4. Right Click and do a 'Find' on 'Emerge'

5. There will be two items in the list. The first is the 'variable' you just edited and the second is the 'function'
     that uses that variable. Double Click Scene_Battle (532):

6. Edit line 532 of Scene_Battle from

      text = sprintf(Vocab::Emerge, name)

to

      text = sprintf(Vocab::Emerge[rand(3)], name)

So rand(3) got added, this stands for, random integer between 1 and the number you put. no zero.


Hope this did the trick... i may add notes to this after awhile but... if anyone else wants to take a better crack at it don't wait for me.  o.-


::: side note, i'll probably move my post here to its own page in a few days :::
Arclight

A Jack of all Trades
An Ace of None

modern algebra

So, not really random at all, or do you want to have a number of phrases for each weapon type.

I think arclight has some good ideas for this script anyway, so I'll let him at it.

And... don't double post. Or triple post for that matter. Edit your posts instead.

foadbot

Quote from: modern algebra on July 31, 2008, 06:37:33 PM
So, not really random at all, or do you want to have a number of phrases for each weapon type.

I think arclight has some good ideas for this script anyway, so I'll let him at it.

And... don't double post. Or triple post for that matter. Edit your posts instead.

Will do, sorry

foadbot

#6
Ok, so i tried adding 3 different damage descriptions that to Actordamage in VOCAB and then adding [rand(3)] to scene_battle

text = sprintf(Vocab::ActorDamage[rand(3)], target.name, target.hp_damage)

when I initiate a battle, as soon as it is supposed to report damage it crashes with

Script 'Scene_Battle' line 1066: TypeError Occured.

cannot convert Fixnum into String


Any ideas?


edit: Ugh i forgot to put a comma after each of the descriptions. Now working, thanks!

Arclight

Arclight

A Jack of all Trades
An Ace of None