Jump to content

Tokei

Members
  • Posts

    660
  • Joined

  • Last visited

  • Days Won

    89

Posts posted by Tokei

  1. 13 hours ago, munkrej said:

    We've just realized that flat map making feature seems to be broken with current version 1.8.6.9, it was fine with 1.8.6.7.

    Fixed in 1.8.7.1. There was an issue with UV texture coordinates being all set to 0 on new tiles.

     

    • Upvote 1
    • MVP 1
  2. 1 hour ago, annicellin said:

     

    Hi Tokei... I have the same need and I wonder if it's possible to find a workaround? My client requires me to export an effect and convert it as a standard SPR/ACT sprite file for an NPC.

    I have a few suggestions:

    1. Export as APNG (to allow transparency)

    2. Export frames as seen in the view UI (allow me to export them as PNGs for transparency so they can be added as sprites).

    Hmm, there is an approximation that can be done which will probably be good enough. The point 2 is misleading; what is seen in the UI is a blend of the background + layers. You can't separate them as it's already a final image, if that makes sense. But you could in theory extract a transparency value by using a black and white background version of the composite image. Then do some math magic and approximate the bgra values.

    I've added the option in 1.1.0, though it's a bit awkward to use (found in File > Export as PNG...).

     

    • MVP 2
  3. 18 hours ago, Bringer said:

    How can I retrieve files when using Encrypt File Table?

    The purpose of encrypting the file table is to not be able to see the files anymore. While possible, retrieving the file listing would be... quite counter productive? Perhaps this feature is something you don't want to use as it doesn't seem to fit what your needs.

  4. 3 hours ago, roaddict said:

    I'm don't understand how to add sounds to a sprite.

    There are two methods for doing that:

    1. Once you have the current frame, click on:
      image.png.a59553d25fd27af6ba3dd21b9e622c76.png
      Then add the name of the file, like "test.wav". The file should be in data\wav\test.wav
    2. You can add a bunch of sound names by editing the list instead:
      image.png.bc819336546a288ab27a354c74507e9d.pngimage.png.5a7a30f4d45857497cc5c4460a420500.png
      Then select the sound for the frame from the list.

    If the sound doesn't play when testing the sprite, then it's just because it wasn't found in the resources. That's not really important, but you can add more resources from File > Settings > Sound:
    image.png.083166796775ce324bb69808f6f9bd23.png

    • Love 2
  5. Hmm, you'd definitely want to add more checks on this, but here:

    -	script	Mob Helper	-1,{
    OnNPCKillEvent:
    	// Fixed improper usage of rand for "chance"
    	if (500 < rand(10000)) end;
    	if (mkTimed && gettimetick(2) <= mkTimed) end;
    	// Don't use "set" anymore, that's way outdated.
    	// Using getmonsterinfo isn't a bad idea, but it's somewhat useless/broken now. You'd have to expand on it in the source to make it useful.
    	getunitdata(killedgid, .@mobdata);
    	// There's no reason to use player variables in this case, the variable has no purpose outside of the NPC block code. Therefore it should be a NPC variable.
    	.@MobMode = .@mobdata[UMOB_MODE];
    	.@MobClass = .@mobdata[UMOB_CLASS];
    	if (!(.@MobMode & MD_CANMOVE)) end;
    	if (!(.@MobMode & MD_CANATTACK)) end;
    	// MD_BOSS/32 isn't a thing anymore either, so that code won't work.
    	if (.@MobClass == CLASS_BOSS) end;
    	// Too much wrong with these lines.
    	//set @WoE[0],1288|1285|1830|1949|1950|1286|1287|1899|1829;                                    //WoE IDs
    	//for(set @n,0; @n < getarraysize(@WoE); set @n,@n+1){ if(@WoE[@n] == killedrid){ end; } }    //WoE
    	// You probably meant to use "setarray", and you also probably to use commas instead of separators: setarray @woe, 1288, 1285, ..;
    	// Either way, that's inefficient considering this code runs on all killed monsters. Honestly I'd do the whole thing via the source instead since running a script everytime you kill a monster is overkill. Anyhow, use a dictionary seach:
    	if (.badMob[killedrid]) end;
    	.@nTime = (300 + rand(0, 120)) - getmonsterinfo(killedrid, MOB_LV);
    	// The main reason why your script didn't work: "summon" uses miliseconds, not seconds.
    	.@nTime *= 1000; // s to ms
    	summon "Ajudante " + getmonsterinfo(killedrid, MOB_NAME), killedrid, .@nTime;
    	mkTimed = gettimetick(2) + .@nTime + rand(0, 60);
    	message strcharinfo(0), "[" + getmonsterinfo(killedrid, MOB_NAME) + "] Hello " + strcharinfo(0) + " I will help you for a few minutes!";
    	end;
    OnInit:
    	// Define bad mobs here
    	.badMob[1288] = 1;
    	.badMob[1285] = 1;
    	.badMob[1830] = 1;
    	.badMob[1949] = 1;
    	.badMob[1950] = 1;
    	.badMob[1286] = 1;
    	.badMob[1287] = 1;
    	.badMob[1899] = 1;
    	.badMob[1829] = 1;
    	end;
    }

     

    • Love 1
  6. Heya,

    The HP/SP bars are

    • data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\basic_interface\gzeblue_left.bmp
    • gzeblue_mid
    • gzeblue_right

    And the AP bar is gzered_left / gzered_mid / gzered_right.

  7. 1 hour ago, Relzz said:

    What a great update!

    I have a small comment here,

    This is not a bug or anything, but URLs are kinda unreadable

    image.png.7d92b587137f8334e83ea993207ff963.png

     

    As an added comment, do you think its viable to allow GRFs that are bigger than 4GB? 

    The RO GRF its getting really big nowadays. Its getting really close to 4GB that im having issues when merging the GRFs but im not sure if that would be an option.

     

    I wanted to add missing resources to the official GRF and it ended up at 4GB+ so I had to split them

    I fixed the hyperlink color, along with the brush selection and the search brush (same download link as before).

    As for the 4 GB limit, that's a structural limit with GRF files and there's nothing that can be done about it unless Gravity updates their file format. For more context, the file table offset is defined as an unsigned integer and the entries within the file table are also defined as unsigned integers. Four bytes of data cannot go beyond 4294967295; if they do, they'll wrap back to 0 and starts corrupting data in your GRF.

    1 hour ago, Gidz Cross said:

    As for GRF size i have made a single grf with 5gb+ in it. No problem at all. That is HD resource + HD sprites + rdata + custom palettes.. All packed in single grf.

    I'm afraid this is technically impossible. If your GRF reached 5+ GB in size, then it means you've lost data within your GRF without you knowing about it. As I mentioned above, if you go past 4 GB with your file offsets, the data wraps back to 0. The fact that your GRF loads means that the file table offset was indeed beyond the limit and is probably written right in the middle of your GRF instead of at the end of it. The file table has overwritten some of your files within your GRF and some indexes are linking to invalid data (and not by a small amount, about 1/5th of your GRF is unreadable). When that happens, the client won't be able to decompress the data as it won't be a valid zlib entry, and it will attempt to read from the next GRF listed.

    • Upvote 1
    • Like 1
  8. Updated to 1.8.6.6, this update mostly targets the map rendering:

    • Added/fixed the RSM2 to RSM1 option when right-clicking a RSM2 file.
      image.png.6733ed3860f1e1763d9b579e14ec3704.png
      The "anim" option will keep the rotation key frames, but it is not a perfect conversion; the scale/texture/offset key frames cannot be converted. The "flat" option will remove any kind of animation but will always be a perfect match with the original.
      I know this feature isn't that useful anymore since most clients support RSM2 files just fine, but I still hear people wanting to downgrade RSM2 files. You'll need to set the scale to (-1,1,1) in BrowEdit if you want to keep original model direction.
    • Added the "Downgrade" option when right-clicking a RSW file. This will set the version of the RSW to 0x201 and GND to 0x107. All RSM2 files inside the RSW file will be converted to RSM1 and added to your GRF. The RSM2 models are also placed in their correct positions after conversion.
    • Fixed the FPS counter.
    • Added a "minimap" option to create minimaps:
      image.png.fc65e6cbd46955b4d25bd688a43022cd.png
    • Added a face culling option to reflect the client's behavior more accurately.
    • Added a copy/paste feature meant for BrowEdit 3 by using shift-left-click:
      image.png.b604486935df05b4bd7f295a103c0ba5.png
    On 2/14/2024 at 7:16 PM, Westin said:

    Honestly, if you're going to copy and paste what you've already typed over the years here in this topic, it's better not to respond, I'll use another program, thank you very much.

    Please keep your drama/trolling out of this thread, thank you. This forum is primarily dedicated towards developers, not players. I'd refer you to RMS, reddit or your own server forum instead.

    • Love 1
    • MVP 4
  9. 1 hour ago, Relzz said:

    I dont think RRF Parser works like that, it is made to read replays and I dont think replays come encrypted, do they? ns

    They shouldn't be encrypted, no. Unless Gravity revamped the rrf format, this tool should still work. You don't have to handle newer packets unless you want some information from them. For example, if there is a newer packet for displaying NPC messages, then they would simply not show up in the tool anymore until you added a parsing method for it. Anyway, you'd have to share your replay with me in private to look into what's happening. It's too vague as it is.

  10. You forgot the semi-colon after the first line:

    ALTER TABLE `char` ADD `achievement_points` INT
    to
    ALTER TABLE `char` ADD `achievement_points` INT;

    Other than that, it ran fine for me.

    (Also you may want to use a proper SQL editor like HeidiSQL instead of phpmyadmin...)

  11. 11 hours ago, Westin said:

    I've already tried everything in this topic, nothing worked.

    Sem título.png

    Well that's a bit of a vague error, but usually that means either one of these two:

    • You do not have the .net 3.5 and .net 4.0 properly installed.
    • Or you have conflicting dlls in your folder where GRF Editor is running from (doesn't seem likely though?).

    So for starter, I'd recommend reinstalling .net 4.0, then .net 3.5, and go from there I suppose.

  12. 10 hours ago, Outlook said:

    Error me too same like this

    I think because after update

    https://github.com/rathena/rathena/commit/7c153416bc2b69bbb515c0a3e7a90bcb216d5e4a

    Script error after update

    .@npc_size = rand(0, 0);

    i'm not sure just i think.

    That's a different issue though; rand(0, 0) doesn't make sense. You could edit the BUILDIN function to ignore such a case, since one could argue that rand(0, 0) should return 0. In the original script posted by InfectedX, it was impossible to have such a scenario so the error didn't make sense. That's why I suggested him to use an entirely different method instead.

  13. 10 hours ago, Orangecar said:

    Hi! Act Editor have been a huge help in my spriting as I'm completely new to making these stuff.

    I tried using the merge layer script as well as this script  (which is from you too) I found in forums but my headgear keeps getting a line around it. Can you help me?

    Context: I'm trying to merge a fairy ears headgear into a blinking eyes headgear. I notice the lining only happens when I merge it.

    Hmm, I'm not entirely sure. My first guess would be the lack of a 1-pixel border around the image. But perhaps there's something else going on with the image itself (maybe it's a transparency image?), but I'd need to have a look at the act/spr files first.

  14. 9 hours ago, InfectedX said:

    This script is not working for me i tried to check what's different and yes, it is very different XD

    Has a lot of functions i don't have, but it could help... thx a lot... I still no success XD but i will keep trying... if i ever find a solution, i'll share...

    PS: Sorry!!! i think i click on edit, it wasn't my intention to make double post!

    Ah no, the script I posted isn't meant to just copy paste and run. It's just if you have doubts with a mechanic or something; it's way too custom to be used and I'm too lazy to convert it to rAthena's standards.

  15. There is no issue with the code sample you've provided. It's a bit hard to read, but besides that, it works fine for me. To make your life easier though, may I suggest using a command like shufflearray instead? Like so:

    BUILDIN_DEF(shufflearray,"r?"),
    
    BUILDIN_FUNC(shufflearray)
    {
    	map_session_data* sd = NULL;
    	int i, j;
    	int array_size = script_hasdata(st, 3) ? script_getnum(st, 3) : -1;
    
    	struct script_data* data = script_getdata(st, 2);
    
    	if (!data_isreference(data)) {
    		ShowError("buildin_shufflearray: not a variable\n");
    		script_reportdata(data);
    		script_pushnil(st);
    		st->state = END;
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	const char* name = reference_getname(data);
    	int32 id = reference_getid(data);
    
    	if (not_server_variable(*name)) {
    		sd = map_id2sd(st->rid);
    
    		if (sd == NULL)
    			return SCRIPT_CMD_SUCCESS;
    	}
    
    	if (array_size < 0) {
    		array_size = script_array_highest_key(st, sd, reference_getname(data), reference_getref(data));
    	}
    
    	// Start shuffling the array
    	if (is_string_variable(name)) {
    		for (i = array_size - 1; i > 0; i--) {
    			j = rnd() % (i + 1);
    
    			const char* temp_val = get_val2_str(st, reference_uid(id, i), reference_getref(data));
    			set_reg_str(st, sd, reference_uid(id, i), name, get_val2_str(st, reference_uid(id, j), reference_getref(data)), reference_getref(data));
    			set_reg_str(st, sd, reference_uid(id, j), name, temp_val, reference_getref(data));
    			script_removetop(st, -1, 0);
    			script_removetop(st, -1, 0);
    		}
    	}
    	else {
    		for (i = array_size - 1; i > 0; i--) {
    			j = rnd() % (i + 1);
    
    			int64 temp_val = get_val2_num(st, reference_uid(id, i), reference_getref(data));
    			set_reg_num(st, sd, reference_uid(id, i), name, get_val2_num(st, reference_uid(id, j), reference_getref(data)), reference_getref(data));
    			set_reg_num(st, sd, reference_uid(id, j), name, temp_val, reference_getref(data));
    			script_removetop(st, -1, 0);
    			script_removetop(st, -1, 0);
    		}
    	}
    
    	return SCRIPT_CMD_SUCCESS;
    }

    Then you can simply code it like this:

    1@thts,0,0,0	script	#thanatos_main	-1,{
    OnInit:
    	setarray .@rng_floors, 3, 4, 5, 6;
    	shufflearray .@rng_floors;
    	setarray 'floors, 1, 2, .@rng_floors[0], .@rng_floors[1], .@rng_floors[2], .@rng_floors[3], 7, 8;
    	setarray 'maps$,
    		instance_mapname("1@thts"),
    		instance_mapname("2@thts"),
    		instance_mapname("3@thts"),
    		instance_mapname("4@thts"),
    		instance_mapname("5@thts"),
    		instance_mapname("6@thts"),
    		instance_mapname("7@thts"),
    		instance_mapname("8@thts");
    	
    	setarray 'coords_coords,
    		0, 0,
    		0, 0,
    		27, 44,	// 3rd floor
    		18, 97,
    		155, 100,
    		50, 18,
    		50, 18,
    		50, 18;
    	
    	
    	// other stuff here...
    	end;
    }
    
    1@thts,32,166,0	script	#setp02	45,2,2,{
    	end;
    OnTouch:
    	.@next_floor = 3;
    	warp 'maps$[.@next_floor], 'coords_coords[2 * .@next_floor + 0], 'coords_coords[2 * .@next_floor + 1];
    	end;
    }

    As you're clearly implementing Thanatos Tower, you might find some inspiration from when I wrote the script (though it uses quite a few custom script functions and it also has a custom hard mode, but it can probably still be of use). It's from kRO replay files, so the NPC coordinates should be very accurate.

     

    thanatos.txt

  16. 24 minutes ago, freezing1 said:

    it's not just NovaRO that has been decrypted. you left the GRF Editor code open and they are selling everything.

    next time, you might think better of leaving the source open to everyone.

    I would suggest to not speak nonsense on a development forum, it doesn't make you look good at all. This has absolutely nothing to do with sources being public. For that matter, the sources have been public for more than 10+ years on rAthena. Not only that, but C# is not a compiled language, it can be "decompiled" with little to no effort to begin with using tools like JetBrains. What's worse in what you said is that the encryption is applied via cps.dll, compiled in C++, which isn't released in the source at all. Even if someone didn't know the sources were public on rAthena, Act Editor has all the libraries in plain sight outside of the executable to begin with.

    For reference (because I've heard that comment many times already):

    image.png.50a9f03da769fd12cfb1cb91520733ca.png

    image.png.1e8b0c2c83f63499eaff3fe653a098ce.png

    • MVP 1
    • Like 2
  17. 4 minutes ago, Pokye said:

    @Tokei Wow thanks Tokei.
    And taking advantage of the fact that you are talking about decryption... There are a lot of people managing to break the grf, and generate a key. I think this encryption will have to be improved.

    I am aware. However this isn't a high priority for me at the moment. If someone wants to spend time on this, feel free to contact me. I'll get to this eventually, but it won't be anytime soon.

  18. Heya,

    I've been receiving messages about people selling NovaRO's decrypted GRFs and honestly... that's beyond stupid. The server is already closed down, anyone buying this is getting straight up scammed. You could have just asked. I put the key attached down there. I'm too lazy to upload the GRFs though, you'll have to find that yourself (or if someone want to host it and link it below, go ahead). Plus, we released installers without the files encrypted on accident multiple times, so it's not like these files weren't already accessible to begin with.

    nova.grfkey

    • MVP 5
    • Like 1
  19. 1 hour ago, Ckenny said:

    HOW TO FIX THIS

     

    --------------          Message          --------------
    Compiler executable file csc.exe cannot be found.
    --------------        Stack trace        --------------

    That's a wrong thread if I've ever seen one. That being said, csc.exe is the .net compiler. If you get that error, you have to install the ".net 3.5 framework".

  20. 17 hours ago, Ice Bear said:

    no refine for item to barter ex

    +9 Note Headphones = +9 Hat and +0 Note Headphones?

    just asking if this is possible or not thank you :3

    have a nice day everyone

    That's not possible, the client doesn't support that feature. You'd have to make a custom system for it, and it would still not display properly. A lapine box might work better? Not sure. You'll probably have to end up doing it with a boring script though, since it's hard to handle two refines otherwise.

  21. Heya,

    GRF Editor has undergone some big updates in the background in its new release (1.8.5.7) :

    • The .net framework has changed from 3.5 to 4.0.
    • It has been compiled as x64 instead of x86.
    • The cps/lzma libraries have also been recompiled to x64.
    • Another VC++ library is now required:

    The preview for RSM/RSM2/RSW files have been remade from scratch based on BrowEdit 3. It now uses OpenGL instead of WPF 3D. While WPF 3D had good performance, it was way too limited in its options, so this change was a must (shaders weren't even possible...). Though, the performance now is somewhat unknown. If it causes too many issues, I'll add an option to revert back to WPF 3D.

    The new map renderer should be much more accurate to what is shown ingame:

    • Lightmap/shadowmap is now supported.
    • Lub effects are visible.
    • RSM1 animations can be previewed.
    • Maps are animated by default.
    • Fixed a lot of transparency issues (still not perfect, but it's a huge improvement).
    • Many new features were added for rendering.
    • A skymap option was added but that one is still in its early stage.
    • While the preview is focussed, F11 can bring the renderer to fullscreen.
    • Water is now rendered

    I usually don't write an update post, but I did this time because I'm wary of potential issues. I'll leave here some previews:

    Spoiler

    image.png.001c8d4df43e198c4b642a02f626ed68.png

    image.png.321c9e417e9a6b3a169da33cadc4aab6.png

    image.thumb.png.9a2a62a9e94b8f2da20840e615abfdcc.png

    image.png.5eced1ca6fafeffe6e7150468202f254.png

    • Love 3
    • MVP 3
  22. 8 hours ago, Lazarack said:

    Hello, sorry for commenting on an old forum post.

    I would like to ask, do you know how to set each frame to have the same x and y position? For example, I want frame 1 to 7 to be (2 , -82).

    Heya,

    You're right, this is definitely the wrong thread ;P. There are many ways of doing this, so here goes.

    for (int aid = 0; aid <= 7; aid++) {
    	var action = act[aid];
    	
    	for (int fid = 0; fid < action.Frames.Count; fid++) {
    		var frame = action[fid];
    		
    		for (int lid = 0; lid < frame.Layers.Count; lid++) {
    			var layer = frame[lid];
    			
    			layer.OffsetX = 2;
    			layer.OffsetY = -82;
    		}
    	}
    }

     

×
×
  • Create New...