Jump to content
Eternal Lands Official Forums

Fedora

Members
  • Content count

    547
  • Joined

  • Last visited

Posts posted by Fedora


  1. Ok there is one more thing I'd like if possible: Remove that new eye candy icon-because it's not used at all/doesn't work, I don't want people to get confused. Plus if you click it and try to do something it kinda crashes the editor. So it's like a big "DON'T TOUCH!" button right now :D

     

    That is no problem...but on the linux version it works. I'll see if I can fix it for windows too :)


  2. When ground tiles are deleted the height map is also deleted-can this be made so that the height map is left alone-not deleted?

     

    - When you open a window in the editor(like the height map one for example), and you click on the top of it to move it around when you stop your mouse from moving the window does not stop moving-it will go float off screen.

     

    -When you delete a ground tile I would like to be able to "paint" the null tile as is currently possible when you place any other tile on the ground. Basically you would click to delete a tile, and while holding done the mouse button you'd just drag over the screen and the tiles will delete wherever you touch the cursor.

     

    Here it is a compiled mapeditor together with the changed code (events.c)

     

    It should work as intended, removing the tiles but not the height map.

     

    Windows moving around when dragged now stop correctly. It was a bit of code commented out (so, maybe, something else is broken now :D).

     

    I added paint-deleting, but to prevent disasters, since there is no support for multi tile undo, you have to keep Shift pressed while deleting (works both in tile and height mode). Paint-deleting in tile mode, should preserve height maps.

     

    Let me know if something has gone wrong.

     

    EDIT:

    I have a strange flickering while in tile mode with a selected tile as cursor...this may be caused by running mapedit.exe under linux with Wine, so please check if you have it. I can't test it on a native Windows installation.

     

    EDIT2:

    If the link doesn't work, copy and paste it in the url bar


  3. I hope this is the last correction -_-

     

    The recipe saving works only if you have a username set in el.ini, otherwise, at the time of loading in init_stuff you don't have a username string yet. So, moved load_recipes from init.c to multiplayer.c (and thanks Sir_Odie again).

     

    Index: init.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.c,v
    retrieving revision 1.335
    diff -a -u -r1.335 init.c
    --- init.c	1 Oct 2009 18:37:50 -0000	1.335
    +++ init.c	2 Oct 2009 09:51:50 -0000
    @@ -859,7 +859,6 @@
    	CHECK_GL_ERRORS();
    	init_login_screen ();
    	init_spells ();
    -	load_recipes();
    
    #ifdef PAWN
    	update_loading_win (init_pawn_str, 0);
    Index: multiplayer.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/multiplayer.c,v
    retrieving revision 1.290
    diff -a -u -r1.290 multiplayer.c
    --- multiplayer.c	25 Sep 2009 22:06:43 -0000	1.290
    +++ multiplayer.c	2 Oct 2009 09:51:51 -0000
    @@ -627,6 +627,7 @@
    #endif // NEW_SOUND
    
    				load_quickspells();
    +				load_recipes();
    
    				load_counters();
    				send_video_info();


  4. And, as requested by many, the final touch. Manu window remembers the saved recipes and loads them at client startup. Saves them in a "recipes_username.dat" when the client exits normally.

     

    Index: manufacture.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/manufacture.c,v
    retrieving revision 1.55
    diff -a -u -r1.55 manufacture.c
    --- manufacture.c	25 Sep 2009 18:55:18 -0000	1.55
    +++ manufacture.c	1 Oct 2009 10:25:20 -0000
    @@ -10,6 +10,8 @@
    #include "textures.h"
    #include "translate.h"
    #include "sound.h"
    +#include "io/elpathwrapper.h"
    +#include "errors.h"
    #ifdef OPENGL_TRACE
    #include "gl_init.h"
    #endif
    @@ -32,7 +34,41 @@
    static char items_string[350]={0};
    static size_t last_items_string_id = 0;
    
    +void load_recipes (){
    +	char fname[256];
    +	FILE *fp;
    +	
    +	memset (recipes, 0, sizeof (recipes));
    
    +	safe_snprintf(fname, sizeof(fname), "recipes_%s.dat",username_str);
    +	my_tolower(fname);
    +	fp = open_file_config(fname,"rb");
    +	if(fp == NULL){
    +		LOG_ERROR("%s: %s \"%s\"\n", reg_error_str, cant_open_file, fname);
    +		return;
    +	}
    +
    +	fread (recipes,sizeof(recipes),1, fp);
    +	fclose (fp);
    +}
    +
    +void save_recipes(){
    +	char fname[128];
    +	FILE *fp;
    +
    +
    +	safe_snprintf(fname, sizeof(fname), "recipes_%s.dat",username_str);
    +	my_tolower(fname);
    +	fp=open_file_config(fname,"wb");
    +	if(fp == NULL){
    +		LOG_ERROR("%s: %s \"%s\"\n", reg_error_str, cant_open_file, fname);
    +		return;
    +	}
    +
    +	fwrite(recipes, sizeof(recipes), 1, fp);
    +
    +	fclose(fp);
    +}
    
    void build_manufacture_list()
    {
    Index: manufacture.h
    ===================================================================
    RCS file: /cvsroot/elc/elc/manufacture.h,v
    retrieving revision 1.11
    diff -a -u -r1.11 manufacture.h
    --- manufacture.h	2 Nov 2008 23:40:16 -0000	1.11
    +++ manufacture.h	1 Oct 2009 10:25:20 -0000
    @@ -54,6 +54,10 @@
     */
    int mix_handler(Uint8 quantity, const char* mixbut_empty_str);
    
    +void load_recipes();
    +void save_recipes();
    +
    +
    #ifdef __cplusplus
    } // extern "C"
    #endif
    Index: init.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.c,v
    retrieving revision 1.334
    diff -a -u -r1.334 init.c
    --- init.c	30 Sep 2009 22:01:57 -0000	1.334
    +++ init.c	1 Oct 2009 10:25:21 -0000
    @@ -859,6 +859,7 @@
    	CHECK_GL_ERRORS();
    	init_login_screen ();
    	init_spells ();
    +	load_recipes();
    
    #ifdef PAWN
    	update_loading_win (init_pawn_str, 0);
    Index: console.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/console.c,v
    retrieving revision 1.152
    diff -a -u -r1.152 console.c
    --- console.c	18 Aug 2009 23:03:17 -0000	1.152
    +++ console.c	1 Oct 2009 10:25:22 -0000
    @@ -19,6 +19,7 @@
    #include "lights.h"
    #include "list.h"
    #include "mapwin.h"
    +#include "manufacture.h"
    #include "misc.h"
    #include "multiplayer.h"
    #include "notepad.h"
    @@ -1199,6 +1200,8 @@
    	save_bin_cfg();
    	//Save the quickbar spells
    	save_quickspells();
    +	//Save recipes
    +	save_recipes();
    	// save el.ini if asked
    	if (write_ini_on_exit) write_el_ini ();
    	// save notepad contents if the file was loaded

     

    EDIT:

    little bug corrected, tnx Sir_Odie


  5. There is a bug in the PPC client related to MAP_SET_OBJECTS and MAP_STATE_OBJECTS packets, a missing Swap. These packets are used to chenge the map object state and afaik are used for quests only atm. Indeed Halosmee reported the bug to me during a quest.

     

    Here are the missing Swaps, but I can't test the code anymore, I'm on linux now.

     

    Index: 2d_objects.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/2d_objects.c,v
    retrieving revision 1.98
    diff -a -u -r1.98 2d_objects.c
    --- 2d_objects.c	26 Dec 2008 18:54:29 -0000	1.98
    +++ 2d_objects.c	30 Sep 2009 19:06:58 -0000
    @@ -722,8 +722,9 @@
    		int idx = 0;
    
    		while(len >= sizeof(*id_ptr)){
    -			Uint32	obj_id= id_ptr[idx];
    -		
    +
    +			Uint32 obj_id = SDL_SwapLE32(id_ptr[idx]);
    +
    			if(obj_id < MAX_OBJ_2D && obj_2d_list[obj_id]){
    				obj_2d_list[obj_id]->display= display;
    				idx++;
    Index: 3d_objects.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/3d_objects.c,v
    retrieving revision 1.185
    diff -a -u -r1.185 3d_objects.c
    --- 3d_objects.c	26 Apr 2009 00:44:22 -0000	1.185
    +++ 3d_objects.c	30 Sep 2009 19:06:59 -0000
    @@ -920,8 +920,8 @@
    
    		while (len >= sizeof (*id_ptr))
    		{
    -			Uint32 obj_id = id_ptr[idx];
    -		
    +			Uint32 obj_id = SDL_SwapLE32(id_ptr[idx]);
    +
    			if (obj_id <= highest_obj_3d && objects_list[obj_id])
    			{
    				objects_list[obj_id]->display = display;


  6. This should avoid changing the version number and so, keeping intact the previous el.cfg

     

    Index: spells.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.c,v
    retrieving revision 1.93
    diff -a -u -r1.93 spells.c
    --- spells.c	27 Sep 2009 16:25:22 -0000	1.93
    +++ spells.c	30 Sep 2009 10:49:40 -0000
    @@ -117,6 +117,7 @@
    int spell_win=-1;
    int spell_mini_win=-1;
    int last_win=-1;
    +int start_mini_spells=0; //do we start minimized?
    int init_ok=0;
    int sigil_menu_x=10;
    int sigil_menu_y=20;
    @@ -853,6 +854,7 @@
    	show_window(this_win);
    	select_window(this_win);			
    	sigil_win=this_win;
    +	start_mini_spells=(sigil_win==spell_mini_win)? 1:0;
    
    	return 1;
    }
    @@ -1741,7 +1743,7 @@
    		widget_move(spell_win, cast2_button_id, spell_x_len-20-10-w_cast->len_x , spell_y_len_ext - w_cast->len_y - 4);
    
    		hide_window(spell_win);
    -		sigil_win=spell_win;
    +		if(!start_mini_spells) sigil_win=spell_win;
    	} 
    
    	if(spell_mini_win < 0){
    @@ -1758,9 +1760,10 @@
    		set_window_handler(spell_mini_win, ELW_HANDLER_MOUSEOVER, &mouseover_spells_mini_handler );
    
    		hide_window(spell_mini_win);	
    +		if(start_mini_spells) sigil_win=spell_mini_win;
    	} 
    	check_castability();
    -	switch_handler((init_ok) ? (spell_win):(sigils_win));
    +	switch_handler((init_ok) ? (sigil_win):(sigils_win));
    }
    
    
    Index: spells.h
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.h,v
    retrieving revision 1.37
    diff -a -u -r1.37 spells.h
    --- spells.h	23 Sep 2009 17:17:34 -0000	1.37
    +++ spells.h	30 Sep 2009 10:49:40 -0000
    @@ -47,6 +47,7 @@
     */
    /*! @{ */
    extern int sigil_win; /*!< handle for the sigil (spell) window */
    +extern int start_mini_spells; /*!< do we start minimized? */
    extern int quickspell_win; /*!< quickbar windows handler */
    /*! @} */
    
    Index: init.h
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.h,v
    retrieving revision 1.89
    diff -a -u -r1.89 init.h
    --- init.h	10 May 2009 20:14:50 -0000	1.89
    +++ init.h	30 Sep 2009 10:49:40 -0000
    @@ -179,6 +179,7 @@
     /*! @{ */
    	int misc_bool_options;
     /*! @} */
    +	
    
    #if defined(CONTEXT_MENUS) && defined(USER_MENUS)
     /*!
    @@ -190,12 +191,21 @@
     /*! @} */
    
    	//!!!!!!!If you add any new FLOAT option, decrement the reserved thingy accordingly!!!!!!
    -	float freserved[12];
    +#define NUM_RESERVED 11
    #else   
    	//!!!!!!!If you add any new FLOAT option, decrement the reserved thingy accordingly!!!!!!
    -	float freserved[15];
    +#define NUM_RESERVED 14
    #endif // CONTEXT_MENUS && USER_MENUS
    
    +
    +	/*!
    +	 * \name do spells start minimized?
    +	 */
    +	/*! @{ */
    +	int start_mini_spells;
    +	/*! @} */
    +
    +	float freserved[NUM_RESERVED];
    }bin_cfg;
    
    extern int auto_update; /*!<this flags signals whether or not autoupdates are performed at startup, or not. It requires a restart to have an effect. */
    Index: init.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.c,v
    retrieving revision 1.333
    diff -a -u -r1.333 init.c
    --- init.c	20 Jun 2009 21:14:02 -0000	1.333
    +++ init.c	30 Sep 2009 10:49:41 -0000
    @@ -281,6 +281,7 @@
    
    	sigil_menu_x=cfg_mem.sigil_menu_x;
    	sigil_menu_y=cfg_mem.sigil_menu_y;
    +	start_mini_spells=cfg_mem.start_mini_spells;
    
    	dialogue_menu_x=cfg_mem.dialogue_menu_x;
    	dialogue_menu_y=cfg_mem.dialogue_menu_y;
    @@ -457,6 +458,7 @@
    		cfg_mem.trade_menu_y=trade_menu_y;
    	}
    
    +	cfg_mem.start_mini_spells=start_mini_spells;
    	if(sigil_win >= 0) {
    		cfg_mem.sigil_menu_x=windows_list.window[sigil_win].cur_x;
    		cfg_mem.sigil_menu_y=windows_list.window[sigil_win].cur_y;


  7. I use the small window, however after every clientrestart, I got the big one again. could that please be saved? :devlish:

     

     

    This should do the trick:

     

    Index: spells.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.c,v
    retrieving revision 1.93
    diff -a -u -r1.93 spells.c
    --- spells.c	27 Sep 2009 16:25:22 -0000	1.93
    +++ spells.c	29 Sep 2009 07:23:45 -0000
    @@ -117,6 +117,7 @@
    int spell_win=-1;
    int spell_mini_win=-1;
    int last_win=-1;
    +int start_mini_spells=0; //do we start minimized?
    int init_ok=0;
    int sigil_menu_x=10;
    int sigil_menu_y=20;
    @@ -853,6 +854,7 @@
    	show_window(this_win);
    	select_window(this_win);			
    	sigil_win=this_win;
    +	start_mini_spells=(sigil_win==spell_mini_win)? 1:0;
    
    	return 1;
    }
    @@ -1741,7 +1743,7 @@
    		widget_move(spell_win, cast2_button_id, spell_x_len-20-10-w_cast->len_x , spell_y_len_ext - w_cast->len_y - 4);
    
    		hide_window(spell_win);
    -		sigil_win=spell_win;
    +		if(!start_mini_spells) sigil_win=spell_win;
    	} 
    
    	if(spell_mini_win < 0){
    @@ -1758,9 +1760,10 @@
    		set_window_handler(spell_mini_win, ELW_HANDLER_MOUSEOVER, &mouseover_spells_mini_handler );
    
    		hide_window(spell_mini_win);	
    +		if(start_mini_spells) sigil_win=spell_mini_win;
    	} 
    	check_castability();
    -	switch_handler((init_ok) ? (spell_win):(sigils_win));
    +	switch_handler((init_ok) ? (sigil_win):(sigils_win));
    }
    
    
    Index: init.h
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.h,v
    retrieving revision 1.89
    diff -a -u -r1.89 init.h
    --- init.h	10 May 2009 20:14:50 -0000	1.89
    +++ init.h	29 Sep 2009 07:23:45 -0000
    @@ -180,6 +180,14 @@
    	int misc_bool_options;
     /*! @} */
    
    +	/*!
    +	 * \name do spells start minimized?
    +	 */
    +	/*! @{ */
    +	int start_mini_spells;
    +	/*! @} */
    +	
    +
    #if defined(CONTEXT_MENUS) && defined(USER_MENUS)
     /*!
      * \name User menu options
    @@ -190,10 +198,10 @@
     /*! @} */
    
    	//!!!!!!!If you add any new FLOAT option, decrement the reserved thingy accordingly!!!!!!
    -	float freserved[12];
    +	float freserved[11];
    #else   
    	//!!!!!!!If you add any new FLOAT option, decrement the reserved thingy accordingly!!!!!!
    -	float freserved[15];
    +	float freserved[14];
    #endif // CONTEXT_MENUS && USER_MENUS
    
    }bin_cfg;
    Index: init.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/init.c,v
    retrieving revision 1.333
    diff -a -u -r1.333 init.c
    --- init.c	20 Jun 2009 21:14:02 -0000	1.333
    +++ init.c	29 Sep 2009 07:23:46 -0000
    @@ -281,6 +281,7 @@
    
    	sigil_menu_x=cfg_mem.sigil_menu_x;
    	sigil_menu_y=cfg_mem.sigil_menu_y;
    +	start_mini_spells=cfg_mem.start_mini_spells;
    
    	dialogue_menu_x=cfg_mem.dialogue_menu_x;
    	dialogue_menu_y=cfg_mem.dialogue_menu_y;
    @@ -457,6 +458,7 @@
    		cfg_mem.trade_menu_y=trade_menu_y;
    	}
    
    +	cfg_mem.start_mini_spells=start_mini_spells;
    	if(sigil_win >= 0) {
    		cfg_mem.sigil_menu_x=windows_list.window[sigil_win].cur_x;
    		cfg_mem.sigil_menu_y=windows_list.window[sigil_win].cur_y;
    Index: spells.h
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.h,v
    retrieving revision 1.37
    diff -a -u -r1.37 spells.h
    --- spells.h	23 Sep 2009 17:17:34 -0000	1.37
    +++ spells.h	29 Sep 2009 07:23:46 -0000
    @@ -47,6 +47,7 @@
     */
    /*! @{ */
    extern int sigil_win; /*!< handle for the sigil (spell) window */
    +extern int start_mini_spells; /*!< do we start minimized? */
    extern int quickspell_win; /*!< quickbar windows handler */
    /*! @} */


  8. Fully agree on removing PP buying.

     

    Keep the perks, after all they're balanced.

    Turn nexus removals in nexus switchers (trade the stone to a NPC and choose where to move a nexus point).

    For those who can't live without the option of having a edge on others by spending money...why not make the nexus points give a sort of bonus (small), so the more you buy

    the more you get proficient in your profession. Something as, add a human/5 to att/def, or more interestingly a +(animal/5)% to summons strenght :devlish: , or a magic/5 to spell power...and so on (probably already suggested somewhere).

    Or, even more interestingly, following the path of the AP potions, implement the possibility of buying a permanent +1 (up to a cap) to one of your preferred skill feature. So fighters can buy their accuracy or whatever, summoners their pets power, mages their annoying eye candy :P...and why not, manuers an increased make rare...

     

    Buy your nexi, and specialize.

     

    On a side note, this way you could somewhat easily compensate who bought pps already, by allowing them to redistribute pps on nexi/features.

     

    *saves $100 for a Rolling Stone*

     

    EDIT

     

    adding mumblings...


  9. So, a shiny Magic Removal hidden in a bush of chrysanthemums has been found by one of my elven friends.

    He asked me to set up an auction, and here it is:

     

    Starting price: 450k

    Buy it now: 700k

     

    Auction ends in 48 hours (until wednesday).

     

    Bid here or PM Thilien in game.

     

    Happy bidding :(


  10. duh, another bug :)

     

    it seems an item is present in inv if it has an image AND a quantity>0, so:

     

    Index: spells.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.c,v
    retrieving revision 1.92
    diff -a -u -r1.92 spells.c
    --- spells.c	25 Sep 2009 18:52:37 -0000	1.92
    +++ spells.c	26 Sep 2009 22:46:44 -0000
    @@ -391,7 +391,7 @@
    		for(j=0;j<4&&spells_list[i].reagents_id[j]>=0;j++){
    			l=0;
    			for(k=0;k<ITEM_WEAR_START;k++) {
    -				if(item_list[k].image_id==spells_list[i].reagents_id[j]){
    +				if(item_list[k].image_id==spells_list[i].reagents_id[j]&&item_list[k].quantity>0){
    					l=1;
    					if(item_list[k].quantity<spells_list[i].reagents_qt[j]) {
    						spells_list[i].uncastable|=UNCASTABLE_REAGENTS;

     

    otherwise castability is not computed correctly in some situations.


  11. duh, another minor bug. When you click on the dropdown and another window is under it, that window becomes selected instead of the dropdown.

    This mini-patch solves the issue for me.

     

    Index: manufacture.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/manufacture.c,v
    retrieving revision 1.54
    diff -a -u -r1.54 manufacture.c
    --- manufacture.c	23 Sep 2009 17:17:34 -0000	1.54
    +++ manufacture.c	24 Sep 2009 23:13:57 -0000
    @@ -269,6 +269,7 @@
    		cur_recipe=(cur_recipe+1)%MAX_RECIPE;			
    	} else {
    		//normal click
    +		select_window(recipe_win);
    		cur_recipe=my/(33+1);	
    		if ( ((SDL_GetTicks() - last_clicked) < 400)&& last_recipe==cur_recipe){
    			//double click on the same recipe to select it and close the dropdown


  12. Here comes the patch to the patch

     

    Index: spells.c
    ===================================================================
    RCS file: /cvsroot/elc/elc/spells.c,v
    retrieving revision 1.91
    diff -a -u -r1.91 spells.c
    --- spells.c	23 Sep 2009 17:17:34 -0000	1.91
    +++ spells.c	24 Sep 2009 08:39:33 -0000
    @@ -601,7 +601,7 @@
    		glEnd();
    	}
    
    -	if(grayed) gray_out(x_start,y_start+1,gridsize);
    +	if(grayed) gray_out(x_start,y_start,gridsize);
    
    }
    
    @@ -801,9 +801,9 @@
    	//draw spell help
    	if(on_spell==-2) {
    		//mouse over the bottom-left selected spell icon, show uncastability
    -		int l=(int)(get_string_width((unsigned char*)GET_UNCASTABLE_STR(spells_list[i].uncastable))*(float)DEFAULT_SMALL_RATIO);
    +		int l=(int)(get_string_width((unsigned char*)GET_UNCASTABLE_STR(spells_list[we_have_spell].uncastable))*(float)DEFAULT_SMALL_RATIO);
    		SET_COLOR(c_red2);
    -		draw_string_small(20+(33*SPELLS_ALIGN_X-l)/2,spell_mini_y_len-37-35,(unsigned char*)GET_UNCASTABLE_STR(spells_list[i].uncastable),1);		
    +		draw_string_small(20+(33*SPELLS_ALIGN_X-l)/2,spell_mini_y_len-37-35,(unsigned char*)GET_UNCASTABLE_STR(spells_list[we_have_spell].uncastable),1);		
    	} else {
    		i=(on_spell>=0) ? (on_spell):(we_have_spell);
    		if(i>=0){
    @@ -975,7 +975,7 @@
    				the_pos--;
    				if (the_pos==-1) { the_spell=cs; the_group=cg;}
    				else if(the_pos<-1) break;
    -				if (cs==groups_list[cg].spells) {cs=0; cg++; the_pos-=(SPELLS_ALIGN_X-j-1); break;}
    +				if (cs==groups_list[cg].spells-1) {cs=0; cg++; the_pos-=(SPELLS_ALIGN_X-j-1); break;}
    				else cs++;
    			}
    		}
    @@ -1119,7 +1119,7 @@
    				the_pos--;
    				if (the_pos==-1) { the_spell=cs; the_group=cg;}
    				else if(the_pos<-1) break;
    -				if (cs==groups_list[cg].spells) {cs=0; cg++; the_pos-=(SPELLS_ALIGN_X-j-1); break;}
    +				if (cs==groups_list[cg].spells-1) {cs=0; cg++; the_pos-=(SPELLS_ALIGN_X-j-1); break;}
    				else cs++;
    			}
    		}

     

    It was an "i" where a "we_have_spell" is needed.

    Also corrected a little bug that was causing to deselect spells when clicking on an empty square.

     

     

    and tnx Korrode for the updated spells.xml :whistle:

     

    and @Bluap: I tried without the "+1" in the graying out functions and it works...so I guess it was a remnant of some cut&paste :pickaxe:


  13. Both new features looks really nice. I have not been at home for a week so have had very little time to try them out. One issue was that without the new spells.xml file, the old sigils window did not display the sigil icons. IMHO, the old window should work as it did before, with or without the xml file is - may be the new window should not be the default (or could be disabled) if the file is missing. I'm happy to check and commit this patch to CVS but I may not be able to work on it for a couple of days; so shout if someone else is working on it....

     

    You're right. I moved sigils to the xml beacuse they were hard coded in the init_spell...so ugly :)

    I can easily set sigils if the xml fails to load. Not sure what window is best to show as default...I'm all for the new spell win, but let's hear Ent about this.

     

    I'll post the patch with these changes tomorrow at most.


  14. Ok, here it is the patch ready to be committed by someone with permission.

    It contains both spell and manu window patches since, due to some modifications elsewhere (items.c) they are no more independent.

     

    (manu windows scrolldown has been modified and now doesn't have double horizontal lines, as Ent asked)

     

    and here it is the spells.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Magic>
    <Spell_list>
    <!-- health group -->
    <spell>
    	<name>Heal</name>
    	<desc>Restores 10 HP</desc>
    	<id>0</id>
    	<group>0</group>
    	<icon>40</icon>
    	<mana>5</mana>
    	<lvl skill="mag">0</lvl>
    	<sigil>3</sigil>	
    	<sigil>23</sigil>	
    	<reagent id="59">1</reagent>
    </spell>
    <spell>
    	<name>Remote Heal</name>
    	<desc>Restores some HP on a remote target</desc>
    	<id>1</id>
    	<group>0</group>
    	<icon>41</icon>
    	<mana>8</mana>
    	<lvl skill="mag">4</lvl>
    	<sigil>9</sigil>	
    	<sigil>3</sigil>	
    	<sigil>23</sigil>	
    	<reagent id="59">2</reagent>
    	<reagent id="60">1</reagent>
    </spell>
    <spell>
    	<name>Restoration</name>
    	<desc>Restores some of your health</desc>
    	<id>7</id>
    	<group>0</group>
    	<icon>47</icon>
    	<mana>25</mana>
    	<lvl skill="mag">21</lvl>
    	<sigil>1</sigil>	
    	<sigil>24</sigil>	
    	<reagent id="59">4</reagent>
    </spell>
    <spell>
    	<name>Heal Summoned</name>
    	<desc>Restores health to your summoned creatures</desc>
    	<id>12</id>
    	<group>0</group>
    	<icon>52</icon>
    	<mana>25</mana>
    	<lvl skill="mag">33</lvl>
    	<sigil>8</sigil>	
    	<sigil>2</sigil>	
    	<sigil>23</sigil>	
    	<sigil>14</sigil>	
    	<reagent id="54">2</reagent>
    	<reagent id="57">2</reagent>
    	<reagent id="59">2</reagent>
    </spell>
    <!-- misc group -->
    <spell>
    	<name>Teleport to Range</name>
    	<desc>Allows you to teleport to a nearby location</desc>
    	<id>5</id>
    	<group>1</group>
    	<icon>45</icon>
    	<mana>15</mana>
    	<lvl skill="mag">15</lvl>
    	<sigil>7</sigil>	
    	<sigil>0</sigil>	
    	<sigil>8</sigil>	
    	<sigil>2</sigil>	
    	<reagent id="55">1</reagent>
    	<reagent id="56">1</reagent>
    	<reagent id="54">1</reagent>
    </spell>
    <spell>
    	<name>Bones to Gold</name>
    	<desc>Turns all bones in inventory to gold coins</desc>
    	<id>8</id>
    	<group>1</group>
    	<icon>48</icon>
    	<mana>30</mana>
    	<lvl skill="mag">23</lvl>
    	<lvl skill="alc">20</lvl>
    	<sigil>6</sigil>	
    	<sigil>0</sigil>	
    	<sigil>15</sigil>	
    	<reagent id="55">2</reagent>
    	<reagent id="56">1</reagent>
    </spell>
    <spell>
    	<name>Teleport to Portal Room</name>
    	<desc>Teleports to a room where you can access main maps</desc>
    	<id>9</id>
    	<group>1</group>
    	<icon>49</icon>
    	<mana>20</mana>
    	<lvl skill="mag">24</lvl>
    	<sigil>7</sigil>	
    	<sigil>0</sigil>	
    	<sigil>9</sigil>	
    	<sigil>2</sigil>	
    	<reagent id="55">1</reagent>
    	<reagent id="56">5</reagent>
    	<reagent id="54">1</reagent>
    </spell>
    <spell>
    	<name>True Sight</name>
    	<desc>Allows you to see invisible characters</desc>
    	<id>16</id>
    	<group>1</group>
    	<icon>39</icon>
    	<mana>20</mana>
    	<lvl skill="mag">45</lvl>
    	<sigil>19</sigil>	
    	<sigil>15</sigil>	
    	<sigil>20</sigil>	
    	<reagent id="56">4</reagent>
    	<reagent id="60">4</reagent>
    	<reagent id="54">4</reagent>
    </spell>
    <spell>
    	<name>Intercontinental Teleport</name>
    	<desc>Teleports to the Portal Room of the other continent</desc>
    	<id>20</id>
    	<group>1</group>
    	<icon>49</icon>
    	<mana>40</mana>
    	<lvl skill="mag">50</lvl>
    	<sigil>0</sigil>	
    	<sigil>9</sigil>	
    	<sigil>2</sigil>	
    	<reagent id="55">4</reagent>
    	<reagent id="56">10</reagent>
    	<reagent id="54">12</reagent>
    </spell>
    <spell>
    	<name>Invisibility</name>
    	<desc>Makes you temporary invisible</desc>
    	<id>15</id>
    	<group>1</group>
    	<icon>43</icon>
    	<mana>30</mana>
    	<lvl skill="mag">50</lvl>
    	<sigil>22</sigil>	
    	<sigil>15</sigil>	
    	<sigil>20</sigil>	
    	<reagent id="53">10</reagent>
    	<reagent id="56">10</reagent>
    	<reagent id="55">10</reagent>
    </spell>
    <!-- attack group -->
    <spell>
    	<name>Poison</name>
    	<desc>Poisons the target</desc>
    	<id>4</id>
     	<group>2</group>
    	<icon>44</icon>
    	<mana>14</mana>
    	<lvl skill="mag">12</lvl>
    	<sigil>5</sigil>	
    	<sigil>4</sigil>	
    	<sigil>24</sigil>	
    	<reagent id="58">2</reagent>
    </spell>
    <spell>
    	<name>Harm</name>
    	<desc>Inflicts magic damage on the target</desc>
    	<id>6</id>
    	<group>2</group>
    	<icon>46</icon>
    	<mana>25</mana>
    	<lvl skill="mag">20</lvl>
    	<sigil>22</sigil>	
    	<sigil>23</sigil>	
    	<reagent id="59">5</reagent>
    	<reagent id="58">3</reagent>
    </spell>
    <spell>
    	<name>Life Drain</name>
    	<desc>Damages the target and gives you some health back</desc>
    	<id>10</id>
    	<group>2</group>
    	<icon>50</icon>
    	<mana>20</mana>
    	<lvl skill="mag">27</lvl>
    	<sigil>7</sigil>	
    	<sigil>0</sigil>	
    	<sigil>24</sigil>	
    	<reagent id="57">3</reagent>
    </spell>
    <spell>
    	<name>Smite Summoned</name>
    	<desc>Inflicts damages to summoned creatures (not yours)</desc>
    	<id>13</id>
    	<group>2</group>
    	<icon>53</icon>
    	<mana>30</mana>
    	<lvl skill="mag">36</lvl>
    	<sigil>8</sigil>	
    	<sigil>2</sigil>	
    	<sigil>22</sigil>	
    	<sigil>24</sigil>	
    	<reagent id="54">2</reagent>
    	<reagent id="58">3</reagent>
    	<reagent id="55">2</reagent>
    </spell>
    <spell>
    	<name>Mana Drain</name>
    	<desc>Absorbs mana from the target</desc>
    	<id>14</id>
    	<group>2</group>
    	<icon>54</icon>
    	<mana>20</mana>
    	<lvl skill="mag">40</lvl>
    	<sigil>7</sigil>	
    	<sigil>0</sigil>	
    	<sigil>17</sigil>	
    	<reagent id="53">6</reagent>
    </spell>
    <!-- defense group -->
    <spell>
    	<name>Magic Protection</name>
    	<desc>Increases your magic protection</desc>
    	<id>2</id>
    	<group>3</group>
    	<icon>42</icon>
    	<mana>10</mana>
    	<lvl skill="mag">6</lvl>
    	<sigil>19</sigil>	
    	<sigil>17</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="60">1</reagent>
    	<reagent id="56">1</reagent>
    </spell>
    <spell>
    	<name>Shield</name>
    	<desc>Increases your armor</desc>
    	<id>3</id>
     	<group>3</group>
    	<icon>32</icon>
    	<mana>11</mana>
    	<lvl skill="mag">9</lvl>
    	<sigil>19</sigil>	
    	<sigil>15</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="55">1</reagent>
    </spell>
    <spell>
    	<name>Magic Immunity</name>
    	<desc>Makes you immune to negative spells</desc>
    	<id>11</id>
     	<group>3</group>
    	<icon>51</icon>
    	<mana>30</mana>
    	<lvl skill="mag">30</lvl>
    	<sigil>19</sigil>	
    	<sigil>3</sigil>	
    	<sigil>17</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="60">2</reagent>
    	<reagent id="56">1</reagent>
    </spell>
    <spell>
    	<name>Heat Shield</name>
    	<desc>Protects you from heat damage</desc>
    	<id>17</id>
     	<group>3</group>
    	<icon>56</icon>
    	<mana>25</mana>
    	<lvl skill="mag">37</lvl>
    	<sigil>19</sigil>	
    	<sigil>10</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="56">3</reagent>
    	<reagent id="55">3</reagent>
    	<reagent id="51">4</reagent>
    </spell>
    <spell>
    	<name>Cold Shield</name>
    	<desc>Protects you from cold damage</desc>
    	<id>18</id>
     	<group>3</group>
    	<icon>55</icon>
    	<mana>27</mana>
    	<lvl skill="mag">38</lvl>
    	<sigil>19</sigil>	
    	<sigil>11</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="56">3</reagent>
    	<reagent id="55">3</reagent>
    	<reagent id="50">4</reagent>
    </spell>
    <spell>
    	<name>Radiation Shield</name>
    	<desc>Protects you from radiation damage</desc>
    	<id>19</id>
     	<group>3</group>
    	<icon>57</icon>
    	<mana>30</mana>
    	<lvl skill="mag">39</lvl>
    	<sigil>19</sigil>	
    	<sigil>15</sigil>	
    	<sigil>16</sigil>	
    	<sigil>21</sigil>	
    	<reagent id="56">3</reagent>
    	<reagent id="55">3</reagent>
    	<reagent id="60">4</reagent>
    </spell>
    </Spell_list>
    <Groups>
    <group id="0">Health Spells</group>
    <group id="1">General Spells</group>
    <group id="2">Attack Spells</group>
    <group id="3">Defense Spells</group>
    </Groups>
    <Sigil_list>
    <sigil id="0" name="Change">change</sigil>
    <sigil id="1" name="Restore">restore</sigil>
    <sigil id="2" name="Space">space</sigil>
    <sigil id="3" name="Increase">increase</sigil>
    <sigil id="4" name="Decrease">decrease</sigil>
    <sigil id="5" name="Temporary">temporary</sigil>
    <sigil id="6" name="Permanent">permanent</sigil>
    <sigil id="7" name="Move">move</sigil>
    <sigil id="8" name="Local">local</sigil>
    <sigil id="9" name="Global">global</sigil>
    <sigil id="10" name="Fire">fire</sigil>
    <sigil id="11" name="Water">water</sigil>
    <sigil id="12" name="Air">air</sigil>
    <sigil id="13" name="Earth">earth</sigil>
    <sigil id="14" name="Spirit">spirit</sigil>
    <sigil id="15" name="Matter">matter</sigil>
    <sigil id="16" name="Energy">energy</sigil>
    <sigil id="17" name="Magic">destroy</sigil>
    <sigil id="18" name="Destroy">destroy</sigil>
    <sigil id="19" name="Create">create</sigil>
    <sigil id="20" name="Knowledge">knowledge</sigil>
    <sigil id="21" name="Protection">protection</sigil>
    <sigil id="22" name="Remove">remove</sigil>
    <sigil id="23" name="Health">health</sigil>
    <sigil id="24" name="Life">life</sigil>
    <sigil id="25" name="Space">death</sigil>
    </Sigil_list>
    </Magic>

     

    EDIT:

    xml was wrong, tnx Korrode :whistle:

     

    EDIT2:

    lol, tnx Korrode and bkc56, there was a wrong radiation spell


  15. One question (if I didn't miss it) will a mouse-over a spell icon pop-up the name of the spell? Not everyone has the icons memorized.

     

    But otherwise, it looks really good.

     

    Yes, sure. In the normal spell window you get the name of the spell in orange, the reason of uncastability in red and the description in white, printed in the bottom line. In the mini spell window you just get the name in white. The name turns to green when the spell is selected.

     

    Patch will be posted later today, doing some more tests.

×