daemon_n 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 4366 
	
		
	 | 
	
		
 | 
	| 16.01.2021 23:36 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
 | 
	| 16.01.2021 23:55 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
			
			 
			
				Berserker, a very weird problem here. 
 
A player reported that the bin patch "quick battle no retreat question" didn't work. I checked and confirm his report.
 
bin
 
Code: 
 01 00 00 00 D0 78 47 00 03 00 00 00 EB 26 90
  
My erm:
 
Result:
  
This looks super weird.    Why is the value changed immediately after setting up? Something hooked?
			  
			
			
  
Latest ERA mods and scripts in development -  My GitHub
			
		 |  
	 
 | 
	| 18.01.2021 08:28 | 
	
		
	 | 
	
		
		Berserker 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 16789 
	
		
	 | 
	
		
 | 
	| 18.01.2021 14:20 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
 | 
	| 18.01.2021 16:59 | 
	
		
	 | 
	
		
		Berserker 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 16789 
	
		
	 | 
	
		
 | 
	| 18.01.2021 18:42 | 
	
		
	 | 
	
		
		Archer30 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 1192 
	
		
	 | 
	
		
			
			 
			
				My apologies  Berserker, now I understand why the patch disabling retreat msg didn't work. It's only becoz when I renamed it, I also removed its "bin" extension by accident.   
The patch works perfectly well so there is no need to update it.
 
Nice list of pre-defined functions!   
			 
			
			
  
Latest ERA mods and scripts in development -  My GitHub
			
		 |  
	 
 | 
	| 18.01.2021 23:00 | 
	
		
	 | 
	
		
		feanor 
 
 
		
		
		
			
			
			 
			
Posts: 624 
	
		
	 | 
	
		
			
			 
			
				 (09.01.2021 00:27)feanor Wrote:  формат шрифта потом найду и выложу, но там версии если только самому прикручивать, кажется. 
Короче, так 
- 5 байт заголовок, {31, 255, 8, 0, 0} 
- 1 байт высоты глифов 
- 26 нулевых байт 
- 256 раз по три дворда: отступ от символа слева, ширина, отступ от символа справа. Отступы могут быть отрицательными 
- 256 двордов, которые показывают смещение данных о глифе 
- 256 битмапов на каждый глиф, ширина*высота байт
 
Code: 
 using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
 
namespace H3Fnt 
{ 
    struct H3Char 
    { 
        public int left; 
        public int width; 
        public int right; 
        public int offset; 
        public byte[] bytestring; 
 
        public int height; 
    } 
}
  
[/code] 
Code: 
 using System; 
using System.Collections.Generic; 
using System.IO; 
using System.Linq; 
using System.Text; 
 
namespace H3Fnt 
{ 
    internal class H3Font 
    { 
        byte[] tmp_header; 
        public byte height; 
        byte[] tmp_fill; 
        public H3Char[] charset; 
 
        public H3Font() 
        { 
            tmp_header = new byte[]{31,255,8,0,0}; 
            height = 0; 
            tmp_fill = new byte[26]; 
            charset = new H3Char[256]; 
        } 
 
        public void Load(string path) 
        { 
            using (BinaryReader br = new BinaryReader(File.Open(path, FileMode.Open))) 
            { 
                this.tmp_header = br.ReadBytes(5); 
                this.height = br.ReadByte(); 
                this.tmp_fill = br.ReadBytes(26); 
 
                for (int i = 0; i != 256; i++) 
                { 
                    this.charset[i].left = br.ReadInt32(); 
                    this.charset[i].width = br.ReadInt32(); 
                    this.charset[i].right = br.ReadInt32(); 
 
                    this.charset[i].height = this.height; 
                } 
                for (int i = 0; i != 256; i++) 
                { 
                    this.charset[i].offset = br.ReadInt32(); 
                } 
 
                /*for (int i = 0; i != 255; i++) 
                { 
                    fnt[i].bytestring = br.ReadBytes(fnt[i+1].offset - fnt[i].offset); 
                } 
                fnt[255].bytestring = br.ReadBytes(fnt[255].width * heigth);*/ 
 
                for (int i = 0; i != 256; i++) 
                { 
                    this.charset[i].bytestring = br.ReadBytes(this.charset[i].width * this.height); 
                } 
            } 
        } 
 
 
        public void Save(string path) 
        { 
            using (BinaryWriter br = new BinaryWriter(File.Open(path, FileMode.Create))) 
            { 
                br.Write(tmp_header); 
                br.Write(height); 
                br.Write(tmp_fill); 
 
                for (int i = 0; i != 256; i++) 
                { 
                    br.Write(this.charset[i].left); 
                    br.Write(this.charset[i].width); 
                    br.Write(this.charset[i].right); 
                } 
 
                for (int i = 0, offset = 0; i != 256; i++) 
                { 
                    br.Write(offset); 
                    offset += this.charset[i].width * this.height; 
                } 
 
                for (int i = 0; i != 256; i++) 
                { 
                    br.Write(this.charset[i].bytestring); 
                } 
            } 
        } 
    } 
}
  
			 
			
			
			
		 |  
	 
 | 
	| 20.01.2021 22:09 | 
	
		
	 | 
	
		
		daemon_n 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 4366 
	
		
	 | 
	
		
 | 
	| 21.01.2021 19:12 | 
	
		
	 | 
	
		
		daemon_n 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 4366 
	
		
	 | 
	
		
			
			 
			
				[quote='Berserker' pid='121229' dateline='1610979222'] 
 
А в новой версии не будет обновления экрана каждую секунду, если подсказка не отличается? А то в текущем варианте наблюдается мерцание подсказки на движение мыши по тому же объекту, если сделать просто
 
Ну и выполнение какой либо функции на MM выдаёт в строку цифры. То 10, то 1000, то 20.
 UPD: Если под курсор попадает герой, который находится в центре экрана (активный - после ЛКМ на нём в панели героев или на карте), то "тип объекта" возвращается "0", а не "34";
 
			 
			
			
  
  
 
Новейший Heroes Launcher
			
		 |  
	 
 | 
	| 21.01.2021 21:49 | 
	
		
	 | 
	
		
		Berserker 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 16789 
	
		
	 | 
	
		
 | 
	| 22.01.2021 20:58 | 
	
		
	 | 
	
		
		daemon_n 
 
 
		
		
		
			
			
 
 
			
 
 
			
Posts: 4366 
	
		
	 | 
	
		
			
			 
			
				Berserker, мерцания запишу на видео чуть позднее, а пока с объектами разбираюсь. 
Поскольку беру в привычку писать н а ERM 2.0, то вот вопрос: как в игре выражается (NO_OBJ)? Пустая карта приключения начинается с 0, если там, скажем, нет объекта. 
А то записываю (NO_OBJ), думая, что он равен 0, а код не работает) Хорошо хоть, что догадался проверить EEF consts. , а то уже писал бы в спортлото  
			 
			
			
  
  
 
Новейший Heroes Launcher
			
		 |  
	 
 | 
	| 23.01.2021 00:58 | 
	
		
	 |