May 18, 2024, 05:31:57 PM

Username
Password

  Show Posts
Pages: 1 ... 3 4 [5] 6
61  Modifications / Tools / Re: Mixed Magic 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"

62  Modifications / 2D Sprites / Re: Adding more Sprites to Dark Omen 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.
 
63  Warhammer Dark Omen / Singleplayer / cheats on: January 15, 2014, 04:57:34 AM
I assume this is the most complete list of cheats?
http://sturmlord.tripod.com/easter.htm

---

does anyone know what the *undocumented* cheats do?

BENNYHILL - really fast game speed
DONTMESSWITHME - ??
LOOKLIVELY - ??
OVERBYCHRISTMAS - ??
SQUAREWINDOW - ??
SMEGHEAD - ??
BLACKMARKET - ??
64  Modifications / 2D Sprites / Re: Adding more Sprites to Dark Omen 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
65  Modifications / 2D Sprites / Re: Adding more Sprites to Dark Omen 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 )

66  Modifications / Campaigns / Re: Cut-Scene Modding on: December 08, 2013, 03:27:59 AM
 Wink
https://github.com/Ghabry/Dark-Omen-Mod-Selector/pull/1

Script Compiler
Completely untested beyond the first mission.

I couldn't build the mod-selector with my C++ compiler,
so I'll leave it to Ghabry to hook it into that.
Code:
ImportScript( "whmtg.txt" );

also updated:
http://bitpatch.com/downloads/default_WHMGT.7z
with a new script and my quickly-made default script disassembler.

I'm sure some people are less than amused by the way I write C++...
but oh well. Cool


edit:
If it is to be used "on-the-fly" then something needs to be changed about the VirtualProtect call in ImportScript()
where it installs its hooks
67  Modifications / Campaigns / Re: Cut-Scene Modding on: December 03, 2013, 12:56:13 AM
I think we lost track of what each other are talking about...

I assume...
two sub-scripts can save the game one is 0x4C3C50 and the other is 0x4C3CF0
in a sav file the program counter will always point to after the call of WH_SaveGame in one of those two functions
when the script resumes at the program counter it will run until it hits the RETURN statement
in which case it pops the return address from the stack and continues from there.
just like a real function call

anyways,
here is a "compilable" dump of the default script
http://bitpatch.com/downloads/default_WHMGT.7z
now all we need is a compiler :p


edit: already found a bug: Voice has two args
though it seems the second one is ignored.
68  Modifications / Campaigns / Re: Cut-Scene Modding on: December 02, 2013, 08:35:07 AM
I checked, 004C3D90 is start script in the German version.

The save script is a sub-function so the relative return address [program counter]  ( marking where we really are in the campaign ) is on the stack. The stack IS restored from the save file. The script entry points are hardcoded in the executable and need to be hooked.

 Tongue
69  Modifications / Campaigns / Re: Cut-Scene Modding on: December 01, 2013, 06:48:57 PM
I saw that wiki page, I posted this here to show the arg count and arg types for the functions

the LV is "the" location that WH_IF, WH_UNTIL, and WH_ReadVariable, access... (as you know) ... state machine... Local Value maybe?

thanks for the info about the save file.
0xBC + 0x00 is the program counter
0xBC + 0x08 is the start script
0xBC + 0x0C is the end script

however the start script and end script are ignored. ( hex-edited them to 0xFFFFFFF )
so the exe must use its own values ( or possibly difference the two then align 4 and adjust :p )

004C3C48 + 3A * 4 = 004C3D30 ( aka right after the WH_SaveGame ln the english version )

004C3D90 is the script start in the german version?

70  Modifications / Campaigns / Re: Cut-Scene Modding on: December 01, 2013, 08:51:54 AM
Looks pretty much all figured out.

I doubt that the save file would have an absolute address store in it.
my guess is that "current position" in the script would be relative to "script start"
so I think it will not be necessary to load at the same memory address every time.

since pastebin has apparently banned my IP address from posting...
here is what things look like to me at this point in time.

//xrefs
004C3C48 // start of script ( 4C3C20 thru 4C3C244 == dead code? )
004CCD28 // end of script
004C3D48 // tutorial
004C3D68 // new campaign
004C3DA8 // Start game at chapter 2
004C3E40 // Start game at chapter 3
004C3F28 // Start game at chapter 4
004C4060 // Start game at chapter 5


//VA func, name, argc, args w/fixups
/////////////////////////////////////////////////////////////////////////
0x0041DB60, "WH_GOTO", 1, { 1 } // label
0x0041DB80, "WH_IF", 2, { }
0x0041DC30, "WH_ENDIF", 0, { }
0x0041DC60, "WH_ELSE", 0, { }
0x0041DC80, "WH_GOSUB", 1, { 1 } // label
0x0041DCD0, "WH_RETURN", 0, { }
0x0041DDF0, "WH_PUSHLV", 0, { }
0x0041DE10, "WH_POPLV", 0, { }
0x0041DD00, "WH_REPEAT", 0, { }
0x0041DD20, "WH_UNTIL", 2, { }
0x0041DED0, "WH_END", 0, { }
0x0041C920, "WH_PlayMovie", 1, { 1 } // ".tgq"
0x0041C970, "WH_MeetingPoint", 2, { 1, 2 } // ".bmp", label
0x0041CA00, "WH_TravelMap", 10, { 1, 2, 3 } // ".bmp", ".spr", ".dot"
0x0041CB10, "WH_Deploy", 0, { }
0x0041CB20, "WH_Battle", 2, { 1 } // "B1_01"
0x0041CDC0, "WH_GetUnitStatus", 1, { }
0x0041CE20, "WH_GetUnitHireStatus", 1, { }
0x0041CE80, "WH_AddUnit", 1, { }
0x0041CED0, "WH_RemoveUnit", 1, { }
0x0041DEE0, "WH_SetVariable", 2, { 1 } // var
0x0041DF00, "WH_ReadVariable", 1, { 1 } // var
0x0041D620, "WH_AddCash", 1, { }
0x0041D970, "WH_GameOver", 0, { }
0x0041DF20, "WH_ClearVariables", 2, { 1 } // var
0x0041CFB0, "WH_ForceUnit", 1, { }
0x0041CFF0, "WH_UnForceUnit", 1, { }
0x0041D040, "WH_ExcludeUnit", 1, { }
0x0041D080, "WH_IncludeUnit", 1, { }
0x0041D0D0, "WH_TemporyUnitSet", 1, { }
0x0041D120, "WH_TemporyUnitClear", 1, { }
0x0041D170, "WH_UnitIsGoingSet", 1, { }
0x0041D1C0, "WH_UnitIsGoingClear", 1, { }
0x0041CAB0, "WH_Book", 0, { }
0x0041C9D0, "WH_MeetingWait", 0, { }
0x0041CB40, "WH_InitDebrief", 2, { }
0x0041CB70, "WH_Debrief", 0, { }
0x0041CAE0, "WH_SaveGame", 0, { }
0x0041CC00, "WH_Delay", 1, { }
0x0041CCE0, "WH_Pause", 1, { }
0x0041CBE0, "WH_SetDeafultSaveName", 1, { 1 } // "text"
0x0041D640, "WH_AddMagic", 1, { }
0x0041D870, "WHMTG_DisplayBitmap", 3, { 1 } // ".bmp"
0x0041D8A0, "WHMTG_RemoveBitmap", 0, { }
0x0041D210, "WH_CheckObjective", 1, { }
0x0041D550, "WHMTG_Voice", 2, { 1 } // "VC001"
0x0041D8B0, "WHMTG_SpotAnim", 4, { }
0x0041D950, "WHMTG_ChooseInit", 0, { }
0x0041D740, "WHMTG_PlaySFX", 6, { 1, 2, 5 } // "stay", "continue", "H_KZ001"
0x0041D720, "WHMTG_StopSFX", 1, { }
0x0041D980, "WHMTG_StopAllSFX", 2, { }
0x0041D9A0, "WHMTG_PlayMusic", 1, { }
0x0041D9C0, "WHMTG_SetMusic", 1, { 1 } // ".fsm"
0x0041D9E0, "WHMTG_SetBackground", 0, { }
0x0041D2A0, "WHMTG_Speak", * // var arg???
0x0041D360, "WHMTG_SpeakNoWait", 1, { }
0x0041D420, "WHMTG_Narrate", 5, { 3 } // ".mad"
0x0041D410, "WHMTG_Wait", 1, { }


// not used ( guessed at args # )
0x0041DE30, "WH_DO", 1, { unknown }
0x0041DE20, "WH_SETLV", 1, { unknown }
0x0041DE60, "WH_LOOP", 0, {}
0x0041DEC0, "WH_BREAK", 0, {}
0x0041C910, "WH_Test", 1, { unknown }
0x0041D9B0, "WHMTG_StopMusic", 0, {}
0x0041D280, "WHMTG_AddBitmap", 1, { unknown }
0x0041D250, "WH_SetObjective", 2, { unknown }
0x0041D690, "WH_RemoveMagic", 1, { unknown }
0x0041CDA0, "WH_ShowMouse", 1, { unknown }
0x0041CD90, "WH_HideMouse", 0, {}
0x0041CBA0, "WH_Picture", 1, { unknown }


// not implemented
0x0041DA00, "WH_Narration"
0x0041DA10, "WH_WriteTextToFile"
0x0041DA20, "WH_SetUnitVar"
0x0041DA30, "WH_ReadUnitVar"
0x0041DA40, "WH_DisableAutosave"
0x0041DA50, "WHMTG_StartAnimAsync"
0x0041DA60, "WHMTG_StopAnim"
0x0041DA70, "WHMTG_PlayAnim"
0x0041DA80, "WHMTG_LoadHeads"
0x0041DA90, "WHMTG_ShowHead"
0x0041DAA0, "WHMTG_AddOption"
0x0041DAB0, "WHMTG_ChooseOption"
0x0041DAC0, "WHMTG_HideHead"
0x0041D9F0, "WHMTG_PlaySample"
0x0041DAD0, "WHMTG_PlaySampleNoWait"
0x0041DAE0, "WHMTG_LoadDots"
0x0041DB10, "WHMTG_PlayDots"
0x0041DB20, "WHMTG_WaitForDots"
0x0041DB30, "WHMTG_FinishDots"
0x0041DB40, "WHMTG_ContinuePrompt"
0x0041DAF0, "WHMTG_SetResult"
0x0041DB00, "WHMTG_RemoveBitmap"
0x0041DB50, "WHMTG_ResetDotList"

/////

int WHMTG_Narrate(         
   DWORD head_id
   DWORD head_animiation_id
   CHAR* psz_mad_name
   DWORD unused // always 0 in script and ignored in func
   DWORD keep_highlight
);


71  Warhammer Dark Omen Community / News / Re: Wiki Password on: November 29, 2013, 06:08:11 PM
I'd like to edit the wiki Cool
pm me the pw
72  Warhammer Dark Omen / Help Section / Re: How to save the Undead Chariot for multiplayer! on: November 29, 2013, 08:45:21 AM
SOTHR's BANCART is a wagon wheel on minilia background.
73  Modifications / Campaigns / Cut-Scene Modding on: November 29, 2013, 08:41:02 AM
What is the current state of cut-scene modding?

Is the wiki up to date?
http://wiki.dark-omen.org/do/DO/WHMTG

Has anyone given thought to externalizing the .MTG file?
74  Modifications / 3D Scenery Models / Re: Dark Omen Extreme Camera Zoom Out on: November 25, 2013, 08:37:02 PM
this thread is a little off topic now but...

here is a patch to get the multiplier behavior of the [tab/space] battlemap in single player
at file offset 0x00023720 in the english version of the executable
write E9 00 01 00 00 90
75  Modifications / 3D Scenery Models / Re: Dark Omen Extreme Camera Zoom Out on: November 25, 2013, 08:12:08 AM
 http://wiki.multimedia.cx/index.php?title=RNC_ProPack

It is possible to extract the bmps using hex-editor + propack + dosbox
oddly, two zero bytes have to added (or removed) at the end of the RNC header for the game to be compatible with ProPack
With ProPack a decompress then re-compress creates an identical file ( with the 2 bytes inserted/deleted from the header )

however, if I modify a bmp and add it back to the MAPS.PBD file ... the game crashes.

so I assume the RNC compression isn't really the current hold-up...
something in the PBD header info needs to be fixup? ( other than the [compressed data + header] size var in the table at 0x800 )
 
Pages: 1 ... 3 4 [5] 6