PixelPusher

Villager
Member
Joined
Jun 17, 2014
Messages
5
Reaction score
2
First Language
english
Primarily Uses
I have a question about how to do something.

In the:

# Results for Actions on Actors

ActorDamage = "%s took %s damage!"  = (Hero took 99 damage!)

How is it possible, if at all to comment out or remove the syntax that prints the actors name?

When only using one %s the result is that the heros name will print rather than the

damage number. This leaves you open to fewer ways to write out the battle dialogue in basic

tinker mode. I know... there are scripts for that.. ;)

Since they are both the same, ( %s ) I'm sure soemthing else in one of the other scripts is

responsible for knowing that the first one in the list is the heros name to be printed and

the second is the number of damage points to be printed.

Leaving one of those %s (whatever it may be called) results in the following:

"They did Hero damage!" (Bad vocabular BAD!)

I hope this will not confuse anyone.

Thank You Mr. or Mrs/s..
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,255
Reaction score
9,688
First Language
German
Primarily Uses
RMMV
Yes, the %s are placeholders that are replaced at runtime with values by the command that uses the vocab, and to change them you'll need to change the command using the vocab as well as the vocab itself.

You can search for the vocab name to find all places where it is used (ActorDamage) and you need to change everything in the same way if it is used in more than one function.

And yes, that requires scripting knowledge - without scripting knowledge you can only rephrase but not change the placeholders.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,812
Reaction score
890
First Language
German
Primarily Uses
RMMZ
You can drop the first parameter by setting its width to 0, like this:

Code:
"%.0s%s damage!"
/edit: You can even drop the "0":
Code:
"%.s%s damage!"
 
Last edited by a moderator:

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
233
Reaction score
102
Primarily Uses
Another way:

Code:
"They did %2$s damage!"# or you could switch the order"They did %2$s damage to %1$s!"
The 2$ means the second argument (the amount of damage) is used.
 
Last edited by a moderator:

PixelPusher

Villager
Member
Joined
Jun 17, 2014
Messages
5
Reaction score
2
First Language
english
Primarily Uses
Yes, the %s are placeholders that are replaced at runtime with values by the command that uses the vocab, and to change them you'll need to change the command using the vocab as well as the vocab itself.

You can search for the vocab name to find all places where it is used (ActorDamage) and you need to change everything in the same way if it is used in more than one function.

And yes, that requires scripting knowledge - without scripting knowledge you can only rephrase but not change the placeholders.
I did find this out. I placed a bad syntax into Vocab and the error reported it being in the BattleManager script. So I realize that it might be a false possitive if changing a value in one script, you get an error in the other script unless you change the other dependant script as well. I'll keep this in mind...

I've also realized that after banging my head with KilloZapit's word wrap script that wasn't working with my use of Victors SFonts, the Word Wrap script needed to be placed above the SFonts. Sounds logical; Format the output then tell the output what to look like, rather than the other way around.

You can drop the first parameter by setting its width to 0, like this:

"%.0s%s damage!"/edit: You can even drop the "0":
Code:
"%.s%s damage!"
Thanks for the tip! I was able to get the desired printout. I don't require too much fiddlin' inside the Vocab script just tinkering with the obvious and in this case, not so obvious editable syntax.

So It may be fair to say this seems to be resolved but of course, something else may arise as I'm testing and playing. Thanks for the feedback.
 

Latest Threads

Latest Posts

Latest Profile Posts

Kes
Let me ask you this - when was the last time you backed up? Can you afford to lose all the progress you've made since the last backup?
Just asking.
Working on fun ways to get around the Midnight Circus level! Cannons were a given :LZSlol:

apolloblastoff.gif

Forum statistics

Threads
123,075
Messages
1,153,795
Members
161,407
Latest member
Tree_of_Topaz
Top