RMS Home | Guide Writing | New Servers | Latest Reviews

Author Topic: Help.Grf to make mob names always visible  (Read 21554 times)

0 Members and 1 Guest are viewing this topic.

Offline ludz69

Re: Help.Grf to make mob names always visible
« Reply #15 on: Aug 07, 2022, 09:38 pm »
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
« Last Edit: Aug 07, 2022, 09:45 pm by ludz69 »

Advertisement

Offline antonigaming

Re: Help.Grf to make mob names always visible
« Reply #16 on: Apr 09, 2023, 04:36 am »
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?


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:

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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.

Offline owlow

Re: Help.Grf to make mob names always visible
« Reply #17 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?

Code: [Select]
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);
}

Offline Ara

Re: Help.Grf to make mob names always visible
« Reply #18 on: Apr 09, 2023, 07:30 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?

Code: [Select]
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.

Offline owlow

Re: Help.Grf to make mob names always visible
« Reply #19 on: Apr 10, 2023, 03:33 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.