Здравствуйте, гость ( Вход | Регистрация )
09 May 2008, 13:59
Сообщение
#1
|
|
|
Мимо проходил Сообщений: 1 616 Спасибо сказали: 17 раз |
Кто нибудь встречал моды для двойки? Какие возможности для моддинга предлагает нам эта платформа? Давайте ка дружненько попробуем провести вскрытие двоечки
А заодно и заменить какие нибудь ресурсы -------------------- Ты хочешь знать,что гений-это я?!
|
|
|
|
![]() |
10 Dec 2009, 14:25
Сообщение
#2
|
|
![]() laughed as one fey Сообщений: 12 167 Спасибо сказали: 20605 раз |
Цитата I took a look at heroes2w.exe in a hex editor yesterday. I don't have the exact addresses with me right now, but about 3/4 of the way through the file there's something that looks like a creature data table. Look for "psnt", "arch", "pike", etc. in the code each separated by 26 bytes. I saw some hex values that correspond to attack and defense in there. I saw 0101 a few bytes before "psnt" and 0503 a few bytes before "arch". I really think that's what we're looking for. It'll take a bunch of analysis to figure out exactly how that structure is laid out. Hopefully that'll get someone (or me if no one jumps on it) started. Цитата Ok here's what I have so far. I have version 2.1 of the Price of Loyalty expansion. The creature data table starts at address 0xF03F8. Each creature contains 26 bytes, laid out as follows: Code: bytes description ----- ----------- 0-1 cost in gold 2-6 ??? 7 base growth per week 8-9 hit points 10 alignment[1] 11 speed 12 attack 13 defense 14 min damage 15 max damage 16 shots 17-21 4-character ID string, plus null char 22 attack-type flags[2] 23 other flags[3] 24-25 padding (all bits zero) 1. Alignment is a value between 0 and 6. 0 = Knight, 1 = Barbarian, 2 = Sorceress, 3 = Warlock, 4 = Wizard, 5 = Necromancer, 6 = Neutral. 2. The attack-type flags are ORed together. The default is 0, meaning a single hex melee creature, 1 = the creature takes up two hexes, 2 = flying, 4 = ranged, 8 = two-hex attack (e.g., Dragons). I expected to see more detail here but there isn't. Liches have a 4 and Hydras have a 1. 3. The only nonzero value I've seen here is 4, and that corresponds to undead. I haven't yet been able to find any pattern to bytes 2-6 of the structure. There may be a pointer in there to unique functionality for each creature, in which case modding that will probably be impossible. The other thing missing here is the extra resource cost for certain creatures. That might be hardcoded into the game logic somewhere, and thus would likely be unmoddable. Anyway, that should be more than enough to get some aspiring modders started. I'll post again if I find anything else useful. Цитата Bytes 2 to 6 indeed offer the computer a hint about the strength of the unit. It will attack or avoid a fight based on this stuff. Another user pointed to the Fight Value, this might be the name for it. We have two values here: - four bytes (2 to 5) surprisingly store the strength of the unit (fight value), it's suprising because we have four bytes so the strength can go up to 2 billion or something (whatever max long int is). I put a 01 in the 5th bit of a peasant and with an army of a single peasant all monsters either fled or offered to join my army; - byte 6 seems to be related to strength too but it's more chaotic and still remains a mistery to me. it seems to go up with creature level but not in the same degree as the Fight Value, also i thought it was a unique code for each unit, but more units happen to have the same value, so it's a mistery for now; Byte 22 the Attack-type flags as Kristo pointed is byte-coded: - 1: 2hex - 2: fly - 4: ranged - 8: 2hex attack but it seems to hold more than this info because if we go up we find - 16: a bizzare mode when the creature does not take part in battle and vanishes after it, it's not found in the normal state but maybe it's the effect of a spell - 32 to 128: no visible things here Byte 23 Other Flags, has other uses than the obvious 4 (undead): - 1: mirror imaged creature (transparent, 1 HP, same damage) - 2: red creature (maybe bloodlust? but does not carry the effect of the spell as it has normal attack) - 4: undead - 8 and 16: apparently nothing, could be spells that affect the creature but are not graphical - 32: brown (ressurected? but does not dissapear after battle) - 64: gray (stoned but can move) - 128: apparently nothing Using value 68, i made a "Ghost Peasant" which looked gray and carried the undead flag Also, if you look a bit further there are some bits about spells! Spells occupy 22 bytes but i haven't figured out much. This is how they go: 0-7 Name 8 Zero 9 Level 10 ? 11 ? 12,13 This gives a round value together so i guess it's a 2-byte int, it is not however the damage of the spell (which i couldn't find in those bytes) but maybe a valuation of the power of the spell 14 Mana 15,16,17,18,19 usually 0A but 00 in case of summon elemental and the death spells 20 ? 21 ? http://www.celestialheavens.com/forums/viewtopic.php?t=5659 |
|
|
|
Necronix Моддинг 09 May 2008, 13:59
Necronix Ресурсы двоечки по видимому в основном хранятся в ... 10 May 2008, 13:25
Docent Picolan я когда-то потрошил.. хранится там всё в основном ... 10 May 2008, 16:06
XEL У нас с Некрониксом такая идея есть. Сделать во вт... 11 May 2008, 20:52
Docent Picolan Цитата(XEL @ 11 May 2008, 21:52)У нас с Некро... 11 May 2008, 22:50
fireman Если б в герои2 забросить новых городов и монстров... 11 May 2008, 21:42
Necronix Ну если вместо старых,то мона попробувать 11 May 2008, 22:17
Necronix Почему? Если тупо заменить ресурсы скажем варлока ... 12 May 2008, 13:44
XEL Концепт города Инферно.
Стиль города: похоже на Ин... 12 May 2008, 21:21
Necronix Делали с Кселем вместе конструктивная критика прив... 12 May 2008, 21:27
Damacon Город может и можно добавить(нам неизвестно), а за... 12 May 2008, 21:30
Shaidar Haran А апгрейдов не многовато сделали? В классических Г... 13 May 2008, 08:17
Necronix Можно у первого лвла снять. 13 May 2008, 10:21
Docent Picolan да. апгрейдов явно слишком много. 13 May 2008, 12:20
Shaidar Haran Хотя нет, у Рыцаря кажется тоже пять апгрейдов) Та... 13 May 2008, 12:56
Necronix В принципе абсолютно не принципиальные грейд у 1го... 13 May 2008, 12:58
Mugais Я всецело поддерживаю Ксела и Некроникса и желаю и... 15 May 2008, 14:31
hippocamus 3-й грейд Дьяволов имхо лишнее. А так - ок! 19 May 2008, 11:31
Necronix Не вот это принципиально
Дьяволы же по идее аццкие... 19 May 2008, 17:54
fireman Я з, только я незнал что герои 2 можно ,я видел ка... 20 May 2008, 17:04
fireman Вы нашли чем распотрошить?Или вы забросили идею? 20 Jun 2008, 13:13
sergroj Потрошилки ресурсов есть. Для AGG есть распаковщик... 21 Jun 2008, 13:22
Baklajan Цитата(XEL @ 11 May 2008, 20:52)У нас с Некро... 21 Jun 2008, 13:56
XEL В HotA будет вестленд (вторая почва для Башни). Но... 21 Jun 2008, 15:24
Baklajan Эм? Я как раз вчера потихоньку начинал рисовать эк... 21 Jun 2008, 16:36
XEL Цитата(bak @ 21 Jun 2008, 16:36)Эм? Я как раз... 21 Jun 2008, 17:12
Docent Picolan Цитата(sergroj @ 21 Jun 2008, 14:22)P.S. Как ... 21 Jun 2008, 16:43
Baklajan Я всего лишь пытаюсь сделать в фотошопе многослойн... 21 Jun 2008, 17:22
CrackedMind http://sf.net/projects/fheroes2 Опен Сорс реализац... 25 Jun 2008, 17:40
fireman А что они изменили? 10 Jul 2008, 13:20
Spartak fireman
http://sourceforge.net/project/screenshots... 10 Jul 2008, 14:11
fireman Понятно,я просто давно качал старую версию,а щас д... 10 Jul 2008, 16:46
nLc Хлопцы а есть мысля где и как поменять чего в них ... 28 Jul 2008, 22:56
Александр Чумак Ну наконец, наконец у мя нормальный инет!... 18 Nov 2008, 11:03
XEL Если сеттинг тот же, что и в Героях 2, то еще музы... 18 Nov 2008, 11:23
Александр Чумак Спасибо XEL, из might and magic с их 9 версиями и ... 18 Nov 2008, 17:12
Александр Чумак всё!проэкт закрыт! , я не нашёл поддержки... 11 May 2009, 11:32
Master Of Puppets Три поста - а какая трагедия... 11 May 2009, 17:45
DRONыч Во вторых героях надо как-то улучшить рыцарей, они... 23 Jul 2009, 10:35
Adept Цитата(XEL @ 13 May 2008, 00:21)Концепт город... 02 Oct 2009, 08:45
feanor Забавно, но в экзешнике двойки куча отладочной инф... 25 Nov 2010, 01:18
feanor Примерно вот так:
004AF490: 3Bh - байт, отвечающий... 25 Nov 2010, 20:46
tolich Когда исходники выложишь? 25 Nov 2010, 20:49
feanor Hex-Rays же и "Produce C file". Впрочем,... 25 Nov 2010, 20:53
tolich There were 5 decompilation failure(s) on 1639 func... 25 Nov 2010, 21:01
feanor Для ковыряния - нормально. Скомпилить все равно не... 25 Nov 2010, 21:05
tolich Есть Resource Hacker, есть MSVC 6.0.
Кстати, прос... 25 Nov 2010, 21:30
feanor Йа просто оставлю это здесь.
Патчик для подключени... 26 Nov 2010, 00:43![]() ![]() |
| Текстовая версия | Сейчас: 19 December 2025 - 12:58 |
|
Copyright by Алексей Крючков
Programming by Degtyarev Dmitry |
|