Warhammer Dark Omen Forum

Modifications => Tools => Topic started by: olly on January 18, 2014, 12:03:52 AM



Title: Mixed Magic
Post by: olly 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 (http://forum.dark-omen.org/black-prophecy-dark-omen-mod/bp-571-new-release-stats-t1054.0.html)

:)


Title: Re: Mixed Magic
Post by: aqrit 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 (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"



Title: Re: Mixed Magic
Post by: olly on January 21, 2014, 08:14:53 PM
Many thanks again Aqrit, that's awesome!

:)


Title: Re: Mixed Magic
Post by: Rob 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.


Title: Re: Mixed Magic
Post by: aqrit on January 24, 2014, 08:40:09 AM
:)
http://forum.dark-omen.org/2d-sprites/adding-more-sprites-to-dark-omen-t1214.0.html;msg12435#msg12435 (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!



Title: Re: Mixed Magic
Post by: Ghabry 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 :)