March 28, 2024, 03:12:56 PM

Username
Password

Pages: [1] 2 3   Go Down
Print
Author Topic: Adding more Sprites to Dark Omen  (Read 61318 times)
0 Members and 1 Guest are viewing this topic.
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« on: December 28, 2013, 06:04:43 PM »

Just having a problem when trying to add new sprites to Dark Omen, as the "Spare" slots are only 80 frames and therefore unsuitable for Archers or Mages that require more frames. Most of the Shadow of the Horned Rat sprites are more than 80 frames and to avoid overwriting existing Archer sprites, I've been trying to add more Sprites to the Sprite Table listed in EngRel.exe but without much success -probably requires .DLL linking to a custom table.

http://wiki.dark-omen.org/do/DO/Sprites

http://wiki.dark-omen.org/do/Updated_Sprite_Format



So I copy and pasted the Sprite Slot for ELFARC in EngRel.exe and added to the bottom of the list and called it ELFARC2. Then copy and pasted the ELFARC.SPR to be a new ELFARC2.SPR in Sprites folder. Then using Wh32Edit and Hex Editor, assigned PLYR_ALL.ARM William Fletcher (Grudge XBow) to have sprite 153, since ELFARC2 is the last sprite in the table of position 153 or 99 Hex. The Game works but sadly doesn't display any sprite frames, so any further assistance would be greatly appreciated since there are loads of SOTHR sprites to add.

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 01, 2014, 08:16:51 AM »

here is a start...

The table of int16's starting at file offset 0x000E9C88 in the english version of RelEng.exe seems to control whether a "sprite slot" can be used for archers, etc.

For example:
Create a copy of "GRUXBW.SPR" and rename it to "ST_ZZNewPlyr3.SPR" in the sprite folder.
Using wh32edit_2.x set the grudgebringer xbow unit to use the ST_ZZNewPlyr3 sprite in the PLYR_ALL.ARM file.
Using a Hex-editor write the value "0x7E 0x00" at file offset 0x000E9CDA in RelEng.exe
Start a  (new?) single player game to test...
---

ST_ZZNewPlyr3 is slot 0x29 so ( 0x000E9C88 + ( 0x29 * 2 ) ) =  0x000E9CDA
Why "0x7E 0x00" ? because that was the value that slot 0x12 was using. ( GRUXBW.SPR )

Logged
mattressses
Giant Scorpion
*
Offline Offline

Posts: 7


View Profile
« Reply #2 on: January 01, 2014, 02:50:14 PM »

Amazing find, aqrit! The fixed sprite-types have been one of the most annoying limitations in modding DO, now I can give pistols to whoever I want!!

I've gotten the mounted wizard (slightly modified) from SOTHR working ingame as ST_ZZNewPlyr3 using the value used for the BRIGHT sprite (a800), haven't played around with it extensively but everything seems to work fine!

(bonus gyrocopter shot included)

To make it a little easier to figure out the values, I sorted them (in little-endian, so 7e00 becomes 007e) by the sprites associated with them, I might have made some mistakes, though:
Quote
0000 = VOIDTYPE/XST_ZNewMisc5/XST_ZNewMisc6/XST_LastSprite
000e = BtlSprit/flags
001c = missiles
002a = mi
0038 = SPL_ITEM
0046 = SPL_BRI
0054 = SPL_BRI
0062 = SPL_BRI
0070 = SPL_DARK
007e = GRUINF/GRUXBW/OUTINF/IMPGRT/ARTILL/NGOB/NGARCH/ORCBOY/BIGUNS/MUMMY/SKELWR/WIGHT/BANSWD
008c = GRAILK/KREALM/BERNHD/GRUCAV/CARLSS/OUTPIST
009a = CANNON/MORTAR
00a8 = BRIGHT
00b6 = ICEMAG
00c4 = NGSHAM
00d2 = ORCSHM
00e0 = NECRO
00ee = CARST
00fc = IMPHAL/GLADE
010a = DWARF/GHOUL
0118 = PEASMN/PEASBY/PEASWM
0126 = ZOMBIE
0134 = ELFARC/ARRERB
0142 = BOAR
0150 = CHARIOT/NAGASH
015e = SKELHS
016c = SPIDER/SCORPN
017a = TROLL/WRAITH
0188 = FLAGEL
0196 = OGRE/TREEMN
01a4 = STMTNK
01b2 = FANATIC
01c0 = RAGNAR
01ce = DREAD
01dc = SKELCV/UNKNIG
01ea = BOLT
01f8 = ROCKLB
0206 = SSKULL
0214 = DUMMY
0222 = IMPBOW/SKELBW/BANARC
0230 = VAMP
023e = Unused sprites (ST_*)


It's a bit weird that Ice Mage and Bright Wizard have different values, or that Wood Elf Archers and Arrer Boyz use the same value (or Troll/Wraith, or Halberdiers and Glade Guard).

Thanks again, aqrit! You've really breathed new life into DO modding with the discoveries you've made over the past year!
« Last Edit: January 01, 2014, 02:55:31 PM by mattressses » Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #3 on: January 01, 2014, 10:29:56 PM »

What a fantastic New Year this is going to be, Big thanks for the Sprite Fix Aqrit - saves me having to overwrite existing Dark Omen archers and mages, when adding new sprites like the Shadow of the Horned Rat like the Skaven Grey Seer Thanquol, instead of pasting over original Vampire. Many thanks to Mattressses for updated list, will look forward to your new campaigns!

 



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 #4 on: January 05, 2014, 02:14:49 AM »

I do not foresee any problems ripping out the sprite table to an external one created by a dll.

sprite table [ VA: 004CEB50 to 004D177C ] ( 257 entries )
Code:
struct sprite_slot
{
DWORD ref_count; // things using this sprite ( units, unit leaders, etc. )
char* name[32]; // GRUXBW, ST_ZZNewPlyr3, etc.
DWORD type_id; // ?? ( always 0x8 for units )
DWORD loaded_index; // index in loaded_sprite_array ( pointer stored at VA: 0x526D24 )
};

but it will take awhile to wade thru all the cross references
e.g.
sub_4184B0: get type_id
sub_4184D0: inc ref_count
sub_4184F0: dec ref_count
sub_418510: zero all ref_counts
sub_418540: get loaded_index
sub_42B510: count all used sprites, alloc, but then only load the type 0x08 sprites...
sub_42B600: zero all loaded_index and then free
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #5 on: January 05, 2014, 02:12:10 PM »

Sounds promising

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 #6 on: January 18, 2014, 10:57:22 AM »

This seems to work.
https://github.com/aqrit/Dark-Omen-Mod-Selector/commit/9682623806d2e7ad3999c6ae4fbd193bac092271

I'll change it to read-in the values from a text file sometime.
 
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #7 on: January 18, 2014, 05:50:06 PM »

awesome code and comments, thanks!

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)
Grend
2D Sprite Artist
*
Offline Offline

Posts: 257



View Profile
« Reply #8 on: February 05, 2014, 05:32:32 PM »

This along with the code that allows for mixed spells really adds a lot of possibility to modding Smiley
Do you know of a way to add new pages to the army book as well by any chance?
Logged

On vacation
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #9 on: March 10, 2014, 05:25:24 PM »

wow wow owowo!! nice team work, really.

i remember when making mods with more sprites and units, that yes, if you reallly wanted to add more races while keeping the original ones (hu, un, or) or even, keeping that ones, but making a 4th race by remplacing some "remplasable units" and making a new race, you were Fuc@€ing stoped by that sprites slots problem, the number of frames .. and the number of units slots available.

ANd.. while you could do the "mod selector" stuff. it was a mess.. grend works was good but  (it is a perfectionist thing maybe) i couldnt enjoy it: units iwth the same banner, and races with different banner colurs pallete (because it was used in other  races too) etc..

SO, fixing that would atract me a lot to keep making 3d modles and then 2D sprites, but mostly, 3D models.. i have being working a lot with Zbrush, if there is no problem  i wanna share some of the works in a post, i guess that in "2D Sprites" main topic. all of them are medieval/fantasy of course Smiley
Logged

ito maquiesves
aqrit
Developer
*
Offline Offline

Posts: 85



View Profile WWW
« Reply #10 on: March 13, 2014, 06:09:18 AM »

http://bitpatch.com/downloads/do_mod_helper.zip

More sprite/banner slots
More unit names
More army book entries
allow spellcasters to have spells from any school of magic
allows the player viewpoint to move out ten times further from the ground
repoints [armytmp] to a folder in the game directory
fixed heap corruption problem with games's realloc function
multi-player look of the [tab/space] battlemap in single-player

barely tested and only with single-player -> New Campaign

does not do "heads" or PT_sprites yet
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #11 on: March 13, 2014, 05:58:28 PM »

Totally awesome creation!

Our Eternal thanks to Aqrit. Allowing additional new sprites to Dark Omen is a dream come true, especially combined with your other height map tool, that now allows us to build additional new maps! (and the 3D fix and the Shadow Of The Horned Rat sprites and overhead map fix and...)

Updated Campaign Modding guide coming soon!


Smiley

« Last Edit: March 13, 2014, 10:59:13 PM by olly » 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)
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #12 on: March 17, 2014, 01:51:33 AM »

oh very well Aqrit, fantasticus!

as you say, it would be a "beta" right? the tool you made will be improved by time right? anyway, i will check it, i dont know how might it work.
Logged

ito maquiesves
olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #13 on: May 10, 2014, 07:48:39 PM »

Sorry for late reply (have been moving houses) but big thanks to Aqrit as this mod works really well in single player and multiplayer!

Add new sprites to Dark Omen without having to overwrite any orignals - Skaven Mod Example



Smiley

(it maybe me but I cant get custom banner in army book - will post xslots contents for more detail)

Modding Guide coming soon - add your own armies and new maps
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)
hari8
Big'un
*
Offline Offline

Posts: 229


View Profile
« Reply #14 on: May 12, 2014, 10:19:49 PM »

wooooooow very nice stuff coming, keep it up Smiley

Modding Guide coming soon - add your own armies and new maps

Maybe it'll be possible to make armies and campaigns just by drag&drop Smiley then we could have absolutely infinite fun with DO  Grin
Logged
Pages: [1] 2 3   Go Up
Print
Jump to: