January 16, 2018, 10:19:42 PM

Username
Password

Pages: 1 2 3 [4]   Go Down
Print
Author Topic: Back to the Roots (BTTR)  (Read 16440 times)
0 Members and 1 Guest are viewing this topic.
cuthalion
Campaign Creator
*
Offline Offline

Posts: 370


View Profile
« Reply #45 on: June 01, 2015, 09:58:01 AM »

the table of magic items/spells is at file offset 0x000E2A18 in the english executable
each entry is 40 bytes in length
see http://wiki.dark-omen.org/do/DO/Magic_Items for id's

DWORD id; // 0x00
BYTE unknown[8]
DWORD cost_mana; // 0x0C
BYTE unknown[12]
DWORD max_range; // 0x1C
BYTE unknown[8]



I have the following problem in a singleplayer campaign: To make enemy mages more dangerous I give them wands of jet. But after I collect more than 1 such wand, my wizard is able to carry several and this reduces costs of most powerful spells to 1 for him.
I tried to solve this by using WHMTG function 'removemagic' but using it crashes the game. so far I have not figured out what I do wrong.
This Aqrit's find was another possible solution to my problem: I wanted to reduce all spellcosts in game the way Wand of Jet does it: 3->2, 2->1, 1->1 and remove all wands of jet from the game alltogether. This would make my wizard slightly stronger in the early missions - till he finds the wand in a natural way. But this would solve my main problem.

However this other way did not work either Sad. The problem is: When my wizard is high in level, he has to have a 3-mana spell in his book or the game crashes. Sad If I set only 1 spell that costs 3, he will always have that spell. And besides, the spell becomes too expensive as there are no wands of jet. I am not yet sure what to do.
Logged
aqrit
Developer
*
Offline Offline

Posts: 71



View Profile WWW
« Reply #46 on: June 01, 2015, 05:36:05 PM »

The argument type for the RemoveMagic WHMTG function is listed "unknown". (here)
To get it to work, one would need change the argument type to "integer" then recompile.

the whmtg compiler code is merged with the mod selector code in a way that doesn't want to compile with vs2008, which is why I don't have time right now to make the change and re-upload it for you.

I've started a rewrite of the whmtg compiler a half-dozen times and never finished it.
Logged
cuthalion
Campaign Creator
*
Offline Offline

Posts: 370


View Profile
« Reply #47 on: June 02, 2015, 12:09:16 PM »

I wonder if Ghabry can do it instead of you Smiley
Logged
cuthalion
Campaign Creator
*
Offline Offline

Posts: 370


View Profile
« Reply #48 on: July 26, 2015, 08:11:15 PM »

Just a note to myself:

in my EngRel offest of first magic item - Grudgebringer sword - is 0x0E2FB8
Logged
cuthalion
Campaign Creator
*
Offline Offline

Posts: 370


View Profile
« Reply #49 on: July 26, 2015, 08:40:19 PM »

Items/Spells in EngRel:

5th byte - after Spell Id - seems to be responsible for item type and problably unit class that can wear it.

Spells have 5th byte = 01
Spellbooks have = 10 (hex)
Grudge Sword = 02 - as do other swords' 5th byte.
Staff of Osiris has A0. When I changed A0 to 02, My Cavalry was able to pick it up and blast with it. At the same time units who already had sword, could not pick up this staff.

6th byte - seems to be responsible for race - and probably class too - that can wear artifact. Most of items have this byte =0 but for example Runefang and Mork's Warbanner have certain values in it.

20th byte - (offset 0x14) - is related to spell icon. All artifacts seem to have 01. Fireball has 02, Brain Bursta has 04. If I set 04 for Grudgebringer Sword AND give Waagh Book to any regiment, Grudgebringer Sword is displayed as Brain Bursta but shoots fireballs none the less.

Also, unfortunately there does not seem to be spell firepower anywhere in these bytes.
Brain Bursta and Fireball have identical data (apart from a few ids that I have already mentioned). However Brain Bursta never kills more than 1 enemy while Fireball may kill up to 6 - maybe even more if lucky.
« Last Edit: July 26, 2015, 09:55:02 PM by cuthalion » Logged
Pages: 1 2 3 [4]   Go Up
Print
Jump to: