RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] - More descrptive / random battle messages

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 87
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!
« Last Edit: July 31, 2008, 06:58:45 PM by foadbot »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Would you really want it to be randomly picked? It'd be weird to swing an axe or something and have it say bludgeoned.

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
Would be useful for roguelikes and text-based games.
Be kind, everyone you meet is fighting a hard battle.

**
Rep:
Level 85
Jack of all Trades
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 :::
« Last Edit: July 31, 2008, 10:59:00 AM by Arclight »
Arclight

A Jack of all Trades
An Ace of None

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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.

**
Rep: +0/-0Level 87
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

**
Rep: +0/-0Level 87
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!
« Last Edit: August 01, 2008, 12:38:22 AM by foadbot »

**
Rep:
Level 85
Jack of all Trades
Arclight

A Jack of all Trades
An Ace of None