November 07, 2024, 06:47:32 AM

Username
Password

Pages: [1]   Go Down
Print
Author Topic: Mixed Magic  (Read 5576 times)
0 Members and 1 Guest are viewing this topic.
olly
Global Spokesperson
*
Offline Offline

Posts: 2296



View Profile
« on: January 18, 2014, 12:03:52 AM »

Darkmancer successfully added mixed magic in his Black Prophecy mod by auto deploying a unit from each race, when loading a battle but then auto killing the sprite, which initialised the humans/green-skins/undead magic books and allowed his normal armies to then have any spell from any race, without crashing.

If you have any free time available, could you investigate if it's possible to turn on the magic books automatically by detecting a possible address location, please Aqrit. No rush but would be cool to have one day.

Thanks

Black Prophecy Mod ->
http://forum.dark-omen.org/black-prophecy-dark-omen-mod/bp-571-new-release-stats-t1054.0.html

Smiley
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
aqrit
Developer
*
Offline Offline

Posts: 85



View Profile WWW
« Reply #1 on: January 21, 2014, 04:28:18 AM »

I don't know a good way of doing this, but this works...

Increment the ref_count of SPL* sprites in that table.
Increment the ref_count of the books in the table at VA: 0x004D1A40
Code:
struct // sizeof 0x34
{
    DWORD ref_count;
    char name[32?];
    unknown
}

 <0, 'MT_None', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>
 <0, 'Battle', 28h, 0, 0, 0, 0, 0, 0, 0, 28h, 2, 2, 1, 1, 1, 2, 3>
 <0, 'MT_ItemMagicMesh', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>
 <0, 'Bright', 14h, 0, 0, 0, 0, 0, 0, 0, 14h, 14h, 1, 1, 0, 0, 0, 0>
 <0, 'Ice', 10h, 0, 0, 0, 0, 0, 0, 0, 1, 4, 4, 4, 4, 0, 0, 0>
 <0, 'Green', 10h, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0>
 <0, 'Dark', 10h, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0>

previous discussion over here:
http://forum.dark-omen.org/singleplayer/changin-spells-in-spellbook-t759.0.html

the CTL op add_spell by itself does not load up necessary "stuff"

Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2296



View Profile
« Reply #2 on: January 21, 2014, 08:14:53 PM »

Many thanks again Aqrit, that's awesome!

Smiley
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
Rob
Developer
*
Offline Offline

Posts: 13


View Profile
« Reply #3 on: January 23, 2014, 06:43:44 PM »

If I remember rightly, one of the members of that structure controls the shape of the banner?  Obviously only for unit sprites.
Logged
aqrit
Developer
*
Offline Offline

Posts: 85



View Profile WWW
« Reply #4 on: January 24, 2014, 08:40:09 AM »

Smiley
http://forum.dark-omen.org/2d-sprites/adding-more-sprites-to-dark-omen-t1214.0.html;msg12435#msg12435

the field I was calling type_id controls that for banners
Thanks!

Logged
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #5 on: January 25, 2014, 02:27:57 PM »

Oh I found that banner shape field too, but didnt noticed that it is in that sprite table you referenced Smiley
Logged

Pages: [1]   Go Up
Print
Jump to: