Help.Grf to make mob names always visible

Started by dob_20, Feb 22, 2015, 08:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dob_20

To see a monster's name.you should move your mouse over the monster. My question is. Is it possible to make every monster's name visible through custom grf? Or any other way? Tnx for the help. I am willing to dwell deeper into grf editing if that's a must.

Triper

I'm pretty sure that the names show based on how the server and the exe is coded. Ofc you could always edit each frame of each sprite in the grf to include the name but... good luck with life to do that to every monster lol

BTW, it would be easier to just swap/recolour the problematic sprites instead.

exii

[dream shattering]Not possible with grf edits.[/dream shattering]
exii - leader of the nonsense army

finest low quality gw2 streams: http://www.twitch.tv/exii_against_the_world

Tokeiburu

Well it's possible to some extent. Triper's correct, the server sends the mob's name to the client and his idea of showing up the name of the mob is actually a nice one!

There is, obviously, issues with the method. You can't show the name below the mob, because if you zoom out it'll show under the floor and you won't see it. Showing it above works fine, except if you zoom in and out, the text will change size as well. For example :



If that solution is fine with you, I can make these for all available sprites, just let me know! (On a side note, adding the name above the sprite is rather straightforward and it's done via a script xD!)

MrMystery

@Tokeiburu That's super cool. Mind sharing how you did it?

Tokeiburu

Well, not sure if this is what the OP would want, but here goes : http://www.mediafire.com/download/naw25l5a6l3bzp2/mobsWithName.grf

And to answer your question, this was made with Act Editor using the following script : http://pastebin.com/xif9KE8Z

Another screenshot :
Spoiler
[close]

itsmevincecee

Hi Tokeiburu, i want to learn how to use your script. I can't use it and im new to this kind of stuff so if you see this kindly teach me or send me a guide on how to make a name above the mobs. Thanks!

itsmevincecee

Quote from: Tokeiburu on Feb 23, 2015, 02:25 AM
Well, not sure if this is what the OP would want, but here goes : http://www.mediafire.com/download/naw25l5a6l3bzp2/mobsWithName.grf

And to answer your question, this was made with Act Editor using the following script : http://pastebin.com/xif9KE8Z

Another screenshot :
Spoiler
[close]

Hi tokeiburu, this script has an error if i try to load it to Act editor. How to fix this?
https://imgur.com/3VgV3JI

Thanks!

Ara

I went through and tried running it myself and it worked fine. I don't know what's causing your error, but I had to make a couple edits to the script.

First off, you need a mob_db.txt I guess. I just copied the one from here: https://github.com/rathena/rathena/blob/master/db/re/mob_db.txt
If the server you're playing on has custom monsters, you might need to add them into the mob_db.txt yourself.

I pasted this in my Ragnarok Online folder (I'm just going to be reffering to this as "C:\Games\NovaRO" because that's what mine's is called.)

Then, take a look at the script. Near the top, you can see these lines:


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\data.grf";
var newGrfName = @"C:\mobsWithName.grf";
var mobDbPath = @"C:\mob_db.txt";


You'll need to change the last 3 to your own Raganrok Folder. So I changed mine to


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\data.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";


You'll also need to use GRF Editor and I guess make an empty grf in your Ragnarok Online folder called mobsWithName.grf.

Then you can paste the edited script into ACTEditor's script runner and run it.

-----------------------------

If your server also has monster sprites in a GRF that isn't data.grf, you'll have to switch out that code line for the other GRF as well.

(example: after I finish running the script with data.grf, I'd switch the code to say


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\nova.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName2.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";

You can see I changed data.grf -> nova.grf and mobsWithName.grf -> mobsWithName2.grf. Don't forget to make another empty GRF for this also. Run the script again and then merge mobsWithName.grf and mobsWithName2.grf and it should work fine.

itsmevincecee

Quote from: Ara on Jan 26, 2021, 08:00 PM
I went through and tried running it myself and it worked fine. I don't know what's causing your error, but I had to make a couple edits to the script.

First off, you need a mob_db.txt I guess. I just copied the one from here: https://github.com/rathena/rathena/blob/master/db/re/mob_db.txt
If the server you're playing on has custom monsters, you might need to add them into the mob_db.txt yourself.

I pasted this in my Ragnarok Online folder (I'm just going to be reffering to this as "C:\Games\NovaRO" because that's what mine's is called.)

Then, take a look at the script. Near the top, you can see these lines:


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\data.grf";
var newGrfName = @"C:\mobsWithName.grf";
var mobDbPath = @"C:\mob_db.txt";


You'll need to change the last 3 to your own Raganrok Folder. So I changed mine to


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\data.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";


You'll also need to use GRF Editor and I guess make an empty grf in your Ragnarok Online folder called mobsWithName.grf.

Then you can paste the edited script into ACTEditor's script runner and run it.

-----------------------------

If your server also has monster sprites in a GRF that isn't data.grf, you'll have to switch out that code line for the other GRF as well.

(example: after I finish running the script with data.grf, I'd switch the code to say


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\nova.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName2.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";

You can see I changed data.grf -> nova.grf and mobsWithName.grf -> mobsWithName2.grf. Don't forget to make another empty GRF for this also. Run the script again and then merge mobsWithName.grf and mobsWithName2.grf and it should work fine.

This helps a lot. Thanks for your time.  /ok /ok /ok

itsmevincecee

Quote from: Ara on Jan 26, 2021, 08:00 PM
I went through and tried running it myself and it worked fine. I don't know what's causing your error, but I had to make a couple edits to the script.

First off, you need a mob_db.txt I guess. I just copied the one from here: https://github.com/rathena/rathena/blob/master/db/re/mob_db.txt
If the server you're playing on has custom monsters, you might need to add them into the mob_db.txt yourself.

I pasted this in my Ragnarok Online folder (I'm just going to be reffering to this as "C:\Games\NovaRO" because that's what mine's is called.)

Then, take a look at the script. Near the top, you can see these lines:


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\data.grf";
var newGrfName = @"C:\mobsWithName.grf";
var mobDbPath = @"C:\mob_db.txt";


You'll need to change the last 3 to your own Raganrok Folder. So I changed mine to


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\data.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";


You'll also need to use GRF Editor and I guess make an empty grf in your Ragnarok Online folder called mobsWithName.grf.

Then you can paste the edited script into ACTEditor's script runner and run it.

-----------------------------

If your server also has monster sprites in a GRF that isn't data.grf, you'll have to switch out that code line for the other GRF as well.

(example: after I finish running the script with data.grf, I'd switch the code to say


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\nova.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName2.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";

You can see I changed data.grf -> nova.grf and mobsWithName.grf -> mobsWithName2.grf. Don't forget to make another empty GRF for this also. Run the script again and then merge mobsWithName.grf and mobsWithName2.grf and it should work fine.

How about a single monster? Is it possible to put a name on a specific monster? Thanks again.

Ara

Uh I guess if you just want specific monsters, you just have to find the sprite in the GRF you exported earlier (mobsWithName.grf) and find the monsters you want to see the name for. Delete all the ones you DON'T want to see from the grf and you should be fine?

pogihahaha

Sorry for the bump, but i have tried this just now, using https://github.com/rathena/rathena/blob/master/db/re/mob_db.yml with its format changed to txt and an updated kRO data.grf. I do not get any error but and get an empty 62b-sized mobsWithName.grf upon clicking Run on the Script Runner window. I have also changed my directories and made an empty mobsWithName grf. Are there new things that I have to do to make it work or am i still doing something wrong?

themagma

Anyone. Do you have any script that can apply image to all frames, all action index except die animation?

molecules

is anyone still up in this thread? I'm having an error on poporing/zombie whenever I try to go to pay dun

ludz69

#15
Hello. I have a question its kinda off topic coz I dont want to create a new thread for my simple question.

Question is: Whats the file name to remove the Torch or the Torch Light from dungeons? TIA

antonigaming

I followed everything you did here but mine just loads saying "Processing" and does nothing. What else could I have been missing? Maybe a redistributable file or something?


Quote from: Ara on Jan 26, 2021, 08:00 PM
I went through and tried running it myself and it worked fine. I don't know what's causing your error, but I had to make a couple edits to the script.

First off, you need a mob_db.txt I guess. I just copied the one from here: https://github.com/rathena/rathena/blob/master/db/re/mob_db.txt
If the server you're playing on has custom monsters, you might need to add them into the mob_db.txt yourself.

I pasted this in my Ragnarok Online folder (I'm just going to be reffering to this as "C:\Games\NovaRO" because that's what mine's is called.)

Then, take a look at the script. Near the top, you can see these lines:


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\data.grf";
var newGrfName = @"C:\mobsWithName.grf";
var mobDbPath = @"C:\mob_db.txt";


You'll need to change the last 3 to your own Raganrok Folder. So I changed mine to


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\data.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";


You'll also need to use GRF Editor and I guess make an empty grf in your Ragnarok Online folder called mobsWithName.grf.

Then you can paste the edited script into ACTEditor's script runner and run it.

-----------------------------

If your server also has monster sprites in a GRF that isn't data.grf, you'll have to switch out that code line for the other GRF as well.

(example: after I finish running the script with data.grf, I'd switch the code to say


var mobFolder = @"data\sprite\¸ó½ºÅÍ\";
var dataGrfName = @"C:\Games\NovaRO\nova.grf";
var newGrfName = @"C:\Games\NovaRO\mobsWithName2.grf";
var mobDbPath = @"C:\Games\NovaRO\mob_db.txt";

You can see I changed data.grf -> nova.grf and mobsWithName.grf -> mobsWithName2.grf. Don't forget to make another empty GRF for this also. Run the script again and then merge mobsWithName.grf and mobsWithName2.grf and it should work fine.

owlow

I've been trying to do something similar and ran into a similar issue. I'm trying to remove all death animation frames from all the files in that folder but nothing happens if I run the script.

If I open an .act first and then run the script, it seems to work but doesn't save the files, then asks me to save the single .act I opened, which did get the frames removed correctly.

Anyone able to help?

var path = @"C:\sprite\test";

foreach (var actFile in Directory.GetFiles(path, "*.act")) {
    var sprFile = actFile.ReplaceExtension(".spr");
    var act2 = new Act(actFile, sprFile);
   
    for (int aid = 32; aid < act.Actions.Count; aid++) {
        for (int fid = act.Actions[aid].Frames.Count - 1; fid >= 1; fid--) {
        act[aid].Frames.RemoveAt(fid);
           }
    }
   
    act2.SaveWithSprite(actFile, sprFile);
}

Ara

Quote from: owlow on Apr 09, 2023, 03:59 PM
I've been trying to do something similar and ran into a similar issue. I'm trying to remove all death animation frames from all the files in that folder but nothing happens if I run the script.

If I open an .act first and then run the script, it seems to work but doesn't save the files, then asks me to save the single .act I opened, which did get the frames removed correctly.

Anyone able to help?

var path = @"C:\sprite\test";

foreach (var actFile in Directory.GetFiles(path, "*.act")) {
    var sprFile = actFile.ReplaceExtension(".spr");
    var act2 = new Act(actFile, sprFile);
   
    for (int aid = 32; aid < act.Actions.Count; aid++) {
        for (int fid = act.Actions[aid].Frames.Count - 1; fid >= 1; fid--) {
        act[aid].Frames.RemoveAt(fid);
           }
    }
   
    act2.SaveWithSprite(actFile, sprFile);
}


The issue here is that you're saving a variable called "act2", but you're doing the actions on a variable called "act". Just change every instance of "act" with "act2" in your code (e.g. act[aid] ---> act2[aid]) and it should work.


===============================================

Also, it doesn't seem like I can edit my old message, but rAthena has swapped out mob_db.txt for mob_db.yml. The script doesn't really work with the yml file, even if you convert it into a txt file instead.

For anyone looking for a mob_db.txt file, you can try this one: https://github.com/evertonsnake/rathena/blob/master/db/re/mob_db.txt

Or if you try to find another one (that's perhaps more updated?), the format should look something like that.

owlow

Quote from: Ara on Apr 09, 2023, 07:30 PM
The issue here is that you're saving a variable called "act2", but you're doing the actions on a variable called "act". Just change every instance of "act" with "act2" in your code (e.g. act[aid] ---> act2[aid]) and it should work.

Thank you very much, it's working now.

NeOBR

Quote from: Ara on Apr 09, 2023, 07:30 PMThe issue here is that you're saving a variable called "act2", but you're doing the actions on a variable called "act". Just change every instance of "act" with "act2" in your code (e.g. act[aid] ---> act2[aid]) and it should work.


===============================================

Also, it doesn't seem like I can edit my old message, but rAthena has swapped out mob_db.txt for mob_db.yml. The script doesn't really work with the yml file, even if you convert it into a txt file instead.

For anyone looking for a mob_db.txt file, you can try this one: https://github.com/evertonsnake/rathena/blob/master/db/re/mob_db.txt

Or if you try to find another one (that's perhaps more updated?), the format should look something like that.


Hi Ara, I know the topic has been stopped for a while I'm having an error in the script I didn't find a mob.db but the version I have of act editor I believe is not compatible with the current script, it's giving an error


'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core.FileEntry>' does not contain a definition for 'AddFileAbsolute' and no extension method 'AddFileAbsolute' accepting a first argument of type 'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core .FileEntry>' could be found (are you missing a directive or an assembly reference?)"

I'm probably using a very recent version of act editor, do you have the version that works with this script?

@Tokeiburu

ishida20

Quote from: NeOBR on Jan 11, 2024, 08:39 PMHi Ara, I know the topic has been stopped for a while I'm having an error in the script I didn't find a mob.db but the version I have of act editor I believe is not compatible with the current script, it's giving an error


'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core.FileEntry>' does not contain a definition for 'AddFileAbsolute' and no extension method 'AddFileAbsolute' accepting a first argument of type 'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core .FileEntry>' could be found (are you missing a directive or an assembly reference?)"

I'm probably using a very recent version of act editor, do you have the version that works with this script?

@Tokeiburu


Sorry for the bump, can anyone please help as I am having the same error when running the script on ACTEditor 1.2.8. It seems that it doesn't recognize the command 'AddFileAbsolute'. I have a mob_db.txt but I am not sure if it's updated or the one needed.

Please help because the mobsWithName.grf that Tokeiburu has provided doesn't have certain mobs like Archer Skeleton and Skeleton Soldier, etc. I would like to have it added using the script.

If you also have a download link for a known working mob_db.txt that would be greatly appreciated. I am hoping for a response and thank you so much in advance.

Ara

Quote from: ishida20 on Apr 07, 2024, 08:49 PMSorry for the bump, can anyone please help as I am having the same error when running the script on ACTEditor 1.2.8. It seems that it doesn't recognize the command 'AddFileAbsolute'. I have a mob_db.txt but I am not sure if it's updated or the one needed.

Please help because the mobsWithName.grf that Tokeiburu has provided doesn't have certain mobs like Archer Skeleton and Skeleton Soldier, etc. I would like to have it added using the script.

If you also have a download link for a known working mob_db.txt that would be greatly appreciated. I am hoping for a response and thank you so much in advance.

Quote from: NeOBR on Jan 11, 2024, 08:39 PM'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core.FileEntry>' does not contain a definition for 'AddFileAbsolute' and no extension method 'AddFileAbsolute' accepting a first argument of type 'GRF.ContainerFormat.Commands.CommandsHolder<GRF.Core .FileEntry>' could be found (are you missing a directive or an assembly reference?)"

I went to go bother Tokei a bit (^u^) and turns out "AddFileAbsolute" has been replaced with "AddFile", which is why it stopped working on newer versions of ActEditor.

If you're getting the error regarding that, find and replace (ctrl + h) and replace every instance of "AddFileAbsolute" with "AddFile" and the script should work.

=======

On another note, looks like the last mob_db.txt I posted broke as well huh... I've attached some sort of version of mob_db.txt that I had lying around. It's called mob_db.rar but that's just because I had to compress it so that RMS would let me attach it (file size limit is 100KB, uncompressed the file is like 300ish KB), obviously extract it back to a txt if you want to try using it.

Download here: You cannot view this attachment.

ishida20

@Ara

I apologize for the late response and I hope it's not too late to say, THANK YOU!
It worked with the latest version of Tokei's ACTEditor and I found out the reason why some mobs were not included in his original mobsWithName.grf.

It turns out that the mob_db.txt that we have is indeed outdated. (or the current data.grf's that we have just updated) Some .act files within data.grf has different name tags compared to the ones from mob_db.txt (e.g. Archer Skeleton has an .act file name of SKEL_ARCHER in data.grf but mob_db.txt has it named ARCHER_SKELETON)

If anyone wants to change this, just simply rename the mob_db.txt name to the ones in your data.grf.

Once again, I appreciate your help as this has been triggering my OCD for a while since I started using Tokei's GRF.  /heh