Jump to content

Tokei

Members
  • Posts

    667
  • Joined

  • Last visited

  • Days Won

    91

Posts posted by Tokei

  1. Heya,

    Just wanted to highlight some of the changes in 1.1.0.

    • New gender option for reference sprites:
      UP69Z2v.png
    • Animation > Setup Headgear... allows you to create a full headgear by positioning the sprite on a single head, saving a ton of work. It's relatively new and might have errors, but from what I've been testing it's been working out pretty well. It's fairly limited at the moment, but if it's requested I don't mind expanding on it. (It also fixes all the anchor positions to make the head stick better.)
      SZPmcdR.png
    • Holding down Alt and then moving the sprite will move all the layers in the current action. It's usually meant for a single sprite though.
    • Added basic utilities to the Palette editor tool. You can now use a Pen, a Bucket, an Eraser and a Stamp-ish tool. The Stamp's brush size can be increased with + and - on the numpad. Also, I've combined both edition modes (Single edit and Gradient edit) in a single screen and removed the adjust mode which wasn't really useful and quite buggy anyway.
      6VOORpD.png
      (I forgot to add preset/saved gradients; will add it for the next update ;O.)

     

    • Upvote 1
    • Love 1
    • MVP 1
  2. On 1/16/2018 at 6:49 AM, Chuu said:

    @Tokeiburu

    Is there a script out yet to move everything at once? X_X

    Well, I've updated the version to 1.1.0, the Alt-Move should now work. Bunch of other changes as well, looks like I forgot to push the updates for this software (I got pretty busy!).

    Although I'll just mention that this was always possible via scripting:

    Script > Script Runner... > 

    act[selectedActionIndex].Translate(0, -100);

    or

    // Translates by 100 up for the whole act file
    act.Translate(0, -100);

     

    • Like 1
  3. On 1/4/2018 at 6:03 PM, Moonshadows said:

    I just tried to compress my data.grf file, but when I was able to do so and opened the game, this is what happened to my client:

    https://imgur.com/o5mcWN4

    I got a blank screen and it crashed afterwards. 

    Encoding: Default
    Format: 0x103
    Compression Method: LZMA

     

    Edit: Fixed.

    You cannot use GPF's packing for LZMA compression. Use version 0x200 and don't forget to use Curiosity's DLL afterwards.

  4. On 1/7/2018 at 2:40 PM, samisaher said:

    hi Tokei  , thanks for this advanced gadget  

    i have a problem some files in my the grf  don't open   (there is no data )  

    and when i open KRO grf all files open correctly .

    The files are encrypted. You cannot open them unless you use their client.

    • Like 1
  5. 14 hours ago, padangyoesa said:

    Hahaha sorry mate. Everytime i'm trying to extract the file inside my grf, i do a right-click, and then extract. Whenever i do that, my grf editor just blinking white and done nothing. Is it error or there's a setting that need to change?

    Well if the file is encrypted then you won't be able to view its content (or extract it). Otherwise it would be a permission issue that prevents the software from extracting the files. Or perhaps the extraction path has a problem, so try to use "Extract..." instead.

  6. You... must have the wrong files somewhere ;O. This issue doesn't happen on my end. If you see black squares like that, it means you didn't import the generated textures to your data\texture folder. But you shouldn't be seeing this on a map generated with no options checked (unless you're using a previous generated map and that you forgot to copy the new map textures, which is what I'm assuming happened here).

    The tool should be generating a maps.grf file; copy paste the file in your ragnarok folder and then extract it if you want to use the data folder. Make sure the file has the payon map files inside the GRF though. Or just modify your data.ini to read maps.grf first and then clear your data folder from any map in there.

  7. 57 minutes ago, invvv said:

    In Flat Maps Maker,

    i. What's the pt of having the checkbox Remove all objects, as even if all the checkboxes in Options're unticked, generating the maps still removes all objects, as if I'm correct I've just tested this?

     

     

    ii. What's the pt of Make gat cells stick to ground, as w/o all other options but it( including Change the ground textures for custom ones) ticked, there're already no "floating cells" & the benches, chairs're already flattened to the ground?

     

     

     

    iii. I've read their popup descriptions but still don't understand, what's

    I. Remove light & shadow maps for?

    II. Reset global lighting to its default value for?

    These are meant to further customize the flat maps creation.

    If you uncheck Remove all objects, you must also uncheck Make the ground flat. This is meant to keep the objects while only changing the textures and it would create the map shown below. Otherwise you would have objects floating in mid-air.

    K77iQU8.png

     

    Making gat cells stick to the ground will be the difference between the left screenshot and the right screenshot. The gat cells are usually on top of objects so that you can walk over them. Obviously this doesn't apply if Make the ground flat is checked as you'd be walking on air otherwise.

    NCNCAb6.png 1Rj7vHn.png

     

    As far as the lightmap and shadowmap goes, I'd have to refer you to https://en.wikipedia.org/wiki/Lightmap and https://en.wikipedia.org/wiki/Shadow_mapping . The difference can be seen here I guess, if you keep the lightmaps:

    4MuV4Hz.png

    As for the global lighting, that's a setting used on some maps to dim the ambient light. Not many maps use this, but it is best to remove it when making flat maps.

    Using the default options would be best for a regular usage of course.

  8. 16 hours ago, dekspyware said:

    Thanks for Tools :D

    @TokeiUpdate the item_db2 pls rA don't have it now.

    it change to db\import-tmpl or db\import i'm not sure.....

    but i use db\import-tmpl that i use to create custom item 

    Hey there,

    import-templ (stands for import-template) is the template folder for the import files. Your changes should be located inside import/item_db.txt (which SDE tries to read first, and then tries to read item_db2 if it fails to keep the compatibility).

    • Like 1
  9. Well, I don't know if you have to as far as parsing the file goes, but a big part of the purpose of completing achievements is getting those points and increasing your rank. The server does need to know the scores to show them properly on the client side, but you can put whatever value you want to there. The default score value is around 20.

  10. Hmm, I believe the following would be easier to maintain:

    prontera,153,193,6	script	Fake_Npc	123,{
    	.@menu$ = implode(.tmenu$, ":");
    	.@option = select(.@menu$ + ":Info") - 1;
    	
    	if (.@option < getarraysize(.tmenu$)) {
    		Var1 = .@option;
    	}
    	else {
    		dispbottom "Test";
    		dispbottom .tmenu$[Var1];
    	}
    	
    	end;
    OnInit:
    	setarray .tmenu$, "Dog", "Cat";
    	end;
    }

     

    • Upvote 1
  11. Copy and paste this file to Scripts > Open scripts folder (name it "SetColor.cs"):

    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using ErrorManager;
    using GRF.FileFormats.ActFormat;
    using GRF.FileFormats.SprFormat;
    using GRF.FileFormats.PalFormat;
    using GRF.Image;
    using GRF.Image.Decoders;
    using GRF.Graphics;
    using GrfToWpfBridge;
    using TokeiLibrary;
    using TokeiLibrary.WPF;
    using Action = GRF.FileFormats.ActFormat.Action;
    using Frame = GRF.FileFormats.ActFormat.Frame;
    using Point = System.Windows.Point;
    
    namespace Scripts {
        public class Script : IActScript {
    		public object DisplayName {
    			get { return "Change all layer color"; }
    		}
    		
    		public string Group {
    			get { return "Scripts"; }
    		}
    		
    		public string InputGesture {
    			get { return null; }
    		}
    		
    		public string Image {
    			get { return null; }
    		}
    		
    		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			if (act == null) return;
    			
    			var frame = act[selectedActionIndex, selectedFrameIndex];
    			
    			GrfColor startColor;
    			
    			if (frame.Layers.Count == 0) {
    				startColor = GrfColor.White;
    			}
    			else {
    				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
    			}
    			
    			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
    			picker.Owner = WpfUtilities.TopWindow;
    			picker.ShowDialog();
    			
    			if (picker.DialogResult) {
    				try {
    					act.Commands.Begin();
    					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
    					act.Commands.SetColor(newColor);
    				}
    				catch (Exception err) {
    					act.Commands.CancelEdit();
    					ErrorHandler.HandleException(err, ErrorLevel.Warning);
    				}
    				finally {
    					act.Commands.End();
    					act.InvalidateVisual();
    				}
    			}
    		}
    		
    		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			return act != null;
    		}
    	}
    }

    Then you can use Scripts > Change all layer color. I really should update Act Editor @@...

    • Upvote 2
  12. 2 minutes ago, Anacondaqq said:

    drag and drop do not work in very many cases under simple user at windows. If you are an admin with admin privileges drag N drop feature works fine.

    If you are not admin drag N drop stop working in the very weird case.

    But if you close GRF Editor and will run it with Admin Privileges (right click) -> drag N drop will work fine.

    I think it's somehow related to a path where stored files on win10.

    Except this, GRF Editor has issues with using shell integration checkboxes.

    About add button, please do not remove this option... 

    The drag and drop feature has issues when two processes have different access privileges. Since explorer.exe is not started with admin rights (even if you're an administrator), GRF Editor won't be able to receive messages from explorer. I've seen many posts regarding this issue (it applies well beyong GRF Editor) but there are no apparent solutions to resolve this other than fully disabling UAC from the registry. So if you want to drag and drop, you should not start GRFE as an admin, simply open it normally and it should work fine.

    The file extension feature will require access to the registry and therefore will need admin privileges, which, as you can guess, is a problem. I do not have a copy of Windows 10 yet, so I'm not sure if the file extension even works. I presume it doesn't since Windows always changes how shortcuts work in every update.

    (Updated the mediafire link to fix the "Add..." box with thor files.)

    • Upvote 1
  13. 2 hours ago, Akkarin said:

    When attempting to create a new Thor file, (file -> new -> new thor) i get an unhandled exception error after right clicking on "data" and selecting "Add...":

    I'm using v1.8.2.2 (asmv1.5.3.3063)

    The "Add..." feature is deprecated and should have been removed a while ago. I left it there if people were having trouble with drag & drop, but drag and dropping is still preferred. I'll go see what's wrong with the thor format and the "Add..." feature though, thanks ~!

    • Upvote 1
  14. 4 hours ago, Zell said:

    Where am I missing?

    If i put CONQ_KILLNPC = 500 on my Script when killing a mob, the count its not working.

    Counter type achievements work a bit differently; the target counter that you set (in achievement_db.yml) is your actual goal/condition. So first thing first, you want to add it to your achievement definition:

      - ID: 500001
        Group: "AG_BATTLE"
        Name: "Name"
        Target:
          Count: 500
        Score: 10

    What you want to do isn't compatible with counter type achievements (you'd have to create a new group, pass it to AG_CHAT, and set the start value manually, etc). However you can do this easily via scripting instead:

    OnPCKillNPC:
    	if (CONQ_KILLNPC < 500) {
    		CONQ_KILLNPC++;
    		achievementupdate 500001, ACHIEVEINFO_COUNT1, CONQ_KILLNPC;
    		
    		if (CONQ_KILLNPC == 500) {
    			achievementcomplete 500001;
    		}
    	}
    	
    	end;

    Hmmm, it appears achievementupdate isn't included...! You can add this script function in your source:

    //BUILDIN_DEF(achievementupdate,"iii?"),
    BUILDIN_FUNC(achievementupdate) {
    	struct map_session_data *sd;
    	int i, achievement_id, type, value;
    
    	achievement_id = script_getnum(st, 2);
    	type = script_getnum(st, 3);
    	value = script_getnum(st, 4);
    
    	if (!script_charid2sd(5, sd)) {
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	if (achievement_search(achievement_id) == NULL) {
    		ShowWarning("buildin_achievementupdate: Achievement '%d' doesn't exist.\n", achievement_id);
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id);
    	if (i == sd->achievement_data.count)
    		achievement_add(sd, achievement_id);
    
    	ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id);
    	if (i == sd->achievement_data.count) {
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	if (type >= ACHIEVEINFO_COUNT1 && type <= ACHIEVEINFO_COUNT10)
    		sd->achievement_data.achievements[i].count[type - 1] = value;
    	else if (type == ACHIEVEINFO_COMPLETE)
    		sd->achievement_data.achievements[i].complete = value ?  true : false;
    	else if (type == ACHIEVEINFO_COMPLETEDATE)
    		sd->achievement_data.achievements[i].completeDate = value;
    	else if (type == ACHIEVEINFO_GOTREWARD)
    		sd->achievement_data.achievements[i].gotReward = value ? true : false;
    	else {
    		ShowWarning("buildin_achievementupdate: Unknown type '%d'.\n", type);
    		return SCRIPT_CMD_FAILURE;
    	}
    
    	achievement_update_achievement(sd, achievement_id, false);
    	return SCRIPT_CMD_SUCCESS;
    }

    Best of luck ~!

    • Upvote 3
×
×
  • Create New...